@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,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as me, ref as
|
|
5
|
-
import
|
|
1
|
+
var Pt = Object.defineProperty;
|
|
2
|
+
var Lt = (e, a, t) => a in e ? Pt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
|
+
var oe = (e, a, t) => Lt(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
+
import { defineComponent as me, ref as N, inject as Q, computed as H, onMounted as Se, createVNode as E, watch as W, reactive as he, toRaw as xt, nextTick as qe, withDirectives as We, vModelCheckbox as it, onUnmounted as Ae, isVNode as Et, Fragment as Vt, resolveDirective as Mt, provide as ge, mergeProps as ot } from "vue";
|
|
5
|
+
import Dt from "../../designer/button-edit/index.esm.js";
|
|
6
6
|
import { useDesignerComponent as Nt } from "../designer-canvas/index.esm.js";
|
|
7
|
-
import { resolveAppearance as
|
|
8
|
-
import { InputBaseProperty as
|
|
9
|
-
import { FieldSelectorRepositoryToken as
|
|
10
|
-
import { FNotifyService as
|
|
11
|
-
import { F_MODAL_SERVICE_TOKEN as
|
|
12
|
-
import { FButtonEdit as
|
|
13
|
-
import { FLayout as
|
|
14
|
-
import { FDataGrid as
|
|
15
|
-
import {
|
|
16
|
-
import { resolveField as
|
|
17
|
-
import { useI18n as
|
|
18
|
-
import { FTreeGrid as
|
|
19
|
-
import { FComboList as
|
|
20
|
-
import
|
|
21
|
-
function
|
|
7
|
+
import { resolveAppearance as Ot, createPropsResolver as Bt } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
import { InputBaseProperty as At, ExpressionProperty as Ze } from "../property-panel/index.esm.js";
|
|
9
|
+
import { FieldSelectorRepositoryToken as Ve } from "../field-selector/index.esm.js";
|
|
10
|
+
import { FNotifyService as Rt, F_NOTIFY_SERVICE_TOKEN as Ge } from "../notify/index.esm.js";
|
|
11
|
+
import { F_MODAL_SERVICE_TOKEN as Ut } from "../modal/index.esm.js";
|
|
12
|
+
import { FButtonEdit as lt } from "../button-edit/index.esm.js";
|
|
13
|
+
import { FLayout as zt, FLayoutPane as et } from "../layout/index.esm.js";
|
|
14
|
+
import { FDataGrid as Re } from "../data-grid/index.esm.js";
|
|
15
|
+
import { flatten as _t, isNaN as $t, cloneDeep as Pe, throttle as jt, get as Ce, debounce as st, isEmpty as qt } from "lodash-es";
|
|
16
|
+
import { resolveField as Me, encrypt as Wt } from "../common/index.esm.js";
|
|
17
|
+
import { useI18n as Gt } from "vue-i18n";
|
|
18
|
+
import { FTreeGrid as He } from "../tree-grid/index.esm.js";
|
|
19
|
+
import { FComboList as rt } from "../combo-list/index.esm.js";
|
|
20
|
+
import Ht from "../popover/index.esm.js";
|
|
21
|
+
function tt(e) {
|
|
22
22
|
return typeof e == "string" && e.startsWith("{") && e.endsWith("}") ? (e = e.replace(/'/g, '"'), { mappingFields: JSON.parse(e) }) : { mappingFields: e };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
["appearance",
|
|
24
|
+
const Jt = /* @__PURE__ */ new Map([
|
|
25
|
+
["appearance", Ot],
|
|
26
26
|
["mappingFields", (e, a, t) => {
|
|
27
27
|
if (a)
|
|
28
|
-
return
|
|
28
|
+
return tt(a);
|
|
29
29
|
const { mappingFields: n } = t;
|
|
30
|
-
return
|
|
30
|
+
return tt(n);
|
|
31
31
|
}],
|
|
32
32
|
["uri", (e, a, t) => {
|
|
33
33
|
var n;
|
|
@@ -37,7 +37,7 @@ const Ht = /* @__PURE__ */ new Map([
|
|
|
37
37
|
var n;
|
|
38
38
|
return a ? { idField: a } : { idField: (n = t == null ? void 0 : t.dataSource) == null ? void 0 : n.idField };
|
|
39
39
|
}]
|
|
40
|
-
]),
|
|
40
|
+
]), Qt = "https://json-schema.org/draft/2020-12/schema", Xt = "https://farris-design.gitee.io/lookup.schema.json", Yt = "lookup", Kt = "A Farris Input Component", Zt = "object", en = {
|
|
41
41
|
id: {
|
|
42
42
|
description: "The unique identifier for a combo list",
|
|
43
43
|
type: "string"
|
|
@@ -302,43 +302,43 @@ const Ht = /* @__PURE__ */ new Map([
|
|
|
302
302
|
type: "string",
|
|
303
303
|
default: ""
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, tn = [
|
|
306
306
|
"type"
|
|
307
|
-
],
|
|
307
|
+
], nn = [
|
|
308
308
|
"appearance",
|
|
309
309
|
"binding",
|
|
310
310
|
"visible"
|
|
311
|
-
],
|
|
311
|
+
], an = {
|
|
312
312
|
dictPicking: "帮助前事件",
|
|
313
313
|
dictPicked: "帮助后事件",
|
|
314
314
|
beforeSelectData: "数据选择确认前事件",
|
|
315
315
|
beforeLoadData: "数据加载前事件",
|
|
316
316
|
clear: "清空事件"
|
|
317
|
-
},
|
|
318
|
-
$schema:
|
|
319
|
-
$id:
|
|
320
|
-
title:
|
|
321
|
-
description:
|
|
317
|
+
}, on = {
|
|
318
|
+
$schema: Qt,
|
|
319
|
+
$id: Xt,
|
|
320
|
+
title: Yt,
|
|
321
|
+
description: Kt,
|
|
322
322
|
type: Zt,
|
|
323
|
-
properties:
|
|
324
|
-
required:
|
|
325
|
-
ignore:
|
|
326
|
-
events:
|
|
323
|
+
properties: en,
|
|
324
|
+
required: tn,
|
|
325
|
+
ignore: nn,
|
|
326
|
+
events: an
|
|
327
327
|
};
|
|
328
|
-
function
|
|
328
|
+
function ln(e, a, t) {
|
|
329
329
|
return a;
|
|
330
330
|
}
|
|
331
|
-
var
|
|
332
|
-
const
|
|
331
|
+
var ut = /* @__PURE__ */ ((e) => (e.Both = "both", e.Up = "up", e.Down = "down", e.Disable = "disable", e))(ut || {});
|
|
332
|
+
const je = [
|
|
333
333
|
{ value: "both", text: "同步选择" },
|
|
334
334
|
{ value: "up", text: "包含上级" },
|
|
335
335
|
{ value: "down", text: "包含下级" },
|
|
336
336
|
{ value: "disable", text: "仅选择自身" }
|
|
337
|
-
],
|
|
338
|
-
var
|
|
339
|
-
const
|
|
337
|
+
], ct = "";
|
|
338
|
+
var ce = /* @__PURE__ */ ((e) => (e.List = "LIST", e.Tree = "TREELIST", e.ListList = "NAVLIST", e.TreeList = "NAVTREELIST", e.ListTree = "NAVLISTTREE", e))(ce || {}), be = /* @__PURE__ */ ((e) => (e.default = "default", e.all = "all", e.async = "async", e))(be || {});
|
|
339
|
+
const xe = "__lookup_active_tab__", ya = "__lookup_user_data_id__";
|
|
340
340
|
var ue = /* @__PURE__ */ ((e) => (e.dataList = "datalist", e.favorite = "favorite", e))(ue || {});
|
|
341
|
-
const
|
|
341
|
+
const dt = {
|
|
342
342
|
showPageInfo: !0,
|
|
343
343
|
enable: !1,
|
|
344
344
|
showLimits: !0,
|
|
@@ -348,9 +348,9 @@ const ct = {
|
|
|
348
348
|
total: 0,
|
|
349
349
|
mode: "server",
|
|
350
350
|
showGoto: !1
|
|
351
|
-
},
|
|
352
|
-
var
|
|
353
|
-
const
|
|
351
|
+
}, sn = Symbol("f_lookup-http-service_token");
|
|
352
|
+
var De = /* @__PURE__ */ ((e) => (e[e.Equal = 0] = "Equal", e[e.NotEqual = 1] = "NotEqual", e[e.Greater = 2] = "Greater", e[e.GreaterOrEqual = 3] = "GreaterOrEqual", e[e.Less = 4] = "Less", e[e.LessOrEqual = 5] = "LessOrEqual", e[e.Like = 6] = "Like", e[e.LikeStartWith = 7] = "LikeStartWith", e[e.LikeEndWith = 8] = "LikeEndWith", e[e.NotLike = 9] = "NotLike", e[e.NotLikeStartWith = 10] = "NotLikeStartWith", e[e.NotLikeEndWith = 11] = "NotLikeEndWith", e[e.Is = 12] = "Is", e[e.IsNot = 13] = "IsNot", e[e.In = 14] = "In", e[e.NotIn = 15] = "NotIn", e))(De || {}), Ne = /* @__PURE__ */ ((e) => (e[e.Empty = 0] = "Empty", e[e.And = 1] = "And", e[e.Or = 2] = "Or", e))(Ne || {}), rn = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.Expression = 1] = "Expression", e.FrontExpress = "frontExpress", e))(rn || {});
|
|
353
|
+
const un = {
|
|
354
354
|
showCloseButton: !0,
|
|
355
355
|
showMaxButton: !0,
|
|
356
356
|
draggable: !0,
|
|
@@ -358,7 +358,7 @@ const rn = {
|
|
|
358
358
|
enableEsc: !0,
|
|
359
359
|
rememberSize: !0
|
|
360
360
|
};
|
|
361
|
-
function
|
|
361
|
+
function cn() {
|
|
362
362
|
function e(a, t) {
|
|
363
363
|
const n = {};
|
|
364
364
|
return n.dictPicking = (i) => t.call("dictPicking", [i, a]), n.beforeLoadData = (i) => t.call("beforeLoadData", [i, a]), n.beforeSelectData = (i) => t.call("beforeSelectData", [i, a]), n.dictPicked = (i) => t.call("dictPicked", [i, a]), n;
|
|
@@ -367,7 +367,7 @@ function un() {
|
|
|
367
367
|
resolve: e
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
const
|
|
370
|
+
const Ue = {
|
|
371
371
|
id: { type: String, require: !0 },
|
|
372
372
|
uri: { type: String, default: "" },
|
|
373
373
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -380,7 +380,7 @@ const Re = {
|
|
|
380
380
|
idField: { type: String, default: "id" },
|
|
381
381
|
textField: { type: String, defalut: "name" },
|
|
382
382
|
data: { type: Array, default: [] },
|
|
383
|
-
displayType: { type: String, default:
|
|
383
|
+
displayType: { type: String, default: ce.List },
|
|
384
384
|
dialog: {
|
|
385
385
|
type: Object,
|
|
386
386
|
default: {
|
|
@@ -390,7 +390,7 @@ const Re = {
|
|
|
390
390
|
multiSelect: { type: Boolean, default: !1 },
|
|
391
391
|
showSelections: { type: Boolean, default: !0 },
|
|
392
392
|
separator: { type: String, default: "," },
|
|
393
|
-
pagination: { type: Object, default:
|
|
393
|
+
pagination: { type: Object, default: dt },
|
|
394
394
|
enableClear: { type: Boolean, default: !0 },
|
|
395
395
|
inputType: { type: String, default: "text" },
|
|
396
396
|
idValue: { type: String, default: "" },
|
|
@@ -438,12 +438,12 @@ const Re = {
|
|
|
438
438
|
/** 是否启用等于搜索功能 */
|
|
439
439
|
enableEqualSearch: { type: Boolean, default: !1 },
|
|
440
440
|
togglePopupOnClickInput: { type: Boolean, default: !1 }
|
|
441
|
-
},
|
|
442
|
-
function
|
|
441
|
+
}, ft = Bt(Ue, on, Jt, ln), dn = cn();
|
|
442
|
+
function Oe(e) {
|
|
443
443
|
let a = [10, 20, 30, 50, 100];
|
|
444
444
|
return e && (typeof e == "string" && (a = e.replaceAll("[", "").replaceAll("]", "").replaceAll(" ", "").split(",")), Array.isArray(e) && (a = e)), a.map((t) => ({ value: parseInt(t, 10) })).sort((t, n) => t.value - n.value);
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const ae = {
|
|
447
447
|
convertFrom: (e, a) => {
|
|
448
448
|
const t = e.editor ? e.editor : e;
|
|
449
449
|
return a === "multiSelect" || a === "enableTitle" ? !!t[a] : a === "separator" ? t[a] || "," : a === "onlySelectLeaf" ? t[a] == null ? !1 : t[a] : a === "loadTreeDataType" ? t[a] || "default" : a === "placeholder" ? t.placeholder || "请选择" : a === "openType" ? t[a] || "Modal" : t[a];
|
|
@@ -461,22 +461,22 @@ const ne = {
|
|
|
461
461
|
n.multiSelect && n.openType === "Popup" && (n.editable = !1, n.allowFreeInput = !1);
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
|
-
function
|
|
464
|
+
function fn(e) {
|
|
465
465
|
let a = "form_group_" + Date.now();
|
|
466
466
|
return e && (a = e.replaceAll("-", "_").replaceAll(".", "_")), "lookup." + a;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function pn(e, a) {
|
|
469
469
|
const { enablePager: t, pageSize: n, pageList: i } = a;
|
|
470
470
|
e.pagination = e.pagination || {}, Object.assign(e.pagination, {
|
|
471
471
|
enable: t,
|
|
472
|
-
sizeLimits:
|
|
472
|
+
sizeLimits: Oe(i).map((o) => o.value),
|
|
473
473
|
size: n,
|
|
474
474
|
showLimits: !0,
|
|
475
475
|
showGoto: !1,
|
|
476
476
|
mode: "server"
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const pt = {
|
|
480
480
|
convertFrom: (e, a) => {
|
|
481
481
|
var n;
|
|
482
482
|
return (n = (e.editor ? e.editor : e).dataSource) == null ? void 0 : n.displayName;
|
|
@@ -487,20 +487,20 @@ const ft = {
|
|
|
487
487
|
n.dataSource || (n.dataSource = {}), n.dataSource.displayName = `${o}(${l})`, n.helpId = s;
|
|
488
488
|
const { displayType: r, idField: d, textField: f } = c;
|
|
489
489
|
n.displayType = r, n.dataSource.idField = d, n.textField = f, n.dataSource.type = "ViewObject", n.enableEqualSearch = !1;
|
|
490
|
-
const { pageInfo:
|
|
491
|
-
|
|
492
|
-
const { treeInfo:
|
|
493
|
-
if (
|
|
494
|
-
const { onlySelectLeaf: v, loadDataType: h } =
|
|
490
|
+
const { pageInfo: y } = c.dataSource;
|
|
491
|
+
pn(n, y);
|
|
492
|
+
const { treeInfo: F } = r.toUpperCase() === "NAVTREELIST" ? c.navigation : c.dataSource;
|
|
493
|
+
if (F) {
|
|
494
|
+
const { onlySelectLeaf: v, loadDataType: h } = F;
|
|
495
495
|
n.loadTreeDataType = "default", n.onlySelectLeaf = v ?? !1;
|
|
496
496
|
}
|
|
497
|
-
if (n.dataSource.uri || (n.dataSource.uri =
|
|
497
|
+
if (n.dataSource.uri || (n.dataSource.uri = fn(e.id)), n.dialog) {
|
|
498
498
|
const { width: v } = n.dialog;
|
|
499
499
|
r && r.toUpperCase().indexOf("NAV") > -1 && (!v || v < 520) && (n.dialog.width = 960);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
},
|
|
503
|
+
}, hn = {
|
|
504
504
|
convertFrom: (e, a) => {
|
|
505
505
|
var t;
|
|
506
506
|
return (t = e.editor.dataSource) == null ? void 0 : t.idField;
|
|
@@ -511,7 +511,7 @@ const ft = {
|
|
|
511
511
|
e.editor.dataSource.idField = n == null ? void 0 : n.bindingPath;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
},
|
|
514
|
+
}, gn = {
|
|
515
515
|
convertFrom: (e, a) => {
|
|
516
516
|
var t;
|
|
517
517
|
return (t = e.editor) == null ? void 0 : t.textField;
|
|
@@ -522,7 +522,7 @@ const ft = {
|
|
|
522
522
|
e.editor.textField = n == null ? void 0 : n.bindingPath;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
},
|
|
525
|
+
}, mn = {
|
|
526
526
|
convertFrom: (e, a) => e.editor.displayType ? e.editor.displayType.toUpperCase() : "LIST",
|
|
527
527
|
convertTo: (e, a, t) => {
|
|
528
528
|
e.editor.displayType = t;
|
|
@@ -533,7 +533,7 @@ const ft = {
|
|
|
533
533
|
let t = e.editor ? e.editor.dialog : e.dialog;
|
|
534
534
|
const n = e.editor ? e.editor.openType : e.openType;
|
|
535
535
|
if (t || (t = {}), a === "title")
|
|
536
|
-
return t[a] ||
|
|
536
|
+
return t[a] || ct;
|
|
537
537
|
if (!n || n === "Modal") {
|
|
538
538
|
if (a === "width")
|
|
539
539
|
return (o = t.displayType) != null && o.toUpperCase().startsWith("NAV") ? t[a] || 960 : t[a] || 590;
|
|
@@ -556,14 +556,14 @@ const ft = {
|
|
|
556
556
|
const n = e.editor ? e.editor : e;
|
|
557
557
|
n.dialog = n.dialog || {}, n.dialog[a] = t;
|
|
558
558
|
}
|
|
559
|
-
},
|
|
559
|
+
}, vn = {
|
|
560
560
|
convertFrom: (e, a) => {
|
|
561
561
|
const t = e.editor ? e.editor : e;
|
|
562
562
|
if (t.pagination = t.pagination || {}, a === "enable" || a === "showLimits")
|
|
563
563
|
return t.pagination[a] == null ? !1 : t.pagination[a];
|
|
564
564
|
if (a === "sizeLimits") {
|
|
565
565
|
const n = t.pagination[a];
|
|
566
|
-
return
|
|
566
|
+
return Oe(n);
|
|
567
567
|
}
|
|
568
568
|
if (a === "size")
|
|
569
569
|
return t.pagination[a] || 20;
|
|
@@ -580,7 +580,7 @@ const ft = {
|
|
|
580
580
|
}
|
|
581
581
|
n.pagination[a] = t;
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, bn = [
|
|
584
584
|
{
|
|
585
585
|
label: "clear",
|
|
586
586
|
name: "清空事件"
|
|
@@ -601,7 +601,7 @@ const ft = {
|
|
|
601
601
|
label: "dictPicked",
|
|
602
602
|
name: "帮助后事件"
|
|
603
603
|
}
|
|
604
|
-
],
|
|
604
|
+
], yn = [
|
|
605
605
|
{
|
|
606
606
|
label: "dictPicking",
|
|
607
607
|
name: "帮助前事件"
|
|
@@ -618,8 +618,8 @@ const ft = {
|
|
|
618
618
|
label: "dictPicked",
|
|
619
619
|
name: "帮助后事件"
|
|
620
620
|
}
|
|
621
|
-
],
|
|
622
|
-
function
|
|
621
|
+
], Cn = Symbol("schema_repository_token");
|
|
622
|
+
function Sn(e, a) {
|
|
623
623
|
const t = (n) => n && n.length ? n.map((i) => `${i.name}[${i.bindingPath}]`).join(",") : "";
|
|
624
624
|
return {
|
|
625
625
|
dataSourceEditor: {
|
|
@@ -643,10 +643,10 @@ function Cn(e, a) {
|
|
|
643
643
|
},
|
|
644
644
|
{ id: "total", title: "全部", type: "List", dataSource: "Total" }
|
|
645
645
|
],
|
|
646
|
-
repositoryToken:
|
|
646
|
+
repositoryToken: Cn
|
|
647
647
|
},
|
|
648
|
-
dataSourceConverter:
|
|
649
|
-
defaultConverter:
|
|
648
|
+
dataSourceConverter: pt,
|
|
649
|
+
defaultConverter: ae,
|
|
650
650
|
idFieldEditor: {
|
|
651
651
|
type: "field-selector",
|
|
652
652
|
textField: "bindingPath",
|
|
@@ -661,7 +661,7 @@ function Cn(e, a) {
|
|
|
661
661
|
{ field: "code", title: "编号" },
|
|
662
662
|
{ field: "bindingPath", title: "绑定字段" }
|
|
663
663
|
],
|
|
664
|
-
repositoryToken:
|
|
664
|
+
repositoryToken: Ve
|
|
665
665
|
},
|
|
666
666
|
textFieldEditor: {
|
|
667
667
|
type: "field-selector",
|
|
@@ -676,7 +676,7 @@ function Cn(e, a) {
|
|
|
676
676
|
{ field: "code", title: "编号" },
|
|
677
677
|
{ field: "bindingPath", title: "绑定字段" }
|
|
678
678
|
],
|
|
679
|
-
repositoryToken:
|
|
679
|
+
repositoryToken: Ve
|
|
680
680
|
},
|
|
681
681
|
mappingFieldsEditor: {
|
|
682
682
|
type: "mapping-editor",
|
|
@@ -694,7 +694,7 @@ function Cn(e, a) {
|
|
|
694
694
|
textField: "name",
|
|
695
695
|
valueField: "bindingPath",
|
|
696
696
|
searchFields: ["name", "bindingPath"],
|
|
697
|
-
repositoryToken:
|
|
697
|
+
repositoryToken: Ve,
|
|
698
698
|
displayFormatter: t
|
|
699
699
|
},
|
|
700
700
|
toData: {
|
|
@@ -713,7 +713,7 @@ function Cn(e, a) {
|
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function Tn(e) {
|
|
717
717
|
var o, s;
|
|
718
718
|
const a = {
|
|
719
719
|
type: "combo-list",
|
|
@@ -729,7 +729,7 @@ function Sn(e) {
|
|
|
729
729
|
title: "打开方式",
|
|
730
730
|
type: "string",
|
|
731
731
|
refreshPanelAfterChanged: !0,
|
|
732
|
-
$converter:
|
|
732
|
+
$converter: ae,
|
|
733
733
|
editor: {
|
|
734
734
|
...a,
|
|
735
735
|
data: [
|
|
@@ -774,7 +774,7 @@ function Sn(e) {
|
|
|
774
774
|
},
|
|
775
775
|
showNavigation: {
|
|
776
776
|
description: "显示导航栏",
|
|
777
|
-
$converter:
|
|
777
|
+
$converter: ae,
|
|
778
778
|
refreshPanelAfterChanged: !0,
|
|
779
779
|
title: "显示导航栏",
|
|
780
780
|
type: "boolean",
|
|
@@ -830,7 +830,7 @@ function Sn(e) {
|
|
|
830
830
|
}
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function wn(e, a = !0) {
|
|
834
834
|
var o, s, c, l;
|
|
835
835
|
const t = !((o = e.pagination) != null && o.enable), n = () => e.displayType ? e.displayType.toUpperCase() : "", i = (r, d) => {
|
|
836
836
|
const f = n() !== "TREELIST" || r.treeToList;
|
|
@@ -841,7 +841,7 @@ function Tn(e, a = !0) {
|
|
|
841
841
|
description: "分页配置",
|
|
842
842
|
title: "分页",
|
|
843
843
|
parentPropertyID: "pagination",
|
|
844
|
-
$converter:
|
|
844
|
+
$converter: vn,
|
|
845
845
|
properties: {
|
|
846
846
|
// enable: {
|
|
847
847
|
// description: "启用分页",
|
|
@@ -885,8 +885,8 @@ function Tn(e, a = !0) {
|
|
|
885
885
|
nameField: "value",
|
|
886
886
|
requiredFields: ["value"],
|
|
887
887
|
uniqueFields: ["value"],
|
|
888
|
-
modelValue:
|
|
889
|
-
beforeSubmit: ({ notifyService: r, data: d }) => !d || !d.length ? (r == null || r.warning({ message: "每页显示条数不能为空!" }), !1) : new Set(d.map((
|
|
888
|
+
modelValue: Oe((s = e.pagination) == null ? void 0 : s.sizeLimits),
|
|
889
|
+
beforeSubmit: ({ notifyService: r, data: d }) => !d || !d.length ? (r == null || r.warning({ message: "每页显示条数不能为空!" }), !1) : new Set(d.map((y) => parseInt(y.value, 10))).size === d.length ? !0 : (r == null || r.warning({ message: "每页显示条数不能重复!" }), !1)
|
|
890
890
|
}
|
|
891
891
|
},
|
|
892
892
|
size: {
|
|
@@ -898,7 +898,7 @@ function Tn(e, a = !0) {
|
|
|
898
898
|
type: "combo-list",
|
|
899
899
|
enableClear: !1,
|
|
900
900
|
editable: !1,
|
|
901
|
-
data:
|
|
901
|
+
data: Oe((c = e.pagination) == null ? void 0 : c.sizeLimits),
|
|
902
902
|
textField: "value",
|
|
903
903
|
idField: "value",
|
|
904
904
|
valueField: "value",
|
|
@@ -908,22 +908,22 @@ function Tn(e, a = !0) {
|
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
class
|
|
911
|
+
class ht extends At {
|
|
912
912
|
constructor() {
|
|
913
913
|
super(...arguments);
|
|
914
|
-
|
|
914
|
+
oe(this, "comboListEditor", {
|
|
915
915
|
type: "combo-list",
|
|
916
916
|
enableClear: !1,
|
|
917
917
|
editable: !1
|
|
918
918
|
});
|
|
919
|
-
|
|
919
|
+
oe(this, "numberEditor", {
|
|
920
920
|
type: "number-spinner",
|
|
921
921
|
useThousands: !1
|
|
922
922
|
});
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
923
|
+
oe(this, "readonlyEditor", { ...this.comboListEditor, editable: !0 });
|
|
924
|
+
oe(this, "visibleEditor", { ...this.comboListEditor, editable: !1 });
|
|
925
|
+
oe(this, "requiredEditor", { ...this.comboListEditor, editable: !1 });
|
|
926
|
+
oe(this, "freeInputEditor", { ...this.comboListEditor, editable: !1 });
|
|
927
927
|
}
|
|
928
928
|
getExpressionConfig(t, n) {
|
|
929
929
|
const i = ["validate"];
|
|
@@ -933,14 +933,14 @@ class pt extends Bt {
|
|
|
933
933
|
var u;
|
|
934
934
|
const o = (u = t.binding) != null && u.field ? [] : ["Const", "Variable", "StateMachine"];
|
|
935
935
|
this.readonlyEditor = this.getPropertyEditorParams(t, o, "readonly"), this.visibleEditor = this.getPropertyEditorParams(t, o, "visible"), this.requiredEditor = this.getPropertyEditorParams(t, o, "required"), this.freeInputEditor = this.getPropertyEditorParams(t, ["Const", "Variable"], "allowFreeInput");
|
|
936
|
-
const s = this.getBasicProperties(t, n, i), c = this.getBehaviorConfig(t), l = this.getAppearanceProperties(t, n), r = this.getLookupConfig(t), d = this.getEventPropConfig(t), f = this.getDialogPropertyConfig(t),
|
|
936
|
+
const s = this.getBasicProperties(t, n, i), c = this.getBehaviorConfig(t), l = this.getAppearanceProperties(t, n), r = this.getLookupConfig(t), d = this.getEventPropConfig(t), f = this.getDialogPropertyConfig(t), y = this.getPageConfig(t.editor), F = this.getTreePropConfig(t.editor), v = this.getSearchConfig(t), h = this.getExpressionConfig(t, "Field"), p = {
|
|
937
937
|
basic: s,
|
|
938
938
|
appearance: l,
|
|
939
939
|
behavior: c,
|
|
940
940
|
lookup: r,
|
|
941
|
-
treeConfig:
|
|
941
|
+
treeConfig: F,
|
|
942
942
|
dialog: f,
|
|
943
|
-
pager:
|
|
943
|
+
pager: y,
|
|
944
944
|
searchConfig: v,
|
|
945
945
|
expressions: h
|
|
946
946
|
};
|
|
@@ -976,7 +976,7 @@ class pt extends Bt {
|
|
|
976
976
|
).some(
|
|
977
977
|
(l) => {
|
|
978
978
|
var r, d, f;
|
|
979
|
-
return ((f = (d = (r = s.find((
|
|
979
|
+
return ((f = (d = (r = s.find((y) => y.data.path === l)) == null ? void 0 : r.data) == null ? void 0 : d.type) == null ? void 0 : f.$type) === "EntityType";
|
|
980
980
|
}
|
|
981
981
|
);
|
|
982
982
|
}
|
|
@@ -1015,7 +1015,7 @@ class pt extends Bt {
|
|
|
1015
1015
|
parentPropertyID: "editor",
|
|
1016
1016
|
properties: {
|
|
1017
1017
|
enableSearchBar: {
|
|
1018
|
-
$converter:
|
|
1018
|
+
$converter: ae,
|
|
1019
1019
|
description: "是否启用搜索栏",
|
|
1020
1020
|
refreshPanelAfterChanged: !0,
|
|
1021
1021
|
title: "启用搜索栏",
|
|
@@ -1024,13 +1024,13 @@ class pt extends Bt {
|
|
|
1024
1024
|
},
|
|
1025
1025
|
searchAnyField: {
|
|
1026
1026
|
description: "显示所有列",
|
|
1027
|
-
$converter:
|
|
1027
|
+
$converter: ae,
|
|
1028
1028
|
title: "允许查询所有列",
|
|
1029
1029
|
type: "boolean",
|
|
1030
1030
|
visible: t.editor.openType !== "Popup" && t.editor.enableSearchBar == null ? !0 : !!t.editor.enableSearchBar
|
|
1031
1031
|
},
|
|
1032
1032
|
enableEqualSearch: {
|
|
1033
|
-
$converter:
|
|
1033
|
+
$converter: ae,
|
|
1034
1034
|
description: "是否启用等于搜索",
|
|
1035
1035
|
title: "启用精确搜索",
|
|
1036
1036
|
type: "boolean",
|
|
@@ -1044,7 +1044,7 @@ class pt extends Bt {
|
|
|
1044
1044
|
const n = t.editor, i = () => {
|
|
1045
1045
|
const r = this.formSchemaUtils.getFormSchema().module.entity[0].id, d = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
1046
1046
|
return { propertyData: n, formBasicInfo: d, viewModelId: r, dataSourceId: n.helpId };
|
|
1047
|
-
}, { dataSourceEditor: o, idFieldEditor: s, textFieldEditor: c, mappingFieldsEditor: l } =
|
|
1047
|
+
}, { dataSourceEditor: o, idFieldEditor: s, textFieldEditor: c, mappingFieldsEditor: l } = Sn(n, this);
|
|
1048
1048
|
return {
|
|
1049
1049
|
description: "Basic Infomation",
|
|
1050
1050
|
title: "编辑器",
|
|
@@ -1077,20 +1077,20 @@ class pt extends Bt {
|
|
|
1077
1077
|
description: "当控件没有值时在输入框中显示的文本",
|
|
1078
1078
|
title: "提示文本",
|
|
1079
1079
|
type: "string",
|
|
1080
|
-
$converter:
|
|
1080
|
+
$converter: ae
|
|
1081
1081
|
},
|
|
1082
1082
|
enableTitle: {
|
|
1083
1083
|
description: "鼠标悬停显示文本内容",
|
|
1084
1084
|
title: "悬停提示",
|
|
1085
1085
|
type: "boolean",
|
|
1086
|
-
$converter:
|
|
1086
|
+
$converter: ae,
|
|
1087
1087
|
editor: this.comboListEditor
|
|
1088
1088
|
},
|
|
1089
1089
|
editable: {
|
|
1090
1090
|
description: "",
|
|
1091
1091
|
title: "允许编辑",
|
|
1092
1092
|
type: "boolean",
|
|
1093
|
-
$converter:
|
|
1093
|
+
$converter: ae,
|
|
1094
1094
|
refreshPanelAfterChanged: !0,
|
|
1095
1095
|
editor: this.comboListEditor,
|
|
1096
1096
|
visible: !(n.multiSelect && n.openType === "Popup")
|
|
@@ -1099,14 +1099,14 @@ class pt extends Bt {
|
|
|
1099
1099
|
description: "",
|
|
1100
1100
|
title: "任意输入",
|
|
1101
1101
|
type: "boolean",
|
|
1102
|
-
$converter:
|
|
1102
|
+
$converter: ae,
|
|
1103
1103
|
editor: this.freeInputEditor,
|
|
1104
1104
|
visible: !!n.editable && this.isSimpleStringField()
|
|
1105
1105
|
},
|
|
1106
1106
|
enableClear: {
|
|
1107
1107
|
title: "启用清除按钮",
|
|
1108
1108
|
type: "boolean",
|
|
1109
|
-
$converter:
|
|
1109
|
+
$converter: ae
|
|
1110
1110
|
},
|
|
1111
1111
|
dataSource: {
|
|
1112
1112
|
description: "数据源",
|
|
@@ -1125,13 +1125,13 @@ class pt extends Bt {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
1127
|
},
|
|
1128
|
-
$converter:
|
|
1128
|
+
$converter: pt
|
|
1129
1129
|
},
|
|
1130
1130
|
filterConditions: {
|
|
1131
1131
|
descriptions: "帮助过滤条件",
|
|
1132
1132
|
title: "过滤条件",
|
|
1133
1133
|
type: "string",
|
|
1134
|
-
$converter:
|
|
1134
|
+
$converter: ae,
|
|
1135
1135
|
editor: {
|
|
1136
1136
|
type: "filter-condition-editor",
|
|
1137
1137
|
editable: !1,
|
|
@@ -1144,29 +1144,29 @@ class pt extends Bt {
|
|
|
1144
1144
|
viewModelId: this.formSchemaUtils.getFormSchema().module.entity[0].id
|
|
1145
1145
|
},
|
|
1146
1146
|
idField: "path",
|
|
1147
|
-
repositoryToken:
|
|
1147
|
+
repositoryToken: Ve,
|
|
1148
1148
|
beforeOpen: async ({ repository: r, notifyService: d }) => {
|
|
1149
1149
|
var p;
|
|
1150
1150
|
if (!(n == null ? void 0 : n.helpId))
|
|
1151
1151
|
return d == null || d.warning({ message: "请先配置数据源!" }), !1;
|
|
1152
|
-
const
|
|
1152
|
+
const y = i(), v = new Ze(this.formSchemaUtils).getEntitiesAndVariables();
|
|
1153
1153
|
let h = {};
|
|
1154
1154
|
if (r) {
|
|
1155
|
-
const u = await r.getData(
|
|
1155
|
+
const u = await r.getData(y), m = await r.getLookupConditions(y);
|
|
1156
1156
|
h = { fieldList: u, conditionList: m };
|
|
1157
1157
|
}
|
|
1158
1158
|
return (p = v.variables) != null && p.forms && (v.variables.forms.items = v.variables.forms.items.filter((u) => u.category === "remote")), { ...h, ...v, isServerSide: !0 };
|
|
1159
1159
|
},
|
|
1160
|
-
onSubmitModal: async ({ loadingService: r, repository: d, conditions: f, originalConditions:
|
|
1160
|
+
onSubmitModal: async ({ loadingService: r, repository: d, conditions: f, originalConditions: y, FMessageBoxService: F }) => {
|
|
1161
1161
|
if (d)
|
|
1162
1162
|
try {
|
|
1163
1163
|
const v = i(), h = await d.getLookupConditions(v) || [];
|
|
1164
|
-
return JSON.stringify(h) !== JSON.stringify(
|
|
1165
|
-
f.value = h,
|
|
1164
|
+
return JSON.stringify(h) !== JSON.stringify(y.value) ? (r == null || r.clearAll(), F.question("视图对象中的帮助过滤条件已更改,请点击确定同步过滤数据", "", () => {
|
|
1165
|
+
f.value = h, y.value = JSON.parse(JSON.stringify(f.value));
|
|
1166
1166
|
}, () => {
|
|
1167
|
-
}), !1) : (JSON.stringify(f.value) === JSON.stringify(
|
|
1167
|
+
}), !1) : (JSON.stringify(f.value) === JSON.stringify(y.value) || await d.saveFilterCondition(f.value, v, this.formSchemaUtils.getFormMetadataBasicInfo()), !0);
|
|
1168
1168
|
} catch {
|
|
1169
|
-
return
|
|
1169
|
+
return F == null || F.error("保存失败", ""), !1;
|
|
1170
1170
|
} finally {
|
|
1171
1171
|
r == null || r.clearAll();
|
|
1172
1172
|
}
|
|
@@ -1178,7 +1178,7 @@ class pt extends Bt {
|
|
|
1178
1178
|
description: "类型: 树列表、列表、双列表、左树右列表",
|
|
1179
1179
|
title: "展示类型",
|
|
1180
1180
|
type: "string",
|
|
1181
|
-
$converter:
|
|
1181
|
+
$converter: mn,
|
|
1182
1182
|
editor: {
|
|
1183
1183
|
type: "combo-list",
|
|
1184
1184
|
editable: !1,
|
|
@@ -1201,34 +1201,34 @@ class pt extends Bt {
|
|
|
1201
1201
|
editor: {
|
|
1202
1202
|
...s
|
|
1203
1203
|
},
|
|
1204
|
-
$converter:
|
|
1204
|
+
$converter: hn
|
|
1205
1205
|
},
|
|
1206
1206
|
textField: {
|
|
1207
1207
|
description: "显示文本字段",
|
|
1208
1208
|
title: "文本字段",
|
|
1209
1209
|
type: "string",
|
|
1210
|
-
$converter:
|
|
1210
|
+
$converter: gn,
|
|
1211
1211
|
editor: c
|
|
1212
1212
|
},
|
|
1213
1213
|
mappingFields: {
|
|
1214
1214
|
description: "字段映射",
|
|
1215
1215
|
title: "字段映射",
|
|
1216
1216
|
type: "string",
|
|
1217
|
-
$converter:
|
|
1217
|
+
$converter: ae,
|
|
1218
1218
|
editor: {
|
|
1219
1219
|
...l
|
|
1220
1220
|
}
|
|
1221
1221
|
},
|
|
1222
1222
|
enableToSelect: {
|
|
1223
1223
|
description: "数据加载后是否选中现有值",
|
|
1224
|
-
$converter:
|
|
1224
|
+
$converter: ae,
|
|
1225
1225
|
title: "选中已选值",
|
|
1226
1226
|
type: "boolean",
|
|
1227
1227
|
editor: this.comboListEditor
|
|
1228
1228
|
},
|
|
1229
1229
|
multiSelect: {
|
|
1230
1230
|
description: "启用多选",
|
|
1231
|
-
$converter:
|
|
1231
|
+
$converter: ae,
|
|
1232
1232
|
title: "启用多选",
|
|
1233
1233
|
type: "boolean",
|
|
1234
1234
|
editor: this.comboListEditor,
|
|
@@ -1237,14 +1237,14 @@ class pt extends Bt {
|
|
|
1237
1237
|
},
|
|
1238
1238
|
showSelections: {
|
|
1239
1239
|
description: "显示已选记录",
|
|
1240
|
-
$converter:
|
|
1240
|
+
$converter: ae,
|
|
1241
1241
|
title: "显示已选记录",
|
|
1242
1242
|
type: "boolean",
|
|
1243
1243
|
visible: !!n.multiSelect && n.openType !== "Popup"
|
|
1244
1244
|
},
|
|
1245
1245
|
separator: {
|
|
1246
1246
|
description: "多选分隔符",
|
|
1247
|
-
$converter:
|
|
1247
|
+
$converter: ae,
|
|
1248
1248
|
title: "多选分隔符",
|
|
1249
1249
|
type: "string",
|
|
1250
1250
|
editor: {
|
|
@@ -1265,7 +1265,7 @@ class pt extends Bt {
|
|
|
1265
1265
|
},
|
|
1266
1266
|
enableSearchBar: {
|
|
1267
1267
|
description: "显示搜索工具条",
|
|
1268
|
-
$converter:
|
|
1268
|
+
$converter: ae,
|
|
1269
1269
|
refreshPanelAfterChanged: !0,
|
|
1270
1270
|
title: "启用搜索框",
|
|
1271
1271
|
type: "boolean",
|
|
@@ -1273,14 +1273,14 @@ class pt extends Bt {
|
|
|
1273
1273
|
},
|
|
1274
1274
|
enableFavorite: {
|
|
1275
1275
|
description: "启用收藏夹",
|
|
1276
|
-
$converter:
|
|
1276
|
+
$converter: ae,
|
|
1277
1277
|
title: "启用收藏夹",
|
|
1278
1278
|
type: "boolean",
|
|
1279
1279
|
visible: n.openType !== "Popup"
|
|
1280
1280
|
},
|
|
1281
1281
|
enableUserData: {
|
|
1282
1282
|
description: "保存界面状态",
|
|
1283
|
-
$converter:
|
|
1283
|
+
$converter: ae,
|
|
1284
1284
|
refreshPanelAfterChanged: !0,
|
|
1285
1285
|
title: "保存界面状态",
|
|
1286
1286
|
type: "boolean",
|
|
@@ -1293,8 +1293,8 @@ class pt extends Bt {
|
|
|
1293
1293
|
return this.getDisplayType(t).startsWith("NAV") && t.openType !== "Popup" ? t.showNavigation === void 0 ? !0 : !!t.showNavigation : !1;
|
|
1294
1294
|
}
|
|
1295
1295
|
getDialogPropertyConfig(t) {
|
|
1296
|
-
const n =
|
|
1297
|
-
return n.openType.$converter =
|
|
1296
|
+
const n = Tn(t.editor);
|
|
1297
|
+
return n.openType.$converter = ae, {
|
|
1298
1298
|
description: "帮助窗口尺寸配置",
|
|
1299
1299
|
title: "帮助窗口",
|
|
1300
1300
|
parentPropertyID: "dialog",
|
|
@@ -1312,7 +1312,7 @@ class pt extends Bt {
|
|
|
1312
1312
|
* @returns
|
|
1313
1313
|
*/
|
|
1314
1314
|
getPageConfig(t) {
|
|
1315
|
-
return
|
|
1315
|
+
return wn(t);
|
|
1316
1316
|
}
|
|
1317
1317
|
showLoadType(t) {
|
|
1318
1318
|
const n = this.getDisplayType(t);
|
|
@@ -1330,7 +1330,7 @@ class pt extends Bt {
|
|
|
1330
1330
|
properties: {
|
|
1331
1331
|
treeToList: {
|
|
1332
1332
|
description: "以列表的形式展示树结构数据",
|
|
1333
|
-
$converter:
|
|
1333
|
+
$converter: ae,
|
|
1334
1334
|
refreshPanelAfterChanged: !0,
|
|
1335
1335
|
title: "以列表形式展示",
|
|
1336
1336
|
type: "boolean",
|
|
@@ -1338,7 +1338,7 @@ class pt extends Bt {
|
|
|
1338
1338
|
},
|
|
1339
1339
|
navTreeToList: {
|
|
1340
1340
|
description: "以列表的形式展示树结构数据",
|
|
1341
|
-
$converter:
|
|
1341
|
+
$converter: ae,
|
|
1342
1342
|
refreshPanelAfterChanged: !0,
|
|
1343
1343
|
title: "以列表形式展示",
|
|
1344
1344
|
type: "boolean",
|
|
@@ -1346,7 +1346,7 @@ class pt extends Bt {
|
|
|
1346
1346
|
},
|
|
1347
1347
|
loadTreeDataType: {
|
|
1348
1348
|
description: "树形数据加载方式",
|
|
1349
|
-
$converter:
|
|
1349
|
+
$converter: ae,
|
|
1350
1350
|
title: "数据加载方式",
|
|
1351
1351
|
type: "string",
|
|
1352
1352
|
editor: {
|
|
@@ -1363,21 +1363,21 @@ class pt extends Bt {
|
|
|
1363
1363
|
},
|
|
1364
1364
|
enableFullTree: {
|
|
1365
1365
|
description: "启用构造完整树",
|
|
1366
|
-
$converter:
|
|
1366
|
+
$converter: ae,
|
|
1367
1367
|
title: "构造完整树",
|
|
1368
1368
|
type: "boolean",
|
|
1369
1369
|
visible: this.showLoadType(t)
|
|
1370
1370
|
},
|
|
1371
1371
|
onlySelectLeaf: {
|
|
1372
1372
|
description: "仅选择叶子节点",
|
|
1373
|
-
$converter:
|
|
1373
|
+
$converter: ae,
|
|
1374
1374
|
title: "仅选择叶子节点",
|
|
1375
1375
|
type: "boolean",
|
|
1376
1376
|
visible: this.isTree(t)
|
|
1377
1377
|
},
|
|
1378
1378
|
enableCascade: {
|
|
1379
1379
|
description: "启用级联选择",
|
|
1380
|
-
$converter:
|
|
1380
|
+
$converter: ae,
|
|
1381
1381
|
refreshPanelAfterChanged: !0,
|
|
1382
1382
|
title: "启用级联选择",
|
|
1383
1383
|
type: "boolean",
|
|
@@ -1385,27 +1385,27 @@ class pt extends Bt {
|
|
|
1385
1385
|
},
|
|
1386
1386
|
showCascadeControl: {
|
|
1387
1387
|
description: "是否在界面中显示级联状态",
|
|
1388
|
-
$converter:
|
|
1388
|
+
$converter: ae,
|
|
1389
1389
|
title: "显示级联状态",
|
|
1390
1390
|
type: "boolean",
|
|
1391
1391
|
visible: !!t.enableCascade && this.isTree(t)
|
|
1392
1392
|
},
|
|
1393
1393
|
cascadeValue: {
|
|
1394
1394
|
description: "缺省级联选择模式",
|
|
1395
|
-
$converter:
|
|
1395
|
+
$converter: ae,
|
|
1396
1396
|
title: "缺省级联选择模式",
|
|
1397
1397
|
type: "string",
|
|
1398
1398
|
visible: !!t.enableCascade && this.isTree(t),
|
|
1399
1399
|
editor: {
|
|
1400
1400
|
...this.comboListEditor,
|
|
1401
|
-
data:
|
|
1401
|
+
data: je,
|
|
1402
1402
|
textField: "text",
|
|
1403
1403
|
valueField: "value"
|
|
1404
1404
|
}
|
|
1405
1405
|
},
|
|
1406
1406
|
expandLevel: {
|
|
1407
1407
|
description: "默认展开层级: 0: 不展开; -1: 全部展开;>0: 展开到指定级数 ",
|
|
1408
|
-
$converter:
|
|
1408
|
+
$converter: ae,
|
|
1409
1409
|
title: "默认展开层级",
|
|
1410
1410
|
type: "number",
|
|
1411
1411
|
visible: this.showLoadType(t),
|
|
@@ -1421,7 +1421,7 @@ class pt extends Bt {
|
|
|
1421
1421
|
}
|
|
1422
1422
|
getEventPropConfig(t) {
|
|
1423
1423
|
const n = this;
|
|
1424
|
-
let i =
|
|
1424
|
+
let i = bn;
|
|
1425
1425
|
t.editor.openType === "Popup" && (i = i.filter((c) => c.label !== "beforeSelectData"));
|
|
1426
1426
|
const o = n.eventsEditorUtils.formProperties(t, n.viewModelId, i);
|
|
1427
1427
|
return {
|
|
@@ -1457,32 +1457,32 @@ class pt extends Bt {
|
|
|
1457
1457
|
var p;
|
|
1458
1458
|
if ((p = h == null ? void 0 : h.metadata) != null && p.content)
|
|
1459
1459
|
return JSON.parse(h.metadata.content);
|
|
1460
|
-
}), f = (o = r == null ? void 0 : r.dataSource) == null ? void 0 : o.sourceType,
|
|
1461
|
-
if (f === "BE" &&
|
|
1462
|
-
return new
|
|
1460
|
+
}), f = (o = r == null ? void 0 : r.dataSource) == null ? void 0 : o.sourceType, y = (s = d.dataSource) == null ? void 0 : s.sourceType, F = (c = r == null ? void 0 : r.dataSource) == null ? void 0 : c.sourceId, v = (l = d == null ? void 0 : d.dataSource) == null ? void 0 : l.sourceId;
|
|
1461
|
+
if (f === "BE" && y === "BE" && F !== v)
|
|
1462
|
+
return new Rt().error({ message: "只允许更换同数据源的帮助元数据", position: "top-center" }), !1;
|
|
1463
1463
|
}
|
|
1464
1464
|
return !0;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function In(e, a) {
|
|
1468
1468
|
function t(n, i) {
|
|
1469
1469
|
const o = e.schema;
|
|
1470
|
-
return new
|
|
1470
|
+
return new ht(n, a).getPropertyConfig(o, i);
|
|
1471
1471
|
}
|
|
1472
1472
|
return { getPropsConfig: t };
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1474
|
+
const Fn = /* @__PURE__ */ me({
|
|
1475
1475
|
name: "FLookupDesign",
|
|
1476
|
-
props:
|
|
1476
|
+
props: Ue,
|
|
1477
1477
|
emits: [],
|
|
1478
1478
|
setup(e, a) {
|
|
1479
|
-
const t =
|
|
1480
|
-
return
|
|
1479
|
+
const t = N(), n = Q("design-item-context"), i = Q("designer-host-service"), o = In(n, i), s = Nt(t, n, o), c = '<i class="f-icon f-icon-lookup"></i>', l = '<i class="f-icon f-icon-arrow-chevron-down"></i>', r = H(() => e.openType === "Popup" ? "Popup" : "Modal"), d = H(() => r.value === "Popup" ? l : c);
|
|
1480
|
+
return Se(() => {
|
|
1481
1481
|
t.value.componentInstance = s;
|
|
1482
1482
|
}), a.expose(s.value), () => E("div", {
|
|
1483
1483
|
class: "f-lookup-design",
|
|
1484
1484
|
ref: t
|
|
1485
|
-
}, [E(
|
|
1485
|
+
}, [E(Dt, {
|
|
1486
1486
|
ref: t,
|
|
1487
1487
|
buttonContent: d.value,
|
|
1488
1488
|
readonly: !0,
|
|
@@ -1491,10 +1491,10 @@ const In = /* @__PURE__ */ me({
|
|
|
1491
1491
|
}, null)]);
|
|
1492
1492
|
}
|
|
1493
1493
|
});
|
|
1494
|
-
function
|
|
1494
|
+
function Te(e, a) {
|
|
1495
1495
|
const { lookupOptions: t } = a;
|
|
1496
1496
|
function n(h) {
|
|
1497
|
-
return { ...
|
|
1497
|
+
return { ...dt, ...h };
|
|
1498
1498
|
}
|
|
1499
1499
|
function i() {
|
|
1500
1500
|
return {
|
|
@@ -1513,19 +1513,19 @@ function Se(e, a) {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
function s() {
|
|
1515
1515
|
const { displayType: h } = a.lookupOptions;
|
|
1516
|
-
return typeof h == "string" && h in
|
|
1516
|
+
return typeof h == "string" && h in ce ? !1 : h.toLowerCase().startsWith("nav");
|
|
1517
1517
|
}
|
|
1518
1518
|
function c() {
|
|
1519
1519
|
const { displayType: h, treeToList: p } = a.lookupOptions;
|
|
1520
|
-
return (h.toLowerCase() ===
|
|
1520
|
+
return (h.toLowerCase() === ce.Tree.toLowerCase() || h.toLowerCase() === ce.ListTree.toLowerCase()) && !p;
|
|
1521
1521
|
}
|
|
1522
1522
|
function l() {
|
|
1523
1523
|
const { displayType: h, navTreeToList: p } = a.lookupOptions;
|
|
1524
|
-
return h.toLowerCase() ===
|
|
1524
|
+
return h.toLowerCase() === ce.TreeList.toLowerCase() && !p;
|
|
1525
1525
|
}
|
|
1526
1526
|
function r() {
|
|
1527
1527
|
const { displayType: h, navTreeToList: p } = a.lookupOptions, u = h.toLowerCase();
|
|
1528
|
-
return u ===
|
|
1528
|
+
return u === ce.ListList.toLowerCase() || u === ce.ListTree.toLowerCase() || p;
|
|
1529
1529
|
}
|
|
1530
1530
|
function d() {
|
|
1531
1531
|
var u;
|
|
@@ -1541,10 +1541,10 @@ function Se(e, a) {
|
|
|
1541
1541
|
const { loadTreeDataType: p } = t;
|
|
1542
1542
|
return p === be.all || p === "default" && (h == null ? void 0 : h.loadDataType) === "all";
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function y(h) {
|
|
1545
1545
|
return (h == null ? void 0 : h.layerType) === "pathcode";
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function F() {
|
|
1548
1548
|
return t.enableCascade && t.multiSelect;
|
|
1549
1549
|
}
|
|
1550
1550
|
function v() {
|
|
@@ -1560,25 +1560,25 @@ function Se(e, a) {
|
|
|
1560
1560
|
navIsTreeList: l,
|
|
1561
1561
|
navIsList: r,
|
|
1562
1562
|
isLoadAll: f,
|
|
1563
|
-
isPathCodeTree:
|
|
1564
|
-
isEnableCascadeCheck:
|
|
1563
|
+
isPathCodeTree: y,
|
|
1564
|
+
isEnableCascadeCheck: F,
|
|
1565
1565
|
isDropdownMode: v
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function gt(e, a, t) {
|
|
1569
1569
|
var o;
|
|
1570
|
-
const n =
|
|
1571
|
-
return
|
|
1570
|
+
const n = N(e.searchFields || []), i = N(((o = e.navigation) == null ? void 0 : o.searchFields) || []);
|
|
1571
|
+
return W(() => a == null ? void 0 : a.searchFields, (s) => {
|
|
1572
1572
|
n.value = s;
|
|
1573
|
-
}),
|
|
1573
|
+
}), W(() => t == null ? void 0 : t.searchFields, (s) => {
|
|
1574
1574
|
i.value = s;
|
|
1575
1575
|
}), {
|
|
1576
1576
|
searchFieldItems: n,
|
|
1577
1577
|
navSearchFieldItems: i
|
|
1578
1578
|
};
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1581
|
-
const a = he({}), t = he({}), n = he({}), i = he({}), o = he({}), s =
|
|
1580
|
+
function kn(e) {
|
|
1581
|
+
const a = he({}), t = he({}), n = he({}), i = he({}), o = he({}), s = N([]), c = N(), l = he({}), r = he({ canClose: !0 }), d = N(!1), f = [
|
|
1582
1582
|
"displayType",
|
|
1583
1583
|
"treeToList",
|
|
1584
1584
|
"navTreeToList",
|
|
@@ -1603,12 +1603,12 @@ function Fn(e) {
|
|
|
1603
1603
|
"enableCascade",
|
|
1604
1604
|
"enableFavorite"
|
|
1605
1605
|
];
|
|
1606
|
-
function
|
|
1607
|
-
f.forEach((
|
|
1608
|
-
l[
|
|
1606
|
+
function y() {
|
|
1607
|
+
f.forEach((F) => {
|
|
1608
|
+
l[F] = e[F];
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
|
-
return
|
|
1611
|
+
return y(), {
|
|
1612
1612
|
pageInfoState: a,
|
|
1613
1613
|
lookupState: t,
|
|
1614
1614
|
navigationState: n,
|
|
@@ -1621,177 +1621,177 @@ function Fn(e) {
|
|
|
1621
1621
|
popupState: r
|
|
1622
1622
|
};
|
|
1623
1623
|
}
|
|
1624
|
-
const
|
|
1625
|
-
function
|
|
1626
|
-
const t =
|
|
1627
|
-
var
|
|
1628
|
-
const g = (
|
|
1629
|
-
return g ===
|
|
1630
|
-
}, h = (g,
|
|
1624
|
+
const Le = N(), ve = "F_LOOKUP_HTTP_COMPOSITION_TOKEN";
|
|
1625
|
+
function Pn(e, a) {
|
|
1626
|
+
const t = Q("FLoadingService"), n = Q(sn), i = kn(e), { pageInfoState: o, lookupState: s, navigationState: c, lookupOptions: l, searchValueChanged: r } = i, { searchFieldItems: d, navSearchFieldItems: f } = gt(e, s, c), y = N(e.idValue), F = N(!1), v = () => {
|
|
1627
|
+
var L;
|
|
1628
|
+
const g = (L = l.displayType) == null ? void 0 : L.toUpperCase();
|
|
1629
|
+
return g === ce.Tree || g === ce.TreeList;
|
|
1630
|
+
}, h = (g, L = !1) => {
|
|
1631
1631
|
if (g) {
|
|
1632
1632
|
const {
|
|
1633
|
-
layerType:
|
|
1633
|
+
layerType: A,
|
|
1634
1634
|
dataField: _,
|
|
1635
|
-
parentField:
|
|
1635
|
+
parentField: Y,
|
|
1636
1636
|
pathField: ee,
|
|
1637
|
-
layerField:
|
|
1637
|
+
layerField: ne,
|
|
1638
1638
|
isDetailField: J,
|
|
1639
|
-
loadDataType:
|
|
1640
|
-
} = g,
|
|
1641
|
-
layerType:
|
|
1639
|
+
loadDataType: O
|
|
1640
|
+
} = g, z = {
|
|
1641
|
+
layerType: A,
|
|
1642
1642
|
dataField: _,
|
|
1643
|
-
parentField:
|
|
1643
|
+
parentField: Y,
|
|
1644
1644
|
pathField: ee,
|
|
1645
|
-
layerField:
|
|
1645
|
+
layerField: ne,
|
|
1646
1646
|
isDetailField: J,
|
|
1647
|
-
loadDataType:
|
|
1648
|
-
}, { onlySelectLeaf:
|
|
1649
|
-
|
|
1647
|
+
loadDataType: O
|
|
1648
|
+
}, { onlySelectLeaf: w, loadTreeDataType: b } = l;
|
|
1649
|
+
z.onlySelectLeaf = w, z.loadDataType = b, L ? l.navTreeInfo = Object.assign(l.navTreeInfo || {}, z) : l.treeInfo = Object.assign(l.treeInfo || {}, z);
|
|
1650
1650
|
}
|
|
1651
1651
|
};
|
|
1652
|
-
function p(g,
|
|
1653
|
-
if (
|
|
1652
|
+
function p(g, L, A = "like") {
|
|
1653
|
+
if (L == null || !L.trim())
|
|
1654
1654
|
return [];
|
|
1655
|
-
const _ = Array.from(new Set(
|
|
1655
|
+
const _ = Array.from(new Set(L.trim().split(" ").filter((O) => O.trim())));
|
|
1656
1656
|
if (!g || !_.length)
|
|
1657
1657
|
return [];
|
|
1658
|
-
const ee =
|
|
1659
|
-
const
|
|
1660
|
-
filterField:
|
|
1661
|
-
value:
|
|
1658
|
+
const ee = A === "equal" ? De.Equal : De.Like, ne = (g || []).map((O, z) => {
|
|
1659
|
+
const w = _.map((b, M) => ({
|
|
1660
|
+
filterField: O.value,
|
|
1661
|
+
value: b,
|
|
1662
1662
|
lbracket: "",
|
|
1663
1663
|
rbracket: "",
|
|
1664
1664
|
relation: Ne.And,
|
|
1665
1665
|
compare: ee
|
|
1666
1666
|
}));
|
|
1667
|
-
return
|
|
1668
|
-
}).filter((
|
|
1667
|
+
return w.length && (w.length > 1 && (w[0].lbracket = "(", w[w.length - 1].rbracket = ")"), w[w.length - 1].relation = Ne.Or), w;
|
|
1668
|
+
}).filter((O) => O.length);
|
|
1669
1669
|
let J = [];
|
|
1670
|
-
return
|
|
1670
|
+
return ne && ne.length && (J = _t(ne), J.length > 1 && (J[0].lbracket += "(", J[J.length - 1].rbracket += ")"), J[J.length - 1].relation = 0), J;
|
|
1671
1671
|
}
|
|
1672
1672
|
function u() {
|
|
1673
1673
|
let { expandLevel: g } = l;
|
|
1674
|
-
return g &&
|
|
1674
|
+
return g && !$t(g) && (g = g < -1 ? -1 : g), g;
|
|
1675
1675
|
}
|
|
1676
|
-
function m(g,
|
|
1677
|
-
const
|
|
1678
|
-
|
|
1679
|
-
let _ = null,
|
|
1676
|
+
function m(g, L) {
|
|
1677
|
+
const A = {};
|
|
1678
|
+
A.category = L;
|
|
1679
|
+
let _ = null, Y = null;
|
|
1680
1680
|
if (g != null && g.search) {
|
|
1681
|
-
const { field: ee, value:
|
|
1682
|
-
if (
|
|
1683
|
-
J && (
|
|
1684
|
-
const
|
|
1685
|
-
filterField:
|
|
1686
|
-
value:
|
|
1681
|
+
const { field: ee, value: ne, isNavigation: J, type: O } = g.search, z = O || "like";
|
|
1682
|
+
if (ne && (A.searchValue = ne.trim()), A.searchField = ee ? ee.trim() : "*", A.searchType = z, J && (A.category = "navsearch"), !e.enableMultiFieldSearch) {
|
|
1683
|
+
J && (A.searchType = "like");
|
|
1684
|
+
const w = A.searchType === "equal" && A.searchValue ? [{
|
|
1685
|
+
filterField: A.searchField,
|
|
1686
|
+
value: A.searchValue,
|
|
1687
1687
|
lbracket: "",
|
|
1688
1688
|
rbracket: "",
|
|
1689
1689
|
relation: Ne.And,
|
|
1690
|
-
compare:
|
|
1691
|
-
}] : [],
|
|
1692
|
-
|
|
1690
|
+
compare: De.Equal
|
|
1691
|
+
}] : [], b = J ? f.value : d.value, M = A.searchField === "*" ? p(b, ne, z) : w;
|
|
1692
|
+
M && M.length && (J ? _ = M : Y = M), ne === "" && A.category === "search" && !Y && !_ && (A.category = "all");
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
|
-
return v() && (
|
|
1696
|
-
searchParam:
|
|
1695
|
+
return v() && (A.layerNum = u()), {
|
|
1696
|
+
searchParam: A,
|
|
1697
1697
|
navSearchConditions: _,
|
|
1698
|
-
searchConditions:
|
|
1698
|
+
searchConditions: Y
|
|
1699
1699
|
};
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1702
|
-
var
|
|
1701
|
+
function T(g) {
|
|
1702
|
+
var A, _;
|
|
1703
1703
|
if (g === "fav")
|
|
1704
1704
|
return {
|
|
1705
1705
|
pageIndex: 1,
|
|
1706
1706
|
pageSize: 500
|
|
1707
1707
|
};
|
|
1708
|
-
let
|
|
1709
|
-
return g === "navsearch" && (
|
|
1710
|
-
pageIndex: ((
|
|
1711
|
-
pageSize: ((_ = o[
|
|
1708
|
+
let L = "default";
|
|
1709
|
+
return g === "navsearch" && (L = "navigation"), {
|
|
1710
|
+
pageIndex: ((A = o[L]) == null ? void 0 : A.index) || 1,
|
|
1711
|
+
pageSize: ((_ = o[L]) == null ? void 0 : _.size) || 20
|
|
1712
1712
|
};
|
|
1713
1713
|
}
|
|
1714
1714
|
function I(g) {
|
|
1715
|
-
const
|
|
1716
|
-
ee && (
|
|
1717
|
-
const { pageIndex:
|
|
1718
|
-
return
|
|
1719
|
-
}
|
|
1720
|
-
function
|
|
1721
|
-
return g == null ? void 0 : g.map((
|
|
1722
|
-
}
|
|
1723
|
-
function
|
|
1724
|
-
return g.map((
|
|
1725
|
-
const _ =
|
|
1726
|
-
return _ && (
|
|
1715
|
+
const L = {}, A = (g == null ? void 0 : g.action) || "all", { searchParam: _, navSearchConditions: Y, searchConditions: ee } = m(g, A);
|
|
1716
|
+
ee && (L.searchConditions = ee), Y && (L.navSearchConditions = Y), L.enableFullTree = e.enableFullTree, L.searchValue = JSON.stringify(_);
|
|
1717
|
+
const { pageIndex: ne, pageSize: J } = T(A);
|
|
1718
|
+
return L.pageIndex = ne, L.pageSize = J, L.treeToList = e.treeToList, L.navTreeToList = e.navTreeToList, l.loadTreeDataType === be.default ? L.loadTreeDataType = "default" : L.loadTreeDataType = l.loadTreeDataType === be.all ? "loadall" : "layerload", g != null && g.relationFilter && (L.relationFilter = [...g.relationFilter]), g != null && g.navNodePathCode && (L.navPathCode = g.navNodePathCode), g.selectedInfo && (L.selectedInfo = g.selectedInfo), L.customData = xt(Le.value), L.id = e.id, L;
|
|
1719
|
+
}
|
|
1720
|
+
function D(g) {
|
|
1721
|
+
return g == null ? void 0 : g.map((L) => (L.resizable = !0, L));
|
|
1722
|
+
}
|
|
1723
|
+
function V(g, L) {
|
|
1724
|
+
return g.map((A) => {
|
|
1725
|
+
const _ = L == null ? void 0 : L.find((Y) => Y.field.toLowerCase() === A.value.toLowerCase());
|
|
1726
|
+
return _ && (A.label = _.title), A;
|
|
1727
1727
|
});
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1730
|
-
g.columns && (g.columns =
|
|
1729
|
+
function C(g) {
|
|
1730
|
+
g.columns && (g.columns = D(g.columns), g.searchFields && (g.searchFields = V(g.searchFields, g.columns))), g.navigation && g.navigation.columns && (g.navigation.columns = D(g.navigation.columns), g.navigation.searchFields && (g.navigation.searchFields = V(g.navigation.searchFields, g.navigation.columns)));
|
|
1731
1731
|
}
|
|
1732
|
-
function
|
|
1732
|
+
function q() {
|
|
1733
1733
|
return l.loader || n && n.getData.bind(n);
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1737
|
-
return
|
|
1738
|
-
|
|
1735
|
+
function R(g) {
|
|
1736
|
+
const L = q();
|
|
1737
|
+
return L ? L(l.uri, g).then((A) => (C(A), r.value = !1, A)) : new Promise((A, _) => {
|
|
1738
|
+
A({
|
|
1739
1739
|
...e
|
|
1740
1740
|
});
|
|
1741
1741
|
});
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const
|
|
1745
|
-
return
|
|
1743
|
+
function j(g) {
|
|
1744
|
+
const L = u();
|
|
1745
|
+
return L === -1 ? !0 : L === 0 ? !1 : g <= L;
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function S(g, L = !1, A = "layer") {
|
|
1748
1748
|
g.forEach((_) => {
|
|
1749
|
-
var
|
|
1750
|
-
_.collapse =
|
|
1749
|
+
var Y;
|
|
1750
|
+
_.collapse = L ? !1 : l.loadTreeDataType === "all" ? !j(Me(_.data, A)) : !(_.expanded ?? !0), _.hasChildren = !_.leaf, (Y = _.children) != null && Y.length && S(_.children, L, A);
|
|
1751
1751
|
});
|
|
1752
1752
|
}
|
|
1753
|
-
async function
|
|
1754
|
-
var
|
|
1755
|
-
const
|
|
1753
|
+
async function k(g, L) {
|
|
1754
|
+
var Y;
|
|
1755
|
+
const A = I(g), _ = t == null ? void 0 : t.show();
|
|
1756
1756
|
try {
|
|
1757
|
-
let ee = await
|
|
1757
|
+
let ee = await R(A);
|
|
1758
1758
|
if (l.displayType !== ee.displayType && g.action !== "navsearch" && (l.displayType = ee.displayType), v()) {
|
|
1759
|
-
const { items:
|
|
1760
|
-
if (l.loadDataType === be.default && (l.loadTreeDataType = (J == null ? void 0 : J.loadDataType) || be.all),
|
|
1761
|
-
const { dataField:
|
|
1762
|
-
|
|
1759
|
+
const { items: ne, treeInfo: J } = ee.navigation || ee;
|
|
1760
|
+
if (l.loadDataType === be.default && (l.loadTreeDataType = (J == null ? void 0 : J.loadDataType) || be.all), ne != null && ne.length && J) {
|
|
1761
|
+
const { dataField: O, layerField: z } = J;
|
|
1762
|
+
S(ne, !1, `${O}.${z}`);
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
e.beforeLoadData && (ee = await e.beforeLoadData({ data: ee })),
|
|
1765
|
+
e.beforeLoadData && (ee = await e.beforeLoadData({ data: ee })), L(ee);
|
|
1766
1766
|
} finally {
|
|
1767
|
-
(
|
|
1767
|
+
(Y = _ == null ? void 0 : _.value) == null || Y.close();
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1771
|
-
|
|
1770
|
+
function x(g) {
|
|
1771
|
+
F.value = g;
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1774
|
-
if (!
|
|
1773
|
+
function P(g, L) {
|
|
1774
|
+
if (!L)
|
|
1775
1775
|
return "";
|
|
1776
|
-
const { dataField:
|
|
1777
|
-
return _ ?
|
|
1776
|
+
const { dataField: A, pathField: _ } = L;
|
|
1777
|
+
return _ ? A ? g[A][_] : Me(g, _) : "";
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1780
|
-
const
|
|
1781
|
-
return (g.selectable || g.selectable === void 0) &&
|
|
1782
|
-
|
|
1783
|
-
}),
|
|
1779
|
+
function X(g) {
|
|
1780
|
+
const L = [];
|
|
1781
|
+
return (g.selectable || g.selectable === void 0) && L.push(g), g.children && g.children.length && g.children.forEach((A) => {
|
|
1782
|
+
L.push(...X(A));
|
|
1783
|
+
}), L;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function ie(g, L = !1) {
|
|
1786
1786
|
var ee;
|
|
1787
1787
|
if (!(g != null && g.length))
|
|
1788
1788
|
return g;
|
|
1789
|
-
const
|
|
1790
|
-
return _ &&
|
|
1789
|
+
const A = L ? (ee = l.navigation) == null ? void 0 : ee.treeInfo : l.treeInfo, { dataField: _, layerField: Y } = A || {};
|
|
1790
|
+
return _ && Y && S(g, !0, `${_}.${Y}`), g;
|
|
1791
1791
|
}
|
|
1792
1792
|
function $() {
|
|
1793
1793
|
try {
|
|
1794
|
-
const g =
|
|
1794
|
+
const g = y.value;
|
|
1795
1795
|
return g !== "" && g != null ? g : "";
|
|
1796
1796
|
} catch (g) {
|
|
1797
1797
|
return console.error("Error in getIdValues:", g), "";
|
|
@@ -1802,27 +1802,27 @@ function kn(e, a) {
|
|
|
1802
1802
|
return Array.isArray(g) || (g = ("" + g).split(e.separator)), { selectedIds: g, selected: !0 };
|
|
1803
1803
|
}
|
|
1804
1804
|
return {
|
|
1805
|
-
includeChilds:
|
|
1806
|
-
updateIncludeChilds:
|
|
1807
|
-
idValues:
|
|
1808
|
-
getData:
|
|
1809
|
-
loadData:
|
|
1810
|
-
updateSearchFieldTitle:
|
|
1811
|
-
getPathCode:
|
|
1812
|
-
getChildNodes:
|
|
1805
|
+
includeChilds: F,
|
|
1806
|
+
updateIncludeChilds: x,
|
|
1807
|
+
idValues: y,
|
|
1808
|
+
getData: R,
|
|
1809
|
+
loadData: k,
|
|
1810
|
+
updateSearchFieldTitle: V,
|
|
1811
|
+
getPathCode: P,
|
|
1812
|
+
getChildNodes: X,
|
|
1813
1813
|
lookupStates: i,
|
|
1814
1814
|
httpService: n,
|
|
1815
|
-
lookupRequest:
|
|
1816
|
-
expandAllNodes:
|
|
1815
|
+
lookupRequest: q,
|
|
1816
|
+
expandAllNodes: ie,
|
|
1817
1817
|
getIdQueryParams: Z,
|
|
1818
1818
|
setTreeInfo: h,
|
|
1819
|
-
getFieldValue:
|
|
1819
|
+
getFieldValue: Me
|
|
1820
1820
|
};
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1823
|
-
|
|
1822
|
+
function mt(e, a) {
|
|
1823
|
+
W(() => e.pagination, (n) => {
|
|
1824
1824
|
a.default = n;
|
|
1825
|
-
}),
|
|
1825
|
+
}), W(() => {
|
|
1826
1826
|
var n;
|
|
1827
1827
|
return (n = e.navigation) == null ? void 0 : n.pagination;
|
|
1828
1828
|
}, (n) => {
|
|
@@ -1835,11 +1835,11 @@ function gt(e, a) {
|
|
|
1835
1835
|
updatePageInfo: t
|
|
1836
1836
|
};
|
|
1837
1837
|
}
|
|
1838
|
-
const
|
|
1839
|
-
function
|
|
1840
|
-
const t =
|
|
1838
|
+
const ze = "F_LOOKUP_USER_DATA_SERVICE";
|
|
1839
|
+
function Ln(e, a) {
|
|
1840
|
+
const t = Q("FLoadingService", null), { lookupStates: n, lookupRequest: i, httpService: o } = a, { lookupOptions: s } = n, c = H(() => {
|
|
1841
1841
|
const v = s.userDataKey || e.id;
|
|
1842
|
-
return v ?
|
|
1842
|
+
return v ? Wt(v) : "";
|
|
1843
1843
|
}), l = he({ key: c.value, data: {} });
|
|
1844
1844
|
function r() {
|
|
1845
1845
|
return o ? o.getSettings(l.key).then((v) => (v && v.textValue ? l.data = JSON.parse(v.textValue) : l.data = {}, e.enableUserData || (l.data.tabIndex = ue.dataList), v)) : Promise.resolve();
|
|
@@ -1860,7 +1860,7 @@ function Pn(e, a) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
return Promise.resolve();
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function y(v) {
|
|
1864
1864
|
const h = { category: "fav", favoriteIds: v.favoriteIds };
|
|
1865
1865
|
return {
|
|
1866
1866
|
searchValue: JSON.stringify(h),
|
|
@@ -1869,25 +1869,25 @@ function Pn(e, a) {
|
|
|
1869
1869
|
treeToList: s.treeToList
|
|
1870
1870
|
};
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function F() {
|
|
1873
1873
|
var u;
|
|
1874
|
-
const v =
|
|
1874
|
+
const v = y({ favoriteIds: (u = l.data) == null ? void 0 : u.favorites }), h = t == null ? void 0 : t.show(), p = i();
|
|
1875
1875
|
return p ? p(s.uri, v).then((m) => {
|
|
1876
|
-
var
|
|
1877
|
-
return (
|
|
1876
|
+
var T;
|
|
1877
|
+
return (T = h.value) == null || T.close(), l.favoriteItems = m && m.items || [], m;
|
|
1878
1878
|
}) : Promise.resolve();
|
|
1879
1879
|
}
|
|
1880
1880
|
return {
|
|
1881
1881
|
userDataState: l,
|
|
1882
1882
|
setDialogSize: d,
|
|
1883
1883
|
saveUserData: f,
|
|
1884
|
-
getFavoriteData:
|
|
1884
|
+
getFavoriteData: F,
|
|
1885
1885
|
getUserData: r
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
|
-
const
|
|
1889
|
-
function
|
|
1890
|
-
const { t: a } =
|
|
1888
|
+
const Ie = Symbol("FARRIS_LOOKUP_LOCALES");
|
|
1889
|
+
function xn(e) {
|
|
1890
|
+
const { t: a } = Gt();
|
|
1891
1891
|
function t(r, d, f) {
|
|
1892
1892
|
return r === d ? a(f) : r;
|
|
1893
1893
|
}
|
|
@@ -1927,24 +1927,24 @@ function Ln(e) {
|
|
|
1927
1927
|
buttons: o
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1931
|
-
const t =
|
|
1930
|
+
function Je(e, a) {
|
|
1931
|
+
const t = Q(Ge), n = Q(ze), i = Q(Ie), {
|
|
1932
1932
|
userDataState: o
|
|
1933
1933
|
} = n;
|
|
1934
1934
|
o.data = o.data || {};
|
|
1935
|
-
const s = "_favorite_", c =
|
|
1935
|
+
const s = "_favorite_", c = N(!1);
|
|
1936
1936
|
function l({
|
|
1937
1937
|
id: u,
|
|
1938
1938
|
data: m
|
|
1939
|
-
},
|
|
1940
|
-
var
|
|
1939
|
+
}, T = "add") {
|
|
1940
|
+
var D, V;
|
|
1941
1941
|
if (u == null && u === "")
|
|
1942
1942
|
return;
|
|
1943
1943
|
const I = u;
|
|
1944
|
-
o.data.favorites = ((
|
|
1945
|
-
const
|
|
1944
|
+
o.data.favorites = ((D = o.data) == null ? void 0 : D.favorites) || [], o.favoriteItems = o.favoriteItems || [], T === "add" ? (c.value = !1, o.data.favorites = Array.from(/* @__PURE__ */ new Set([...((V = o.data) == null ? void 0 : V.favorites) || [], I])), o.favoriteItems = [...o.favoriteItems, m]) : (c.value = !0, o.data.favorites = o.data.favorites.filter((C) => C !== I), o.favoriteItems = o.favoriteItems.filter((C) => C[a] !== I)), n == null || n.saveUserData(!0).then((C) => {
|
|
1945
|
+
const q = T === "add" ? i.messages.addedFavSuccess : i.messages.cancelFavSuccess;
|
|
1946
1946
|
t == null || t.success({
|
|
1947
|
-
message:
|
|
1947
|
+
message: q,
|
|
1948
1948
|
position: "top-center"
|
|
1949
1949
|
});
|
|
1950
1950
|
});
|
|
@@ -1952,12 +1952,12 @@ function He(e, a) {
|
|
|
1952
1952
|
function r(u) {
|
|
1953
1953
|
return u ? u.raw[a] : "";
|
|
1954
1954
|
}
|
|
1955
|
-
const d =
|
|
1956
|
-
var
|
|
1955
|
+
const d = H(() => (u) => {
|
|
1956
|
+
var T, I;
|
|
1957
1957
|
const m = r(u);
|
|
1958
|
-
return (I = (
|
|
1958
|
+
return (I = (T = o.data) == null ? void 0 : T.favorites) == null ? void 0 : I.includes(m);
|
|
1959
1959
|
});
|
|
1960
|
-
function f(u, m,
|
|
1960
|
+
function f(u, m, T) {
|
|
1961
1961
|
u.stopPropagation();
|
|
1962
1962
|
const I = r(m);
|
|
1963
1963
|
l({
|
|
@@ -1965,27 +1965,27 @@ function He(e, a) {
|
|
|
1965
1965
|
data: m.raw
|
|
1966
1966
|
}, d.value(m) ? "remove" : "add");
|
|
1967
1967
|
}
|
|
1968
|
-
const
|
|
1968
|
+
const y = (u) => d.value(u) ? i.buttons.removeFav : i.buttons.addFav, F = (u, m) => E("button", {
|
|
1969
1969
|
type: "button",
|
|
1970
|
-
onClick: (
|
|
1971
|
-
f(
|
|
1970
|
+
onClick: (T) => {
|
|
1971
|
+
f(T, m);
|
|
1972
1972
|
},
|
|
1973
1973
|
class: ["btn btn-link f-icon f-icon-star-outline p-0", {
|
|
1974
1974
|
"f-icon-star": d.value(m)
|
|
1975
1975
|
}],
|
|
1976
1976
|
style: "color: #ffbd8c;",
|
|
1977
|
-
title:
|
|
1978
|
-
}, null), v = (u, m) => m.disabled ? "" :
|
|
1977
|
+
title: y(m)
|
|
1978
|
+
}, null), v = (u, m) => m.disabled ? "" : F(u, m), h = {
|
|
1979
1979
|
field: s,
|
|
1980
1980
|
title: "",
|
|
1981
1981
|
width: 50,
|
|
1982
1982
|
fixed: "right",
|
|
1983
1983
|
align: "center",
|
|
1984
|
-
formatter:
|
|
1984
|
+
formatter: F
|
|
1985
1985
|
};
|
|
1986
|
-
function p(u, m,
|
|
1987
|
-
const I =
|
|
1988
|
-
e.enableFavorite && (h.formatter =
|
|
1986
|
+
function p(u, m, T = !1) {
|
|
1987
|
+
const I = Pe(m);
|
|
1988
|
+
e.enableFavorite && (h.formatter = T ? v : F, I.push(h)), u == null || u.updateColumns(I);
|
|
1989
1989
|
}
|
|
1990
1990
|
return {
|
|
1991
1991
|
favorite: h,
|
|
@@ -1993,25 +1993,25 @@ function He(e, a) {
|
|
|
1993
1993
|
setColumns: p
|
|
1994
1994
|
};
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1997
|
-
const { selectionState: i, unSelectDataId: o, lookupOptions: s } = t, c =
|
|
1998
|
-
n &&
|
|
1996
|
+
function Qe(e, a, t, n) {
|
|
1997
|
+
const { selectionState: i, unSelectDataId: o, lookupOptions: s } = t, c = H(() => !(i.value && i.value.length));
|
|
1998
|
+
n && W(() => n.value, (l, r) => {
|
|
1999
1999
|
var d;
|
|
2000
2000
|
if (l === ue.dataList && l !== r && !c.value) {
|
|
2001
|
-
const f = i.value.map((
|
|
2001
|
+
const f = i.value.map((y) => y[s.idField]);
|
|
2002
2002
|
(d = a.value) == null || d.selectItemByIds(f);
|
|
2003
2003
|
}
|
|
2004
|
-
}),
|
|
2004
|
+
}), W(c, (l, r) => {
|
|
2005
2005
|
var d;
|
|
2006
2006
|
l && ((d = a.value) == null || d.clearSelection());
|
|
2007
|
-
}), e.showSelections && s.multiSelect &&
|
|
2007
|
+
}), e.showSelections && s.multiSelect && W(o, (l) => {
|
|
2008
2008
|
var r;
|
|
2009
2009
|
l && ((r = a.value) == null || r.unSelectItemByIds(l));
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
|
-
const
|
|
2013
|
-
function
|
|
2014
|
-
const { selectionState: t, unSelectDataId: n, lookupOptions: i } = a, o =
|
|
2012
|
+
const Fe = Symbol("LOOKUP_SELECTIONS_MANAGER");
|
|
2013
|
+
function vt(e, a) {
|
|
2014
|
+
const { selectionState: t, unSelectDataId: n, lookupOptions: i } = a, o = H(() => i.idField);
|
|
2015
2015
|
function s(u) {
|
|
2016
2016
|
return u[o.value];
|
|
2017
2017
|
}
|
|
@@ -2035,51 +2035,51 @@ function mt(e, a) {
|
|
|
2035
2035
|
console.error("idField is required");
|
|
2036
2036
|
return;
|
|
2037
2037
|
}
|
|
2038
|
-
const m = Array.isArray(u) ? u : [u],
|
|
2038
|
+
const m = Array.isArray(u) ? u : [u], T = c();
|
|
2039
2039
|
m.forEach((I) => {
|
|
2040
|
-
|
|
2041
|
-
}), t.value = Array.from(
|
|
2040
|
+
T.delete(I);
|
|
2041
|
+
}), t.value = Array.from(T.values()), n.value = m;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function y(u) {
|
|
2044
2044
|
return c().has(u);
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function F(u, m = !0) {
|
|
2047
2047
|
if (!u)
|
|
2048
2048
|
return;
|
|
2049
2049
|
if (!o.value) {
|
|
2050
2050
|
console.error("idField is required");
|
|
2051
2051
|
return;
|
|
2052
2052
|
}
|
|
2053
|
-
const
|
|
2054
|
-
if (!
|
|
2053
|
+
const T = Array.isArray(u) ? u : [u];
|
|
2054
|
+
if (!T.length)
|
|
2055
2055
|
return;
|
|
2056
|
-
if (!
|
|
2056
|
+
if (!T.every((V) => o.value in V)) {
|
|
2057
2057
|
console.error("Some items do not have the specified idField:", o.value);
|
|
2058
2058
|
return;
|
|
2059
2059
|
}
|
|
2060
|
-
const I =
|
|
2060
|
+
const I = T.map((V) => V[o.value]);
|
|
2061
2061
|
if (!i.multiSelect) {
|
|
2062
|
-
if (I.length &&
|
|
2062
|
+
if (I.length && y(I[0]))
|
|
2063
2063
|
return;
|
|
2064
2064
|
l();
|
|
2065
2065
|
}
|
|
2066
|
-
const
|
|
2066
|
+
const D = c();
|
|
2067
2067
|
if (m) {
|
|
2068
|
-
const
|
|
2069
|
-
I.forEach((
|
|
2070
|
-
|
|
2068
|
+
const V = new Map(T.map((C) => [C[o.value], C]));
|
|
2069
|
+
I.forEach((C) => {
|
|
2070
|
+
D.has(C) || D.set(C, V.get(C));
|
|
2071
2071
|
});
|
|
2072
2072
|
} else
|
|
2073
|
-
I.forEach((
|
|
2074
|
-
|
|
2073
|
+
I.forEach((V) => {
|
|
2074
|
+
D.delete(V);
|
|
2075
2075
|
});
|
|
2076
|
-
t.value = Array.from(
|
|
2076
|
+
t.value = Array.from(D.values());
|
|
2077
2077
|
}
|
|
2078
2078
|
function v(u) {
|
|
2079
2079
|
if (!u || !u.length)
|
|
2080
2080
|
return;
|
|
2081
|
-
const m = u.map((
|
|
2082
|
-
|
|
2081
|
+
const m = u.map((T) => T.data);
|
|
2082
|
+
F(m);
|
|
2083
2083
|
}
|
|
2084
2084
|
function h(u) {
|
|
2085
2085
|
if (u) {
|
|
@@ -2091,7 +2091,7 @@ function mt(e, a) {
|
|
|
2091
2091
|
!u || !u.length || f(u);
|
|
2092
2092
|
}
|
|
2093
2093
|
return {
|
|
2094
|
-
updateSelections:
|
|
2094
|
+
updateSelections: F,
|
|
2095
2095
|
clearSelections: l,
|
|
2096
2096
|
getSelectionIds: d,
|
|
2097
2097
|
getSelections: r,
|
|
@@ -2099,12 +2099,12 @@ function mt(e, a) {
|
|
|
2099
2099
|
selectTreeNodes: v,
|
|
2100
2100
|
unSelectTreeNode: h,
|
|
2101
2101
|
unSelectTreeNodes: p,
|
|
2102
|
-
isSelected:
|
|
2102
|
+
isSelected: y,
|
|
2103
2103
|
getPrimaryKey: s
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2107
|
-
const { getSelectionIds: t } =
|
|
2106
|
+
function bt(e, a) {
|
|
2107
|
+
const { getSelectionIds: t } = vt(e, a), { lookupOptions: n } = a;
|
|
2108
2108
|
function i(c, l) {
|
|
2109
2109
|
c == null || c.updateDataSource(l || []);
|
|
2110
2110
|
}
|
|
@@ -2123,8 +2123,8 @@ function vt(e, a) {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
return { loadData: i, selectItemByIds: o, loadAndSelect: s };
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2127
|
-
const n =
|
|
2126
|
+
function yt(e, a, t) {
|
|
2127
|
+
const n = Q(xe, N(ue.dataList)), i = Q(ve), o = Q(Fe), {
|
|
2128
2128
|
lookupStates: s,
|
|
2129
2129
|
loadData: c,
|
|
2130
2130
|
includeChilds: l,
|
|
@@ -2132,174 +2132,171 @@ function bt(e, a, t) {
|
|
|
2132
2132
|
getChildNodes: d
|
|
2133
2133
|
} = i, {
|
|
2134
2134
|
lookupState: f,
|
|
2135
|
-
navigationState:
|
|
2136
|
-
pageInfoState:
|
|
2135
|
+
navigationState: y,
|
|
2136
|
+
pageInfoState: F,
|
|
2137
2137
|
searchState: v,
|
|
2138
2138
|
lookupOptions: h
|
|
2139
2139
|
} = s, {
|
|
2140
2140
|
checkPaination: p,
|
|
2141
2141
|
checkMultiSelect: u,
|
|
2142
2142
|
checkColumnOptions: m,
|
|
2143
|
-
navIsTreeList:
|
|
2144
|
-
|
|
2145
|
-
|
|
2143
|
+
navIsTreeList: T,
|
|
2144
|
+
isLoadAll: I,
|
|
2145
|
+
isPathCodeTree: D
|
|
2146
|
+
} = Te(e, s), {
|
|
2146
2147
|
updatePageInfo: V
|
|
2147
|
-
} =
|
|
2148
|
-
updateSelections:
|
|
2149
|
-
isSelected:
|
|
2150
|
-
getPrimaryKey:
|
|
2148
|
+
} = mt(e, F), {
|
|
2149
|
+
updateSelections: C,
|
|
2150
|
+
isSelected: q,
|
|
2151
|
+
getPrimaryKey: R
|
|
2151
2152
|
} = o, {
|
|
2152
|
-
loadAndSelect:
|
|
2153
|
-
} =
|
|
2154
|
-
navSelectedItems:
|
|
2155
|
-
getNavigationIdField:
|
|
2156
|
-
getRelationFilter:
|
|
2153
|
+
loadAndSelect: j
|
|
2154
|
+
} = bt(e, s), S = p(e.pagination), k = u(), x = m(), P = N(), X = N([]), {
|
|
2155
|
+
navSelectedItems: ie,
|
|
2156
|
+
getNavigationIdField: $,
|
|
2157
|
+
getRelationFilter: Z
|
|
2157
2158
|
} = t;
|
|
2158
|
-
V(
|
|
2159
|
-
const
|
|
2160
|
-
setColumns:
|
|
2161
|
-
} =
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2159
|
+
V(S);
|
|
2160
|
+
const g = N(F.default), {
|
|
2161
|
+
setColumns: L
|
|
2162
|
+
} = Je(e, h.idField), A = N({
|
|
2163
|
+
"lookup-datagrid": !0,
|
|
2164
|
+
"lookup-datagrid-empty": !1
|
|
2165
|
+
});
|
|
2166
|
+
W(() => F.default, (U) => {
|
|
2167
|
+
var K;
|
|
2168
|
+
g.value = U, (K = P.value) == null || K.updatePagination(U);
|
|
2169
|
+
}), Qe(e, P, i.lookupStates, n);
|
|
2170
|
+
function _(U, K, se) {
|
|
2171
|
+
const de = {
|
|
2172
|
+
total: K
|
|
2169
2173
|
};
|
|
2170
2174
|
if (se) {
|
|
2171
2175
|
const {
|
|
2172
2176
|
pageIndex: fe,
|
|
2173
|
-
pageSize:
|
|
2174
|
-
enablePager:
|
|
2175
|
-
pageList:
|
|
2177
|
+
pageSize: _e,
|
|
2178
|
+
enablePager: $e,
|
|
2179
|
+
pageList: Ye
|
|
2176
2180
|
} = se;
|
|
2177
|
-
Object.assign(
|
|
2181
|
+
Object.assign(de, {
|
|
2178
2182
|
index: fe,
|
|
2179
|
-
size:
|
|
2180
|
-
enable:
|
|
2183
|
+
size: _e,
|
|
2184
|
+
enable: $e
|
|
2181
2185
|
});
|
|
2182
2186
|
} else
|
|
2183
|
-
|
|
2184
|
-
V(
|
|
2187
|
+
de.enable = !1;
|
|
2188
|
+
V(de), j(P.value, U || []), A.value["lookup-datagrid-empty"] = !(U && U.length);
|
|
2185
2189
|
}
|
|
2186
|
-
const
|
|
2190
|
+
const Y = H(() => {
|
|
2187
2191
|
var fe;
|
|
2188
|
-
if (!((fe =
|
|
2192
|
+
if (!((fe = ie.value) != null && fe.length))
|
|
2189
2193
|
return null;
|
|
2190
|
-
const
|
|
2191
|
-
relationFilter:
|
|
2194
|
+
const U = ie.value, K = {
|
|
2195
|
+
relationFilter: Z(U)
|
|
2192
2196
|
};
|
|
2193
|
-
if (!
|
|
2194
|
-
return
|
|
2197
|
+
if (!T() || !l.value)
|
|
2198
|
+
return K;
|
|
2195
2199
|
const {
|
|
2196
2200
|
treeInfo: se
|
|
2197
|
-
} =
|
|
2201
|
+
} = y, de = {
|
|
2198
2202
|
action: "navAllChildren",
|
|
2199
|
-
...
|
|
2203
|
+
...K
|
|
2200
2204
|
};
|
|
2201
|
-
return
|
|
2202
|
-
navNodePathCode: r(
|
|
2203
|
-
}) :
|
|
2204
|
-
}),
|
|
2205
|
-
P.value && (
|
|
2205
|
+
return D(se) ? Object.assign(de, {
|
|
2206
|
+
navNodePathCode: r(U[0].data, se)
|
|
2207
|
+
}) : de;
|
|
2208
|
+
}), ee = W([() => f == null ? void 0 : f.columns, () => f == null ? void 0 : f.items, () => f == null ? void 0 : f.pageInfo, () => f == null ? void 0 : f.total, () => f == null ? void 0 : f.selectedData], ([U, K, se, de, fe]) => {
|
|
2209
|
+
P.value && (U && L(P.value, U), fe && fe.length && C(fe), K && _(K, de || 0, se));
|
|
2206
2210
|
});
|
|
2207
|
-
|
|
2208
|
-
|
|
2211
|
+
W(() => e.idValue, (U) => {
|
|
2212
|
+
X.value = U.split(e.separator);
|
|
2209
2213
|
});
|
|
2210
|
-
function
|
|
2211
|
-
if (
|
|
2212
|
-
const
|
|
2213
|
-
if (
|
|
2214
|
+
function ne(U) {
|
|
2215
|
+
if (U && U.length && !h.multiSelect) {
|
|
2216
|
+
const K = R(U[0]);
|
|
2217
|
+
if (q(K))
|
|
2214
2218
|
return;
|
|
2215
2219
|
}
|
|
2216
|
-
|
|
2217
|
-
items:
|
|
2220
|
+
C(U), a.emit("selectionsChanged", {
|
|
2221
|
+
items: U
|
|
2218
2222
|
});
|
|
2219
2223
|
}
|
|
2220
|
-
function
|
|
2221
|
-
!h.multiSelect && e.openType === "Modal" && (
|
|
2222
|
-
items: [
|
|
2224
|
+
function J(U, K) {
|
|
2225
|
+
!h.multiSelect && e.openType === "Modal" && (C([K]), a.emit("dblClickRow", {
|
|
2226
|
+
items: [K]
|
|
2223
2227
|
}));
|
|
2224
2228
|
}
|
|
2225
|
-
function
|
|
2226
|
-
|
|
2229
|
+
function O(U) {
|
|
2230
|
+
C(U == null ? void 0 : U.raw, !1);
|
|
2227
2231
|
}
|
|
2228
|
-
function
|
|
2229
|
-
const
|
|
2232
|
+
function z() {
|
|
2233
|
+
const U = {
|
|
2230
2234
|
search: v.default,
|
|
2231
2235
|
action: "list"
|
|
2232
2236
|
};
|
|
2233
|
-
e.openType === "Modal" &&
|
|
2234
|
-
|
|
2237
|
+
e.openType === "Modal" && Y.value && Object.assign(U, Y.value), c(U, (K) => {
|
|
2238
|
+
_(K.items, K.total || 0, K.pageInfo);
|
|
2235
2239
|
});
|
|
2236
2240
|
}
|
|
2237
|
-
const
|
|
2241
|
+
const w = jt(() => {
|
|
2238
2242
|
V({
|
|
2239
2243
|
index: 1
|
|
2240
|
-
}),
|
|
2241
|
-
}, 200),
|
|
2244
|
+
}), z();
|
|
2245
|
+
}, 200), b = W(() => ie == null ? void 0 : ie.value, (U) => {
|
|
2242
2246
|
if (h.uri) {
|
|
2243
|
-
|
|
2247
|
+
w();
|
|
2244
2248
|
return;
|
|
2245
2249
|
}
|
|
2246
|
-
const
|
|
2250
|
+
const K = U.map((se) => se[$()]);
|
|
2247
2251
|
a.emit("navSelectionsChanged", {
|
|
2248
|
-
items:
|
|
2249
|
-
ids:
|
|
2252
|
+
items: U,
|
|
2253
|
+
ids: K
|
|
2250
2254
|
});
|
|
2251
|
-
}),
|
|
2255
|
+
}), M = W(() => v.default, (U) => {
|
|
2252
2256
|
if (h.uri) {
|
|
2253
|
-
|
|
2257
|
+
w();
|
|
2254
2258
|
return;
|
|
2255
2259
|
}
|
|
2256
|
-
a.emit("search",
|
|
2257
|
-
}),
|
|
2258
|
-
if (h.uri &&
|
|
2259
|
-
|
|
2260
|
+
a.emit("search", U);
|
|
2261
|
+
}), G = W(() => l.value, () => {
|
|
2262
|
+
if (h.uri && ie.value && ie.value.length) {
|
|
2263
|
+
w();
|
|
2260
2264
|
return;
|
|
2261
2265
|
}
|
|
2262
2266
|
});
|
|
2263
|
-
function
|
|
2264
|
-
|
|
2267
|
+
function te() {
|
|
2268
|
+
ee(), b(), M(), G();
|
|
2265
2269
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2270
|
+
W(() => h.displayType, (U) => {
|
|
2271
|
+
U.toLowerCase() === "treelist" && te();
|
|
2268
2272
|
});
|
|
2269
|
-
function
|
|
2270
|
-
pageSize:
|
|
2271
|
-
pageIndex:
|
|
2273
|
+
function le({
|
|
2274
|
+
pageSize: U,
|
|
2275
|
+
pageIndex: K
|
|
2272
2276
|
}) {
|
|
2273
2277
|
var fe;
|
|
2274
|
-
let se =
|
|
2275
|
-
((fe =
|
|
2276
|
-
const
|
|
2277
|
-
size:
|
|
2278
|
+
let se = K;
|
|
2279
|
+
((fe = g.value) == null ? void 0 : fe.size) !== U && (se = 1);
|
|
2280
|
+
const de = {
|
|
2281
|
+
size: U,
|
|
2278
2282
|
index: se,
|
|
2279
2283
|
isNavigation: !1
|
|
2280
2284
|
};
|
|
2281
|
-
if (V(
|
|
2282
|
-
|
|
2285
|
+
if (V(de), h.uri) {
|
|
2286
|
+
z();
|
|
2283
2287
|
return;
|
|
2284
2288
|
}
|
|
2285
|
-
a.emit("pageSizeChanged",
|
|
2289
|
+
a.emit("pageSizeChanged", de);
|
|
2286
2290
|
}
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
return {
|
|
2290
|
-
"lookup-datagrid": !0,
|
|
2291
|
-
"lookup-datagrid-empty": !((j = f.items) != null && j.length)
|
|
2292
|
-
};
|
|
2293
|
-
});
|
|
2294
|
-
function re() {
|
|
2295
|
-
return E(Ae, {
|
|
2291
|
+
function ye() {
|
|
2292
|
+
return E(Re, {
|
|
2296
2293
|
ref: P,
|
|
2297
|
-
class:
|
|
2298
|
-
pagination:
|
|
2294
|
+
class: A.value,
|
|
2295
|
+
pagination: g.value,
|
|
2299
2296
|
summary: {
|
|
2300
2297
|
enable: !1
|
|
2301
2298
|
},
|
|
2302
|
-
columnOption:
|
|
2299
|
+
columnOption: x,
|
|
2303
2300
|
idField: h.idField,
|
|
2304
2301
|
rowNumber: {
|
|
2305
2302
|
enable: !1
|
|
@@ -2307,27 +2304,27 @@ function bt(e, a, t) {
|
|
|
2307
2304
|
showBorder: !0,
|
|
2308
2305
|
virtualized: !0,
|
|
2309
2306
|
fit: !0,
|
|
2310
|
-
selection:
|
|
2311
|
-
selectionValues:
|
|
2312
|
-
onSelectionUpdate:
|
|
2313
|
-
onUnSelectItem:
|
|
2314
|
-
onChanged:
|
|
2315
|
-
onDoubleClickRow:
|
|
2307
|
+
selection: k,
|
|
2308
|
+
selectionValues: X.value,
|
|
2309
|
+
onSelectionUpdate: ne,
|
|
2310
|
+
onUnSelectItem: O,
|
|
2311
|
+
onChanged: le,
|
|
2312
|
+
onDoubleClickRow: J
|
|
2316
2313
|
}, null);
|
|
2317
2314
|
}
|
|
2318
2315
|
return {
|
|
2319
2316
|
datagridRef: P,
|
|
2320
|
-
selectionValues:
|
|
2321
|
-
renderDataGrid:
|
|
2322
|
-
unwatches:
|
|
2317
|
+
selectionValues: X,
|
|
2318
|
+
renderDataGrid: ye,
|
|
2319
|
+
unwatches: te
|
|
2323
2320
|
};
|
|
2324
2321
|
}
|
|
2325
|
-
const
|
|
2322
|
+
const Ee = Symbol("LOOKUP_TREEROW_OPTIONS"), Ct = {
|
|
2326
2323
|
cascadeOption: { autoCheckChildren: !1, autoCheckParent: !1 },
|
|
2327
2324
|
collapseField: "collapse",
|
|
2328
2325
|
hasChildrenField: "hasChildren"
|
|
2329
2326
|
};
|
|
2330
|
-
function
|
|
2327
|
+
function St(e, a = !1) {
|
|
2331
2328
|
function t(n) {
|
|
2332
2329
|
(n.raw.addtional || n.raw.selectable === !1) && (n.disabled = !0);
|
|
2333
2330
|
const i = a ? e.navTreeInfo : e.treeInfo;
|
|
@@ -2335,16 +2332,16 @@ function Ct(e, a = !1) {
|
|
|
2335
2332
|
}
|
|
2336
2333
|
return { customRowStatus: t };
|
|
2337
2334
|
}
|
|
2338
|
-
function
|
|
2335
|
+
function Tt(e, a) {
|
|
2339
2336
|
const { lookupState: t, lookupOptions: n } = e;
|
|
2340
2337
|
function i(p, u, m) {
|
|
2341
|
-
return p.reduce((
|
|
2342
|
-
var
|
|
2338
|
+
return p.reduce((T, I) => {
|
|
2339
|
+
var D;
|
|
2343
2340
|
if (I.parents = [], u) {
|
|
2344
|
-
const
|
|
2345
|
-
I.parent = u, I.parents = [...m || [],
|
|
2341
|
+
const V = Ce(u.data, n.idField);
|
|
2342
|
+
I.parent = u, I.parents = [...m || [], V];
|
|
2346
2343
|
}
|
|
2347
|
-
return I.id =
|
|
2344
|
+
return I.id = Ce(I, n.idField), T.push(I), (D = I.children) != null && D.length && T.push(...i(I.children, I, I.parents)), T;
|
|
2348
2345
|
}, []);
|
|
2349
2346
|
}
|
|
2350
2347
|
function o(p) {
|
|
@@ -2354,8 +2351,8 @@ function St(e, a) {
|
|
|
2354
2351
|
function s(p) {
|
|
2355
2352
|
var u;
|
|
2356
2353
|
return ((u = t == null ? void 0 : t.flattenTreeNodes) == null ? void 0 : u.filter((m) => {
|
|
2357
|
-
var
|
|
2358
|
-
return (
|
|
2354
|
+
var T;
|
|
2355
|
+
return (T = m.parents) == null ? void 0 : T.includes(p);
|
|
2359
2356
|
})) ?? [];
|
|
2360
2357
|
}
|
|
2361
2358
|
function c(p) {
|
|
@@ -2363,95 +2360,95 @@ function St(e, a) {
|
|
|
2363
2360
|
if (!p)
|
|
2364
2361
|
return [];
|
|
2365
2362
|
const u = o(p);
|
|
2366
|
-
return ((m = u == null ? void 0 : u.parents) == null ? void 0 : m.map((
|
|
2363
|
+
return ((m = u == null ? void 0 : u.parents) == null ? void 0 : m.map((T) => o(T))) ?? [];
|
|
2367
2364
|
}
|
|
2368
2365
|
function l(p) {
|
|
2369
2366
|
var I;
|
|
2370
2367
|
if (!p)
|
|
2371
2368
|
return [];
|
|
2372
|
-
const u = o(p), m = ((I = u == null ? void 0 : u.parents) == null ? void 0 : I.map((
|
|
2373
|
-
return [...m, ...
|
|
2369
|
+
const u = o(p), m = ((I = u == null ? void 0 : u.parents) == null ? void 0 : I.map((D) => o(D))) ?? [], T = s(p);
|
|
2370
|
+
return [...m, ...T];
|
|
2374
2371
|
}
|
|
2375
2372
|
function r(p, u = !0) {
|
|
2376
2373
|
const m = c(p).filter(
|
|
2377
2374
|
(I) => {
|
|
2378
|
-
var
|
|
2379
|
-
return !((
|
|
2380
|
-
(
|
|
2381
|
-
var
|
|
2382
|
-
return (
|
|
2383
|
-
(
|
|
2375
|
+
var D;
|
|
2376
|
+
return !((D = I.children) != null && D.some(
|
|
2377
|
+
(V) => {
|
|
2378
|
+
var C;
|
|
2379
|
+
return (C = e.selectionState.value) == null ? void 0 : C.some(
|
|
2380
|
+
(q) => q[n.idField] === V.id
|
|
2384
2381
|
);
|
|
2385
2382
|
}
|
|
2386
2383
|
));
|
|
2387
2384
|
}
|
|
2388
|
-
),
|
|
2389
|
-
return m.concat(
|
|
2385
|
+
), T = u ? [] : s(p);
|
|
2386
|
+
return m.concat(T);
|
|
2390
2387
|
}
|
|
2391
2388
|
function d(p, u, m = !0) {
|
|
2392
2389
|
var I;
|
|
2393
|
-
const
|
|
2390
|
+
const T = {
|
|
2394
2391
|
down: () => s(p),
|
|
2395
2392
|
up: () => m ? c(p) : r(p),
|
|
2396
2393
|
both: () => m ? l(p) : r(p, !1)
|
|
2397
2394
|
};
|
|
2398
|
-
return ((I =
|
|
2395
|
+
return ((I = T[u]) == null ? void 0 : I.call(T)) ?? [];
|
|
2399
2396
|
}
|
|
2400
2397
|
function f(p, u = {}, m = !1) {
|
|
2401
|
-
const { field:
|
|
2402
|
-
if (
|
|
2403
|
-
|
|
2398
|
+
const { field: T = "*", value: I = "" } = u, D = !!I, { layerType: V, dataField: C, pathField: q, layerField: R } = m ? n.navTreeInfo : n.treeInfo, j = V === "parentId", S = { category: m ? "navchildren" : "children", searchField: T, searchValue: I, searchType: "like" };
|
|
2399
|
+
if (j)
|
|
2400
|
+
S.parentId = p.raw.id;
|
|
2404
2401
|
else {
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2402
|
+
const x = p.raw[C];
|
|
2403
|
+
S.parentPath = Ce(x, q), S.parentLayer = Ce(x, R);
|
|
2407
2404
|
}
|
|
2408
|
-
const
|
|
2405
|
+
const k = {
|
|
2409
2406
|
searchValue: "",
|
|
2410
|
-
customData:
|
|
2407
|
+
customData: Le.value,
|
|
2411
2408
|
enableFullTree: n.enableFullTree,
|
|
2412
2409
|
loadTreeDataType: n.loadTreeDataType === "all" ? "loadall" : "layerload"
|
|
2413
2410
|
};
|
|
2414
|
-
return
|
|
2411
|
+
return D && (k.enableFullTree = !1, k.loadTreeDataType = "layerload", j && (S.searchValue = "", S.searchField = "*")), k.searchValue = JSON.stringify(S), k;
|
|
2415
2412
|
}
|
|
2416
|
-
function
|
|
2417
|
-
const { isEnableCascadeCheck: m } = a, { layerType:
|
|
2413
|
+
function y(p, u = !1) {
|
|
2414
|
+
const { isEnableCascadeCheck: m } = a, { layerType: T } = u ? n.navTreeInfo : n.treeInfo, I = n.loadTreeDataType !== "all" && T === "pathcode" && m() && (n.cascadeValue === "both" || n.cascadeValue === "down");
|
|
2418
2415
|
return p ? p.data && !p.leaf && I : I;
|
|
2419
2416
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const { dataField: u, pathField: m } = n.treeInfo,
|
|
2417
|
+
function F(p) {
|
|
2418
|
+
const { dataField: u, pathField: m } = n.treeInfo, T = p.data[u], I = Ce(T, m);
|
|
2422
2419
|
return {
|
|
2423
2420
|
searchValue: JSON.stringify({ category: "allChildren" }),
|
|
2424
2421
|
parentsIds: [I],
|
|
2425
|
-
customData:
|
|
2422
|
+
customData: Le.value
|
|
2426
2423
|
};
|
|
2427
2424
|
}
|
|
2428
2425
|
function v(p, u) {
|
|
2429
|
-
let m = p,
|
|
2426
|
+
let m = p, T = null;
|
|
2430
2427
|
for (const I of u) {
|
|
2431
|
-
const
|
|
2432
|
-
if (!
|
|
2428
|
+
const D = m.find((V) => V.data.id === I);
|
|
2429
|
+
if (!D)
|
|
2433
2430
|
return null;
|
|
2434
|
-
|
|
2431
|
+
T = D, m = D.children || [];
|
|
2435
2432
|
}
|
|
2436
|
-
return
|
|
2433
|
+
return T;
|
|
2437
2434
|
}
|
|
2438
2435
|
function h(p, u, m) {
|
|
2439
|
-
var
|
|
2436
|
+
var q;
|
|
2440
2437
|
if (!m)
|
|
2441
2438
|
return;
|
|
2442
|
-
const
|
|
2443
|
-
...
|
|
2444
|
-
hasChildren: !
|
|
2439
|
+
const T = o(u), I = [...(T == null ? void 0 : T.parents) ?? [], u], D = (p ?? []).map((R) => ({
|
|
2440
|
+
...R,
|
|
2441
|
+
hasChildren: !R.leaf,
|
|
2445
2442
|
parents: [...I]
|
|
2446
|
-
})),
|
|
2447
|
-
|
|
2448
|
-
const { isDropdownMode:
|
|
2449
|
-
|
|
2450
|
-
var
|
|
2451
|
-
if (m.addChildrenToNode(
|
|
2443
|
+
})), V = v(t.flattenTreeNodes || [], I);
|
|
2444
|
+
V && (V.children = [...D], (q = t.flattenTreeNodes) == null || q.push(...D));
|
|
2445
|
+
const { isDropdownMode: C } = a;
|
|
2446
|
+
qe(() => {
|
|
2447
|
+
var S;
|
|
2448
|
+
if (m.addChildrenToNode(D, u), C())
|
|
2452
2449
|
return;
|
|
2453
|
-
const
|
|
2454
|
-
|
|
2450
|
+
const R = ((S = e.selectionState.value) == null ? void 0 : S.map((k) => k[n.idField])) ?? [], j = D.filter((k) => R.includes(k.id)).map((k) => k.id);
|
|
2451
|
+
j.length && m.selectItemByIds(j);
|
|
2455
2452
|
});
|
|
2456
2453
|
}
|
|
2457
2454
|
return {
|
|
@@ -2461,129 +2458,129 @@ function St(e, a) {
|
|
|
2461
2458
|
getParentsAndChildren: l,
|
|
2462
2459
|
getTreeNodeWithCascadeValue: d,
|
|
2463
2460
|
buildGetChildrenQueryParams: f,
|
|
2464
|
-
needGetAllChildNodes:
|
|
2465
|
-
buildGetAllChildrenQueryParams:
|
|
2461
|
+
needGetAllChildNodes: y,
|
|
2462
|
+
buildGetAllChildrenQueryParams: F,
|
|
2466
2463
|
loadChildNodes: h
|
|
2467
2464
|
};
|
|
2468
2465
|
}
|
|
2469
|
-
function
|
|
2470
|
-
const t =
|
|
2466
|
+
function wt(e, a) {
|
|
2467
|
+
const t = Q(xe, N(ue.dataList)), n = Q(ve), {
|
|
2471
2468
|
lookupStates: i
|
|
2472
2469
|
} = n, {
|
|
2473
2470
|
lookupState: o,
|
|
2474
2471
|
searchState: s,
|
|
2475
2472
|
lookupOptions: c
|
|
2476
|
-
} = i, l =
|
|
2473
|
+
} = i, l = Q(Ee), r = Q(Fe), d = Te(e, i), {
|
|
2477
2474
|
checkMultiSelect: f,
|
|
2478
|
-
checkColumnOptions:
|
|
2479
|
-
isEnableCascadeCheck:
|
|
2475
|
+
checkColumnOptions: y,
|
|
2476
|
+
isEnableCascadeCheck: F
|
|
2480
2477
|
} = d, {
|
|
2481
2478
|
setColumns: v
|
|
2482
|
-
} =
|
|
2479
|
+
} = Je(e, c.idField), {
|
|
2483
2480
|
selectTreeNodes: h,
|
|
2484
2481
|
unSelectTreeNode: p,
|
|
2485
2482
|
unSelectTreeNodes: u,
|
|
2486
2483
|
updateSelections: m,
|
|
2487
|
-
getSelectionIds:
|
|
2488
|
-
} = r, I = f(),
|
|
2489
|
-
loadAndSelect:
|
|
2490
|
-
} =
|
|
2491
|
-
loadData:
|
|
2492
|
-
expandAllNodes:
|
|
2493
|
-
getData:
|
|
2484
|
+
getSelectionIds: T
|
|
2485
|
+
} = r, I = f(), D = y(), V = N(), C = N([]), {
|
|
2486
|
+
loadAndSelect: q
|
|
2487
|
+
} = bt(e, i), {
|
|
2488
|
+
loadData: R,
|
|
2489
|
+
expandAllNodes: j,
|
|
2490
|
+
getData: S
|
|
2494
2491
|
} = n, {
|
|
2495
|
-
flattenTreeNodes:
|
|
2496
|
-
getTreeNodeWithCascadeValue:
|
|
2497
|
-
buildGetChildrenQueryParams:
|
|
2498
|
-
needGetAllChildNodes:
|
|
2499
|
-
buildGetAllChildrenQueryParams:
|
|
2492
|
+
flattenTreeNodes: k,
|
|
2493
|
+
getTreeNodeWithCascadeValue: x,
|
|
2494
|
+
buildGetChildrenQueryParams: P,
|
|
2495
|
+
needGetAllChildNodes: X,
|
|
2496
|
+
buildGetAllChildrenQueryParams: ie,
|
|
2500
2497
|
loadChildNodes: $
|
|
2501
|
-
} =
|
|
2502
|
-
function Z(
|
|
2503
|
-
|
|
2498
|
+
} = Tt(i, d);
|
|
2499
|
+
function Z(b, M = !1) {
|
|
2500
|
+
M && (b = j(b)), o.flattenTreeNodes = k(b || []), q(V.value, b || []);
|
|
2504
2501
|
}
|
|
2505
|
-
|
|
2506
|
-
const g =
|
|
2507
|
-
|
|
2502
|
+
Qe(e, V, i, t);
|
|
2503
|
+
const g = W([() => o == null ? void 0 : o.columns, () => o == null ? void 0 : o.items, () => o == null ? void 0 : o.pageInfo, () => o == null ? void 0 : o.total, () => o == null ? void 0 : o.selectedData], ([b, M, G, te, le]) => {
|
|
2504
|
+
V.value && (le && le.length && m(le), b && v(V.value, b, !0), Z(M || [], o.action === "search"));
|
|
2508
2505
|
});
|
|
2509
|
-
function
|
|
2506
|
+
function L(b, M = !0) {
|
|
2510
2507
|
const {
|
|
2511
|
-
cascadeValue:
|
|
2508
|
+
cascadeValue: G
|
|
2512
2509
|
} = c;
|
|
2513
|
-
return
|
|
2510
|
+
return F() && G !== ut.Disable ? x(b, G, M).filter((le) => le.selectable || le.selectable === void 0).map((le) => le.id) : [];
|
|
2514
2511
|
}
|
|
2515
|
-
function
|
|
2516
|
-
h(
|
|
2517
|
-
items:
|
|
2512
|
+
function A(b) {
|
|
2513
|
+
h(b), a.emit("selectionsChanged", {
|
|
2514
|
+
items: b
|
|
2518
2515
|
});
|
|
2519
2516
|
}
|
|
2520
|
-
function _(
|
|
2521
|
-
p(
|
|
2522
|
-
const
|
|
2523
|
-
if (
|
|
2524
|
-
const te =
|
|
2525
|
-
|
|
2526
|
-
const
|
|
2527
|
-
|
|
2528
|
-
const
|
|
2529
|
-
u([
|
|
2517
|
+
function _(b) {
|
|
2518
|
+
p(b);
|
|
2519
|
+
const M = Ce(b.raw, c.idField), G = L(M);
|
|
2520
|
+
if (X(b.raw)) {
|
|
2521
|
+
const te = ie(b.raw);
|
|
2522
|
+
S(te).then((le) => {
|
|
2523
|
+
const U = (le.items || []).filter((se) => !se.addtional && (se.selectable || se.selectable === void 0));
|
|
2524
|
+
U && U.length && h(U);
|
|
2525
|
+
const K = (U || []).map((se) => se.id);
|
|
2526
|
+
u([M, ...G, ...K]);
|
|
2530
2527
|
});
|
|
2531
2528
|
} else
|
|
2532
|
-
u([
|
|
2533
|
-
}
|
|
2534
|
-
function
|
|
2535
|
-
const
|
|
2536
|
-
if (
|
|
2537
|
-
const te =
|
|
2538
|
-
|
|
2539
|
-
const
|
|
2540
|
-
|
|
2529
|
+
u([M, ...G]);
|
|
2530
|
+
}
|
|
2531
|
+
function Y(b) {
|
|
2532
|
+
const M = Ce(b.raw, c.idField), G = L(M);
|
|
2533
|
+
if (G.length && V.value.selectItemByIds([M, ...G]), X(b.raw)) {
|
|
2534
|
+
const te = ie(b.raw);
|
|
2535
|
+
S(te).then((le) => {
|
|
2536
|
+
const U = (le.items || []).filter((K) => !K.addtional && (K.selectable || K.selectable === void 0));
|
|
2537
|
+
U && U.length && h(U);
|
|
2541
2538
|
});
|
|
2542
2539
|
}
|
|
2543
2540
|
}
|
|
2544
|
-
function ee(
|
|
2545
|
-
|
|
2541
|
+
function ee(b = "list") {
|
|
2542
|
+
R({
|
|
2546
2543
|
search: s.default,
|
|
2547
|
-
action:
|
|
2548
|
-
}, (
|
|
2549
|
-
Z(
|
|
2544
|
+
action: b
|
|
2545
|
+
}, (M) => {
|
|
2546
|
+
Z(M.items, b === "search");
|
|
2550
2547
|
});
|
|
2551
2548
|
}
|
|
2552
|
-
const
|
|
2549
|
+
const ne = W(() => s.default, (b) => {
|
|
2553
2550
|
if (c.uri) {
|
|
2554
2551
|
ee("search");
|
|
2555
2552
|
return;
|
|
2556
2553
|
}
|
|
2557
|
-
a.emit("search",
|
|
2554
|
+
a.emit("search", b);
|
|
2558
2555
|
});
|
|
2559
2556
|
function J() {
|
|
2560
|
-
g(),
|
|
2557
|
+
g(), ne();
|
|
2561
2558
|
}
|
|
2562
|
-
|
|
2563
|
-
|
|
2559
|
+
W(() => c.displayType, (b) => {
|
|
2560
|
+
b.toLowerCase() !== "treelist" && J();
|
|
2564
2561
|
});
|
|
2565
|
-
function
|
|
2566
|
-
if (
|
|
2562
|
+
function O(b) {
|
|
2563
|
+
if (V.value.hasChildren(b))
|
|
2567
2564
|
return Promise.resolve();
|
|
2568
|
-
const
|
|
2569
|
-
return
|
|
2570
|
-
$((te == null ? void 0 : te.items) ?? [],
|
|
2565
|
+
const M = b.raw.id, G = P(b, s.default);
|
|
2566
|
+
return S(G).then((te) => {
|
|
2567
|
+
$((te == null ? void 0 : te.items) ?? [], M, V.value);
|
|
2571
2568
|
});
|
|
2572
2569
|
}
|
|
2573
|
-
function
|
|
2570
|
+
function z(b) {
|
|
2574
2571
|
var te;
|
|
2575
2572
|
const {
|
|
2576
|
-
node:
|
|
2577
|
-
$event:
|
|
2578
|
-
} =
|
|
2579
|
-
c.enableFavorite && ((te =
|
|
2580
|
-
items: [
|
|
2573
|
+
node: M,
|
|
2574
|
+
$event: G
|
|
2575
|
+
} = b;
|
|
2576
|
+
c.enableFavorite && ((te = G.target) == null ? void 0 : te.className.indexOf("f-icon-star")) > -1 || !c.multiSelect && e.openType === "Modal" && (m([M]), a.emit("dblClickRow", {
|
|
2577
|
+
items: [M]
|
|
2581
2578
|
}));
|
|
2582
2579
|
}
|
|
2583
|
-
function
|
|
2584
|
-
return E(
|
|
2580
|
+
function w() {
|
|
2581
|
+
return E(He, {
|
|
2585
2582
|
class: "lookup-treegrid",
|
|
2586
|
-
ref:
|
|
2583
|
+
ref: V,
|
|
2587
2584
|
fit: !0,
|
|
2588
2585
|
data: e.data,
|
|
2589
2586
|
idField: c.idField,
|
|
@@ -2591,75 +2588,75 @@ function Tt(e, a) {
|
|
|
2591
2588
|
rowNumber: {
|
|
2592
2589
|
enable: !1
|
|
2593
2590
|
},
|
|
2594
|
-
columnOption:
|
|
2591
|
+
columnOption: D,
|
|
2595
2592
|
selection: I,
|
|
2596
2593
|
showBorder: !0,
|
|
2597
2594
|
virtualized: !0,
|
|
2598
2595
|
displayField: "code",
|
|
2599
2596
|
rowOption: l,
|
|
2600
|
-
hierarchy:
|
|
2601
|
-
onSelectionUpdate:
|
|
2597
|
+
hierarchy: Ct,
|
|
2598
|
+
onSelectionUpdate: A,
|
|
2602
2599
|
onUnSelectItem: _,
|
|
2603
|
-
onSelectItem:
|
|
2604
|
-
loadData:
|
|
2605
|
-
onDblclickNode:
|
|
2600
|
+
onSelectItem: Y,
|
|
2601
|
+
loadData: O,
|
|
2602
|
+
onDblclickNode: z
|
|
2606
2603
|
}, null);
|
|
2607
2604
|
}
|
|
2608
2605
|
return {
|
|
2609
|
-
treegridRef:
|
|
2610
|
-
selectionTreeValues:
|
|
2611
|
-
renderTreeGrid:
|
|
2606
|
+
treegridRef: V,
|
|
2607
|
+
selectionTreeValues: C,
|
|
2608
|
+
renderTreeGrid: w,
|
|
2612
2609
|
unwatches: J
|
|
2613
2610
|
};
|
|
2614
2611
|
}
|
|
2615
|
-
const
|
|
2612
|
+
const En = {
|
|
2616
2613
|
fields: { type: Array, default: () => [] },
|
|
2617
2614
|
showAllColumns: { type: Boolean, default: !0 },
|
|
2618
2615
|
isNavigation: { type: Boolean, default: !1 },
|
|
2619
2616
|
id: { type: String, default: "" },
|
|
2620
2617
|
enableEqualSearch: { type: Boolean, default: !1 },
|
|
2621
2618
|
exactLabel: { type: String, default: "精确" }
|
|
2622
|
-
},
|
|
2619
|
+
}, Vn = /* @__PURE__ */ me({
|
|
2623
2620
|
name: "FLookupSearchBar",
|
|
2624
|
-
props:
|
|
2621
|
+
props: En,
|
|
2625
2622
|
emits: ["search"],
|
|
2626
2623
|
setup(e, a) {
|
|
2627
|
-
const t = '<i id="' + e.id + '-icon-search" class="f-icon f-icon-search"></i>', n =
|
|
2624
|
+
const t = '<i id="' + e.id + '-icon-search" class="f-icon f-icon-search"></i>', n = Q(ve), {
|
|
2628
2625
|
queryState: i
|
|
2629
|
-
} = n.lookupStates, o =
|
|
2626
|
+
} = n.lookupStates, o = N(e.fields || []), s = N(""), c = N(i.value), l = N(e.isNavigation), r = N(), d = N(!1), f = H(() => ({
|
|
2630
2627
|
field: s.value,
|
|
2631
2628
|
value: c.value,
|
|
2632
2629
|
isNavigation: l.value,
|
|
2633
2630
|
type: d.value ? "equal" : "like"
|
|
2634
2631
|
}));
|
|
2635
|
-
function
|
|
2632
|
+
function y() {
|
|
2636
2633
|
if (!o.value.length)
|
|
2637
2634
|
return;
|
|
2638
2635
|
let u = "";
|
|
2639
2636
|
e.showAllColumns && (u = "*"), u = o.value[0].value;
|
|
2640
|
-
const m = o.value.find((
|
|
2637
|
+
const m = o.value.find((T) => !!T.isDefault);
|
|
2641
2638
|
m && (u = m.value), s.value = u;
|
|
2642
2639
|
}
|
|
2643
|
-
|
|
2644
|
-
o.value = u,
|
|
2640
|
+
W(() => e.fields, (u) => {
|
|
2641
|
+
o.value = u, y();
|
|
2645
2642
|
});
|
|
2646
|
-
function
|
|
2643
|
+
function F() {
|
|
2647
2644
|
a.emit("search", f.value);
|
|
2648
2645
|
}
|
|
2649
|
-
const v =
|
|
2646
|
+
const v = st(() => F(), 300);
|
|
2650
2647
|
function h() {
|
|
2651
|
-
c.value = "",
|
|
2648
|
+
c.value = "", F();
|
|
2652
2649
|
}
|
|
2653
2650
|
function p(u) {
|
|
2654
2651
|
u.key === "Enter" && v();
|
|
2655
2652
|
}
|
|
2656
|
-
return
|
|
2657
|
-
|
|
2653
|
+
return Se(() => {
|
|
2654
|
+
y(), l.value && (c.value = "");
|
|
2658
2655
|
}), () => E("div", {
|
|
2659
2656
|
class: "fv-lookup-search-bar d-flex flex-row"
|
|
2660
2657
|
}, [E("div", {
|
|
2661
2658
|
style: "width: 160px;"
|
|
2662
|
-
}, [E(
|
|
2659
|
+
}, [E(rt, {
|
|
2663
2660
|
ref: r,
|
|
2664
2661
|
data: o.value,
|
|
2665
2662
|
textField: "label",
|
|
@@ -2670,13 +2667,13 @@ const xn = {
|
|
|
2670
2667
|
enableClear: !1
|
|
2671
2668
|
}, null)]), E("div", {
|
|
2672
2669
|
class: "f-utils-fill ml-2 d-flex align-items-center"
|
|
2673
|
-
}, [E(
|
|
2670
|
+
}, [E(lt, {
|
|
2674
2671
|
buttonContent: t,
|
|
2675
2672
|
class: "f-utils-fill",
|
|
2676
2673
|
maxLength: 200,
|
|
2677
2674
|
modelValue: c.value,
|
|
2678
2675
|
"onUpdate:modelValue": (u) => c.value = u,
|
|
2679
|
-
onClickButton:
|
|
2676
|
+
onClickButton: F,
|
|
2680
2677
|
enableClear: !0,
|
|
2681
2678
|
onClear: h,
|
|
2682
2679
|
onKeyup: p,
|
|
@@ -2684,19 +2681,19 @@ const xn = {
|
|
|
2684
2681
|
id: e.id + "-search-bar"
|
|
2685
2682
|
}, null), e.enableEqualSearch && E("div", {
|
|
2686
2683
|
class: "custom-control custom-checkbox custom-control-inline pr-0 m-0 ml-2"
|
|
2687
|
-
}, [
|
|
2684
|
+
}, [We(E("input", {
|
|
2688
2685
|
class: "custom-control-input",
|
|
2689
2686
|
id: "farris-lookup_searchtype-equal",
|
|
2690
2687
|
type: "checkbox",
|
|
2691
2688
|
"onUpdate:modelValue": (u) => d.value = u
|
|
2692
|
-
}, null), [[
|
|
2689
|
+
}, null), [[it, d.value]]), E("label", {
|
|
2693
2690
|
class: "custom-control-label btn-link lookup-checkbox-label",
|
|
2694
2691
|
for: "farris-lookup_searchtype-equal",
|
|
2695
2692
|
style: "padding-left:18px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
|
|
2696
2693
|
}, [e.exactLabel])])])]);
|
|
2697
2694
|
}
|
|
2698
2695
|
});
|
|
2699
|
-
function
|
|
2696
|
+
function Xe(e, a, t, n) {
|
|
2700
2697
|
const {
|
|
2701
2698
|
lookupState: i,
|
|
2702
2699
|
searchState: o,
|
|
@@ -2704,7 +2701,7 @@ function Qe(e, a, t, n) {
|
|
|
2704
2701
|
} = t, {
|
|
2705
2702
|
searchFieldItems: c,
|
|
2706
2703
|
navSearchFieldItems: l
|
|
2707
|
-
} =
|
|
2704
|
+
} = gt(e, i, s), r = N([]), d = N([]);
|
|
2708
2705
|
function f(p, u = !1) {
|
|
2709
2706
|
let m = p;
|
|
2710
2707
|
e.searchAnyField && (m = [{
|
|
@@ -2712,19 +2709,19 @@ function Qe(e, a, t, n) {
|
|
|
2712
2709
|
value: "*"
|
|
2713
2710
|
}].concat(p)), u ? d.value = m : r.value = m;
|
|
2714
2711
|
}
|
|
2715
|
-
f(c.value), f(l.value, !0),
|
|
2712
|
+
f(c.value), f(l.value, !0), W(() => c.value, (p) => {
|
|
2716
2713
|
f(p);
|
|
2717
|
-
}),
|
|
2714
|
+
}), W(() => l.value, (p) => {
|
|
2718
2715
|
f(p, !0);
|
|
2719
2716
|
});
|
|
2720
|
-
function
|
|
2717
|
+
function y() {
|
|
2721
2718
|
const {
|
|
2722
2719
|
displayType: p,
|
|
2723
2720
|
treeToList: u
|
|
2724
2721
|
} = t.lookupOptions;
|
|
2725
|
-
return (p.toLowerCase() ===
|
|
2722
|
+
return (p.toLowerCase() === ce.Tree.toLowerCase() || p.toLowerCase() === ce.ListTree.toLowerCase()) && !u;
|
|
2726
2723
|
}
|
|
2727
|
-
function
|
|
2724
|
+
function F(p) {
|
|
2728
2725
|
const u = {
|
|
2729
2726
|
...p
|
|
2730
2727
|
};
|
|
@@ -2734,18 +2731,18 @@ function Qe(e, a, t, n) {
|
|
|
2734
2731
|
}
|
|
2735
2732
|
o.default = u;
|
|
2736
2733
|
}
|
|
2737
|
-
const v =
|
|
2734
|
+
const v = H(() => a ? d.value || [] : r.value || []);
|
|
2738
2735
|
function h() {
|
|
2739
2736
|
if (e.enableSearchBar && v.value.length > 0)
|
|
2740
2737
|
return E("div", {
|
|
2741
2738
|
class: "p-2"
|
|
2742
|
-
}, [E(
|
|
2739
|
+
}, [E(Vn, {
|
|
2743
2740
|
fields: v.value,
|
|
2744
2741
|
id: e.id,
|
|
2745
2742
|
showAllColumns: e.searchAnyField,
|
|
2746
2743
|
isNavigation: a,
|
|
2747
|
-
onSearch:
|
|
2748
|
-
enableEqualSearch: e.enableEqualSearch && !a && !
|
|
2744
|
+
onSearch: F,
|
|
2745
|
+
enableEqualSearch: e.enableEqualSearch && !a && !y(),
|
|
2749
2746
|
exactLabel: n.searchColumns.exactLabel || "精确"
|
|
2750
2747
|
}, null)]);
|
|
2751
2748
|
}
|
|
@@ -2753,9 +2750,9 @@ function Qe(e, a, t, n) {
|
|
|
2753
2750
|
renderSearchBar: h
|
|
2754
2751
|
};
|
|
2755
2752
|
}
|
|
2756
|
-
function
|
|
2753
|
+
function Mn(e, a) {
|
|
2757
2754
|
var J;
|
|
2758
|
-
const t =
|
|
2755
|
+
const t = Q(Ee), n = Q(ve), i = Q(Ie), {
|
|
2759
2756
|
loadData: o,
|
|
2760
2757
|
lookupStates: s,
|
|
2761
2758
|
expandAllNodes: c,
|
|
@@ -2764,162 +2761,162 @@ function Vn(e, a) {
|
|
|
2764
2761
|
} = n, {
|
|
2765
2762
|
navigationState: d,
|
|
2766
2763
|
pageInfoState: f,
|
|
2767
|
-
searchState:
|
|
2768
|
-
lookupOptions:
|
|
2764
|
+
searchState: y,
|
|
2765
|
+
lookupOptions: F
|
|
2769
2766
|
} = s, {
|
|
2770
2767
|
renderSearchBar: v
|
|
2771
|
-
} =
|
|
2768
|
+
} = Xe(e, !0, s, i), h = Te(e, s), {
|
|
2772
2769
|
checkPaination: p,
|
|
2773
2770
|
navIsList: u,
|
|
2774
2771
|
navIsTreeList: m
|
|
2775
2772
|
} = h, {
|
|
2776
|
-
updatePageInfo:
|
|
2777
|
-
} =
|
|
2778
|
-
buildGetChildrenQueryParams:
|
|
2779
|
-
loadChildNodes:
|
|
2780
|
-
} =
|
|
2773
|
+
updatePageInfo: T
|
|
2774
|
+
} = mt(e, f), I = N([]), {
|
|
2775
|
+
buildGetChildrenQueryParams: D,
|
|
2776
|
+
loadChildNodes: V
|
|
2777
|
+
} = Tt(s, h);
|
|
2781
2778
|
if (u()) {
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2779
|
+
const O = p((J = e.navigation) == null ? void 0 : J.pagination);
|
|
2780
|
+
T(O, !0);
|
|
2784
2781
|
}
|
|
2785
|
-
const
|
|
2782
|
+
const C = N(f.navigation), q = {
|
|
2786
2783
|
enableSelectRow: !0,
|
|
2787
2784
|
multiSelect: !1,
|
|
2788
2785
|
showCheckbox: !1,
|
|
2789
2786
|
keepSelectingOnClick: !1
|
|
2790
|
-
},
|
|
2787
|
+
}, R = {
|
|
2791
2788
|
fitColumns: !0,
|
|
2792
2789
|
fitMode: "percentage",
|
|
2793
2790
|
resizeColumn: !0
|
|
2794
|
-
},
|
|
2795
|
-
|
|
2796
|
-
var
|
|
2797
|
-
|
|
2791
|
+
}, j = N(), S = N(), k = N("id");
|
|
2792
|
+
W(() => f.navigation, (O) => {
|
|
2793
|
+
var z;
|
|
2794
|
+
C.value = O, (z = S.value) == null || z.updatePagination(O);
|
|
2798
2795
|
});
|
|
2799
|
-
function
|
|
2800
|
-
var
|
|
2801
|
-
if (
|
|
2796
|
+
function x(O, z, w) {
|
|
2797
|
+
var b, M, G;
|
|
2798
|
+
if (O = O || [], u()) {
|
|
2802
2799
|
const te = {
|
|
2803
|
-
total:
|
|
2800
|
+
total: z
|
|
2804
2801
|
};
|
|
2805
|
-
if (
|
|
2802
|
+
if (w) {
|
|
2806
2803
|
const {
|
|
2807
|
-
pageIndex:
|
|
2808
|
-
pageSize:
|
|
2809
|
-
enablePager:
|
|
2810
|
-
pageList:
|
|
2811
|
-
} =
|
|
2804
|
+
pageIndex: le,
|
|
2805
|
+
pageSize: ye,
|
|
2806
|
+
enablePager: U,
|
|
2807
|
+
pageList: K
|
|
2808
|
+
} = w;
|
|
2812
2809
|
Object.assign(te, {
|
|
2813
|
-
index:
|
|
2814
|
-
size:
|
|
2815
|
-
enable:
|
|
2810
|
+
index: le,
|
|
2811
|
+
size: ye,
|
|
2812
|
+
enable: U
|
|
2816
2813
|
});
|
|
2817
2814
|
}
|
|
2818
|
-
|
|
2819
|
-
} else m() && ((
|
|
2815
|
+
T(te, !0), (b = S.value) == null || b.updateDataSource(O);
|
|
2816
|
+
} else m() && ((M = y.navigation) != null && M.value && (O = c(O, !0)), (G = j.value) == null || G.updateDataSource(O));
|
|
2820
2817
|
}
|
|
2821
|
-
function
|
|
2822
|
-
var
|
|
2823
|
-
u() ? (
|
|
2818
|
+
function P(O) {
|
|
2819
|
+
var z, w;
|
|
2820
|
+
u() ? (z = S.value) == null || z.updateColumns(O) : m() && ((w = j.value) == null || w.updateColumns(O));
|
|
2824
2821
|
}
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
}),
|
|
2828
|
-
|
|
2822
|
+
W([() => d == null ? void 0 : d.columns, () => d == null ? void 0 : d.items, () => d == null ? void 0 : d.pageInfo, () => d == null ? void 0 : d.total], ([O, z, w, b]) => {
|
|
2823
|
+
O && P(O), x(z, b || 0, w);
|
|
2824
|
+
}), W(() => d == null ? void 0 : d.idField, (O) => {
|
|
2825
|
+
k.value = O || "id";
|
|
2829
2826
|
});
|
|
2830
|
-
function
|
|
2831
|
-
I.value =
|
|
2827
|
+
function X(O) {
|
|
2828
|
+
I.value = O;
|
|
2832
2829
|
}
|
|
2833
|
-
function
|
|
2834
|
-
I.value =
|
|
2830
|
+
function ie(O) {
|
|
2831
|
+
I.value = O;
|
|
2835
2832
|
}
|
|
2836
2833
|
function $() {
|
|
2837
2834
|
o({
|
|
2838
|
-
search:
|
|
2835
|
+
search: y.navigation,
|
|
2839
2836
|
action: "navsearch"
|
|
2840
|
-
}, (
|
|
2841
|
-
|
|
2837
|
+
}, (O) => {
|
|
2838
|
+
x(O.items, O.total || 0, O.pageInfo);
|
|
2842
2839
|
});
|
|
2843
2840
|
}
|
|
2844
|
-
|
|
2845
|
-
if (
|
|
2846
|
-
|
|
2841
|
+
W(() => y.navigation, (O) => {
|
|
2842
|
+
if (F.uri) {
|
|
2843
|
+
T({
|
|
2847
2844
|
index: 1
|
|
2848
2845
|
}, !0), $();
|
|
2849
2846
|
return;
|
|
2850
2847
|
}
|
|
2851
|
-
a.emit("search",
|
|
2848
|
+
a.emit("search", O);
|
|
2852
2849
|
});
|
|
2853
2850
|
function Z({
|
|
2854
|
-
pageSize:
|
|
2855
|
-
pageIndex:
|
|
2851
|
+
pageSize: O,
|
|
2852
|
+
pageIndex: z
|
|
2856
2853
|
}) {
|
|
2857
|
-
var
|
|
2858
|
-
let
|
|
2859
|
-
((
|
|
2860
|
-
const
|
|
2861
|
-
size:
|
|
2862
|
-
index:
|
|
2854
|
+
var M;
|
|
2855
|
+
let w = z;
|
|
2856
|
+
((M = C.value) == null ? void 0 : M.size) !== O && (w = 1);
|
|
2857
|
+
const b = {
|
|
2858
|
+
size: O,
|
|
2859
|
+
index: w
|
|
2863
2860
|
};
|
|
2864
|
-
if (
|
|
2861
|
+
if (T(b, !0), F.uri) {
|
|
2865
2862
|
$();
|
|
2866
2863
|
return;
|
|
2867
2864
|
}
|
|
2868
|
-
a.emit("pageSizeChanged",
|
|
2865
|
+
a.emit("pageSizeChanged", b);
|
|
2869
2866
|
}
|
|
2870
|
-
function g(
|
|
2871
|
-
if (
|
|
2867
|
+
function g(O) {
|
|
2868
|
+
if (j.value.hasChildren(O))
|
|
2872
2869
|
return Promise.resolve();
|
|
2873
|
-
const
|
|
2874
|
-
return r(
|
|
2875
|
-
|
|
2870
|
+
const z = O.raw.id, w = D(O, y.navigation, !0);
|
|
2871
|
+
return r(w).then((b) => {
|
|
2872
|
+
V((b == null ? void 0 : b.items) ?? [], z, j.value);
|
|
2876
2873
|
});
|
|
2877
2874
|
}
|
|
2878
|
-
function
|
|
2879
|
-
return E(
|
|
2880
|
-
ref:
|
|
2875
|
+
function L() {
|
|
2876
|
+
return E(He, {
|
|
2877
|
+
ref: j,
|
|
2881
2878
|
fit: !0,
|
|
2882
|
-
idField:
|
|
2879
|
+
idField: k.value,
|
|
2883
2880
|
rowNumber: {
|
|
2884
2881
|
enable: !1
|
|
2885
2882
|
},
|
|
2886
|
-
columnOption:
|
|
2887
|
-
selection:
|
|
2883
|
+
columnOption: R,
|
|
2884
|
+
selection: q,
|
|
2888
2885
|
virtualized: !0,
|
|
2889
2886
|
showBorder: !0,
|
|
2890
2887
|
rowOption: t,
|
|
2891
|
-
hierarchy:
|
|
2892
|
-
onSelectionUpdate:
|
|
2888
|
+
hierarchy: Ct,
|
|
2889
|
+
onSelectionUpdate: X,
|
|
2893
2890
|
loadData: g
|
|
2894
2891
|
}, null);
|
|
2895
2892
|
}
|
|
2896
|
-
function
|
|
2897
|
-
return E(
|
|
2898
|
-
ref:
|
|
2899
|
-
pagination:
|
|
2893
|
+
function A() {
|
|
2894
|
+
return E(Re, {
|
|
2895
|
+
ref: S,
|
|
2896
|
+
pagination: C.value,
|
|
2900
2897
|
summary: {
|
|
2901
2898
|
enable: !1
|
|
2902
2899
|
},
|
|
2903
|
-
columnOption:
|
|
2904
|
-
idField:
|
|
2900
|
+
columnOption: R,
|
|
2901
|
+
idField: k.value,
|
|
2905
2902
|
rowNumber: {
|
|
2906
2903
|
enable: !1
|
|
2907
2904
|
},
|
|
2908
2905
|
showBorder: !0,
|
|
2909
2906
|
fit: !0,
|
|
2910
2907
|
virtualized: !0,
|
|
2911
|
-
selection:
|
|
2912
|
-
onSelectionUpdate:
|
|
2908
|
+
selection: q,
|
|
2909
|
+
onSelectionUpdate: ie,
|
|
2913
2910
|
onChanged: Z
|
|
2914
2911
|
}, null);
|
|
2915
2912
|
}
|
|
2916
2913
|
function _() {
|
|
2917
2914
|
if (m())
|
|
2918
|
-
return
|
|
2915
|
+
return L();
|
|
2919
2916
|
if (u())
|
|
2920
|
-
return
|
|
2917
|
+
return A();
|
|
2921
2918
|
}
|
|
2922
|
-
function
|
|
2919
|
+
function Y() {
|
|
2923
2920
|
return E("div", {
|
|
2924
2921
|
class: "d-flex h-100 w-100 flex-column"
|
|
2925
2922
|
}, [v(), E("div", {
|
|
@@ -2928,37 +2925,37 @@ function Vn(e, a) {
|
|
|
2928
2925
|
}, [_()])]);
|
|
2929
2926
|
}
|
|
2930
2927
|
function ee() {
|
|
2931
|
-
return
|
|
2928
|
+
return k.value;
|
|
2932
2929
|
}
|
|
2933
|
-
function
|
|
2934
|
-
return d.relations && d.relations.length ? d.relations.map((
|
|
2930
|
+
function ne(O) {
|
|
2931
|
+
return d.relations && d.relations.length ? d.relations.map((w) => {
|
|
2935
2932
|
const {
|
|
2936
|
-
groupField:
|
|
2937
|
-
helpField:
|
|
2938
|
-
} =
|
|
2939
|
-
fieldName:
|
|
2933
|
+
groupField: b,
|
|
2934
|
+
helpField: M
|
|
2935
|
+
} = w, G = {
|
|
2936
|
+
fieldName: M,
|
|
2940
2937
|
fieldValue: ""
|
|
2941
|
-
}, te =
|
|
2942
|
-
return
|
|
2938
|
+
}, te = O.map((le) => l(le, b));
|
|
2939
|
+
return G.fieldValue = te.join(","), G;
|
|
2943
2940
|
}) : "";
|
|
2944
2941
|
}
|
|
2945
2942
|
return {
|
|
2946
|
-
renderNavigation:
|
|
2943
|
+
renderNavigation: Y,
|
|
2947
2944
|
selectedItems: I,
|
|
2948
2945
|
getNavigationIdField: ee,
|
|
2949
|
-
getRelationFilter:
|
|
2946
|
+
getRelationFilter: ne
|
|
2950
2947
|
};
|
|
2951
2948
|
}
|
|
2952
|
-
function
|
|
2953
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2949
|
+
function Dn(e) {
|
|
2950
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Et(e);
|
|
2954
2951
|
}
|
|
2955
2952
|
const Nn = /* @__PURE__ */ me({
|
|
2956
2953
|
name: "LookupContainer",
|
|
2957
|
-
props:
|
|
2954
|
+
props: Ue,
|
|
2958
2955
|
emits: ["update:modelValue", "search", "navSelectionsChanged", "pageIndexChanged", "pageSizeChanged", "changeDialogOptions", "clearSearch", "dblClickRow"],
|
|
2959
2956
|
setup(e, a) {
|
|
2960
|
-
|
|
2961
|
-
const t =
|
|
2957
|
+
Q(xe, N(ue.dataList));
|
|
2958
|
+
const t = Q(ve), n = Q(Ie), {
|
|
2962
2959
|
lookupStates: i,
|
|
2963
2960
|
getIdQueryParams: o
|
|
2964
2961
|
} = t, {
|
|
@@ -2969,71 +2966,71 @@ const Nn = /* @__PURE__ */ me({
|
|
|
2969
2966
|
searchState: d
|
|
2970
2967
|
} = i, {
|
|
2971
2968
|
renderSearchBar: f
|
|
2972
|
-
} =
|
|
2973
|
-
isDoubleList:
|
|
2974
|
-
getNavigationSize:
|
|
2969
|
+
} = Xe(e, !1, i, n), {
|
|
2970
|
+
isDoubleList: y,
|
|
2971
|
+
getNavigationSize: F,
|
|
2975
2972
|
isTreeList: v
|
|
2976
|
-
} =
|
|
2973
|
+
} = Te(e, i), {
|
|
2977
2974
|
renderNavigation: h,
|
|
2978
2975
|
selectedItems: p,
|
|
2979
2976
|
getNavigationIdField: u,
|
|
2980
2977
|
getRelationFilter: m
|
|
2981
|
-
} =
|
|
2982
|
-
renderTreeGrid:
|
|
2978
|
+
} = Mn(e, a), {
|
|
2979
|
+
renderTreeGrid: T,
|
|
2983
2980
|
unwatches: I
|
|
2984
|
-
} =
|
|
2985
|
-
renderDataGrid:
|
|
2986
|
-
unwatches:
|
|
2987
|
-
} =
|
|
2981
|
+
} = wt(e, a), {
|
|
2982
|
+
renderDataGrid: D,
|
|
2983
|
+
unwatches: V
|
|
2984
|
+
} = yt(e, a, {
|
|
2988
2985
|
navSelectedItems: p,
|
|
2989
2986
|
getNavigationIdField: u,
|
|
2990
2987
|
getRelationFilter: m
|
|
2991
|
-
}),
|
|
2992
|
-
function
|
|
2993
|
-
var
|
|
2994
|
-
const
|
|
2995
|
-
|
|
2996
|
-
title:
|
|
2988
|
+
}), C = H(() => v() ? T : D), q = F();
|
|
2989
|
+
function R(k) {
|
|
2990
|
+
var P;
|
|
2991
|
+
const x = (P = r.dialog) == null ? void 0 : P.title;
|
|
2992
|
+
x && x !== ct && (k = x), a.emit("changeDialogOptions", {
|
|
2993
|
+
title: k
|
|
2997
2994
|
});
|
|
2998
2995
|
}
|
|
2999
|
-
function
|
|
3000
|
-
s.action =
|
|
3001
|
-
var
|
|
3002
|
-
c[
|
|
3003
|
-
}),
|
|
3004
|
-
s[
|
|
2996
|
+
function j(k, x) {
|
|
2997
|
+
s.action = x, v() ? V() : I(), k.navigation && (Object.keys(k.navigation).forEach((P) => {
|
|
2998
|
+
var X;
|
|
2999
|
+
c[P] = (X = k.navigation) == null ? void 0 : X[P];
|
|
3000
|
+
}), k.navigation.treeInfo && (t == null || t.setTreeInfo(k.navigation.treeInfo, !0)), delete k.navigation), k.treeInfo && (t == null || t.setTreeInfo(k.treeInfo)), Object.keys(k).forEach((P) => {
|
|
3001
|
+
s[P] = k[P];
|
|
3005
3002
|
});
|
|
3006
3003
|
}
|
|
3007
|
-
function
|
|
3008
|
-
const
|
|
3009
|
-
e.enableToSelect && (
|
|
3004
|
+
function S() {
|
|
3005
|
+
const k = {};
|
|
3006
|
+
e.enableToSelect && (k.selectedInfo = o()), l.value != null && (k.search = {
|
|
3010
3007
|
field: "*",
|
|
3011
3008
|
value: l.value,
|
|
3012
3009
|
type: "like"
|
|
3013
|
-
},
|
|
3010
|
+
}, k.action = "search", d.default = {
|
|
3014
3011
|
field: "*",
|
|
3015
3012
|
value: l.value,
|
|
3016
3013
|
type: "like"
|
|
3017
|
-
}), t == null || t.loadData(
|
|
3018
|
-
|
|
3019
|
-
|
|
3014
|
+
}), t == null || t.loadData(k, (x) => {
|
|
3015
|
+
qe(() => {
|
|
3016
|
+
j(x, (k == null ? void 0 : k.action) || ""), R(x.title || "");
|
|
3020
3017
|
});
|
|
3021
3018
|
});
|
|
3022
3019
|
}
|
|
3023
|
-
return
|
|
3024
|
-
|
|
3025
|
-
}),
|
|
3020
|
+
return Se(() => {
|
|
3021
|
+
S(), document.body.classList.add("lookup-modal-open");
|
|
3022
|
+
}), Ae(() => {
|
|
3026
3023
|
document.body.classList.remove("lookup-modal-open");
|
|
3027
3024
|
}), () => {
|
|
3028
|
-
let
|
|
3029
|
-
return E(
|
|
3030
|
-
default: () => [
|
|
3025
|
+
let k;
|
|
3026
|
+
return E(zt, null, {
|
|
3027
|
+
default: () => [y() && e.showNavigation && E(et, {
|
|
3031
3028
|
position: "left",
|
|
3032
|
-
width:
|
|
3033
|
-
minWidth:
|
|
3034
|
-
},
|
|
3035
|
-
default: () => [
|
|
3036
|
-
}), E(
|
|
3029
|
+
width: q == null ? void 0 : q.width,
|
|
3030
|
+
minWidth: q == null ? void 0 : q.minWidth
|
|
3031
|
+
}, Dn(k = h()) ? k : {
|
|
3032
|
+
default: () => [k]
|
|
3033
|
+
}), E(et, {
|
|
3037
3034
|
position: "center"
|
|
3038
3035
|
}, {
|
|
3039
3036
|
default: () => [E("div", {
|
|
@@ -3041,12 +3038,12 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3041
3038
|
}, [f(), E("div", {
|
|
3042
3039
|
class: "f-utils-fill px-2",
|
|
3043
3040
|
style: "position: relative;"
|
|
3044
|
-
}, [
|
|
3041
|
+
}, [C.value()])])]
|
|
3045
3042
|
})]
|
|
3046
3043
|
});
|
|
3047
3044
|
};
|
|
3048
3045
|
}
|
|
3049
|
-
}),
|
|
3046
|
+
}), On = {
|
|
3050
3047
|
multiSelect: { type: Boolean, default: !1 },
|
|
3051
3048
|
idField: { type: String, default: "id" },
|
|
3052
3049
|
displayType: { type: String, default: "list" },
|
|
@@ -3054,73 +3051,73 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3054
3051
|
showSelections: { type: Boolean, default: !1 },
|
|
3055
3052
|
treeToList: { type: Boolean, default: !1 },
|
|
3056
3053
|
enableFavorite: { type: Boolean, default: !0 }
|
|
3057
|
-
},
|
|
3054
|
+
}, Bn = /* @__PURE__ */ me({
|
|
3058
3055
|
name: "FLookupFavorite",
|
|
3059
|
-
props:
|
|
3056
|
+
props: On,
|
|
3060
3057
|
emits: ["dblClickRow"],
|
|
3061
3058
|
setup(e, a) {
|
|
3062
|
-
const t =
|
|
3059
|
+
const t = Q(Ee), {
|
|
3063
3060
|
userDataState: n,
|
|
3064
3061
|
getFavoriteData: i
|
|
3065
|
-
} =
|
|
3062
|
+
} = Q(ze), o = Q(xe, N(ue.dataList)), s = Q(Fe), c = Q(ve), {
|
|
3066
3063
|
lookupStates: l,
|
|
3067
3064
|
expandAllNodes: r
|
|
3068
|
-
} = c, d =
|
|
3069
|
-
setColumns:
|
|
3070
|
-
removeFavoriteItem:
|
|
3071
|
-
} =
|
|
3065
|
+
} = c, d = H(() => l.lookupOptions.idField || "id"), f = N(e.selectedIds), {
|
|
3066
|
+
setColumns: y,
|
|
3067
|
+
removeFavoriteItem: F
|
|
3068
|
+
} = Je(e, d.value), {
|
|
3072
3069
|
isTreeList: v
|
|
3073
|
-
} =
|
|
3070
|
+
} = Te(e, l), {
|
|
3074
3071
|
updateSelections: h,
|
|
3075
3072
|
unSelectTreeNode: p,
|
|
3076
3073
|
selectTreeNodes: u
|
|
3077
|
-
} = s, m =
|
|
3078
|
-
|
|
3079
|
-
function
|
|
3074
|
+
} = s, m = N(), T = N(), I = H(() => v() ? T.value : m.value);
|
|
3075
|
+
Qe(e, I, l);
|
|
3076
|
+
function D() {
|
|
3080
3077
|
return n.data && n.data.favorites && n.data.favorites.length;
|
|
3081
3078
|
}
|
|
3082
|
-
function
|
|
3079
|
+
function V($) {
|
|
3083
3080
|
I.value.clearSelection(), $ && $.length && I.value.selectItemByIds($);
|
|
3084
3081
|
}
|
|
3085
|
-
|
|
3086
|
-
JSON.stringify($) !== JSON.stringify(Z) && (f.value = $, f.value.length ?
|
|
3082
|
+
W(() => e.selectedIds, ($, Z) => {
|
|
3083
|
+
JSON.stringify($) !== JSON.stringify(Z) && (f.value = $, f.value.length ? V(f.value) : I.value.clearSelection());
|
|
3087
3084
|
});
|
|
3088
|
-
function
|
|
3089
|
-
Z && Z.length &&
|
|
3085
|
+
function C($, Z) {
|
|
3086
|
+
Z && Z.length && y(I.value, Z, v()), $ && (v() && ($ = r($)), I.value.updateDataSource($ || [])), V(f.value || []);
|
|
3090
3087
|
}
|
|
3091
|
-
function
|
|
3088
|
+
function q() {
|
|
3092
3089
|
i().then(($) => {
|
|
3093
|
-
$ ?
|
|
3090
|
+
$ ? C($.items || [], $.columns) : C([], null);
|
|
3094
3091
|
});
|
|
3095
3092
|
}
|
|
3096
|
-
|
|
3093
|
+
W(() => o.value, ($, Z) => {
|
|
3097
3094
|
var g;
|
|
3098
|
-
$ === ue.favorite && (
|
|
3099
|
-
}),
|
|
3100
|
-
o.value === ue.favorite && $ && (v() ?
|
|
3095
|
+
$ === ue.favorite && (D() ? q() : C([], (g = l.lookupState) == null ? void 0 : g.columns));
|
|
3096
|
+
}), W(() => F.value, ($, Z) => {
|
|
3097
|
+
o.value === ue.favorite && $ && (v() ? q() : C(n.favoriteItems || [], null), F.value = !1);
|
|
3101
3098
|
});
|
|
3102
|
-
const
|
|
3099
|
+
const R = {
|
|
3103
3100
|
fitColumns: !0,
|
|
3104
3101
|
fitMode: "percentage",
|
|
3105
3102
|
resizeColumn: !0
|
|
3106
|
-
},
|
|
3103
|
+
}, j = {
|
|
3107
3104
|
enableSelectRow: !0,
|
|
3108
3105
|
multiSelect: e.multiSelect,
|
|
3109
3106
|
showCheckbox: e.multiSelect,
|
|
3110
3107
|
multiSelectMode: "OnCheckAndClick"
|
|
3111
3108
|
};
|
|
3112
|
-
function
|
|
3109
|
+
function S($) {
|
|
3113
3110
|
v() ? u($) : h($);
|
|
3114
3111
|
}
|
|
3115
|
-
function
|
|
3112
|
+
function k($) {
|
|
3116
3113
|
v() ? p($) : h($ == null ? void 0 : $.raw, !1);
|
|
3117
3114
|
}
|
|
3118
|
-
function
|
|
3115
|
+
function x($, Z) {
|
|
3119
3116
|
e.multiSelect || (h([Z]), a.emit("dblClickRow", {
|
|
3120
3117
|
items: [Z]
|
|
3121
3118
|
}));
|
|
3122
3119
|
}
|
|
3123
|
-
function
|
|
3120
|
+
function P($) {
|
|
3124
3121
|
const {
|
|
3125
3122
|
node: Z
|
|
3126
3123
|
} = $;
|
|
@@ -3128,26 +3125,26 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3128
3125
|
items: [Z]
|
|
3129
3126
|
}));
|
|
3130
3127
|
}
|
|
3131
|
-
function
|
|
3132
|
-
return E(
|
|
3133
|
-
ref:
|
|
3128
|
+
function X() {
|
|
3129
|
+
return E(He, {
|
|
3130
|
+
ref: T,
|
|
3134
3131
|
fit: !0,
|
|
3135
3132
|
idField: d.value,
|
|
3136
3133
|
rowNumber: {
|
|
3137
3134
|
enable: !1
|
|
3138
3135
|
},
|
|
3139
|
-
columnOption:
|
|
3140
|
-
selection:
|
|
3136
|
+
columnOption: R,
|
|
3137
|
+
selection: j,
|
|
3141
3138
|
showBorder: !0,
|
|
3142
3139
|
virtualized: !0,
|
|
3143
3140
|
rowOption: t,
|
|
3144
|
-
onSelectionUpdate:
|
|
3145
|
-
onUnSelectItem:
|
|
3146
|
-
onDblclickNode:
|
|
3141
|
+
onSelectionUpdate: S,
|
|
3142
|
+
onUnSelectItem: k,
|
|
3143
|
+
onDblclickNode: P
|
|
3147
3144
|
}, null);
|
|
3148
3145
|
}
|
|
3149
|
-
function
|
|
3150
|
-
return E(
|
|
3146
|
+
function ie() {
|
|
3147
|
+
return E(Re, {
|
|
3151
3148
|
ref: m,
|
|
3152
3149
|
pagination: {
|
|
3153
3150
|
enable: !1
|
|
@@ -3155,7 +3152,7 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3155
3152
|
summary: {
|
|
3156
3153
|
enable: !1
|
|
3157
3154
|
},
|
|
3158
|
-
columnOption:
|
|
3155
|
+
columnOption: R,
|
|
3159
3156
|
idField: d.value,
|
|
3160
3157
|
rowNumber: {
|
|
3161
3158
|
enable: !1
|
|
@@ -3163,15 +3160,15 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3163
3160
|
showBorder: !0,
|
|
3164
3161
|
virtualized: !0,
|
|
3165
3162
|
fit: !0,
|
|
3166
|
-
selection:
|
|
3167
|
-
onSelectionUpdate:
|
|
3168
|
-
onUnSelectItem:
|
|
3169
|
-
onDoubleClickRow:
|
|
3163
|
+
selection: j,
|
|
3164
|
+
onSelectionUpdate: S,
|
|
3165
|
+
onUnSelectItem: k,
|
|
3166
|
+
onDoubleClickRow: x
|
|
3170
3167
|
}, null);
|
|
3171
3168
|
}
|
|
3172
|
-
return () => v() ?
|
|
3169
|
+
return () => v() ? X() : ie();
|
|
3173
3170
|
}
|
|
3174
|
-
}),
|
|
3171
|
+
}), An = {
|
|
3175
3172
|
id: { type: String },
|
|
3176
3173
|
title: { type: String },
|
|
3177
3174
|
height: { type: Number, default: 50 },
|
|
@@ -3186,28 +3183,28 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3186
3183
|
showCascadeControl: { type: Boolean, default: !1 },
|
|
3187
3184
|
isMaximized: { type: Boolean, default: !1 },
|
|
3188
3185
|
locales: { type: Object, default: {} }
|
|
3189
|
-
},
|
|
3186
|
+
}, Rn = {
|
|
3190
3187
|
idField: { type: String, default: "id" },
|
|
3191
3188
|
parentRef: { type: HTMLElement, default: null },
|
|
3192
3189
|
popoverOffsetX: { type: Number, default: 0 }
|
|
3193
|
-
},
|
|
3194
|
-
props:
|
|
3190
|
+
}, Un = /* @__PURE__ */ me({
|
|
3191
|
+
props: Rn,
|
|
3195
3192
|
setup(e, a) {
|
|
3196
|
-
const t =
|
|
3193
|
+
const t = Q("FMessageBoxService"), n = Q(Fe), i = Q(ve), {
|
|
3197
3194
|
lookupState: o,
|
|
3198
3195
|
selectionState: s
|
|
3199
|
-
} = i.lookupStates, c =
|
|
3196
|
+
} = i.lookupStates, c = Q(Ie), {
|
|
3200
3197
|
clearSelections: l,
|
|
3201
3198
|
unSelectionsByIds: r
|
|
3202
|
-
} = n, d =
|
|
3203
|
-
|
|
3204
|
-
|
|
3199
|
+
} = n, d = N(), f = H(() => d), y = N(), F = N(e.popoverOffsetX || -15);
|
|
3200
|
+
W(() => e.popoverOffsetX, (x) => {
|
|
3201
|
+
F.value = x;
|
|
3205
3202
|
});
|
|
3206
|
-
const v =
|
|
3207
|
-
function u(
|
|
3208
|
-
|
|
3209
|
-
const
|
|
3210
|
-
r(
|
|
3203
|
+
const v = H(() => F.value === -15 ? 10 : 100), h = N(e.parentRef), p = "_remove_selected_";
|
|
3204
|
+
function u(x, P, X) {
|
|
3205
|
+
x.stopPropagation();
|
|
3206
|
+
const ie = P.raw[e.idField];
|
|
3207
|
+
r(ie);
|
|
3211
3208
|
}
|
|
3212
3209
|
const m = {
|
|
3213
3210
|
field: p,
|
|
@@ -3215,97 +3212,97 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3215
3212
|
width: 50,
|
|
3216
3213
|
fixed: "right",
|
|
3217
3214
|
align: "center",
|
|
3218
|
-
formatter: (
|
|
3215
|
+
formatter: (x, P) => E("button", {
|
|
3219
3216
|
type: "button",
|
|
3220
|
-
onClick: (
|
|
3221
|
-
u(
|
|
3217
|
+
onClick: (X) => {
|
|
3218
|
+
u(X, P);
|
|
3222
3219
|
},
|
|
3223
3220
|
class: "btn btn-link f-icon f-icon-x p-0",
|
|
3224
3221
|
style: "color: #dd2438;"
|
|
3225
3222
|
}, null)
|
|
3226
|
-
},
|
|
3227
|
-
const
|
|
3228
|
-
if (
|
|
3229
|
-
return
|
|
3223
|
+
}, T = H(() => {
|
|
3224
|
+
const x = Pe((o == null ? void 0 : o.columns) || []);
|
|
3225
|
+
if (x.length)
|
|
3226
|
+
return x.push(m), x;
|
|
3230
3227
|
});
|
|
3231
|
-
|
|
3232
|
-
h.value =
|
|
3228
|
+
W(() => e.parentRef, (x) => {
|
|
3229
|
+
h.value = x;
|
|
3233
3230
|
});
|
|
3234
3231
|
const I = {
|
|
3235
3232
|
fitColumns: !0,
|
|
3236
3233
|
fitMode: "percentage",
|
|
3237
3234
|
resizeColumn: !0
|
|
3238
|
-
},
|
|
3235
|
+
}, D = {
|
|
3239
3236
|
enableSelectRow: !0,
|
|
3240
3237
|
multiSelect: !1,
|
|
3241
3238
|
showCheckbox: !1,
|
|
3242
3239
|
showSelectAll: !1,
|
|
3243
3240
|
multiSelectMode: "OnCheckAndClick"
|
|
3244
|
-
},
|
|
3241
|
+
}, V = N({
|
|
3245
3242
|
width: "0px",
|
|
3246
3243
|
height: "0px"
|
|
3247
3244
|
});
|
|
3248
|
-
let
|
|
3249
|
-
function
|
|
3245
|
+
let C;
|
|
3246
|
+
function q() {
|
|
3250
3247
|
var $, Z;
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3248
|
+
const x = (($ = h.value) == null ? void 0 : $.offsetHeight) - 100, P = 200, X = s.value.length * 28 + 60, ie = X > x ? x : X < P ? P : X;
|
|
3249
|
+
V.value = {
|
|
3253
3250
|
width: ((Z = h.value) == null ? void 0 : Z.offsetWidth) - 20 + "px",
|
|
3254
|
-
height:
|
|
3251
|
+
height: ie + "px"
|
|
3255
3252
|
};
|
|
3256
3253
|
}
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
}),
|
|
3260
|
-
var
|
|
3261
|
-
(
|
|
3254
|
+
W(() => y.value, (x) => {
|
|
3255
|
+
x && (x.updateColumns(T.value), x.updateDataSource(Pe(s.value || [])), q());
|
|
3256
|
+
}), W(() => s.value, (x) => {
|
|
3257
|
+
var P;
|
|
3258
|
+
(P = y.value) == null || P.updateDataSource(Pe(x || []), {
|
|
3262
3259
|
keepScrollTop: !0
|
|
3263
3260
|
});
|
|
3264
|
-
}),
|
|
3265
|
-
|
|
3266
|
-
h.value &&
|
|
3267
|
-
}),
|
|
3261
|
+
}), W(() => h.value, (x) => {
|
|
3262
|
+
C = new ResizeObserver(() => {
|
|
3263
|
+
h.value && q();
|
|
3264
|
+
}), C.observe(h.value);
|
|
3268
3265
|
});
|
|
3269
|
-
const
|
|
3266
|
+
const R = H(() => (s.value || []).length > 0), j = H(() => ({
|
|
3270
3267
|
display: "flex",
|
|
3271
3268
|
"align-items": "center",
|
|
3272
|
-
opacity:
|
|
3273
|
-
cursor:
|
|
3274
|
-
pointerEvents:
|
|
3269
|
+
opacity: R.value ? 1 : 0.4,
|
|
3270
|
+
cursor: R.value ? "pointer" : "not-allowed",
|
|
3271
|
+
pointerEvents: R.value ? "auto" : "none"
|
|
3275
3272
|
}));
|
|
3276
|
-
function
|
|
3277
|
-
const
|
|
3278
|
-
t == null || t.question(
|
|
3273
|
+
function S() {
|
|
3274
|
+
const x = c == null ? void 0 : c.messages.clearSelections;
|
|
3275
|
+
t == null || t.question(x, "", () => {
|
|
3279
3276
|
l();
|
|
3280
3277
|
});
|
|
3281
3278
|
}
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
}),
|
|
3285
|
-
|
|
3279
|
+
Se(() => {
|
|
3280
|
+
q();
|
|
3281
|
+
}), Ae(() => {
|
|
3282
|
+
C && h.value && C.unobserve(h.value);
|
|
3286
3283
|
});
|
|
3287
|
-
function
|
|
3288
|
-
var
|
|
3289
|
-
(
|
|
3284
|
+
function k() {
|
|
3285
|
+
var x;
|
|
3286
|
+
(x = f.value) == null || x.value.hide();
|
|
3290
3287
|
}
|
|
3291
3288
|
return a.expose({
|
|
3292
|
-
hidePopup:
|
|
3293
|
-
}), () => E(
|
|
3289
|
+
hidePopup: k
|
|
3290
|
+
}), () => E(Vt, null, [E("div", {
|
|
3294
3291
|
class: "d-flex flex-row align-items-center",
|
|
3295
3292
|
style: "line-height:24px"
|
|
3296
|
-
}, [
|
|
3297
|
-
style:
|
|
3293
|
+
}, [We(E("div", {
|
|
3294
|
+
style: j.value,
|
|
3298
3295
|
innerHTML: c.buttons.selectionTotal(s.value.length)
|
|
3299
|
-
}, null), [[
|
|
3296
|
+
}, null), [[Mt("popover"), f.value, "toggle"]]), R.value && E("button", {
|
|
3300
3297
|
class: "btn btn-link btn-sm p-0 pl-2",
|
|
3301
3298
|
style: "line-height:24px",
|
|
3302
|
-
onClick:
|
|
3303
|
-
}, [c.buttons.clear])]), E(
|
|
3299
|
+
onClick: S
|
|
3300
|
+
}, [c.buttons.clear])]), E(Ht, {
|
|
3304
3301
|
id: "lookup-selected-popover",
|
|
3305
3302
|
customStyles: {
|
|
3306
3303
|
filter: "drop-shadow(#c5c5c5 0px 0px 6px)"
|
|
3307
3304
|
},
|
|
3308
|
-
offsetX:
|
|
3305
|
+
offsetX: F.value,
|
|
3309
3306
|
arrowOffsetX: v.value,
|
|
3310
3307
|
ref: d,
|
|
3311
3308
|
placement: "top-left",
|
|
@@ -3313,11 +3310,11 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3313
3310
|
fitContent: !0
|
|
3314
3311
|
}, {
|
|
3315
3312
|
default: () => {
|
|
3316
|
-
var
|
|
3313
|
+
var x;
|
|
3317
3314
|
return [E("div", {
|
|
3318
|
-
style:
|
|
3319
|
-
}, [((
|
|
3320
|
-
ref:
|
|
3315
|
+
style: V.value
|
|
3316
|
+
}, [((x = d.value) == null ? void 0 : x.isShow) && E(Re, {
|
|
3317
|
+
ref: y,
|
|
3321
3318
|
pagination: {
|
|
3322
3319
|
enable: !1
|
|
3323
3320
|
},
|
|
@@ -3332,12 +3329,12 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3332
3329
|
showBorder: !1,
|
|
3333
3330
|
virtualized: !0,
|
|
3334
3331
|
fit: !0,
|
|
3335
|
-
selection:
|
|
3332
|
+
selection: D
|
|
3336
3333
|
}, null)])];
|
|
3337
3334
|
}
|
|
3338
3335
|
})]);
|
|
3339
3336
|
}
|
|
3340
|
-
}),
|
|
3337
|
+
}), zn = /* @__PURE__ */ me({
|
|
3341
3338
|
props: {
|
|
3342
3339
|
modelValue: {
|
|
3343
3340
|
type: Boolean,
|
|
@@ -3350,40 +3347,40 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3350
3347
|
},
|
|
3351
3348
|
emits: ["update:modelValue"],
|
|
3352
3349
|
setup(e, a) {
|
|
3353
|
-
const t =
|
|
3350
|
+
const t = N(e.modelValue);
|
|
3354
3351
|
function n(i) {
|
|
3355
3352
|
i.stopPropagation(), t.value = !t.value, a.emit("update:modelValue", t.value);
|
|
3356
3353
|
}
|
|
3357
3354
|
return () => E("div", {
|
|
3358
3355
|
class: "custom-control custom-checkbox mb-0",
|
|
3359
3356
|
onClick: n
|
|
3360
|
-
}, [
|
|
3357
|
+
}, [We(E("input", {
|
|
3361
3358
|
id: "lookup-include-childs-input",
|
|
3362
3359
|
"onUpdate:modelValue": (i) => t.value = i,
|
|
3363
3360
|
title: "checkbox-input",
|
|
3364
3361
|
type: "checkbox",
|
|
3365
3362
|
class: "custom-control-input"
|
|
3366
|
-
}, null), [[
|
|
3363
|
+
}, null), [[it, t.value]]), E("label", {
|
|
3367
3364
|
class: "custom-control-label",
|
|
3368
3365
|
style: "padding-left: 1.2rem;"
|
|
3369
3366
|
}, [e.label])]);
|
|
3370
3367
|
}
|
|
3371
|
-
}),
|
|
3368
|
+
}), _n = /* @__PURE__ */ me({
|
|
3372
3369
|
name: "FLookupCascadeSelector",
|
|
3373
3370
|
props: ["modelValue"],
|
|
3374
3371
|
emits: ["update:modelValue"],
|
|
3375
3372
|
setup(e, a) {
|
|
3376
|
-
const t =
|
|
3377
|
-
return
|
|
3373
|
+
const t = Q(Ie), n = N(), i = N(e.modelValue);
|
|
3374
|
+
return W(() => i.value, (o, s) => {
|
|
3378
3375
|
o !== s && a.emit("update:modelValue", o);
|
|
3379
|
-
}),
|
|
3376
|
+
}), je.forEach((o) => {
|
|
3380
3377
|
o.text = t.tree[o.value];
|
|
3381
3378
|
}), () => E("div", {
|
|
3382
3379
|
style: "width: 130px",
|
|
3383
3380
|
class: "ml-3"
|
|
3384
|
-
}, [E(
|
|
3381
|
+
}, [E(rt, {
|
|
3385
3382
|
ref: n,
|
|
3386
|
-
data:
|
|
3383
|
+
data: je,
|
|
3387
3384
|
textField: "text",
|
|
3388
3385
|
valueField: "value",
|
|
3389
3386
|
idField: "value",
|
|
@@ -3394,157 +3391,157 @@ const Nn = /* @__PURE__ */ me({
|
|
|
3394
3391
|
placement: "top-left"
|
|
3395
3392
|
}, null)]);
|
|
3396
3393
|
}
|
|
3397
|
-
}),
|
|
3394
|
+
}), $n = /* @__PURE__ */ me({
|
|
3398
3395
|
name: "FLookupModalContainer",
|
|
3399
|
-
props:
|
|
3396
|
+
props: An,
|
|
3400
3397
|
emits: ["closeModal", "maximize"],
|
|
3401
3398
|
setup(e, a) {
|
|
3402
|
-
const t =
|
|
3403
|
-
ge(
|
|
3399
|
+
const t = N(ue.dataList);
|
|
3400
|
+
ge(xe, t), ge(ve, e.useHttpComposition), ge(ze, e.userDataService), ge(Fe, e.selectionsManager), ge(Ie, e.locales);
|
|
3404
3401
|
const {
|
|
3405
3402
|
tabs: n,
|
|
3406
3403
|
buttons: i,
|
|
3407
3404
|
tree: o
|
|
3408
|
-
} = e.locales, s = he(e.showIncludeChildNodes), c =
|
|
3405
|
+
} = e.locales, s = he(e.showIncludeChildNodes), c = N(s.value), {
|
|
3409
3406
|
lookupOptions: l
|
|
3410
|
-
} = e.useHttpComposition.lookupStates, r = l.dialog, d =
|
|
3411
|
-
ge(
|
|
3412
|
-
const
|
|
3413
|
-
|
|
3414
|
-
|
|
3407
|
+
} = e.useHttpComposition.lookupStates, r = l.dialog, d = H(() => l.displayType.toUpperCase() === ce.TreeList), f = St(l, d.value);
|
|
3408
|
+
ge(Ee, f);
|
|
3409
|
+
const y = N(e.isMaximized);
|
|
3410
|
+
W(() => e.isMaximized, (P, X) => {
|
|
3411
|
+
y.value = P;
|
|
3415
3412
|
});
|
|
3416
|
-
const
|
|
3413
|
+
const F = H(() => ({
|
|
3417
3414
|
"f-icon": !0,
|
|
3418
3415
|
modal_maximize: !0,
|
|
3419
|
-
modalrevert:
|
|
3416
|
+
modalrevert: y.value
|
|
3420
3417
|
}));
|
|
3421
|
-
|
|
3422
|
-
const v =
|
|
3423
|
-
|
|
3424
|
-
e.useHttpComposition.updateIncludeChilds(
|
|
3425
|
-
}),
|
|
3426
|
-
s.value =
|
|
3418
|
+
N();
|
|
3419
|
+
const v = H(() => s.show && t.value === ue.dataList && l.displayType && d.value), h = H(() => v.value ? -99 : -15);
|
|
3420
|
+
W(() => c.value, (P, X) => {
|
|
3421
|
+
e.useHttpComposition.updateIncludeChilds(P);
|
|
3422
|
+
}), W(() => e.showIncludeChildNodes, (P, X) => {
|
|
3423
|
+
s.value = P, e.useHttpComposition.updateIncludeChilds(P.value);
|
|
3427
3424
|
});
|
|
3428
3425
|
const {
|
|
3429
3426
|
userDataState: p
|
|
3430
3427
|
} = e.userDataService, {
|
|
3431
3428
|
cancelDialog: u,
|
|
3432
3429
|
submitDialog: m
|
|
3433
|
-
} = e.useDialog,
|
|
3434
|
-
function
|
|
3435
|
-
a.emit("maximize",
|
|
3430
|
+
} = e.useDialog, T = N(), I = N();
|
|
3431
|
+
function D(P) {
|
|
3432
|
+
a.emit("maximize", P);
|
|
3436
3433
|
}
|
|
3437
|
-
function
|
|
3438
|
-
a.emit("closeModal",
|
|
3434
|
+
function V(P) {
|
|
3435
|
+
a.emit("closeModal", P);
|
|
3439
3436
|
}
|
|
3440
|
-
async function
|
|
3441
|
-
await m() &&
|
|
3437
|
+
async function C(P) {
|
|
3438
|
+
await m() && V(P);
|
|
3442
3439
|
}
|
|
3443
|
-
async function
|
|
3444
|
-
await u() &&
|
|
3440
|
+
async function q(P) {
|
|
3441
|
+
await u() && V(P);
|
|
3445
3442
|
}
|
|
3446
|
-
function
|
|
3447
|
-
t.value =
|
|
3443
|
+
function R(P) {
|
|
3444
|
+
t.value = P, p.data.tabIndex = P;
|
|
3448
3445
|
}
|
|
3449
|
-
const
|
|
3446
|
+
const j = H(() => ({
|
|
3450
3447
|
transform: `translate3d(${t.value === ue.favorite ? 84 : 0}px, 0px, 0px)`
|
|
3451
|
-
})),
|
|
3452
|
-
visibility: t.value ===
|
|
3448
|
+
})), S = H(() => (P) => ({
|
|
3449
|
+
visibility: t.value === P ? "visible" : "hidden",
|
|
3453
3450
|
position: "absolute",
|
|
3454
3451
|
top: 0,
|
|
3455
3452
|
transition: "all 0.3s ease-in",
|
|
3456
|
-
opacity: t.value ===
|
|
3457
|
-
})),
|
|
3458
|
-
const
|
|
3453
|
+
opacity: t.value === P ? 1 : 0
|
|
3454
|
+
})), k = H(() => {
|
|
3455
|
+
const P = e.enableFavorite ? "50%" : "100%", X = e.enableFavorite ? 100 : 80, ie = r.showMaxButton || r.showCloseButton ? X : 0;
|
|
3459
3456
|
return {
|
|
3460
|
-
maxWidth: `calc(${
|
|
3457
|
+
maxWidth: `calc(${P} - ${ie}px)`
|
|
3461
3458
|
};
|
|
3462
3459
|
});
|
|
3463
|
-
function P
|
|
3464
|
-
|
|
3460
|
+
function x(P) {
|
|
3461
|
+
P.stopPropagation(), document.body.click();
|
|
3465
3462
|
}
|
|
3466
|
-
return
|
|
3467
|
-
var
|
|
3468
|
-
p.data.favorites && p.data.favorites.length && (t.value = ((
|
|
3463
|
+
return Se(() => {
|
|
3464
|
+
var P;
|
|
3465
|
+
p.data.favorites && p.data.favorites.length && (t.value = ((P = p.data) == null ? void 0 : P.tabIndex) || ue.dataList), v.value && e.useHttpComposition.updateIncludeChilds(c.value);
|
|
3469
3466
|
}), () => E("div", {
|
|
3470
3467
|
class: "d-flex flex-column h-100 lookup-modal",
|
|
3471
|
-
ref:
|
|
3468
|
+
ref: T
|
|
3472
3469
|
}, [E("div", {
|
|
3473
3470
|
class: "d-flex justify-content-between align-items-center px-3 lookup-modal-header"
|
|
3474
3471
|
}, [E("div", {
|
|
3475
3472
|
class: "lookup-modal-header-title",
|
|
3476
3473
|
title: e.title,
|
|
3477
|
-
style:
|
|
3474
|
+
style: k.value
|
|
3478
3475
|
}, [e.title]), e.enableFavorite && E("div", {
|
|
3479
3476
|
class: "d-flex justify-content-center w-100"
|
|
3480
3477
|
}, [E("div", {
|
|
3481
3478
|
class: "lookup-modal-header-tabs-container d-flex",
|
|
3482
|
-
onMousedown:
|
|
3479
|
+
onMousedown: x
|
|
3483
3480
|
}, [E("div", {
|
|
3484
3481
|
class: "active-tab",
|
|
3485
|
-
style:
|
|
3482
|
+
style: j.value
|
|
3486
3483
|
}, null), E("div", {
|
|
3487
3484
|
class: ["tab-item", "d-flex", {
|
|
3488
3485
|
active: t.value === ue.dataList
|
|
3489
3486
|
}],
|
|
3490
|
-
onClick: () =>
|
|
3487
|
+
onClick: () => R(ue.dataList)
|
|
3491
3488
|
}, [n.datalist]), E("div", {
|
|
3492
3489
|
class: ["tab-item", "d-flex", {
|
|
3493
3490
|
active: t.value === ue.favorite
|
|
3494
3491
|
}],
|
|
3495
|
-
onClick: () =>
|
|
3492
|
+
onClick: () => R(ue.favorite)
|
|
3496
3493
|
}, [n.favorite])])]), (r.showMaxButton || r.showCloseButton) && E("div", {
|
|
3497
3494
|
class: "d-flex flex-row h-100 justify-content-end align-items-center lookup-modal-header-buttons",
|
|
3498
|
-
onMousedown: (
|
|
3495
|
+
onMousedown: (P) => P.stopPropagation()
|
|
3499
3496
|
}, [r.showMaxButton && E("span", {
|
|
3500
|
-
class:
|
|
3501
|
-
onClick:
|
|
3497
|
+
class: F.value,
|
|
3498
|
+
onClick: D,
|
|
3502
3499
|
style: "cursor: pointer"
|
|
3503
3500
|
}, null), r.showCloseButton && E("span", {
|
|
3504
3501
|
class: "f-icon modal_close ml-2",
|
|
3505
|
-
onClick:
|
|
3502
|
+
onClick: V,
|
|
3506
3503
|
style: "cursor: pointer;position: relative;top: 1px;"
|
|
3507
3504
|
}, null)])]), E("div", {
|
|
3508
3505
|
class: "f-utils-fill",
|
|
3509
3506
|
style: "position: relative;"
|
|
3510
3507
|
}, [E("div", {
|
|
3511
3508
|
class: "h-100 d-flex flex-column f-utils-fill w-100",
|
|
3512
|
-
style:
|
|
3509
|
+
style: S.value(ue.dataList)
|
|
3513
3510
|
}, [a.slots.default && a.slots.default()]), E("div", {
|
|
3514
3511
|
class: "h-100 d-flex flex-column px-2 f-utils-fill w-100",
|
|
3515
|
-
style:
|
|
3512
|
+
style: S.value(ue.favorite)
|
|
3516
3513
|
}, [a.slots.fav && a.slots.fav()])]), E("div", {
|
|
3517
3514
|
class: "modal-footer"
|
|
3518
3515
|
}, [E("div", {
|
|
3519
3516
|
class: "f-utils-fill align-items-center d-flex flex-row"
|
|
3520
|
-
}, [v.value && E(
|
|
3517
|
+
}, [v.value && E(zn, {
|
|
3521
3518
|
modelValue: c.value,
|
|
3522
|
-
"onUpdate:modelValue": (
|
|
3519
|
+
"onUpdate:modelValue": (P) => c.value = P,
|
|
3523
3520
|
label: o.includechildren
|
|
3524
|
-
}, null), e.showSelectedList && E(
|
|
3521
|
+
}, null), e.showSelectedList && E(Un, {
|
|
3525
3522
|
popoverOffsetX: h.value,
|
|
3526
|
-
parentRef:
|
|
3523
|
+
parentRef: T.value,
|
|
3527
3524
|
ref: I,
|
|
3528
3525
|
idField: l.idField
|
|
3529
|
-
}, null), e.showCascadeControl && t.value === ue.dataList && E(
|
|
3526
|
+
}, null), e.showCascadeControl && t.value === ue.dataList && E(_n, {
|
|
3530
3527
|
modelValue: l.cascadeValue,
|
|
3531
|
-
"onUpdate:modelValue": (
|
|
3528
|
+
"onUpdate:modelValue": (P) => l.cascadeValue = P
|
|
3532
3529
|
}, null)]), E("button", {
|
|
3533
3530
|
id: e.id + "-btncancel",
|
|
3534
3531
|
name: "cancel",
|
|
3535
3532
|
type: "button",
|
|
3536
3533
|
class: "btn btn-secondary",
|
|
3537
|
-
onClick:
|
|
3534
|
+
onClick: q
|
|
3538
3535
|
}, [i.cancel]), E("button", {
|
|
3539
3536
|
id: e.id + "-btnok",
|
|
3540
3537
|
name: "accept",
|
|
3541
3538
|
type: "button",
|
|
3542
3539
|
class: "btn btn-primary",
|
|
3543
|
-
onClick:
|
|
3540
|
+
onClick: C
|
|
3544
3541
|
}, [i.ok])])]);
|
|
3545
3542
|
}
|
|
3546
3543
|
});
|
|
3547
|
-
function
|
|
3544
|
+
function Be(e, a) {
|
|
3548
3545
|
if (e.context) {
|
|
3549
3546
|
if (!a && e.context.editor) {
|
|
3550
3547
|
for (const n in e.context.editor)
|
|
@@ -3555,7 +3552,7 @@ function Oe(e, a) {
|
|
|
3555
3552
|
t ? Object.assign(t, a) : e.context.editor = a;
|
|
3556
3553
|
}
|
|
3557
3554
|
}
|
|
3558
|
-
function
|
|
3555
|
+
function jn(e, a, t, {
|
|
3559
3556
|
dictPicked: n,
|
|
3560
3557
|
modelValue: i,
|
|
3561
3558
|
buttonEditInstance: o,
|
|
@@ -3563,227 +3560,228 @@ function $n(e, a, t, {
|
|
|
3563
3560
|
useHttp: c,
|
|
3564
3561
|
lookupLocales: l
|
|
3565
3562
|
}) {
|
|
3566
|
-
const r =
|
|
3563
|
+
const r = Q(Ge, null), d = Q("FLoadingService"), f = N(), y = N(
|
|
3567
3564
|
"accept"
|
|
3568
3565
|
/* accept */
|
|
3569
|
-
),
|
|
3570
|
-
|
|
3571
|
-
const
|
|
3572
|
-
const
|
|
3573
|
-
i.value =
|
|
3566
|
+
), F = N(), { lookupStates: v } = c, { queryState: h, lookupState: p, navigationState: u, pageInfoState: m, searchState: T, selectionState: I, lookupOptions: D } = v, { isDoubleList: V } = Te(e, v), C = Object.assign({}, un, D.dialog);
|
|
3567
|
+
D.dialog = C;
|
|
3568
|
+
const q = { position: "top-center" }, R = () => {
|
|
3569
|
+
const w = t.value.map((M) => Me(M, D.textField)).join(e.separator), b = t.value.map((M) => M[D.idField]).join(e.separator);
|
|
3570
|
+
i.value = w, c.idValues.value = b, a.emit("update:modelValue", w), a.emit("update:idValue", b);
|
|
3574
3571
|
};
|
|
3575
|
-
function
|
|
3576
|
-
return typeof
|
|
3577
|
-
shouldClose:
|
|
3578
|
-
message:
|
|
3579
|
-
} : { shouldClose:
|
|
3580
|
-
}
|
|
3581
|
-
const
|
|
3582
|
-
const
|
|
3583
|
-
a.emit("update:dataMapping",
|
|
3584
|
-
const
|
|
3585
|
-
return
|
|
3572
|
+
function j(w) {
|
|
3573
|
+
return typeof w == "object" ? {
|
|
3574
|
+
shouldClose: w.closeDialog || w.canClose,
|
|
3575
|
+
message: w.message
|
|
3576
|
+
} : { shouldClose: w, message: "" };
|
|
3577
|
+
}
|
|
3578
|
+
const S = async () => {
|
|
3579
|
+
const w = { items: t.value, mappingFields: D.mappingFields, options: { ...D } };
|
|
3580
|
+
a.emit("update:dataMapping", w), Be(e, w);
|
|
3581
|
+
const b = await n(w);
|
|
3582
|
+
return j(b);
|
|
3586
3583
|
};
|
|
3587
|
-
async function
|
|
3588
|
-
return
|
|
3584
|
+
async function k() {
|
|
3585
|
+
return R(), await S();
|
|
3589
3586
|
}
|
|
3590
|
-
function
|
|
3591
|
-
return
|
|
3587
|
+
function x() {
|
|
3588
|
+
return y.value = "cancel", !0;
|
|
3592
3589
|
}
|
|
3593
|
-
const
|
|
3594
|
-
Object.keys(
|
|
3595
|
-
delete
|
|
3590
|
+
const P = (w) => {
|
|
3591
|
+
Object.keys(w).forEach((b) => {
|
|
3592
|
+
delete w[b];
|
|
3596
3593
|
});
|
|
3597
|
-
},
|
|
3598
|
-
|
|
3599
|
-
|
|
3594
|
+
}, X = (w) => {
|
|
3595
|
+
w.forEach((b) => {
|
|
3596
|
+
P(b);
|
|
3600
3597
|
});
|
|
3601
3598
|
};
|
|
3602
|
-
function
|
|
3603
|
-
document.body.classList.remove("lookup-modal-open"), d == null || d.clearAll(),
|
|
3599
|
+
function ie() {
|
|
3600
|
+
document.body.classList.remove("lookup-modal-open"), d == null || d.clearAll(), X([p, u, m, T, h]), I.value = [], F.value = null;
|
|
3604
3601
|
}
|
|
3605
3602
|
async function $() {
|
|
3606
|
-
var
|
|
3603
|
+
var b;
|
|
3607
3604
|
if (t.value.length === 0)
|
|
3608
|
-
return r == null || r.warning({ message: l.messages.mustChoosAdatarow, ...
|
|
3609
|
-
const
|
|
3605
|
+
return r == null || r.warning({ message: l.messages.mustChoosAdatarow, ...q }), { shouldUpdate: !1 };
|
|
3606
|
+
const w = await ((b = e.beforeSelectData) == null ? void 0 : b.call(e, { items: t.value }));
|
|
3610
3607
|
return {
|
|
3611
|
-
shouldUpdate: typeof
|
|
3612
|
-
message:
|
|
3608
|
+
shouldUpdate: typeof w == "boolean" ? w : (w == null ? void 0 : w.canSelect) ?? !0,
|
|
3609
|
+
message: w == null ? void 0 : w.message
|
|
3613
3610
|
};
|
|
3614
3611
|
}
|
|
3615
3612
|
async function Z() {
|
|
3616
|
-
const { shouldUpdate:
|
|
3617
|
-
if (!
|
|
3618
|
-
return
|
|
3619
|
-
const
|
|
3620
|
-
return
|
|
3613
|
+
const { shouldUpdate: w, message: b } = await $();
|
|
3614
|
+
if (!w)
|
|
3615
|
+
return b && (r == null || r.warning({ message: b, ...q })), !1;
|
|
3616
|
+
const M = await k(), { shouldClose: G, message: te } = M;
|
|
3617
|
+
return G ? (y.value = "accept", !0) : (te && (r == null || r.warning({ message: te, ...q })), !1);
|
|
3621
3618
|
}
|
|
3622
3619
|
function g() {
|
|
3623
|
-
const
|
|
3624
|
-
height:
|
|
3625
|
-
width:
|
|
3626
|
-
minWidth:
|
|
3627
|
-
minHeight:
|
|
3620
|
+
const w = (C == null ? void 0 : C.height) || 620, b = (C == null ? void 0 : C.width) || 590, M = (C == null ? void 0 : C.minWidth) || 300, G = (C == null ? void 0 : C.minHeight) || 200, te = {
|
|
3621
|
+
height: w,
|
|
3622
|
+
width: b,
|
|
3623
|
+
minWidth: M,
|
|
3624
|
+
minHeight: G
|
|
3628
3625
|
};
|
|
3629
|
-
return
|
|
3626
|
+
return V() && (te.width = (C == null ? void 0 : C.width) || 960), te;
|
|
3630
3627
|
}
|
|
3631
|
-
const { width:
|
|
3632
|
-
|
|
3628
|
+
const { width: L, height: A, minHeight: _, minWidth: Y } = g(), ee = !0, ne = ee && ((C == null ? void 0 : C.resizeable) == null ? !0 : C == null ? void 0 : C.resizeable);
|
|
3629
|
+
C.rememberSize = C.rememberSize && ne;
|
|
3633
3630
|
const J = {
|
|
3634
|
-
title:
|
|
3631
|
+
title: C == null ? void 0 : C.title,
|
|
3635
3632
|
fitContent: !1,
|
|
3636
3633
|
showHeader: !1,
|
|
3637
3634
|
dragHandle: ".lookup-modal-header",
|
|
3638
|
-
height:
|
|
3639
|
-
width:
|
|
3640
|
-
minWidth:
|
|
3635
|
+
height: A,
|
|
3636
|
+
width: L,
|
|
3637
|
+
minWidth: Y,
|
|
3641
3638
|
minHeight: _,
|
|
3642
|
-
resizeable:
|
|
3639
|
+
resizeable: ne,
|
|
3643
3640
|
draggable: ee,
|
|
3644
|
-
enableEsc: (
|
|
3645
|
-
closedCallback: (
|
|
3646
|
-
const
|
|
3647
|
-
if ((
|
|
3641
|
+
enableEsc: (C == null ? void 0 : C.enableEsc) == null ? !0 : C == null ? void 0 : C.enableEsc,
|
|
3642
|
+
closedCallback: (w, b) => {
|
|
3643
|
+
const M = { type: y.value, button: w == null ? void 0 : w.target };
|
|
3644
|
+
if ((b === "esc" || b === "icon") && (M.type = "esc"), M.type === "accept" && (M.items = t.value), (M.type === "cancel" || M.type === "esc") && (e.allowFreeInput || (i.value = e.modelValue)), s && e.enableUserData) {
|
|
3648
3645
|
s.saveUserData().then(() => {
|
|
3649
|
-
|
|
3646
|
+
ie(), a.emit("dialogClosed", M);
|
|
3650
3647
|
});
|
|
3651
3648
|
return;
|
|
3652
3649
|
}
|
|
3653
|
-
|
|
3650
|
+
ie(), a.emit("dialogClosed", M);
|
|
3654
3651
|
},
|
|
3655
3652
|
showButtons: !1,
|
|
3656
|
-
resizeHandle: (
|
|
3657
|
-
if (
|
|
3658
|
-
f.value =
|
|
3659
|
-
const { width:
|
|
3660
|
-
!(
|
|
3653
|
+
resizeHandle: (w) => {
|
|
3654
|
+
if (C.rememberSize) {
|
|
3655
|
+
f.value = w;
|
|
3656
|
+
const { width: b, height: M } = w.newSize.size;
|
|
3657
|
+
!(w.isMaximized ?? !1) && s.setDialogSize({ width: Math.round(b), height: Math.round(M) });
|
|
3661
3658
|
}
|
|
3662
3659
|
},
|
|
3663
3660
|
enableEnter: !0,
|
|
3664
|
-
onEnter: (
|
|
3665
|
-
|
|
3666
|
-
var
|
|
3667
|
-
if (
|
|
3668
|
-
const te = (
|
|
3669
|
-
te && te.close(
|
|
3661
|
+
onEnter: (w) => {
|
|
3662
|
+
w.event.preventDefault(), !w.event.target.closest(".fv-lookup-search-bar") && Z().then((M) => {
|
|
3663
|
+
var G;
|
|
3664
|
+
if (M) {
|
|
3665
|
+
const te = (G = o.value) == null ? void 0 : G.getModal();
|
|
3666
|
+
te && te.close(w.event, "enter");
|
|
3670
3667
|
}
|
|
3671
3668
|
});
|
|
3672
3669
|
}
|
|
3673
3670
|
};
|
|
3674
|
-
async function
|
|
3675
|
-
var
|
|
3676
|
-
if (e.enableUserData && (await s.getUserData(), (
|
|
3677
|
-
const { size:
|
|
3678
|
-
|
|
3671
|
+
async function O() {
|
|
3672
|
+
var w;
|
|
3673
|
+
if (e.enableUserData && (await s.getUserData(), (w = s == null ? void 0 : s.userDataState) != null && w.data && C.rememberSize)) {
|
|
3674
|
+
const { size: b } = s.userDataState.data;
|
|
3675
|
+
b && Object.assign(J, b);
|
|
3679
3676
|
}
|
|
3680
3677
|
}
|
|
3681
|
-
async function
|
|
3682
|
-
let
|
|
3683
|
-
const
|
|
3684
|
-
if (
|
|
3685
|
-
const
|
|
3686
|
-
typeof
|
|
3678
|
+
async function z(w) {
|
|
3679
|
+
let b = !0;
|
|
3680
|
+
const M = e.dictPicking;
|
|
3681
|
+
if (M && typeof M == "function") {
|
|
3682
|
+
const G = await M({ customData: F, options: D, idValue: c.idValues });
|
|
3683
|
+
typeof G == "boolean" && !G && (b = !1), typeof G == "object" && (G.canOpen ? G.data && (F.value = G.data) : (b = !1, G.message && (r == null || r.error({ message: G.message, position: "top-center" }))));
|
|
3687
3684
|
}
|
|
3688
|
-
return
|
|
3685
|
+
return b && await O(), b;
|
|
3689
3686
|
}
|
|
3690
3687
|
return {
|
|
3691
3688
|
modalOptions: J,
|
|
3692
|
-
beforeOpenDialog:
|
|
3689
|
+
beforeOpenDialog: z,
|
|
3693
3690
|
dialogSize: f,
|
|
3694
|
-
customData:
|
|
3695
|
-
updateModelValue:
|
|
3696
|
-
cancelDialog:
|
|
3691
|
+
customData: F,
|
|
3692
|
+
updateModelValue: k,
|
|
3693
|
+
cancelDialog: x,
|
|
3697
3694
|
submitDialog: Z,
|
|
3698
|
-
destroyed:
|
|
3699
|
-
setModelAndIdValue:
|
|
3700
|
-
runDictPickedAsync:
|
|
3695
|
+
destroyed: ie,
|
|
3696
|
+
setModelAndIdValue: R,
|
|
3697
|
+
runDictPickedAsync: S
|
|
3701
3698
|
};
|
|
3702
3699
|
}
|
|
3703
|
-
function
|
|
3700
|
+
function qn(e) {
|
|
3704
3701
|
return { dictPicked: async ({ items: t, mappingFields: n }) => e.dictPicked && typeof e.dictPicked == "function" ? await e.dictPicked({ items: t, mappingFields: n }) ?? !0 : !0 };
|
|
3705
3702
|
}
|
|
3706
|
-
function
|
|
3703
|
+
function nt(e, a, t, n) {
|
|
3707
3704
|
if (!e.editable)
|
|
3708
3705
|
return;
|
|
3709
|
-
const i = { items: null, mappingFields: n.mappingFields, isFreeInput: !0 };
|
|
3710
|
-
a.emit("clearMapping", i), a.emit("update:modelValue", t), a.emit("update:idValue", ""),
|
|
3706
|
+
const i = { items: null, mappingFields: n.mappingFields, isFreeInput: !0, options: { ...n } };
|
|
3707
|
+
a.emit("clearMapping", i), a.emit("update:modelValue", t), a.emit("update:idValue", ""), Be(e, i);
|
|
3711
3708
|
}
|
|
3712
|
-
function
|
|
3713
|
-
const n =
|
|
3714
|
-
function
|
|
3715
|
-
return
|
|
3716
|
-
}
|
|
3717
|
-
function
|
|
3718
|
-
var
|
|
3719
|
-
if (!
|
|
3709
|
+
function Wn(e, a, t) {
|
|
3710
|
+
const n = H(() => e.textChangeType === "blur" || e.textChangeType === "any"), i = H(() => e.textChangeType === "enter" || e.textChangeType === "any"), { beforeOpenDialog: o, updateModelValue: s, selectedItems: c, openDialog: l, lookupOptions: r, useHttpComposition: d, isPopuped: f, usePopupComposition: y } = t, { updateSearchFieldTitle: F } = d, { lookupState: v, queryState: h, searchValueChanged: p } = d.lookupStates, u = N(!1);
|
|
3711
|
+
function m(R) {
|
|
3712
|
+
return qt(R) && p.value && !f.value ? (u.value = !0, p.value = !1, !1) : p.value;
|
|
3713
|
+
}
|
|
3714
|
+
function T(R) {
|
|
3715
|
+
var S;
|
|
3716
|
+
if (!R || R.length !== 1)
|
|
3720
3717
|
return;
|
|
3721
|
-
const [
|
|
3722
|
-
return (
|
|
3718
|
+
const [j] = R;
|
|
3719
|
+
return (S = j.children) != null && S.length ? T(j.children) : j.data;
|
|
3723
3720
|
}
|
|
3724
|
-
function
|
|
3725
|
-
var
|
|
3726
|
-
if (!
|
|
3721
|
+
function I(R, j) {
|
|
3722
|
+
var k;
|
|
3723
|
+
if (!j || j.length !== 1)
|
|
3727
3724
|
return !1;
|
|
3728
|
-
const [
|
|
3729
|
-
return
|
|
3725
|
+
const [S] = j;
|
|
3726
|
+
return R ? (k = S.children) != null && k.length ? T(S.children) : S.data : S;
|
|
3730
3727
|
}
|
|
3731
|
-
async function
|
|
3732
|
-
const
|
|
3733
|
-
search: { field: "*", value:
|
|
3728
|
+
async function D(R) {
|
|
3729
|
+
const j = {
|
|
3730
|
+
search: { field: "*", value: R, type: e.openType === "Modal" ? "equal" : "like" },
|
|
3734
3731
|
action: "search"
|
|
3735
3732
|
};
|
|
3736
|
-
|
|
3737
|
-
var
|
|
3738
|
-
if (
|
|
3739
|
-
const
|
|
3740
|
-
|
|
3733
|
+
p.value && (document.body.classList.add("lookup-modal-open"), d.loadData(j, async (S) => {
|
|
3734
|
+
var k;
|
|
3735
|
+
if (S.searchFields && S.columns) {
|
|
3736
|
+
const x = F(S.searchFields, S.columns);
|
|
3737
|
+
v.searchFields = x;
|
|
3741
3738
|
}
|
|
3742
|
-
if (
|
|
3743
|
-
const
|
|
3744
|
-
if (
|
|
3745
|
-
|
|
3739
|
+
if (p.value = !1, e.openType === "Modal") {
|
|
3740
|
+
const x = I(((k = S.displayType) == null ? void 0 : k.toLowerCase()) === "treelist", S.items);
|
|
3741
|
+
if (x) {
|
|
3742
|
+
c.value = [x], s(), h.value = "", document.body.classList.remove("lookup-modal-open");
|
|
3746
3743
|
return;
|
|
3747
3744
|
}
|
|
3748
|
-
|
|
3745
|
+
l();
|
|
3749
3746
|
} else
|
|
3750
|
-
|
|
3747
|
+
v.action = R ? "search" : "list", v.items = S.items, v.total = S.total, S.pageInfo && (v.pageInfo = { ...S.pageInfo });
|
|
3751
3748
|
}));
|
|
3752
3749
|
}
|
|
3753
|
-
function V(
|
|
3754
|
-
var
|
|
3755
|
-
let
|
|
3756
|
-
if (
|
|
3750
|
+
function V(R, j) {
|
|
3751
|
+
var k;
|
|
3752
|
+
let S = (k = R.target) == null ? void 0 : k.value;
|
|
3753
|
+
if (S !== "" && (S = S.trim()), m(S)) {
|
|
3757
3754
|
if (e.allowFreeInput)
|
|
3758
3755
|
if (e.openType === "Modal") {
|
|
3759
|
-
|
|
3756
|
+
nt(e, a, S, r);
|
|
3760
3757
|
return;
|
|
3761
3758
|
} else {
|
|
3762
|
-
const { popupState:
|
|
3763
|
-
|
|
3759
|
+
const { popupState: x } = y;
|
|
3760
|
+
x.canClose = !0, c.value = [], nt(e, a, S, r);
|
|
3764
3761
|
}
|
|
3765
|
-
if (e.openType !== "Modal" && !
|
|
3766
|
-
|
|
3762
|
+
if (e.openType !== "Modal" && !f.value) {
|
|
3763
|
+
l(), p.value = !1;
|
|
3767
3764
|
return;
|
|
3768
3765
|
}
|
|
3769
|
-
|
|
3766
|
+
r.uri ? D(S) : a.emit("textChanged", { value: S, type: j ? "blur" : "enter" });
|
|
3770
3767
|
}
|
|
3771
3768
|
}
|
|
3772
|
-
function
|
|
3773
|
-
n.value && V(
|
|
3769
|
+
function C(R) {
|
|
3770
|
+
n.value && V(R, !0);
|
|
3774
3771
|
}
|
|
3775
|
-
function
|
|
3776
|
-
|
|
3772
|
+
function q(R) {
|
|
3773
|
+
R.key === "Enter" && i.value && V(R, !1);
|
|
3777
3774
|
}
|
|
3778
3775
|
return {
|
|
3779
3776
|
changeOnBlur: n,
|
|
3780
3777
|
changeOnEnter: i,
|
|
3781
|
-
onInputBlur:
|
|
3782
|
-
onEnterKeyDown:
|
|
3783
|
-
isClear:
|
|
3778
|
+
onInputBlur: C,
|
|
3779
|
+
onEnterKeyDown: q,
|
|
3780
|
+
isClear: u,
|
|
3781
|
+
queryDataBySearchKeys: D
|
|
3784
3782
|
};
|
|
3785
3783
|
}
|
|
3786
|
-
const
|
|
3784
|
+
const Gn = {
|
|
3787
3785
|
height: { type: Number, default: 500 },
|
|
3788
3786
|
width: { type: Number, default: 500 },
|
|
3789
3787
|
useHttpComposition: { type: Object, default: {} },
|
|
@@ -3807,7 +3805,7 @@ const Wn = {
|
|
|
3807
3805
|
showGoto: !1
|
|
3808
3806
|
}
|
|
3809
3807
|
},
|
|
3810
|
-
displayType: { type: String, default:
|
|
3808
|
+
displayType: { type: String, default: ce.List },
|
|
3811
3809
|
loadTreeDataType: { type: String, default: be.all },
|
|
3812
3810
|
/** 0: 不展开; -1: 全部展开;>0: 展开到指定级数 */
|
|
3813
3811
|
expandLevel: { type: Number, default: 0 },
|
|
@@ -3826,9 +3824,9 @@ const Wn = {
|
|
|
3826
3824
|
enableSearchBar: { type: Boolean, default: !0 },
|
|
3827
3825
|
searchAnyField: { type: Boolean, default: !0 },
|
|
3828
3826
|
locales: { type: Object, default: {} }
|
|
3829
|
-
},
|
|
3827
|
+
}, Hn = /* @__PURE__ */ me({
|
|
3830
3828
|
name: "FLookupPopupContainer",
|
|
3831
|
-
props:
|
|
3829
|
+
props: Gn,
|
|
3832
3830
|
emits: ["selectItemsChanged", "hiddenPopup"],
|
|
3833
3831
|
setup(e, a) {
|
|
3834
3832
|
const t = e.locales, {
|
|
@@ -3841,17 +3839,17 @@ const Wn = {
|
|
|
3841
3839
|
lookupOptions: l
|
|
3842
3840
|
} = n, {
|
|
3843
3841
|
isTreeList: r
|
|
3844
|
-
} =
|
|
3845
|
-
|
|
3846
|
-
const d =
|
|
3842
|
+
} = Te(e, n);
|
|
3843
|
+
Xe(e, !1, n, t);
|
|
3844
|
+
const d = H(() => ({
|
|
3847
3845
|
width: `${e.width}px`,
|
|
3848
3846
|
height: `${e.height}px`,
|
|
3849
3847
|
padding: "5px"
|
|
3850
3848
|
})), {
|
|
3851
3849
|
renderDataGrid: f
|
|
3852
|
-
} =
|
|
3853
|
-
renderTreeGrid:
|
|
3854
|
-
} =
|
|
3850
|
+
} = yt(e, a, {}), {
|
|
3851
|
+
renderTreeGrid: y
|
|
3852
|
+
} = wt(e, a), F = H(() => r() ? y : f);
|
|
3855
3853
|
function v() {
|
|
3856
3854
|
const h = {};
|
|
3857
3855
|
e.enableToSelect && (h.selectedInfo = i(), c.value != null && (h.search = {
|
|
@@ -3861,27 +3859,27 @@ const Wn = {
|
|
|
3861
3859
|
}, h.action = "search"));
|
|
3862
3860
|
const p = e.useHttpComposition;
|
|
3863
3861
|
p == null || p.loadData(h, (u) => {
|
|
3864
|
-
|
|
3862
|
+
qe(() => {
|
|
3865
3863
|
o.action = h.action, u.navigation && (Object.keys(u.navigation).forEach((m) => {
|
|
3866
|
-
var
|
|
3867
|
-
s[m] = (
|
|
3864
|
+
var T;
|
|
3865
|
+
s[m] = (T = u.navigation) == null ? void 0 : T[m];
|
|
3868
3866
|
}), u.navigation.treeInfo && (p == null || p.setTreeInfo(u.navigation.treeInfo, !0)), delete u.navigation), u.treeInfo && (p == null || p.setTreeInfo(u.treeInfo)), Object.keys(u).forEach((m) => {
|
|
3869
3867
|
o[m] = u[m];
|
|
3870
3868
|
});
|
|
3871
3869
|
});
|
|
3872
3870
|
});
|
|
3873
3871
|
}
|
|
3874
|
-
return
|
|
3872
|
+
return Se(() => {
|
|
3875
3873
|
v();
|
|
3876
|
-
}),
|
|
3874
|
+
}), Ae(() => {
|
|
3877
3875
|
a.emit("hiddenPopup");
|
|
3878
3876
|
}), () => E("div", {
|
|
3879
3877
|
style: d.value,
|
|
3880
3878
|
class: "d-flex flex-column"
|
|
3881
|
-
}, [
|
|
3879
|
+
}, [F.value()]);
|
|
3882
3880
|
}
|
|
3883
3881
|
});
|
|
3884
|
-
function
|
|
3882
|
+
function Jn(e, a, t, {
|
|
3885
3883
|
useHttpComposition: n,
|
|
3886
3884
|
selectionsManager: i,
|
|
3887
3885
|
userDataService: o,
|
|
@@ -3892,142 +3890,140 @@ function Hn(e, a, t, {
|
|
|
3892
3890
|
runDictPickedAsync: d,
|
|
3893
3891
|
popupState: f
|
|
3894
3892
|
}) {
|
|
3895
|
-
ge(
|
|
3893
|
+
ge(ze, o), ge(ve, n), ge(Fe, i);
|
|
3896
3894
|
const {
|
|
3897
|
-
selectionState:
|
|
3898
|
-
queryState:
|
|
3895
|
+
selectionState: y,
|
|
3896
|
+
queryState: F,
|
|
3899
3897
|
lookupOptions: v,
|
|
3900
3898
|
searchState: h
|
|
3901
|
-
} = n.lookupStates, p =
|
|
3902
|
-
ge(
|
|
3903
|
-
const u =
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
var P;
|
|
3907
|
-
const S = (P = t.value) == null ? void 0 : P.popoverRef;
|
|
3899
|
+
} = n.lookupStates, p = St(v, !1);
|
|
3900
|
+
ge(Ee, p);
|
|
3901
|
+
const u = Q(Ge, null), m = H(() => {
|
|
3902
|
+
var k;
|
|
3903
|
+
const S = (k = t.value) == null ? void 0 : k.popoverRef;
|
|
3908
3904
|
return S ? S.shown : !1;
|
|
3909
3905
|
});
|
|
3910
|
-
async function
|
|
3906
|
+
async function T() {
|
|
3911
3907
|
if (!f.canClose)
|
|
3912
3908
|
return !1;
|
|
3913
|
-
if (!
|
|
3909
|
+
if (!y.value.length)
|
|
3914
3910
|
return !0;
|
|
3915
3911
|
let S = null;
|
|
3916
3912
|
v.multiSelect ? S = await d() : S = await s();
|
|
3917
3913
|
const {
|
|
3918
|
-
shouldClose:
|
|
3919
|
-
message:
|
|
3914
|
+
shouldClose: k,
|
|
3915
|
+
message: x
|
|
3920
3916
|
} = S;
|
|
3921
|
-
return
|
|
3922
|
-
message:
|
|
3917
|
+
return k ? !0 : (x && (u == null || u.warning({
|
|
3918
|
+
message: x,
|
|
3923
3919
|
position: "top-center"
|
|
3924
3920
|
})), f.canClose = !1, !1);
|
|
3925
3921
|
}
|
|
3926
|
-
async function
|
|
3922
|
+
async function I() {
|
|
3927
3923
|
var S;
|
|
3928
3924
|
(S = t.value) == null || S.hidePopup();
|
|
3929
3925
|
}
|
|
3930
|
-
e.openType === "Popup" &&
|
|
3931
|
-
|
|
3926
|
+
e.openType === "Popup" && W(() => y.value, (S) => {
|
|
3927
|
+
m.value && e.multiSelect && r();
|
|
3932
3928
|
});
|
|
3933
|
-
const
|
|
3929
|
+
const D = () => {
|
|
3934
3930
|
const {
|
|
3935
3931
|
width: S,
|
|
3936
|
-
height:
|
|
3932
|
+
height: k
|
|
3937
3933
|
} = e.dialog;
|
|
3938
3934
|
return {
|
|
3939
3935
|
width: S || 460,
|
|
3940
|
-
height:
|
|
3936
|
+
height: k || 380
|
|
3941
3937
|
};
|
|
3942
|
-
},
|
|
3938
|
+
}, V = H(() => {
|
|
3943
3939
|
var S;
|
|
3944
3940
|
return (S = t.value) == null ? void 0 : S.popoverRef;
|
|
3945
3941
|
});
|
|
3946
|
-
async function
|
|
3947
|
-
|
|
3942
|
+
async function C() {
|
|
3943
|
+
m.value && I(), F.value = "", l(), a.emit("popupClosed"), f.canClose = !0, document.body.classList.remove("lookup-modal-open");
|
|
3948
3944
|
}
|
|
3949
|
-
function
|
|
3945
|
+
function q() {
|
|
3950
3946
|
var S;
|
|
3951
|
-
|
|
3947
|
+
m.value || (S = t.value) == null || S.showPopup();
|
|
3952
3948
|
}
|
|
3953
|
-
function
|
|
3954
|
-
|
|
3949
|
+
function R() {
|
|
3950
|
+
f.canClose = !0, v.multiSelect || I();
|
|
3955
3951
|
}
|
|
3956
|
-
function
|
|
3952
|
+
function j() {
|
|
3957
3953
|
const {
|
|
3958
3954
|
width: S,
|
|
3959
|
-
height:
|
|
3960
|
-
} =
|
|
3961
|
-
return E(
|
|
3955
|
+
height: k
|
|
3956
|
+
} = D();
|
|
3957
|
+
return E(Hn, ot({
|
|
3962
3958
|
width: S,
|
|
3963
|
-
height:
|
|
3959
|
+
height: k,
|
|
3964
3960
|
useHttpComposition: n,
|
|
3965
3961
|
locales: c,
|
|
3966
3962
|
selectionsManager: i,
|
|
3967
|
-
onHiddenPopup:
|
|
3968
|
-
onSelectionsChanged:
|
|
3963
|
+
onHiddenPopup: C,
|
|
3964
|
+
onSelectionsChanged: R
|
|
3969
3965
|
}, e), null);
|
|
3970
3966
|
}
|
|
3971
3967
|
return {
|
|
3972
|
-
popoverInstance:
|
|
3973
|
-
isPopuped:
|
|
3974
|
-
renderPopup:
|
|
3975
|
-
showPopup:
|
|
3976
|
-
hidePopup:
|
|
3977
|
-
onBeforeClosePopup:
|
|
3968
|
+
popoverInstance: V,
|
|
3969
|
+
isPopuped: m,
|
|
3970
|
+
renderPopup: j,
|
|
3971
|
+
showPopup: q,
|
|
3972
|
+
hidePopup: I,
|
|
3973
|
+
onBeforeClosePopup: T,
|
|
3978
3974
|
popupState: f
|
|
3979
3975
|
};
|
|
3980
3976
|
}
|
|
3981
|
-
const
|
|
3977
|
+
const we = /* @__PURE__ */ me({
|
|
3982
3978
|
name: "FLookup",
|
|
3983
|
-
props:
|
|
3979
|
+
props: Ue,
|
|
3984
3980
|
emits: ["update:modelValue", "update:idValue", "search", "navSelectionsChanged", "pageIndexChanged", "pageSizeChanged", "resize", "dialogClosed", "textChanged", "clear", "update:dataMapping", "clearMapping"],
|
|
3985
3981
|
setup(e, a) {
|
|
3986
|
-
const t = '<i id="' + e.id + '-icon_lookup" class="f-icon f-icon-lookup"></i>', n = '<i id="' + e.id + '-icon_dropdown" class="f-icon f-icon-arrow-chevron-down"></i>', i =
|
|
3987
|
-
|
|
3988
|
-
const c =
|
|
3982
|
+
const t = '<i id="' + e.id + '-icon_lookup" class="f-icon f-icon-lookup"></i>', n = '<i id="' + e.id + '-icon_dropdown" class="f-icon f-icon-arrow-chevron-down"></i>', i = N(), o = N(e.modelValue), s = N("");
|
|
3983
|
+
Le.value = e.customData;
|
|
3984
|
+
const c = H(() => e.openType === "Popup" ? "Popup" : "Modal"), l = H(() => c.value === "Popup" ? n : t), r = xn(e), d = Pn(e), {
|
|
3989
3985
|
lookupOptions: f,
|
|
3990
|
-
selectionState:
|
|
3991
|
-
searchValueChanged:
|
|
3986
|
+
selectionState: y,
|
|
3987
|
+
searchValueChanged: F,
|
|
3992
3988
|
queryState: v,
|
|
3993
3989
|
popupState: h
|
|
3994
|
-
} = d.lookupStates, p =
|
|
3995
|
-
dictPicked:
|
|
3996
|
-
} =
|
|
3997
|
-
modalOptions:
|
|
3998
|
-
beforeOpenDialog:
|
|
3999
|
-
dialogSize:
|
|
4000
|
-
customData:
|
|
4001
|
-
updateModelValue:
|
|
4002
|
-
cancelDialog:
|
|
4003
|
-
submitDialog:
|
|
4004
|
-
destroyed:
|
|
4005
|
-
setModelAndIdValue:
|
|
4006
|
-
runDictPickedAsync:
|
|
4007
|
-
} =
|
|
4008
|
-
dictPicked:
|
|
3990
|
+
} = d.lookupStates, p = Ln(e, d), u = H(() => e.showSelections && f.multiSelect), m = H(() => e.editable && (c.value === "Modal" || !f.multiSelect)), T = H(() => e.showIncludeChildNodes && e.showNavigation && !f.navTreeToList), I = vt(e, d.lookupStates), {
|
|
3991
|
+
dictPicked: D
|
|
3992
|
+
} = qn(e), {
|
|
3993
|
+
modalOptions: V,
|
|
3994
|
+
beforeOpenDialog: C,
|
|
3995
|
+
dialogSize: q,
|
|
3996
|
+
customData: R,
|
|
3997
|
+
updateModelValue: j,
|
|
3998
|
+
cancelDialog: S,
|
|
3999
|
+
submitDialog: k,
|
|
4000
|
+
destroyed: x,
|
|
4001
|
+
setModelAndIdValue: P,
|
|
4002
|
+
runDictPickedAsync: X
|
|
4003
|
+
} = jn(e, a, y, {
|
|
4004
|
+
dictPicked: D,
|
|
4009
4005
|
modelValue: o,
|
|
4010
4006
|
buttonEditInstance: i,
|
|
4011
4007
|
userDataService: p,
|
|
4012
4008
|
useHttp: d,
|
|
4013
4009
|
lookupLocales: r
|
|
4014
|
-
}),
|
|
4010
|
+
}), ie = Jn(e, a, i, {
|
|
4015
4011
|
useHttpComposition: d,
|
|
4016
4012
|
selectionsManager: I,
|
|
4017
4013
|
userDataService: p,
|
|
4018
|
-
updateModelValue:
|
|
4014
|
+
updateModelValue: j,
|
|
4019
4015
|
lookupLocales: r,
|
|
4020
|
-
destroyed:
|
|
4021
|
-
setModelAndIdValue:
|
|
4022
|
-
runDictPickedAsync:
|
|
4016
|
+
destroyed: x,
|
|
4017
|
+
setModelAndIdValue: P,
|
|
4018
|
+
runDictPickedAsync: X,
|
|
4023
4019
|
popupState: h
|
|
4024
4020
|
}), {
|
|
4025
4021
|
renderPopup: $,
|
|
4026
4022
|
showPopup: Z,
|
|
4027
4023
|
isPopuped: g,
|
|
4028
|
-
hidePopup:
|
|
4029
|
-
onBeforeClosePopup:
|
|
4030
|
-
} =
|
|
4024
|
+
hidePopup: L,
|
|
4025
|
+
onBeforeClosePopup: A
|
|
4026
|
+
} = ie;
|
|
4031
4027
|
function _() {
|
|
4032
4028
|
if (e.openType === "Popup") {
|
|
4033
4029
|
Z();
|
|
@@ -4036,99 +4032,104 @@ const Te = /* @__PURE__ */ me({
|
|
|
4036
4032
|
i.value && !i.value.getModal() && i.value.openDialog();
|
|
4037
4033
|
}
|
|
4038
4034
|
const {
|
|
4039
|
-
onInputBlur:
|
|
4035
|
+
onInputBlur: Y,
|
|
4040
4036
|
onEnterKeyDown: ee,
|
|
4041
|
-
isClear:
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4037
|
+
isClear: ne,
|
|
4038
|
+
queryDataBySearchKeys: J
|
|
4039
|
+
} = Wn(e, a, {
|
|
4040
|
+
beforeOpenDialog: C,
|
|
4041
|
+
updateModelValue: j,
|
|
4042
|
+
selectedItems: y,
|
|
4045
4043
|
openDialog: _,
|
|
4044
|
+
modelValue: o,
|
|
4046
4045
|
useHttpComposition: d,
|
|
4047
4046
|
lookupOptions: f,
|
|
4048
|
-
usePopupComposition:
|
|
4047
|
+
usePopupComposition: ie,
|
|
4049
4048
|
isPopuped: g
|
|
4050
|
-
}),
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
}),
|
|
4049
|
+
}), O = he(V), z = Q(Ut);
|
|
4050
|
+
W(() => R.value, (B) => {
|
|
4051
|
+
Le.value = B;
|
|
4052
|
+
}), W(() => e.modelValue, (B) => {
|
|
4054
4053
|
o.value = B;
|
|
4055
4054
|
});
|
|
4056
|
-
function
|
|
4057
|
-
d.idValues.value = B, B || (
|
|
4055
|
+
function w(B) {
|
|
4056
|
+
d.idValues.value = B, B || (y.value = []), a.emit("update:idValue", B);
|
|
4058
4057
|
}
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
}),
|
|
4062
|
-
}),
|
|
4063
|
-
|
|
4064
|
-
}),
|
|
4058
|
+
W(() => e.idValue, (B) => {
|
|
4059
|
+
w(B);
|
|
4060
|
+
}), Se(() => {
|
|
4061
|
+
}), Ae(() => {
|
|
4062
|
+
Be(e);
|
|
4063
|
+
}), W(() => q.value, (B) => {
|
|
4065
4064
|
a.emit("resize", B);
|
|
4066
|
-
}), c.value === "Popup" &&
|
|
4067
|
-
var
|
|
4068
|
-
(B ||
|
|
4065
|
+
}), c.value === "Popup" && W([() => e.readonly, () => e.disabled], ([B, re]) => {
|
|
4066
|
+
var ke;
|
|
4067
|
+
(B || re) && ((ke = i.value) == null || ke.forceClosePopup());
|
|
4069
4068
|
});
|
|
4070
|
-
async function
|
|
4071
|
-
|
|
4072
|
-
a.emit("update:modelValue", ""), Q(""), c.value === "Popup" && g.value && ((le = i.value) == null || le.forceClosePopup());
|
|
4069
|
+
async function b() {
|
|
4070
|
+
a.emit("update:modelValue", ""), w(""), c.value === "Popup" && g.value && (h.canClose = !0, ne.value || (F.value = !0, J("")));
|
|
4073
4071
|
const B = {
|
|
4074
4072
|
items: null,
|
|
4075
|
-
mappingFields: f.mappingFields
|
|
4073
|
+
mappingFields: f.mappingFields,
|
|
4074
|
+
options: {
|
|
4075
|
+
...f
|
|
4076
|
+
}
|
|
4076
4077
|
};
|
|
4077
|
-
a.emit("clear", B),
|
|
4078
|
+
a.emit("clear", B), Be(e, B);
|
|
4078
4079
|
}
|
|
4079
|
-
|
|
4080
|
-
B && (
|
|
4080
|
+
W(() => ne.value, (B) => {
|
|
4081
|
+
B && (b(), ne.value = !1);
|
|
4081
4082
|
});
|
|
4082
|
-
function
|
|
4083
|
+
function M(B) {
|
|
4083
4084
|
a.emit("search", B);
|
|
4084
4085
|
}
|
|
4085
|
-
function
|
|
4086
|
+
function G(B) {
|
|
4086
4087
|
a.emit("navSelectionsChanged", B);
|
|
4087
4088
|
}
|
|
4088
|
-
function
|
|
4089
|
+
function te(B) {
|
|
4089
4090
|
a.emit("pageIndexChanged", B);
|
|
4090
4091
|
}
|
|
4091
|
-
function
|
|
4092
|
+
function le(B) {
|
|
4092
4093
|
a.emit("pageSizeChanged", B);
|
|
4093
4094
|
}
|
|
4094
|
-
async function
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4095
|
+
async function ye(B) {
|
|
4096
|
+
const re = z == null ? void 0 : z.getCurrentModal();
|
|
4097
|
+
re && re.updateModalOptions(B), B.title && (s.value = B.title);
|
|
4097
4098
|
}
|
|
4098
|
-
function
|
|
4099
|
-
const
|
|
4100
|
-
|
|
4099
|
+
function U(B) {
|
|
4100
|
+
const re = z == null ? void 0 : z.getCurrentModal();
|
|
4101
|
+
z && re.close(B);
|
|
4101
4102
|
}
|
|
4102
|
-
function
|
|
4103
|
-
const
|
|
4104
|
-
|
|
4103
|
+
function K(B) {
|
|
4104
|
+
const re = z == null ? void 0 : z.getCurrentModal();
|
|
4105
|
+
re && re.maxDialog(B);
|
|
4105
4106
|
}
|
|
4106
|
-
const se =
|
|
4107
|
-
const B =
|
|
4107
|
+
const se = H(() => {
|
|
4108
|
+
const B = z == null ? void 0 : z.getCurrentModal();
|
|
4108
4109
|
return B == null ? void 0 : B.isMaximized;
|
|
4109
|
-
}),
|
|
4110
|
-
function
|
|
4111
|
-
for (const
|
|
4112
|
-
B[
|
|
4110
|
+
}), de = H(() => f.multiSelect && f.showCascadeControl && f.enableCascade && ce.Tree === f.displayType.toUpperCase() && !f.treeToList), fe = H(() => y.value && y.value.length ? y.value.map((B) => B[f.idField]) : []);
|
|
4111
|
+
function _e(B) {
|
|
4112
|
+
for (const re in f)
|
|
4113
|
+
B[re] !== void 0 && (f[re] = B[re]);
|
|
4113
4114
|
}
|
|
4114
|
-
const
|
|
4115
|
-
|
|
4115
|
+
const $e = st((B) => {
|
|
4116
|
+
Y(B);
|
|
4116
4117
|
}, 200);
|
|
4117
|
-
function
|
|
4118
|
-
var
|
|
4119
|
-
let
|
|
4120
|
-
|
|
4118
|
+
function Ye(B) {
|
|
4119
|
+
var ke;
|
|
4120
|
+
let re = (ke = B.target) == null ? void 0 : ke.value;
|
|
4121
|
+
re !== "" && (re = re.trim()), F.value = B.target._value !== re, e.allowFreeInput && w(""), F.value && (v.value = re), c.value === "Popup" && F.value && $e(B);
|
|
4121
4122
|
}
|
|
4122
|
-
function
|
|
4123
|
-
|
|
4123
|
+
function It() {
|
|
4124
|
+
F.value = !1;
|
|
4124
4125
|
}
|
|
4125
|
-
async function
|
|
4126
|
-
await
|
|
4126
|
+
async function Ke(B) {
|
|
4127
|
+
await k() && (z == null || z.close());
|
|
4127
4128
|
}
|
|
4128
|
-
function
|
|
4129
|
-
e.togglePopupOnClickInput && (g.value ?
|
|
4129
|
+
function Ft(B) {
|
|
4130
|
+
e.togglePopupOnClickInput && (g.value ? L() : Z());
|
|
4130
4131
|
}
|
|
4131
|
-
function
|
|
4132
|
+
function kt() {
|
|
4132
4133
|
document.body.classList.add("lookup-modal-open"), e.editable && setTimeout(() => {
|
|
4133
4134
|
var B;
|
|
4134
4135
|
(B = i.value.getTextbox()) == null || B.focus();
|
|
@@ -4136,12 +4137,12 @@ const Te = /* @__PURE__ */ me({
|
|
|
4136
4137
|
}
|
|
4137
4138
|
return a.expose({
|
|
4138
4139
|
openDialog: _,
|
|
4139
|
-
updateIdValue:
|
|
4140
|
+
updateIdValue: w,
|
|
4140
4141
|
mappingFields: f.mappingFields,
|
|
4141
4142
|
idField: f.idField,
|
|
4142
|
-
setProps:
|
|
4143
|
-
clear:
|
|
4144
|
-
}), () => E(
|
|
4143
|
+
setProps: _e,
|
|
4144
|
+
clear: b
|
|
4145
|
+
}), () => E(lt, {
|
|
4145
4146
|
ref: i,
|
|
4146
4147
|
id: e.id,
|
|
4147
4148
|
modelValue: o.value,
|
|
@@ -4153,67 +4154,67 @@ const Te = /* @__PURE__ */ me({
|
|
|
4153
4154
|
enableClear: e.enableClear,
|
|
4154
4155
|
buttonContent: l.value,
|
|
4155
4156
|
buttonBehavior: c.value,
|
|
4156
|
-
modalOptions:
|
|
4157
|
-
onClear:
|
|
4158
|
-
beforeOpen:
|
|
4159
|
-
onBlur:
|
|
4157
|
+
modalOptions: O,
|
|
4158
|
+
onClear: b,
|
|
4159
|
+
beforeOpen: C,
|
|
4160
|
+
onBlur: Y,
|
|
4160
4161
|
onKeydown: ee,
|
|
4161
4162
|
placeholder: r.placeholder,
|
|
4162
4163
|
keepWidthWithReference: !1,
|
|
4163
4164
|
popupOnClick: !e.editable && c.value === "Popup",
|
|
4164
|
-
onInput:
|
|
4165
|
+
onInput: Ye,
|
|
4165
4166
|
enableTitle: e.enableTitle,
|
|
4166
4167
|
placement: "auto",
|
|
4167
|
-
onBeforeClearValue:
|
|
4168
|
+
onBeforeClearValue: It,
|
|
4168
4169
|
customClass: "f-cmp-lookup",
|
|
4169
|
-
onClick:
|
|
4170
|
-
onShown:
|
|
4171
|
-
beforeClosePopup:
|
|
4170
|
+
onClick: Ft,
|
|
4171
|
+
onShown: kt,
|
|
4172
|
+
beforeClosePopup: A,
|
|
4172
4173
|
popupClass: "lookup-popup-panel"
|
|
4173
4174
|
}, {
|
|
4174
|
-
default: () => [c.value === "Modal" && E(
|
|
4175
|
+
default: () => [c.value === "Modal" && E($n, {
|
|
4175
4176
|
title: s.value || "",
|
|
4176
4177
|
enableFavorite: e.enableFavorite,
|
|
4177
|
-
onCloseModal:
|
|
4178
|
-
onMaximize: (B) =>
|
|
4178
|
+
onCloseModal: U,
|
|
4179
|
+
onMaximize: (B) => K(B),
|
|
4179
4180
|
useHttpComposition: d,
|
|
4180
4181
|
userDataService: p,
|
|
4181
4182
|
useDialog: {
|
|
4182
|
-
cancelDialog:
|
|
4183
|
-
submitDialog:
|
|
4183
|
+
cancelDialog: S,
|
|
4184
|
+
submitDialog: k
|
|
4184
4185
|
},
|
|
4185
4186
|
showSelectedList: u.value,
|
|
4186
4187
|
selectionsManager: I,
|
|
4187
4188
|
showIncludeChildNodes: {
|
|
4188
|
-
show:
|
|
4189
|
+
show: T.value,
|
|
4189
4190
|
value: e.includeChildNodesValue
|
|
4190
4191
|
},
|
|
4191
|
-
showCascadeControl:
|
|
4192
|
+
showCascadeControl: de.value,
|
|
4192
4193
|
isMaximized: se.value,
|
|
4193
4194
|
locales: r,
|
|
4194
4195
|
id: e.id
|
|
4195
4196
|
}, {
|
|
4196
|
-
default: () => E(Nn,
|
|
4197
|
-
onSearch:
|
|
4198
|
-
onNavSelectionsChanged:
|
|
4199
|
-
onPageIndexChanged:
|
|
4200
|
-
onPageSizeChanged:
|
|
4201
|
-
onChangeDialogOptions:
|
|
4202
|
-
onDblClickRow:
|
|
4197
|
+
default: () => E(Nn, ot(e, {
|
|
4198
|
+
onSearch: M,
|
|
4199
|
+
onNavSelectionsChanged: G,
|
|
4200
|
+
onPageIndexChanged: te,
|
|
4201
|
+
onPageSizeChanged: le,
|
|
4202
|
+
onChangeDialogOptions: ye,
|
|
4203
|
+
onDblClickRow: Ke
|
|
4203
4204
|
}), null),
|
|
4204
|
-
fav: () => e.enableFavorite && E(
|
|
4205
|
+
fav: () => e.enableFavorite && E(Bn, {
|
|
4205
4206
|
idField: f.idField,
|
|
4206
4207
|
displayType: f.displayType,
|
|
4207
4208
|
selectedIds: fe.value,
|
|
4208
4209
|
multiSelect: f.multiSelect,
|
|
4209
4210
|
showSelections: u.value,
|
|
4210
4211
|
treeToList: f.treeToList,
|
|
4211
|
-
onDblClickRow:
|
|
4212
|
+
onDblClickRow: Ke
|
|
4212
4213
|
}, null)
|
|
4213
4214
|
}), c.value === "Popup" && $()]
|
|
4214
4215
|
});
|
|
4215
4216
|
}
|
|
4216
|
-
}),
|
|
4217
|
+
}), at = {
|
|
4217
4218
|
button: { type: "button", name: "按钮" },
|
|
4218
4219
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
4219
4220
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -4260,12 +4261,12 @@ const Te = /* @__PURE__ */ me({
|
|
|
4260
4261
|
"list-view": { type: "list-view", name: "列表" },
|
|
4261
4262
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
4262
4263
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
4263
|
-
},
|
|
4264
|
-
function
|
|
4265
|
-
|
|
4264
|
+
}, Qn = N(0);
|
|
4265
|
+
function Xn() {
|
|
4266
|
+
Qn.value++;
|
|
4266
4267
|
}
|
|
4267
|
-
const
|
|
4268
|
-
function
|
|
4268
|
+
const Yn = N(0);
|
|
4269
|
+
function Kn(e) {
|
|
4269
4270
|
const { formSchemaUtils: a, formStateMachineUtils: t } = e;
|
|
4270
4271
|
function n(l, r = "") {
|
|
4271
4272
|
return {
|
|
@@ -4294,7 +4295,7 @@ function Yn(e) {
|
|
|
4294
4295
|
}
|
|
4295
4296
|
class Zn {
|
|
4296
4297
|
constructor(a) {
|
|
4297
|
-
|
|
4298
|
+
oe(this, "sessionVariables", [
|
|
4298
4299
|
{
|
|
4299
4300
|
key: "CurrentSysOrgName",
|
|
4300
4301
|
name: "当前组织Name",
|
|
@@ -4331,7 +4332,7 @@ class Zn {
|
|
|
4331
4332
|
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
4332
4333
|
}
|
|
4333
4334
|
]);
|
|
4334
|
-
|
|
4335
|
+
oe(this, "expressionNames", {
|
|
4335
4336
|
compute: "计算表达式",
|
|
4336
4337
|
dependency: "依赖表达式",
|
|
4337
4338
|
validate: "验证表达式",
|
|
@@ -4340,7 +4341,7 @@ class Zn {
|
|
|
4340
4341
|
readonly: "只读表达式",
|
|
4341
4342
|
required: "必填表达式"
|
|
4342
4343
|
});
|
|
4343
|
-
|
|
4344
|
+
oe(this, "getExpressionConverter", (a, t) => ({
|
|
4344
4345
|
convertFrom: (n, i, o, s) => {
|
|
4345
4346
|
const c = o.getExpressionRuleValue(a, t || i);
|
|
4346
4347
|
return c && c.value || "";
|
|
@@ -4520,8 +4521,8 @@ class Zn {
|
|
|
4520
4521
|
onSubmitModal: (d) => {
|
|
4521
4522
|
const f = this.updateExpression(a, t, d, s);
|
|
4522
4523
|
if (i) {
|
|
4523
|
-
const
|
|
4524
|
-
i(
|
|
4524
|
+
const y = this.buildRule(c, d, s);
|
|
4525
|
+
i(y);
|
|
4525
4526
|
}
|
|
4526
4527
|
return f;
|
|
4527
4528
|
}
|
|
@@ -4559,21 +4560,21 @@ class Zn {
|
|
|
4559
4560
|
};
|
|
4560
4561
|
}
|
|
4561
4562
|
}
|
|
4562
|
-
class
|
|
4563
|
+
class ea {
|
|
4563
4564
|
constructor(a, t) {
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4565
|
+
oe(this, "componentId");
|
|
4566
|
+
oe(this, "viewModelId");
|
|
4567
|
+
oe(this, "eventsEditorUtils");
|
|
4568
|
+
oe(this, "formSchemaUtils");
|
|
4569
|
+
oe(this, "formMetadataConverter");
|
|
4570
|
+
oe(this, "designViewModelUtils");
|
|
4571
|
+
oe(this, "designViewModelField");
|
|
4572
|
+
oe(this, "controlCreatorUtils");
|
|
4573
|
+
oe(this, "designerHostService");
|
|
4574
|
+
oe(this, "designerContext");
|
|
4575
|
+
oe(this, "schemaService", null);
|
|
4576
|
+
oe(this, "metadataService", null);
|
|
4577
|
+
oe(this, "propertyConfig", {
|
|
4577
4578
|
type: "object",
|
|
4578
4579
|
categories: {}
|
|
4579
4580
|
});
|
|
@@ -4620,7 +4621,7 @@ class Kn {
|
|
|
4620
4621
|
valueField: "value",
|
|
4621
4622
|
idField: "value",
|
|
4622
4623
|
editable: !1,
|
|
4623
|
-
data: [{ value: a.type, name:
|
|
4624
|
+
data: [{ value: a.type, name: at[a.type] && at[a.type].name }]
|
|
4624
4625
|
}
|
|
4625
4626
|
}
|
|
4626
4627
|
}
|
|
@@ -4656,7 +4657,7 @@ class Kn {
|
|
|
4656
4657
|
switch (s && s.propertyID) {
|
|
4657
4658
|
case "class":
|
|
4658
4659
|
case "style": {
|
|
4659
|
-
|
|
4660
|
+
Yn.value++;
|
|
4660
4661
|
break;
|
|
4661
4662
|
}
|
|
4662
4663
|
}
|
|
@@ -4676,26 +4677,26 @@ class Kn {
|
|
|
4676
4677
|
* @returns
|
|
4677
4678
|
*/
|
|
4678
4679
|
getPropertyEditorParams(a, t = [], n = "visible", i = {}, o = {}, s = "") {
|
|
4679
|
-
const { getVariables: c, getControlName: l, getStateMachines: r } =
|
|
4680
|
+
const { getVariables: c, getControlName: l, getStateMachines: r } = Kn(this.designerHostService), d = this.getRealTargetType(a), f = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], y = {
|
|
4680
4681
|
type: "property-editor",
|
|
4681
4682
|
propertyTypes: f
|
|
4682
4683
|
};
|
|
4683
|
-
return f.map((
|
|
4684
|
-
switch (
|
|
4684
|
+
return f.map((F) => {
|
|
4685
|
+
switch (F) {
|
|
4685
4686
|
case "Const":
|
|
4686
|
-
Object.assign(
|
|
4687
|
+
Object.assign(y, {
|
|
4687
4688
|
constType: "enum",
|
|
4688
4689
|
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
4689
4690
|
}, i);
|
|
4690
4691
|
break;
|
|
4691
4692
|
case "Expression":
|
|
4692
|
-
|
|
4693
|
+
y.expressionConfig = this.getExpressionOptions(a, d, s || n);
|
|
4693
4694
|
break;
|
|
4694
4695
|
case "StateMachine":
|
|
4695
|
-
|
|
4696
|
+
y.stateMachines = r();
|
|
4696
4697
|
break;
|
|
4697
4698
|
case "Variable":
|
|
4698
|
-
Object.assign(
|
|
4699
|
+
Object.assign(y, {
|
|
4699
4700
|
controlName: l(a),
|
|
4700
4701
|
newVariablePrefix: "is",
|
|
4701
4702
|
newVariableType: "Boolean",
|
|
@@ -4706,7 +4707,7 @@ class Kn {
|
|
|
4706
4707
|
}, o);
|
|
4707
4708
|
break;
|
|
4708
4709
|
}
|
|
4709
|
-
}),
|
|
4710
|
+
}), y;
|
|
4710
4711
|
}
|
|
4711
4712
|
getVisibleProperty(a, t = "") {
|
|
4712
4713
|
var o;
|
|
@@ -4769,8 +4770,8 @@ class Kn {
|
|
|
4769
4770
|
const n = t && t.parent && t.parent.schema;
|
|
4770
4771
|
if (!n)
|
|
4771
4772
|
return;
|
|
4772
|
-
const i = n.contents.findIndex((s) => s.id === a), o =
|
|
4773
|
-
n.contents.splice(i, 1), n.contents.splice(i, 0, o),
|
|
4773
|
+
const i = n.contents.findIndex((s) => s.id === a), o = Pe(n.contents[i]);
|
|
4774
|
+
n.contents.splice(i, 1), n.contents.splice(i, 0, o), Xn();
|
|
4774
4775
|
}
|
|
4775
4776
|
/**
|
|
4776
4777
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -4799,11 +4800,11 @@ class Kn {
|
|
|
4799
4800
|
const t = a.propertyValue;
|
|
4800
4801
|
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
4801
4802
|
return;
|
|
4802
|
-
const { expressionId: o, expressionInfo: s } = t, { targetId: c, targetType: l, expressionType: r, value: d, message: f } = s,
|
|
4803
|
-
|
|
4804
|
-
const { expressions:
|
|
4805
|
-
let v =
|
|
4806
|
-
v || (v = { target: c, rules: [], targetType: l },
|
|
4803
|
+
const { expressionId: o, expressionInfo: s } = t, { targetId: c, targetType: l, expressionType: r, value: d, message: f } = s, y = this.formSchemaUtils.getModule();
|
|
4804
|
+
y.expressions = y.expressions || [];
|
|
4805
|
+
const { expressions: F } = y;
|
|
4806
|
+
let v = F.find((p) => p.target === c);
|
|
4807
|
+
v || (v = { target: c, rules: [], targetType: l }, F.push(v));
|
|
4807
4808
|
const h = v.rules.find((p) => p.type === r);
|
|
4808
4809
|
if (h)
|
|
4809
4810
|
h.value = d, h.message = f;
|
|
@@ -4846,10 +4847,10 @@ class Kn {
|
|
|
4846
4847
|
}, t;
|
|
4847
4848
|
}
|
|
4848
4849
|
}
|
|
4849
|
-
class
|
|
4850
|
+
class Ca extends ea {
|
|
4850
4851
|
constructor(t, n) {
|
|
4851
4852
|
super(t, n);
|
|
4852
|
-
|
|
4853
|
+
oe(this, "propertyConfigFilters", {
|
|
4853
4854
|
lookup: [
|
|
4854
4855
|
"dataSource",
|
|
4855
4856
|
"filterConditions",
|
|
@@ -4887,7 +4888,7 @@ class ya extends Kn {
|
|
|
4887
4888
|
"showCloseButton"
|
|
4888
4889
|
]
|
|
4889
4890
|
});
|
|
4890
|
-
|
|
4891
|
+
oe(this, "events", yn);
|
|
4891
4892
|
}
|
|
4892
4893
|
/**
|
|
4893
4894
|
* 获取帮助的属性
|
|
@@ -4895,7 +4896,7 @@ class ya extends Kn {
|
|
|
4895
4896
|
* @returns
|
|
4896
4897
|
*/
|
|
4897
4898
|
getPropertyConfig(t) {
|
|
4898
|
-
const n = new
|
|
4899
|
+
const n = new ht("root-component", this.designerHostService), i = n.getLookupConfig(t), o = n.getPageConfig(t.editor), s = n.getTreePropConfig(t.editor), c = n.getDialogPropertyConfig(t), l = this.getEventPropConfig(t), r = {
|
|
4899
4900
|
type: "object",
|
|
4900
4901
|
categories: {
|
|
4901
4902
|
lookup: i,
|
|
@@ -4936,39 +4937,39 @@ class ya extends Kn {
|
|
|
4936
4937
|
};
|
|
4937
4938
|
}
|
|
4938
4939
|
}
|
|
4939
|
-
|
|
4940
|
-
e.component(
|
|
4940
|
+
we.install = (e) => {
|
|
4941
|
+
e.component(we.name, we);
|
|
4941
4942
|
};
|
|
4942
|
-
|
|
4943
|
-
e.lookup =
|
|
4943
|
+
we.register = (e, a, t, n) => {
|
|
4944
|
+
e.lookup = we, a.lookup = ft, n.lookup = { callbackResolver: dn };
|
|
4944
4945
|
};
|
|
4945
|
-
|
|
4946
|
-
e.lookup =
|
|
4946
|
+
we.registerDesigner = (e, a, t) => {
|
|
4947
|
+
e.lookup = Fn, a.lookup = ft;
|
|
4947
4948
|
};
|
|
4948
4949
|
export {
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4950
|
+
ut as CascadeEnum,
|
|
4951
|
+
De as Compare,
|
|
4952
|
+
un as DEFAULT_LOOKUP_DIALOG_OPTIONS,
|
|
4953
|
+
dt as DEFAULT_PAGINATION_OPTIONS,
|
|
4954
|
+
ct as DefaultDialogTitle,
|
|
4955
|
+
rn as ExpressValueType,
|
|
4956
|
+
Ca as ExternalLookupPropertyConfig,
|
|
4957
|
+
we as FLookup,
|
|
4958
|
+
sn as F_LOOKUP_HTTP_SERVICE_TOKEN,
|
|
4958
4959
|
Ne as FilterRelation,
|
|
4959
|
-
|
|
4960
|
-
|
|
4960
|
+
xe as LOOKUP_ACTIVE_TAB,
|
|
4961
|
+
ya as LOOKUP_USER_DATA_ID,
|
|
4961
4962
|
be as LoadTreeDataType,
|
|
4962
|
-
|
|
4963
|
-
|
|
4963
|
+
ce as LookupDisplayType,
|
|
4964
|
+
Cn as LookupSchemaRepositoryToken,
|
|
4964
4965
|
ue as LookupTabs,
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4966
|
+
dn as callbackResolver,
|
|
4967
|
+
je as cascadeItems,
|
|
4968
|
+
we as default,
|
|
4969
|
+
Tn as getLookupDialogCommonProperties,
|
|
4970
|
+
Sn as getLookupEditorCommonProperties,
|
|
4971
|
+
wn as getLookupPaginationProperties,
|
|
4972
|
+
pt as lookupDataSourceConverter,
|
|
4973
|
+
Ue as lookupProps,
|
|
4974
|
+
ft as propsResolver
|
|
4974
4975
|
};
|