@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var oe = (e, a, t) =>
|
|
4
|
-
import { createVNode as L, Fragment as ft, createTextVNode as
|
|
5
|
-
import
|
|
6
|
-
import { useDesignerComponent as
|
|
7
|
-
import { resolveAppearance as
|
|
8
|
-
import { InputBaseProperty as
|
|
9
|
-
import { FieldSelectorRepositoryToken as
|
|
10
|
-
import { isNil as
|
|
11
|
-
import { FNotifyService as
|
|
12
|
-
import { F_MODAL_SERVICE_TOKEN as
|
|
1
|
+
var Rt = Object.defineProperty;
|
|
2
|
+
var Ut = (e, a, t) => a in e ? Rt(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
|
+
var oe = (e, a, t) => Ut(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
+
import { createVNode as L, Fragment as ft, createTextVNode as zt, defineComponent as Te, ref as N, inject as X, computed as J, onMounted as ke, watch as q, reactive as ye, toRaw as _t, nextTick as Ye, withDirectives as Ze, vModelCheckbox as pt, onUnmounted as Ne, isVNode as $t, resolveDirective as jt, provide as Se, mergeProps as ht } from "vue";
|
|
5
|
+
import qt from "../../designer/button-edit/index.esm.js";
|
|
6
|
+
import { useDesignerComponent as Wt, DgControl as lt, canvasChanged as Gt, refreshCanvas as Ht } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { resolveAppearance as Jt, createPropsResolver as Qt, getPropsResolverGenerator as Xt } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
import { InputBaseProperty as Yt, ExpressionProperty as st } from "../property-panel/index.esm.js";
|
|
9
|
+
import { FieldSelectorRepositoryToken as Ue } from "../field-selector/index.esm.js";
|
|
10
|
+
import { isNil as Zt, isNaN as Kt, flatten as en, cloneDeep as Ve, throttle as tn, get as Ie, debounce as gt, isEmpty as nn } from "lodash-es";
|
|
11
|
+
import { FNotifyService as an, F_NOTIFY_SERVICE_TOKEN as Ke } from "../notify/index.esm.js";
|
|
12
|
+
import { F_MODAL_SERVICE_TOKEN as on } from "../modal/index.esm.js";
|
|
13
13
|
import { FButtonEdit as mt } from "../button-edit/index.esm.js";
|
|
14
|
-
import { FLayout as
|
|
15
|
-
import { FDataGrid as
|
|
16
|
-
import { resolveField as
|
|
17
|
-
import { LocaleService as
|
|
14
|
+
import { FLayout as ln, FLayoutPane as rt } from "../layout/index.esm.js";
|
|
15
|
+
import { FDataGrid as Ge } from "../data-grid/index.esm.js";
|
|
16
|
+
import { resolveField as ze, encrypt as sn, isMobilePhone as je } from "../common/index.esm.js";
|
|
17
|
+
import { LocaleService as rn } from "../locale/index.esm.js";
|
|
18
18
|
import { FTreeGrid as et } from "../tree-grid/index.esm.js";
|
|
19
19
|
import { FComboList as vt } from "../combo-list/index.esm.js";
|
|
20
|
-
import
|
|
20
|
+
import un from "../popover/index.esm.js";
|
|
21
21
|
function ut(e) {
|
|
22
22
|
return typeof e == "string" && e.startsWith("{") && e.endsWith("}") ? (e = e.replace(/'/g, '"'), { mappingFields: JSON.parse(e) }) : { mappingFields: e };
|
|
23
23
|
}
|
|
24
24
|
const bt = /* @__PURE__ */ new Map([
|
|
25
|
-
["appearance",
|
|
25
|
+
["appearance", Jt],
|
|
26
26
|
["mappingFields", (e, a, t) => {
|
|
27
27
|
if (a)
|
|
28
28
|
return ut(a);
|
|
@@ -37,7 +37,7 @@ const bt = /* @__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
|
+
]), dn = "https://json-schema.org/draft/2020-12/schema", cn = "https://farris-design.gitee.io/lookup.schema.json", fn = "lookup", pn = "A Farris Input Component", hn = "object", gn = {
|
|
41
41
|
id: {
|
|
42
42
|
description: "The unique identifier for a combo list",
|
|
43
43
|
type: "string"
|
|
@@ -338,28 +338,28 @@ const bt = /* @__PURE__ */ new Map([
|
|
|
338
338
|
type: "boolean",
|
|
339
339
|
default: !1
|
|
340
340
|
}
|
|
341
|
-
},
|
|
341
|
+
}, mn = [
|
|
342
342
|
"type"
|
|
343
|
-
],
|
|
343
|
+
], vn = [
|
|
344
344
|
"appearance",
|
|
345
345
|
"binding",
|
|
346
346
|
"visible"
|
|
347
|
-
],
|
|
347
|
+
], bn = {
|
|
348
348
|
dictPicking: "帮助前事件",
|
|
349
349
|
dictPicked: "帮助后事件",
|
|
350
350
|
beforeSelectData: "数据选择确认前事件",
|
|
351
351
|
beforeLoadData: "数据加载前事件",
|
|
352
352
|
clear: "清空事件"
|
|
353
353
|
}, yt = {
|
|
354
|
-
$schema:
|
|
355
|
-
$id:
|
|
356
|
-
title:
|
|
357
|
-
description:
|
|
358
|
-
type:
|
|
359
|
-
properties:
|
|
360
|
-
required:
|
|
361
|
-
ignore:
|
|
362
|
-
events:
|
|
354
|
+
$schema: dn,
|
|
355
|
+
$id: cn,
|
|
356
|
+
title: fn,
|
|
357
|
+
description: pn,
|
|
358
|
+
type: hn,
|
|
359
|
+
properties: gn,
|
|
360
|
+
required: mn,
|
|
361
|
+
ignore: vn,
|
|
362
|
+
events: bn
|
|
363
363
|
};
|
|
364
364
|
function Ct(e, a, t) {
|
|
365
365
|
return a;
|
|
@@ -372,7 +372,7 @@ const Xe = [
|
|
|
372
372
|
{ value: "disable", text: "仅选择自身" }
|
|
373
373
|
], Tt = "";
|
|
374
374
|
var ve = /* @__PURE__ */ ((e) => (e.List = "LIST", e.Tree = "TREELIST", e.ListList = "NAVLIST", e.TreeList = "NAVTREELIST", e.ListTree = "NAVLISTTREE", e))(ve || {}), Fe = /* @__PURE__ */ ((e) => (e.default = "default", e.all = "all", e.async = "async", e))(Fe || {});
|
|
375
|
-
const
|
|
375
|
+
const Oe = "__lookup_active_tab__", La = "__lookup_user_data_id__";
|
|
376
376
|
var pe = /* @__PURE__ */ ((e) => (e.dataList = "datalist", e.favorite = "favorite", e))(pe || {});
|
|
377
377
|
const wt = {
|
|
378
378
|
showPageInfo: !0,
|
|
@@ -384,9 +384,9 @@ const wt = {
|
|
|
384
384
|
total: 0,
|
|
385
385
|
mode: "server",
|
|
386
386
|
showGoto: !1
|
|
387
|
-
},
|
|
388
|
-
var
|
|
389
|
-
const
|
|
387
|
+
}, yn = Symbol("f_lookup-http-service_token");
|
|
388
|
+
var _e = /* @__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))(_e || {}), $e = /* @__PURE__ */ ((e) => (e[e.Empty = 0] = "Empty", e[e.And = 1] = "And", e[e.Or = 2] = "Or", e))($e || {}), Cn = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.Expression = 1] = "Expression", e.FrontExpress = "frontExpress", e))(Cn || {});
|
|
389
|
+
const Sn = {
|
|
390
390
|
showCloseButton: !0,
|
|
391
391
|
showMaxButton: !0,
|
|
392
392
|
draggable: !0,
|
|
@@ -394,7 +394,7 @@ const Cn = {
|
|
|
394
394
|
enableEsc: !0,
|
|
395
395
|
rememberSize: !0
|
|
396
396
|
};
|
|
397
|
-
function
|
|
397
|
+
function Tn() {
|
|
398
398
|
function e(a, t, n) {
|
|
399
399
|
const o = {};
|
|
400
400
|
return o.dictPicking = (i) => t.call("dictPicking", a, [i, a], n), o.beforeLoadData = (i) => t.call("beforeLoadData", a, [i, a], n), o.beforeSelectData = (i) => t.call("beforeSelectData", a, [i, a], n), o.dictPicked = (i) => t.call("dictPicked", a, [i, a], n), o;
|
|
@@ -403,7 +403,7 @@ function Sn() {
|
|
|
403
403
|
resolve: e
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const Be = {
|
|
407
407
|
id: { type: String, require: !0 },
|
|
408
408
|
uri: { type: String, default: "" },
|
|
409
409
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -485,20 +485,20 @@ const Oe = {
|
|
|
485
485
|
expandContent: { type: String, default: "" },
|
|
486
486
|
/** 扩展按钮是否禁用 */
|
|
487
487
|
expandDisabled: { type: Boolean, default: !1 }
|
|
488
|
-
},
|
|
489
|
-
|
|
488
|
+
}, Ea = Qt(Be, yt, bt, Ct), wn = Tn(), Ft = Xt(
|
|
489
|
+
Be,
|
|
490
490
|
yt,
|
|
491
491
|
bt,
|
|
492
492
|
Ct
|
|
493
493
|
);
|
|
494
|
-
function
|
|
494
|
+
function qe(e) {
|
|
495
495
|
let a = [10, 20, 30, 50, 100];
|
|
496
496
|
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);
|
|
497
497
|
}
|
|
498
|
-
const
|
|
498
|
+
const ee = {
|
|
499
499
|
convertFrom: (e, a) => {
|
|
500
500
|
const t = e.editor ? e.editor : e;
|
|
501
|
-
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" ?
|
|
501
|
+
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" ? Zt(t[a]) ? "请选择" : t[a] : a === "openType" ? t[a] || "Modal" : t[a];
|
|
502
502
|
},
|
|
503
503
|
convertTo: (e, a, t) => {
|
|
504
504
|
const n = e.editor ? e.editor : e;
|
|
@@ -513,15 +513,15 @@ const te = {
|
|
|
513
513
|
n.multiSelect && n.openType === "Popup" && (n.editable = !1, n.allowFreeInput = !1);
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
function
|
|
516
|
+
function Fn(e) {
|
|
517
517
|
let a = "form_group_" + Date.now();
|
|
518
518
|
return e && (a = e.replaceAll("-", "_").replaceAll(".", "_")), "lookup." + a;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function In(e, a) {
|
|
521
521
|
const { enablePager: t, pageSize: n, pageList: o } = a;
|
|
522
522
|
e.pagination = e.pagination || {}, Object.assign(e.pagination, {
|
|
523
523
|
enable: t,
|
|
524
|
-
sizeLimits:
|
|
524
|
+
sizeLimits: qe(o).map((i) => i.value),
|
|
525
525
|
size: n,
|
|
526
526
|
showLimits: !0,
|
|
527
527
|
showGoto: !1,
|
|
@@ -540,19 +540,19 @@ const It = {
|
|
|
540
540
|
const { displayType: c, idField: d, textField: p } = u;
|
|
541
541
|
n.displayType = c, n.dataSource.idField = d, n.textField = p, n.dataSource.type = "ViewObject", n.enableEqualSearch = !1;
|
|
542
542
|
const { pageInfo: b } = u.dataSource;
|
|
543
|
-
|
|
543
|
+
In(n, b);
|
|
544
544
|
const { treeInfo: w } = c.toUpperCase() === "NAVTREELIST" ? u.navigation : u.dataSource;
|
|
545
545
|
if (w) {
|
|
546
|
-
const { onlySelectLeaf:
|
|
547
|
-
n.loadTreeDataType = "default", n.onlySelectLeaf =
|
|
546
|
+
const { onlySelectLeaf: C, loadDataType: v } = w;
|
|
547
|
+
n.loadTreeDataType = "default", n.onlySelectLeaf = C ?? !1;
|
|
548
548
|
}
|
|
549
|
-
if (n.dataSource.uri || (n.dataSource.uri =
|
|
550
|
-
const { width:
|
|
551
|
-
c && c.toUpperCase().indexOf("NAV") > -1 && (!
|
|
549
|
+
if (n.dataSource.uri || (n.dataSource.uri = Fn(e.id)), n.dialog) {
|
|
550
|
+
const { width: C } = n.dialog;
|
|
551
|
+
c && c.toUpperCase().indexOf("NAV") > -1 && (!C || C < 520) && (n.dialog.width = 960);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
},
|
|
555
|
+
}, kn = {
|
|
556
556
|
convertFrom: (e, a) => {
|
|
557
557
|
var t;
|
|
558
558
|
return (t = e.editor.dataSource) == null ? void 0 : t.idField;
|
|
@@ -574,12 +574,12 @@ const It = {
|
|
|
574
574
|
e.editor.textField = n == null ? void 0 : n.bindingPath;
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
},
|
|
577
|
+
}, xn = {
|
|
578
578
|
convertFrom: (e, a) => e.editor.displayType ? e.editor.displayType.toUpperCase() : "LIST",
|
|
579
579
|
convertTo: (e, a, t) => {
|
|
580
580
|
e.editor.displayType = t;
|
|
581
581
|
}
|
|
582
|
-
},
|
|
582
|
+
}, Ce = {
|
|
583
583
|
convertFrom: (e, a) => {
|
|
584
584
|
var i;
|
|
585
585
|
let t = e.editor ? e.editor.dialog : e.dialog;
|
|
@@ -608,14 +608,14 @@ const It = {
|
|
|
608
608
|
const n = e.editor ? e.editor : e;
|
|
609
609
|
n.dialog = n.dialog || {}, n.dialog[a] = t;
|
|
610
610
|
}
|
|
611
|
-
},
|
|
611
|
+
}, Ln = {
|
|
612
612
|
convertFrom: (e, a) => {
|
|
613
613
|
const t = e.editor ? e.editor : e;
|
|
614
614
|
if (t.pagination = t.pagination || {}, a === "enable" || a === "showLimits")
|
|
615
615
|
return t.pagination[a] == null ? !1 : t.pagination[a];
|
|
616
616
|
if (a === "sizeLimits") {
|
|
617
617
|
const n = t.pagination[a];
|
|
618
|
-
return
|
|
618
|
+
return qe(n);
|
|
619
619
|
}
|
|
620
620
|
if (a === "size")
|
|
621
621
|
return t.pagination[a] || 20;
|
|
@@ -632,7 +632,7 @@ const It = {
|
|
|
632
632
|
}
|
|
633
633
|
n.pagination[a] = t;
|
|
634
634
|
}
|
|
635
|
-
},
|
|
635
|
+
}, En = [
|
|
636
636
|
{
|
|
637
637
|
label: "clear",
|
|
638
638
|
name: "清空事件"
|
|
@@ -653,7 +653,7 @@ const It = {
|
|
|
653
653
|
label: "dictPicked",
|
|
654
654
|
name: "帮助后事件"
|
|
655
655
|
}
|
|
656
|
-
],
|
|
656
|
+
], Mn = [
|
|
657
657
|
{
|
|
658
658
|
label: "dictPicking",
|
|
659
659
|
name: "帮助前事件"
|
|
@@ -672,7 +672,7 @@ const It = {
|
|
|
672
672
|
}
|
|
673
673
|
], dt = (e) => L(ft, null, [L("h5", {
|
|
674
674
|
style: "display: flex;justify-content: space-between;align-items: center;"
|
|
675
|
-
}, [
|
|
675
|
+
}, [zt("示例代码:")]), L("pre", {
|
|
676
676
|
style: "height: calc(100% - 35px);margin: 0;"
|
|
677
677
|
}, [`{
|
|
678
678
|
// 列绑定字段返回自定义数据,rowData: 行数据, column: 列信息
|
|
@@ -701,7 +701,7 @@ const It = {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
}`])]), Vn = Symbol("schema_repository_token");
|
|
704
|
-
function
|
|
704
|
+
function Dn(e, a) {
|
|
705
705
|
const t = (n) => n && n.length ? n.map((o) => `${o.name}[${o.bindingPath}]`).join(",") : "";
|
|
706
706
|
return {
|
|
707
707
|
dataSourceEditor: {
|
|
@@ -728,7 +728,7 @@ function Mn(e, a) {
|
|
|
728
728
|
repositoryToken: Vn
|
|
729
729
|
},
|
|
730
730
|
dataSourceConverter: It,
|
|
731
|
-
defaultConverter:
|
|
731
|
+
defaultConverter: ee,
|
|
732
732
|
idFieldEditor: {
|
|
733
733
|
type: "field-selector",
|
|
734
734
|
textField: "bindingPath",
|
|
@@ -743,7 +743,7 @@ function Mn(e, a) {
|
|
|
743
743
|
{ field: "code", title: "编号" },
|
|
744
744
|
{ field: "bindingPath", title: "绑定字段" }
|
|
745
745
|
],
|
|
746
|
-
repositoryToken:
|
|
746
|
+
repositoryToken: Ue
|
|
747
747
|
},
|
|
748
748
|
textFieldEditor: {
|
|
749
749
|
type: "field-selector",
|
|
@@ -758,7 +758,7 @@ function Mn(e, a) {
|
|
|
758
758
|
{ field: "code", title: "编号" },
|
|
759
759
|
{ field: "bindingPath", title: "绑定字段" }
|
|
760
760
|
],
|
|
761
|
-
repositoryToken:
|
|
761
|
+
repositoryToken: Ue
|
|
762
762
|
},
|
|
763
763
|
mappingFieldsEditor: {
|
|
764
764
|
type: "mapping-editor",
|
|
@@ -776,7 +776,7 @@ function Mn(e, a) {
|
|
|
776
776
|
textField: "name",
|
|
777
777
|
valueField: "bindingPath",
|
|
778
778
|
searchFields: ["name", "bindingPath"],
|
|
779
|
-
repositoryToken:
|
|
779
|
+
repositoryToken: Ue,
|
|
780
780
|
displayFormatter: t
|
|
781
781
|
},
|
|
782
782
|
toData: {
|
|
@@ -795,7 +795,7 @@ function Mn(e, a) {
|
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Nn(e) {
|
|
799
799
|
var i, s;
|
|
800
800
|
const a = {
|
|
801
801
|
type: "combo-list",
|
|
@@ -811,7 +811,7 @@ function Dn(e) {
|
|
|
811
811
|
title: "打开方式",
|
|
812
812
|
type: "string",
|
|
813
813
|
refreshPanelAfterChanged: !0,
|
|
814
|
-
$converter:
|
|
814
|
+
$converter: ee,
|
|
815
815
|
editor: {
|
|
816
816
|
...a,
|
|
817
817
|
data: [
|
|
@@ -830,7 +830,7 @@ function Dn(e) {
|
|
|
830
830
|
title: "标题",
|
|
831
831
|
type: "string",
|
|
832
832
|
visible: e.openType !== "Popup",
|
|
833
|
-
$converter:
|
|
833
|
+
$converter: Ce
|
|
834
834
|
},
|
|
835
835
|
width: {
|
|
836
836
|
description: "窗口宽度,单位:px,最小值:300px",
|
|
@@ -841,7 +841,7 @@ function Dn(e) {
|
|
|
841
841
|
min: o() ? 520 : 300,
|
|
842
842
|
needValid: !0
|
|
843
843
|
},
|
|
844
|
-
$converter:
|
|
844
|
+
$converter: Ce
|
|
845
845
|
},
|
|
846
846
|
height: {
|
|
847
847
|
description: "窗口高度,单位:px,最小值:200px",
|
|
@@ -852,11 +852,11 @@ function Dn(e) {
|
|
|
852
852
|
min: 200,
|
|
853
853
|
needValid: !0
|
|
854
854
|
},
|
|
855
|
-
$converter:
|
|
855
|
+
$converter: Ce
|
|
856
856
|
},
|
|
857
857
|
showNavigation: {
|
|
858
858
|
description: "显示导航栏",
|
|
859
|
-
$converter:
|
|
859
|
+
$converter: ee,
|
|
860
860
|
refreshPanelAfterChanged: !0,
|
|
861
861
|
title: "显示导航栏",
|
|
862
862
|
type: "boolean",
|
|
@@ -873,46 +873,46 @@ function Dn(e) {
|
|
|
873
873
|
max: (((i = e == null ? void 0 : e.dialog) == null ? void 0 : i.width) ?? 960) - 200,
|
|
874
874
|
needValid: !0
|
|
875
875
|
},
|
|
876
|
-
$converter:
|
|
876
|
+
$converter: Ce
|
|
877
877
|
},
|
|
878
878
|
resizeable: {
|
|
879
879
|
description: "允许鼠标拖拽窗口边缘调整尺寸",
|
|
880
880
|
title: "允许调整窗口尺寸",
|
|
881
881
|
type: "boolean",
|
|
882
882
|
visible: e.openType !== "Popup",
|
|
883
|
-
$converter:
|
|
883
|
+
$converter: Ce
|
|
884
884
|
},
|
|
885
885
|
rememberSize: {
|
|
886
886
|
description: "记录窗口尺寸",
|
|
887
887
|
title: "记录窗口尺寸",
|
|
888
888
|
type: "boolean",
|
|
889
889
|
visible: !!e.enableUserData && (((s = e == null ? void 0 : e.dialog) == null ? void 0 : s.resizeable) ?? !0) && e.openType !== "Popup",
|
|
890
|
-
$converter:
|
|
890
|
+
$converter: Ce
|
|
891
891
|
},
|
|
892
892
|
enableEsc: {
|
|
893
893
|
description: "允许ESC关闭",
|
|
894
894
|
title: "允许ESC关闭",
|
|
895
895
|
type: "boolean",
|
|
896
896
|
visible: e.openType !== "Popup",
|
|
897
|
-
$converter:
|
|
897
|
+
$converter: Ce
|
|
898
898
|
},
|
|
899
899
|
showMaxButton: {
|
|
900
900
|
description: "显示最大化按钮",
|
|
901
901
|
title: "显示最大化按钮",
|
|
902
902
|
type: "boolean",
|
|
903
903
|
visible: e.openType !== "Popup",
|
|
904
|
-
$converter:
|
|
904
|
+
$converter: Ce
|
|
905
905
|
},
|
|
906
906
|
showCloseButton: {
|
|
907
907
|
description: "显示关闭按钮",
|
|
908
908
|
title: "显示关闭按钮",
|
|
909
909
|
type: "boolean",
|
|
910
910
|
visible: e.openType !== "Popup",
|
|
911
|
-
$converter:
|
|
911
|
+
$converter: Ce
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function On(e, a = !0) {
|
|
916
916
|
var i, s, u, l;
|
|
917
917
|
const t = !((i = e.pagination) != null && i.enable), n = () => e.displayType ? e.displayType.toUpperCase() : "", o = (c, d) => {
|
|
918
918
|
const p = n() !== "TREELIST" || c.treeToList;
|
|
@@ -923,7 +923,7 @@ function Nn(e, a = !0) {
|
|
|
923
923
|
description: "分页配置",
|
|
924
924
|
title: "分页",
|
|
925
925
|
parentPropertyID: "pagination",
|
|
926
|
-
$converter:
|
|
926
|
+
$converter: Ln,
|
|
927
927
|
properties: {
|
|
928
928
|
// enable: {
|
|
929
929
|
// description: "启用分页",
|
|
@@ -967,7 +967,7 @@ function Nn(e, a = !0) {
|
|
|
967
967
|
nameField: "value",
|
|
968
968
|
requiredFields: ["value"],
|
|
969
969
|
uniqueFields: ["value"],
|
|
970
|
-
modelValue:
|
|
970
|
+
modelValue: qe((s = e.pagination) == null ? void 0 : s.sizeLimits),
|
|
971
971
|
beforeSubmit: ({ notifyService: c, data: d }) => !d || !d.length ? (c == null || c.warning({ message: "每页显示条数不能为空!" }), !1) : new Set(d.map((b) => parseInt(b.value, 10))).size === d.length ? !0 : (c == null || c.warning({ message: "每页显示条数不能重复!" }), !1)
|
|
972
972
|
}
|
|
973
973
|
},
|
|
@@ -980,7 +980,7 @@ function Nn(e, a = !0) {
|
|
|
980
980
|
type: "combo-list",
|
|
981
981
|
enableClear: !1,
|
|
982
982
|
editable: !1,
|
|
983
|
-
data:
|
|
983
|
+
data: qe((u = e.pagination) == null ? void 0 : u.sizeLimits),
|
|
984
984
|
textField: "value",
|
|
985
985
|
idField: "value",
|
|
986
986
|
valueField: "value",
|
|
@@ -990,7 +990,7 @@ function Nn(e, a = !0) {
|
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
993
|
-
class
|
|
993
|
+
class kt extends Yt {
|
|
994
994
|
constructor() {
|
|
995
995
|
super(...arguments);
|
|
996
996
|
oe(this, "comboListEditor", {
|
|
@@ -1015,7 +1015,7 @@ class Pt extends Xt {
|
|
|
1015
1015
|
var g;
|
|
1016
1016
|
const i = (g = t.binding) != null && g.field ? [] : ["Const", "Variable", "StateMachine"];
|
|
1017
1017
|
this.readonlyEditor = this.getPropertyEditorParams(t, i, "readonly"), this.visibleEditor = this.getPropertyEditorParams(t, i, "visible"), this.requiredEditor = this.getPropertyEditorParams(t, i, "required"), this.freeInputEditor = this.getPropertyEditorParams(t, ["Const", "Variable"], "allowFreeInput");
|
|
1018
|
-
const s = this.getBasicProperties(t, n, o), u = this.getBehaviorConfig(t), l = this.getAppearanceProperties(t, n), c = this.getLookupConfig(t), d = this.getEventPropConfig(t), p = this.getDialogPropertyConfig(t), b = this.getPageConfig(t.editor), w = this.getTreePropConfig(t.editor),
|
|
1018
|
+
const s = this.getBasicProperties(t, n, o), u = this.getBehaviorConfig(t), l = this.getAppearanceProperties(t, n), c = this.getLookupConfig(t), d = this.getEventPropConfig(t), p = this.getDialogPropertyConfig(t), b = this.getPageConfig(t.editor), w = this.getTreePropConfig(t.editor), C = this.getSearchConfig(t), v = this.getExpandProperties(t), f = this.getExpressionConfig(t, "Field"), r = {
|
|
1019
1019
|
basic: s,
|
|
1020
1020
|
appearance: l,
|
|
1021
1021
|
behavior: u,
|
|
@@ -1024,7 +1024,7 @@ class Pt extends Xt {
|
|
|
1024
1024
|
treeConfig: w,
|
|
1025
1025
|
dialog: p,
|
|
1026
1026
|
pager: b,
|
|
1027
|
-
searchConfig:
|
|
1027
|
+
searchConfig: C,
|
|
1028
1028
|
expressions: f
|
|
1029
1029
|
};
|
|
1030
1030
|
return t.type === "form-group" && (r.eventsEditor = d), {
|
|
@@ -1100,7 +1100,7 @@ class Pt extends Xt {
|
|
|
1100
1100
|
parentPropertyID: "editor",
|
|
1101
1101
|
properties: {
|
|
1102
1102
|
enableSearchBar: {
|
|
1103
|
-
$converter:
|
|
1103
|
+
$converter: ee,
|
|
1104
1104
|
description: "是否启用搜索栏",
|
|
1105
1105
|
refreshPanelAfterChanged: !0,
|
|
1106
1106
|
title: "启用搜索栏",
|
|
@@ -1109,13 +1109,13 @@ class Pt extends Xt {
|
|
|
1109
1109
|
},
|
|
1110
1110
|
searchAnyField: {
|
|
1111
1111
|
description: "显示所有列",
|
|
1112
|
-
$converter:
|
|
1112
|
+
$converter: ee,
|
|
1113
1113
|
title: "允许查询所有列",
|
|
1114
1114
|
type: "boolean",
|
|
1115
1115
|
visible: t.editor.openType !== "Popup" && t.editor.enableSearchBar == null ? !0 : !!t.editor.enableSearchBar
|
|
1116
1116
|
},
|
|
1117
1117
|
enableEqualSearch: {
|
|
1118
|
-
$converter:
|
|
1118
|
+
$converter: ee,
|
|
1119
1119
|
description: "是否启用等于搜索",
|
|
1120
1120
|
title: "启用精确搜索",
|
|
1121
1121
|
type: "boolean",
|
|
@@ -1130,7 +1130,7 @@ class Pt extends Xt {
|
|
|
1130
1130
|
const n = t.editor, o = () => {
|
|
1131
1131
|
const d = this.formSchemaUtils.getFormSchema().module.entity[0].id, p = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
1132
1132
|
return { propertyData: n, formBasicInfo: p, viewModelId: d, dataSourceId: n.helpId };
|
|
1133
|
-
}, { dataSourceEditor: i, idFieldEditor: s, textFieldEditor: u, mappingFieldsEditor: l } =
|
|
1133
|
+
}, { dataSourceEditor: i, idFieldEditor: s, textFieldEditor: u, mappingFieldsEditor: l } = Dn(n, this);
|
|
1134
1134
|
return {
|
|
1135
1135
|
description: "Basic Infomation",
|
|
1136
1136
|
title: "编辑器",
|
|
@@ -1164,20 +1164,20 @@ class Pt extends Xt {
|
|
|
1164
1164
|
description: "当控件没有值时在输入框中显示的文本",
|
|
1165
1165
|
title: "提示文本",
|
|
1166
1166
|
type: "string",
|
|
1167
|
-
$converter:
|
|
1167
|
+
$converter: ee
|
|
1168
1168
|
},
|
|
1169
1169
|
enableTitle: {
|
|
1170
1170
|
description: "鼠标悬停显示文本内容",
|
|
1171
1171
|
title: "悬停提示",
|
|
1172
1172
|
type: "boolean",
|
|
1173
|
-
$converter:
|
|
1173
|
+
$converter: ee,
|
|
1174
1174
|
editor: this.comboListEditor
|
|
1175
1175
|
},
|
|
1176
1176
|
editable: {
|
|
1177
1177
|
description: "",
|
|
1178
1178
|
title: "允许编辑",
|
|
1179
1179
|
type: "boolean",
|
|
1180
|
-
$converter:
|
|
1180
|
+
$converter: ee,
|
|
1181
1181
|
refreshPanelAfterChanged: !0,
|
|
1182
1182
|
editor: this.comboListEditor,
|
|
1183
1183
|
visible: !(n.multiSelect && n.openType === "Popup")
|
|
@@ -1186,14 +1186,14 @@ class Pt extends Xt {
|
|
|
1186
1186
|
description: "",
|
|
1187
1187
|
title: "任意输入",
|
|
1188
1188
|
type: "boolean",
|
|
1189
|
-
$converter:
|
|
1189
|
+
$converter: ee,
|
|
1190
1190
|
editor: this.freeInputEditor,
|
|
1191
1191
|
visible: !!n.editable && this.isSimpleStringField()
|
|
1192
1192
|
},
|
|
1193
1193
|
enableClear: {
|
|
1194
1194
|
title: "启用清除按钮",
|
|
1195
1195
|
type: "boolean",
|
|
1196
|
-
$converter:
|
|
1196
|
+
$converter: ee
|
|
1197
1197
|
},
|
|
1198
1198
|
dataSource: {
|
|
1199
1199
|
description: "数据源",
|
|
@@ -1218,7 +1218,7 @@ class Pt extends Xt {
|
|
|
1218
1218
|
descriptions: "帮助过滤条件",
|
|
1219
1219
|
title: "过滤条件",
|
|
1220
1220
|
type: "string",
|
|
1221
|
-
$converter:
|
|
1221
|
+
$converter: ee,
|
|
1222
1222
|
editor: {
|
|
1223
1223
|
type: "filter-condition-editor",
|
|
1224
1224
|
editable: !1,
|
|
@@ -1231,7 +1231,7 @@ class Pt extends Xt {
|
|
|
1231
1231
|
viewModelId: this.formSchemaUtils.getFormSchema().module.entity[0].id
|
|
1232
1232
|
},
|
|
1233
1233
|
idField: "path",
|
|
1234
|
-
repositoryToken:
|
|
1234
|
+
repositoryToken: Ue,
|
|
1235
1235
|
beforeOpen: async ({ repository: d, notifyService: p }) => {
|
|
1236
1236
|
var r;
|
|
1237
1237
|
if (!(n == null ? void 0 : n.helpId))
|
|
@@ -1239,21 +1239,21 @@ class Pt extends Xt {
|
|
|
1239
1239
|
const w = o(), v = new st(this.formSchemaUtils).getEntitiesAndVariables();
|
|
1240
1240
|
let f = {};
|
|
1241
1241
|
if (d) {
|
|
1242
|
-
const g = await d.getData(w),
|
|
1243
|
-
f = { fieldList: g, conditionList:
|
|
1242
|
+
const g = await d.getData(w), S = await d.getLookupConditions(w);
|
|
1243
|
+
f = { fieldList: g, conditionList: S };
|
|
1244
1244
|
}
|
|
1245
1245
|
return (r = v.variables) != null && r.forms && (v.variables.forms.items = v.variables.forms.items.filter((g) => g.category === "remote")), { ...f, ...v, isServerSide: !0 };
|
|
1246
1246
|
},
|
|
1247
|
-
onSubmitModal: async ({ loadingService: d, repository: p, conditions: b, originalConditions: w, FMessageBoxService:
|
|
1247
|
+
onSubmitModal: async ({ loadingService: d, repository: p, conditions: b, originalConditions: w, FMessageBoxService: C }) => {
|
|
1248
1248
|
if (p)
|
|
1249
1249
|
try {
|
|
1250
1250
|
const v = o(), f = await p.getLookupConditions(v) || [];
|
|
1251
|
-
return JSON.stringify(f) !== JSON.stringify(w.value) ? (d == null || d.clearAll(),
|
|
1251
|
+
return JSON.stringify(f) !== JSON.stringify(w.value) ? (d == null || d.clearAll(), C.question("视图对象中的帮助过滤条件已更改,请点击确定同步过滤数据", "", () => {
|
|
1252
1252
|
b.value = f, w.value = JSON.parse(JSON.stringify(b.value));
|
|
1253
1253
|
}, () => {
|
|
1254
1254
|
}), !1) : (JSON.stringify(b.value) === JSON.stringify(w.value) || await p.saveFilterCondition(b.value, v, this.formSchemaUtils.getFormMetadataBasicInfo()), !0);
|
|
1255
1255
|
} catch {
|
|
1256
|
-
return
|
|
1256
|
+
return C == null || C.error("保存失败", ""), !1;
|
|
1257
1257
|
} finally {
|
|
1258
1258
|
d == null || d.clearAll();
|
|
1259
1259
|
}
|
|
@@ -1265,7 +1265,7 @@ class Pt extends Xt {
|
|
|
1265
1265
|
description: "类型: 树列表、列表、双列表、左树右列表",
|
|
1266
1266
|
title: "展示类型",
|
|
1267
1267
|
type: "string",
|
|
1268
|
-
$converter:
|
|
1268
|
+
$converter: xn,
|
|
1269
1269
|
editor: {
|
|
1270
1270
|
type: "combo-list",
|
|
1271
1271
|
editable: !1,
|
|
@@ -1288,7 +1288,7 @@ class Pt extends Xt {
|
|
|
1288
1288
|
editor: {
|
|
1289
1289
|
...s
|
|
1290
1290
|
},
|
|
1291
|
-
$converter:
|
|
1291
|
+
$converter: kn
|
|
1292
1292
|
},
|
|
1293
1293
|
textField: {
|
|
1294
1294
|
description: "显示文本字段",
|
|
@@ -1301,7 +1301,7 @@ class Pt extends Xt {
|
|
|
1301
1301
|
description: "字段映射",
|
|
1302
1302
|
title: "字段映射",
|
|
1303
1303
|
type: "string",
|
|
1304
|
-
$converter:
|
|
1304
|
+
$converter: ee,
|
|
1305
1305
|
editor: {
|
|
1306
1306
|
...l
|
|
1307
1307
|
}
|
|
@@ -1310,7 +1310,7 @@ class Pt extends Xt {
|
|
|
1310
1310
|
description: "文本对齐方式",
|
|
1311
1311
|
title: "文本对齐方式",
|
|
1312
1312
|
type: "string",
|
|
1313
|
-
$converter:
|
|
1313
|
+
$converter: ee,
|
|
1314
1314
|
editor: {
|
|
1315
1315
|
type: "combo-list",
|
|
1316
1316
|
editable: !1,
|
|
@@ -1328,7 +1328,7 @@ class Pt extends Xt {
|
|
|
1328
1328
|
description: "自定义数据格式化、样式",
|
|
1329
1329
|
title: "格式化",
|
|
1330
1330
|
type: "string",
|
|
1331
|
-
$converter:
|
|
1331
|
+
$converter: ee,
|
|
1332
1332
|
editor: {
|
|
1333
1333
|
type: "code-editor",
|
|
1334
1334
|
language: "javascript",
|
|
@@ -1339,7 +1339,7 @@ class Pt extends Xt {
|
|
|
1339
1339
|
description: "自定义左侧导航数据格式化、样式",
|
|
1340
1340
|
title: "左侧导航格式化",
|
|
1341
1341
|
type: "string",
|
|
1342
|
-
$converter:
|
|
1342
|
+
$converter: ee,
|
|
1343
1343
|
editor: {
|
|
1344
1344
|
type: "code-editor",
|
|
1345
1345
|
language: "javascript",
|
|
@@ -1349,14 +1349,14 @@ class Pt extends Xt {
|
|
|
1349
1349
|
},
|
|
1350
1350
|
enableToSelect: {
|
|
1351
1351
|
description: "数据加载后是否选中现有值",
|
|
1352
|
-
$converter:
|
|
1352
|
+
$converter: ee,
|
|
1353
1353
|
title: "选中已选值",
|
|
1354
1354
|
type: "boolean",
|
|
1355
1355
|
editor: this.comboListEditor
|
|
1356
1356
|
},
|
|
1357
1357
|
multiSelect: {
|
|
1358
1358
|
description: "启用多选",
|
|
1359
|
-
$converter:
|
|
1359
|
+
$converter: ee,
|
|
1360
1360
|
title: "启用多选",
|
|
1361
1361
|
type: "boolean",
|
|
1362
1362
|
editor: this.comboListEditor,
|
|
@@ -1365,14 +1365,14 @@ class Pt extends Xt {
|
|
|
1365
1365
|
},
|
|
1366
1366
|
showSelections: {
|
|
1367
1367
|
description: "显示已选记录",
|
|
1368
|
-
$converter:
|
|
1368
|
+
$converter: ee,
|
|
1369
1369
|
title: "显示已选记录",
|
|
1370
1370
|
type: "boolean",
|
|
1371
1371
|
visible: !!n.multiSelect && n.openType !== "Popup"
|
|
1372
1372
|
},
|
|
1373
1373
|
separator: {
|
|
1374
1374
|
description: "多选分隔符",
|
|
1375
|
-
$converter:
|
|
1375
|
+
$converter: ee,
|
|
1376
1376
|
title: "多选分隔符",
|
|
1377
1377
|
type: "string",
|
|
1378
1378
|
editor: {
|
|
@@ -1393,7 +1393,7 @@ class Pt extends Xt {
|
|
|
1393
1393
|
},
|
|
1394
1394
|
enableSearchBar: {
|
|
1395
1395
|
description: "显示搜索工具条",
|
|
1396
|
-
$converter:
|
|
1396
|
+
$converter: ee,
|
|
1397
1397
|
refreshPanelAfterChanged: !0,
|
|
1398
1398
|
title: "启用搜索框",
|
|
1399
1399
|
type: "boolean",
|
|
@@ -1401,14 +1401,14 @@ class Pt extends Xt {
|
|
|
1401
1401
|
},
|
|
1402
1402
|
enableFavorite: {
|
|
1403
1403
|
description: "启用收藏夹",
|
|
1404
|
-
$converter:
|
|
1404
|
+
$converter: ee,
|
|
1405
1405
|
title: "启用收藏夹",
|
|
1406
1406
|
type: "boolean",
|
|
1407
1407
|
visible: n.openType !== "Popup"
|
|
1408
1408
|
},
|
|
1409
1409
|
enableUserData: {
|
|
1410
1410
|
description: "保存界面状态",
|
|
1411
|
-
$converter:
|
|
1411
|
+
$converter: ee,
|
|
1412
1412
|
refreshPanelAfterChanged: !0,
|
|
1413
1413
|
title: "保存界面状态",
|
|
1414
1414
|
type: "boolean",
|
|
@@ -1421,12 +1421,12 @@ class Pt extends Xt {
|
|
|
1421
1421
|
return this.getDisplayType(t).startsWith("NAV") && t.openType !== "Popup" ? t.showNavigation === void 0 ? !0 : !!t.showNavigation : !1;
|
|
1422
1422
|
}
|
|
1423
1423
|
getDialogPropertyConfig(t) {
|
|
1424
|
-
const n =
|
|
1425
|
-
return n.openType.$converter =
|
|
1424
|
+
const n = Nn(t.editor);
|
|
1425
|
+
return n.openType.$converter = ee, {
|
|
1426
1426
|
description: "帮助窗口尺寸配置",
|
|
1427
1427
|
title: "帮助窗口",
|
|
1428
1428
|
parentPropertyID: "dialog",
|
|
1429
|
-
$converter:
|
|
1429
|
+
$converter: Ce,
|
|
1430
1430
|
properties: n
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
@@ -1440,7 +1440,7 @@ class Pt extends Xt {
|
|
|
1440
1440
|
* @returns
|
|
1441
1441
|
*/
|
|
1442
1442
|
getPageConfig(t) {
|
|
1443
|
-
return
|
|
1443
|
+
return On(t);
|
|
1444
1444
|
}
|
|
1445
1445
|
showLoadType(t) {
|
|
1446
1446
|
const n = this.getDisplayType(t);
|
|
@@ -1458,7 +1458,7 @@ class Pt extends Xt {
|
|
|
1458
1458
|
properties: {
|
|
1459
1459
|
treeToList: {
|
|
1460
1460
|
description: "以列表的形式展示树结构数据",
|
|
1461
|
-
$converter:
|
|
1461
|
+
$converter: ee,
|
|
1462
1462
|
refreshPanelAfterChanged: !0,
|
|
1463
1463
|
title: "以列表形式展示",
|
|
1464
1464
|
type: "boolean",
|
|
@@ -1466,7 +1466,7 @@ class Pt extends Xt {
|
|
|
1466
1466
|
},
|
|
1467
1467
|
navTreeToList: {
|
|
1468
1468
|
description: "以列表的形式展示树结构数据",
|
|
1469
|
-
$converter:
|
|
1469
|
+
$converter: ee,
|
|
1470
1470
|
refreshPanelAfterChanged: !0,
|
|
1471
1471
|
title: "以列表形式展示",
|
|
1472
1472
|
type: "boolean",
|
|
@@ -1474,7 +1474,7 @@ class Pt extends Xt {
|
|
|
1474
1474
|
},
|
|
1475
1475
|
loadTreeDataType: {
|
|
1476
1476
|
description: "树形数据加载方式",
|
|
1477
|
-
$converter:
|
|
1477
|
+
$converter: ee,
|
|
1478
1478
|
title: "数据加载方式",
|
|
1479
1479
|
type: "string",
|
|
1480
1480
|
editor: {
|
|
@@ -1491,21 +1491,21 @@ class Pt extends Xt {
|
|
|
1491
1491
|
},
|
|
1492
1492
|
enableFullTree: {
|
|
1493
1493
|
description: "启用构造完整树",
|
|
1494
|
-
$converter:
|
|
1494
|
+
$converter: ee,
|
|
1495
1495
|
title: "构造完整树",
|
|
1496
1496
|
type: "boolean",
|
|
1497
1497
|
visible: this.showLoadType(t)
|
|
1498
1498
|
},
|
|
1499
1499
|
onlySelectLeaf: {
|
|
1500
1500
|
description: "仅选择叶子节点",
|
|
1501
|
-
$converter:
|
|
1501
|
+
$converter: ee,
|
|
1502
1502
|
title: "仅选择叶子节点",
|
|
1503
1503
|
type: "boolean",
|
|
1504
1504
|
visible: this.isTree(t)
|
|
1505
1505
|
},
|
|
1506
1506
|
enableCascade: {
|
|
1507
1507
|
description: "启用级联选择",
|
|
1508
|
-
$converter:
|
|
1508
|
+
$converter: ee,
|
|
1509
1509
|
refreshPanelAfterChanged: !0,
|
|
1510
1510
|
title: "启用级联选择",
|
|
1511
1511
|
type: "boolean",
|
|
@@ -1513,14 +1513,14 @@ class Pt extends Xt {
|
|
|
1513
1513
|
},
|
|
1514
1514
|
showCascadeControl: {
|
|
1515
1515
|
description: "是否在界面中显示级联状态",
|
|
1516
|
-
$converter:
|
|
1516
|
+
$converter: ee,
|
|
1517
1517
|
title: "显示级联状态",
|
|
1518
1518
|
type: "boolean",
|
|
1519
1519
|
visible: !!t.enableCascade && this.isTree(t)
|
|
1520
1520
|
},
|
|
1521
1521
|
cascadeValue: {
|
|
1522
1522
|
description: "缺省级联选择模式",
|
|
1523
|
-
$converter:
|
|
1523
|
+
$converter: ee,
|
|
1524
1524
|
title: "缺省级联选择模式",
|
|
1525
1525
|
type: "string",
|
|
1526
1526
|
visible: !!t.enableCascade && this.isTree(t),
|
|
@@ -1533,7 +1533,7 @@ class Pt extends Xt {
|
|
|
1533
1533
|
},
|
|
1534
1534
|
expandLevel: {
|
|
1535
1535
|
description: "默认展开层级: 0: 不展开; -1: 全部展开;>0: 展开到指定级数 ",
|
|
1536
|
-
$converter:
|
|
1536
|
+
$converter: ee,
|
|
1537
1537
|
title: "默认展开层级",
|
|
1538
1538
|
type: "number",
|
|
1539
1539
|
visible: this.showLoadType(t),
|
|
@@ -1549,7 +1549,7 @@ class Pt extends Xt {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
getEventPropConfig(t) {
|
|
1551
1551
|
const n = this;
|
|
1552
|
-
let o =
|
|
1552
|
+
let o = En;
|
|
1553
1553
|
t.editor.openType === "Popup" && (o = o.filter((u) => u.label !== "beforeSelectData")), o.push(...this.formGroupEvents);
|
|
1554
1554
|
const i = n.eventsEditorUtils.formProperties(t, n.viewModelId, o);
|
|
1555
1555
|
return {
|
|
@@ -1562,7 +1562,7 @@ class Pt extends Xt {
|
|
|
1562
1562
|
tabName: "交互",
|
|
1563
1563
|
setPropertyRelates(u, l) {
|
|
1564
1564
|
const c = u.propertyValue;
|
|
1565
|
-
delete l[n.viewModelId], c && n.eventsEditorUtils.saveRelatedParameters(l, n.viewModelId, c.events, c);
|
|
1565
|
+
delete l[n.viewModelId], c && (n.eventsEditorUtils.saveRelatedParameters(l, n.viewModelId, c.events, c), n.updateLinkedLabel(c, l));
|
|
1566
1566
|
const d = n.designViewModelUtils.getDgViewModel(n.viewModelId);
|
|
1567
1567
|
d && n.designViewModelField && d.changeField(n.designViewModelField.id, { valueChanging: l.fieldValueChanging, valueChanged: l.fieldValueChanged });
|
|
1568
1568
|
}
|
|
@@ -1585,32 +1585,33 @@ class Pt extends Xt {
|
|
|
1585
1585
|
var f;
|
|
1586
1586
|
if ((f = v == null ? void 0 : v.metadata) != null && f.content)
|
|
1587
1587
|
return JSON.parse(v.metadata.content);
|
|
1588
|
-
}), p = (i = c == null ? void 0 : c.dataSource) == null ? void 0 : i.sourceType, b = (s = d.dataSource) == null ? void 0 : s.sourceType, w = (u = c == null ? void 0 : c.dataSource) == null ? void 0 : u.sourceId,
|
|
1589
|
-
if (p === "BE" && b === "BE" && w !==
|
|
1590
|
-
return new
|
|
1588
|
+
}), p = (i = c == null ? void 0 : c.dataSource) == null ? void 0 : i.sourceType, b = (s = d.dataSource) == null ? void 0 : s.sourceType, w = (u = c == null ? void 0 : c.dataSource) == null ? void 0 : u.sourceId, C = (l = d == null ? void 0 : d.dataSource) == null ? void 0 : l.sourceId;
|
|
1589
|
+
if (p === "BE" && b === "BE" && w !== C)
|
|
1590
|
+
return new an().error({ message: "只允许更换同数据源的帮助元数据", position: "top-center" }), !1;
|
|
1591
1591
|
}
|
|
1592
1592
|
return !0;
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function Bn(e, a) {
|
|
1596
1596
|
function t(n, o) {
|
|
1597
1597
|
const i = e.schema;
|
|
1598
|
-
return new
|
|
1598
|
+
return new kt(n, a).getPropertyConfig(i, o);
|
|
1599
1599
|
}
|
|
1600
1600
|
return { getPropsConfig: t };
|
|
1601
1601
|
}
|
|
1602
|
-
const
|
|
1602
|
+
const An = /* @__PURE__ */ Te({
|
|
1603
1603
|
name: "FLookupDesign",
|
|
1604
|
-
props:
|
|
1604
|
+
props: Be,
|
|
1605
1605
|
emits: [],
|
|
1606
1606
|
setup(e, a) {
|
|
1607
|
-
const t = N(), n =
|
|
1608
|
-
return
|
|
1607
|
+
const t = N(), n = X("design-item-context"), o = X("designer-host-service"), i = Bn(n, o), s = Wt(t, n, i), u = '<i class="f-icon f-icon-lookup"></i>', l = '<i class="f-icon f-icon-arrow-chevron-down"></i>', c = J(() => e.openType === "Popup" ? "Popup" : "Modal"), d = J(() => c.value === "Popup" ? l : u);
|
|
1608
|
+
return ke(() => {
|
|
1609
1609
|
t.value.componentInstance = s;
|
|
1610
1610
|
}), a.expose(s.value), () => L("div", {
|
|
1611
1611
|
class: "f-lookup-design",
|
|
1612
|
-
ref: t
|
|
1613
|
-
|
|
1612
|
+
ref: t,
|
|
1613
|
+
style: "pointer-events: none;"
|
|
1614
|
+
}, [L(qt, {
|
|
1614
1615
|
ref: t,
|
|
1615
1616
|
buttonContent: d.value,
|
|
1616
1617
|
readonly: !0,
|
|
@@ -1623,7 +1624,7 @@ const Bn = /* @__PURE__ */ Te({
|
|
|
1623
1624
|
}, null)]);
|
|
1624
1625
|
}
|
|
1625
1626
|
});
|
|
1626
|
-
function
|
|
1627
|
+
function Pe(e, a) {
|
|
1627
1628
|
const { lookupOptions: t } = a;
|
|
1628
1629
|
function n(f) {
|
|
1629
1630
|
return { ...wt, ...f };
|
|
@@ -1679,7 +1680,7 @@ function ke(e, a) {
|
|
|
1679
1680
|
function w() {
|
|
1680
1681
|
return t.enableCascade && t.multiSelect;
|
|
1681
1682
|
}
|
|
1682
|
-
function
|
|
1683
|
+
function C() {
|
|
1683
1684
|
return e.openType === "Popup";
|
|
1684
1685
|
}
|
|
1685
1686
|
return {
|
|
@@ -1694,13 +1695,13 @@ function ke(e, a) {
|
|
|
1694
1695
|
isLoadAll: p,
|
|
1695
1696
|
isPathCodeTree: b,
|
|
1696
1697
|
isEnableCascadeCheck: w,
|
|
1697
|
-
isDropdownMode:
|
|
1698
|
+
isDropdownMode: C,
|
|
1698
1699
|
sortOption: {
|
|
1699
1700
|
mode: "server"
|
|
1700
1701
|
}
|
|
1701
1702
|
};
|
|
1702
1703
|
}
|
|
1703
|
-
function
|
|
1704
|
+
function Pt(e, a, t) {
|
|
1704
1705
|
var i;
|
|
1705
1706
|
const n = N(e.searchFields || []), o = N(((i = e.navigation) == null ? void 0 : i.searchFields) || []);
|
|
1706
1707
|
return q(() => a == null ? void 0 : a.searchFields, (s) => {
|
|
@@ -1712,8 +1713,8 @@ function kt(e, a, t) {
|
|
|
1712
1713
|
navSearchFieldItems: o
|
|
1713
1714
|
};
|
|
1714
1715
|
}
|
|
1715
|
-
function
|
|
1716
|
-
const a =
|
|
1716
|
+
function Rn(e) {
|
|
1717
|
+
const a = ye({}), t = ye({}), n = ye({}), o = ye({}), i = ye({}), s = N([]), u = N(), l = ye({}), c = ye({ canClose: !0 }), d = ye({}), p = N(!1), b = [
|
|
1717
1718
|
"displayType",
|
|
1718
1719
|
"treeToList",
|
|
1719
1720
|
"navTreeToList",
|
|
@@ -1740,12 +1741,12 @@ function An(e) {
|
|
|
1740
1741
|
"customFormatter",
|
|
1741
1742
|
"customNavFormatter"
|
|
1742
1743
|
];
|
|
1743
|
-
function
|
|
1744
|
-
|
|
1745
|
-
l[
|
|
1744
|
+
function w() {
|
|
1745
|
+
b.forEach((C) => {
|
|
1746
|
+
l[C] = e[C];
|
|
1746
1747
|
});
|
|
1747
1748
|
}
|
|
1748
|
-
return
|
|
1749
|
+
return w(), {
|
|
1749
1750
|
pageInfoState: a,
|
|
1750
1751
|
lookupState: t,
|
|
1751
1752
|
navigationState: n,
|
|
@@ -1754,179 +1755,180 @@ function An(e) {
|
|
|
1754
1755
|
selectionState: s,
|
|
1755
1756
|
unSelectDataId: u,
|
|
1756
1757
|
lookupOptions: l,
|
|
1757
|
-
searchValueChanged:
|
|
1758
|
-
popupState: c
|
|
1758
|
+
searchValueChanged: p,
|
|
1759
|
+
popupState: c,
|
|
1760
|
+
compatInstance: d
|
|
1759
1761
|
};
|
|
1760
1762
|
}
|
|
1761
1763
|
const De = N(), we = "F_LOOKUP_HTTP_COMPOSITION_TOKEN";
|
|
1762
|
-
function
|
|
1763
|
-
const t =
|
|
1764
|
-
var
|
|
1765
|
-
const h = (
|
|
1764
|
+
function Un(e, a) {
|
|
1765
|
+
const t = X("FLoadingService"), n = X(yn), o = Rn(e), { pageInfoState: i, lookupState: s, navigationState: u, lookupOptions: l, searchValueChanged: c } = o, { searchFieldItems: d, navSearchFieldItems: p } = Pt(e, s, u), b = N(e.idValue), w = N(!1), C = () => {
|
|
1766
|
+
var k;
|
|
1767
|
+
const h = (k = l.displayType) == null ? void 0 : k.toUpperCase();
|
|
1766
1768
|
return h === ve.Tree || h === ve.TreeList;
|
|
1767
|
-
}, v = (h,
|
|
1769
|
+
}, v = (h, k = !1) => {
|
|
1768
1770
|
if (h) {
|
|
1769
1771
|
const {
|
|
1770
|
-
layerType:
|
|
1771
|
-
dataField:
|
|
1772
|
-
parentField:
|
|
1773
|
-
pathField:
|
|
1772
|
+
layerType: V,
|
|
1773
|
+
dataField: R,
|
|
1774
|
+
parentField: te,
|
|
1775
|
+
pathField: Y,
|
|
1774
1776
|
layerField: ae,
|
|
1775
|
-
isDetailField:
|
|
1777
|
+
isDetailField: Q,
|
|
1776
1778
|
loadDataType: re
|
|
1777
|
-
} = h,
|
|
1778
|
-
layerType:
|
|
1779
|
-
dataField:
|
|
1780
|
-
parentField:
|
|
1781
|
-
pathField:
|
|
1779
|
+
} = h, ue = {
|
|
1780
|
+
layerType: V,
|
|
1781
|
+
dataField: R,
|
|
1782
|
+
parentField: te,
|
|
1783
|
+
pathField: Y,
|
|
1782
1784
|
layerField: ae,
|
|
1783
|
-
isDetailField:
|
|
1785
|
+
isDetailField: Q,
|
|
1784
1786
|
loadDataType: re
|
|
1785
|
-
}, { onlySelectLeaf:
|
|
1786
|
-
|
|
1787
|
+
}, { onlySelectLeaf: H, loadTreeDataType: E } = l;
|
|
1788
|
+
ue.onlySelectLeaf = H, ue.loadDataType = E, k ? l.navTreeInfo = Object.assign(l.navTreeInfo || {}, ue) : l.treeInfo = Object.assign(l.treeInfo || {}, ue);
|
|
1787
1789
|
}
|
|
1788
1790
|
};
|
|
1789
|
-
function f(h,
|
|
1790
|
-
if (
|
|
1791
|
+
function f(h, k, V = "like") {
|
|
1792
|
+
if (k == null || !k.trim())
|
|
1791
1793
|
return [];
|
|
1792
|
-
const
|
|
1793
|
-
if (!h || !
|
|
1794
|
+
const R = Array.from(new Set(k.trim().split(" ").filter((re) => re.trim())));
|
|
1795
|
+
if (!h || !R.length)
|
|
1794
1796
|
return [];
|
|
1795
|
-
const
|
|
1796
|
-
const
|
|
1797
|
+
const Y = V === "equal" ? _e.Equal : _e.Like, ae = (h || []).map((re, ue) => {
|
|
1798
|
+
const H = R.map((E, U) => ({
|
|
1797
1799
|
filterField: re.value,
|
|
1798
|
-
value:
|
|
1800
|
+
value: E,
|
|
1799
1801
|
lbracket: "",
|
|
1800
1802
|
rbracket: "",
|
|
1801
|
-
relation:
|
|
1802
|
-
compare:
|
|
1803
|
+
relation: $e.And,
|
|
1804
|
+
compare: Y
|
|
1803
1805
|
}));
|
|
1804
|
-
return
|
|
1806
|
+
return H.length && (H.length > 1 && (H[0].lbracket = "(", H[H.length - 1].rbracket = ")"), H[H.length - 1].relation = $e.Or), H;
|
|
1805
1807
|
}).filter((re) => re.length);
|
|
1806
|
-
let
|
|
1807
|
-
return ae && ae.length && (
|
|
1808
|
+
let Q = [];
|
|
1809
|
+
return ae && ae.length && (Q = en(ae), Q.length > 1 && (Q[0].lbracket += "(", Q[Q.length - 1].rbracket += ")"), Q[Q.length - 1].relation = 0), Q;
|
|
1808
1810
|
}
|
|
1809
1811
|
function r() {
|
|
1810
1812
|
let { expandLevel: h } = l;
|
|
1811
|
-
return h && !
|
|
1813
|
+
return h && !Kt(h) && (h = h < -1 ? -1 : h), h;
|
|
1812
1814
|
}
|
|
1813
|
-
function g(h,
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
let
|
|
1815
|
+
function g(h, k) {
|
|
1816
|
+
const V = {};
|
|
1817
|
+
V.category = k;
|
|
1818
|
+
let R = null, te = null;
|
|
1817
1819
|
if (h != null && h.search) {
|
|
1818
|
-
const { field:
|
|
1819
|
-
if (ae && (
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
filterField:
|
|
1823
|
-
value:
|
|
1820
|
+
const { field: Y, value: ae, isNavigation: Q, type: re } = h.search, ue = re || "like";
|
|
1821
|
+
if (ae && (V.searchValue = ae.trim()), V.searchField = Y ? Y.trim() : "*", V.searchType = ue, Q && (V.category = "navsearch"), !e.enableMultiFieldSearch) {
|
|
1822
|
+
Q && (V.searchType = "like");
|
|
1823
|
+
const H = V.searchType === "equal" && V.searchValue ? [{
|
|
1824
|
+
filterField: V.searchField,
|
|
1825
|
+
value: V.searchValue,
|
|
1824
1826
|
lbracket: "",
|
|
1825
1827
|
rbracket: "",
|
|
1826
|
-
relation:
|
|
1827
|
-
compare:
|
|
1828
|
-
}] : [],
|
|
1829
|
-
|
|
1828
|
+
relation: $e.And,
|
|
1829
|
+
compare: _e.Equal
|
|
1830
|
+
}] : [], E = Q ? p.value : d.value, U = V.searchField === "*" ? f(E, ae, ue) : H;
|
|
1831
|
+
U && U.length && (Q ? R = U : te = U), ae === "" && V.category === "search" && !te && !R && (V.category = "all");
|
|
1830
1832
|
}
|
|
1831
1833
|
}
|
|
1832
|
-
return
|
|
1833
|
-
searchParam:
|
|
1834
|
-
navSearchConditions:
|
|
1835
|
-
searchConditions:
|
|
1834
|
+
return C() && (V.layerNum = r()), {
|
|
1835
|
+
searchParam: V,
|
|
1836
|
+
navSearchConditions: R,
|
|
1837
|
+
searchConditions: te
|
|
1836
1838
|
};
|
|
1837
1839
|
}
|
|
1838
|
-
function
|
|
1839
|
-
var
|
|
1840
|
+
function S(h) {
|
|
1841
|
+
var V, R;
|
|
1840
1842
|
if (h === "fav")
|
|
1841
1843
|
return {
|
|
1842
1844
|
pageIndex: 1,
|
|
1843
1845
|
pageSize: 500
|
|
1844
1846
|
};
|
|
1845
|
-
let
|
|
1846
|
-
return h === "navsearch" && (
|
|
1847
|
-
pageIndex: ((
|
|
1848
|
-
pageSize: ((
|
|
1847
|
+
let k = "default";
|
|
1848
|
+
return h === "navsearch" && (k = "navigation"), {
|
|
1849
|
+
pageIndex: ((V = i[k]) == null ? void 0 : V.index) || 1,
|
|
1850
|
+
pageSize: ((R = i[k]) == null ? void 0 : R.size) || 20
|
|
1849
1851
|
};
|
|
1850
1852
|
}
|
|
1851
1853
|
function F(h) {
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
const { pageIndex: ae, pageSize:
|
|
1855
|
-
return
|
|
1854
|
+
const k = {}, V = (h == null ? void 0 : h.action) || "all", { searchParam: R, navSearchConditions: te, searchConditions: Y } = g(h, V);
|
|
1855
|
+
Y && (k.searchConditions = Y), te && (k.navSearchConditions = te), k.enableFullTree = e.enableFullTree, h.sort && Object.assign(R, h.sort), k.searchValue = JSON.stringify(R);
|
|
1856
|
+
const { pageIndex: ae, pageSize: Q } = S(V);
|
|
1857
|
+
return k.pageIndex = ae, k.pageSize = Q, k.treeToList = e.treeToList, k.navTreeToList = e.navTreeToList, l.loadTreeDataType === Fe.default ? k.loadTreeDataType = "default" : k.loadTreeDataType = l.loadTreeDataType === Fe.all ? "loadall" : "layerload", h != null && h.relationFilter && (k.relationFilter = [...h.relationFilter]), h != null && h.navNodePathCode && (k.navPathCode = h.navNodePathCode), h.selectedInfo && (k.selectedInfo = h.selectedInfo), k.customData = _t(De.value), k.id = e.id, k;
|
|
1856
1858
|
}
|
|
1857
1859
|
function x(h) {
|
|
1858
|
-
return h == null ? void 0 : h.map((
|
|
1860
|
+
return h == null ? void 0 : h.map((k) => (k.resizable = !0, k));
|
|
1859
1861
|
}
|
|
1860
|
-
function O(h,
|
|
1861
|
-
return h.map((
|
|
1862
|
-
const
|
|
1863
|
-
return
|
|
1862
|
+
function O(h, k) {
|
|
1863
|
+
return h.map((V) => {
|
|
1864
|
+
const R = k == null ? void 0 : k.find((te) => te.field.toLowerCase() === V.value.toLowerCase());
|
|
1865
|
+
return R && (V.label = R.title), V;
|
|
1864
1866
|
});
|
|
1865
1867
|
}
|
|
1866
1868
|
function y(h) {
|
|
1867
1869
|
h.columns && (h.columns = x(h.columns), h.searchFields && (h.searchFields = O(h.searchFields, h.columns))), h.navigation && h.navigation.columns && (h.navigation.columns = x(h.navigation.columns), h.navigation.searchFields && (h.navigation.searchFields = O(h.navigation.searchFields, h.navigation.columns)));
|
|
1868
1870
|
}
|
|
1869
|
-
function
|
|
1871
|
+
function M() {
|
|
1870
1872
|
return l.loader || n && n.getData.bind(n);
|
|
1871
1873
|
}
|
|
1872
1874
|
function G(h) {
|
|
1873
|
-
const
|
|
1874
|
-
return
|
|
1875
|
-
|
|
1875
|
+
const k = M();
|
|
1876
|
+
return k ? k(l.uri, h).then((V) => (y(V), c.value = !1, V)) : new Promise((V, R) => {
|
|
1877
|
+
V({
|
|
1876
1878
|
...e
|
|
1877
1879
|
});
|
|
1878
1880
|
});
|
|
1879
1881
|
}
|
|
1880
|
-
function
|
|
1881
|
-
const
|
|
1882
|
-
return
|
|
1882
|
+
function $(h) {
|
|
1883
|
+
const k = r();
|
|
1884
|
+
return k === -1 ? !0 : k === 0 ? !1 : h <= k;
|
|
1883
1885
|
}
|
|
1884
|
-
function B(h,
|
|
1885
|
-
h.forEach((
|
|
1886
|
-
var
|
|
1887
|
-
|
|
1886
|
+
function B(h, k = !1, V = "layer") {
|
|
1887
|
+
h.forEach((R) => {
|
|
1888
|
+
var te;
|
|
1889
|
+
R.collapse = k ? !1 : l.loadTreeDataType === "all" ? !$(ze(R.data, V)) : !(R.expanded ?? !0), R.hasChildren = !R.leaf, (te = R.children) != null && te.length && B(R.children, k, V);
|
|
1888
1890
|
});
|
|
1889
1891
|
}
|
|
1890
|
-
async function m(h,
|
|
1891
|
-
var
|
|
1892
|
-
const
|
|
1892
|
+
async function m(h, k) {
|
|
1893
|
+
var te;
|
|
1894
|
+
const V = F(h), R = t == null ? void 0 : t.show();
|
|
1893
1895
|
try {
|
|
1894
|
-
let
|
|
1895
|
-
if (l.displayType !==
|
|
1896
|
-
const { items: ae, treeInfo:
|
|
1897
|
-
if (l.loadDataType === Fe.default && (l.loadTreeDataType = (
|
|
1898
|
-
const { dataField: re, layerField:
|
|
1899
|
-
B(ae, !1, `${re}.${
|
|
1896
|
+
let Y = await G(V);
|
|
1897
|
+
if (l.displayType !== Y.displayType && h.action !== "navsearch" && (l.displayType = Y.displayType), C()) {
|
|
1898
|
+
const { items: ae, treeInfo: Q } = Y.navigation || Y;
|
|
1899
|
+
if (l.loadDataType === Fe.default && (l.loadTreeDataType = (Q == null ? void 0 : Q.loadDataType) || Fe.all), ae != null && ae.length && Q) {
|
|
1900
|
+
const { dataField: re, layerField: ue } = Q;
|
|
1901
|
+
B(ae, !1, `${re}.${ue}`);
|
|
1900
1902
|
}
|
|
1901
1903
|
}
|
|
1902
|
-
e.beforeLoadData && (
|
|
1904
|
+
e.beforeLoadData && (Y = await e.beforeLoadData({ data: Y })), k(Y);
|
|
1903
1905
|
} finally {
|
|
1904
|
-
(
|
|
1906
|
+
(te = R == null ? void 0 : R.value) == null || te.close();
|
|
1905
1907
|
}
|
|
1906
1908
|
}
|
|
1907
1909
|
function I(h) {
|
|
1908
1910
|
w.value = h;
|
|
1909
1911
|
}
|
|
1910
|
-
function T(h,
|
|
1911
|
-
if (!
|
|
1912
|
+
function T(h, k) {
|
|
1913
|
+
if (!k)
|
|
1912
1914
|
return "";
|
|
1913
|
-
const { dataField:
|
|
1914
|
-
return
|
|
1915
|
+
const { dataField: V, pathField: R } = k;
|
|
1916
|
+
return R ? V ? h[V][R] : ze(h, R) : "";
|
|
1915
1917
|
}
|
|
1916
|
-
function
|
|
1917
|
-
const
|
|
1918
|
-
return (h.selectable || h.selectable === void 0) &&
|
|
1919
|
-
|
|
1920
|
-
}),
|
|
1918
|
+
function W(h) {
|
|
1919
|
+
const k = [];
|
|
1920
|
+
return (h.selectable || h.selectable === void 0) && k.push(h), h.children && h.children.length && h.children.forEach((V) => {
|
|
1921
|
+
k.push(...W(V));
|
|
1922
|
+
}), k;
|
|
1921
1923
|
}
|
|
1922
|
-
function ie(h,
|
|
1923
|
-
var
|
|
1924
|
+
function ie(h, k = !1) {
|
|
1925
|
+
var Y;
|
|
1924
1926
|
if (!(h != null && h.length))
|
|
1925
1927
|
return h;
|
|
1926
|
-
const
|
|
1927
|
-
return
|
|
1928
|
+
const V = k ? (Y = l.navigation) == null ? void 0 : Y.treeInfo : l.treeInfo, { dataField: R, layerField: te } = V || {};
|
|
1929
|
+
return R && te && B(h, !0, `${R}.${te}`), h;
|
|
1928
1930
|
}
|
|
1929
|
-
function
|
|
1931
|
+
function le() {
|
|
1930
1932
|
try {
|
|
1931
1933
|
const h = b.value;
|
|
1932
1934
|
return h !== "" && h != null ? h : "";
|
|
@@ -1934,8 +1936,8 @@ function Rn(e, a) {
|
|
|
1934
1936
|
return console.error("Error in getIdValues:", h), "";
|
|
1935
1937
|
}
|
|
1936
1938
|
}
|
|
1937
|
-
function
|
|
1938
|
-
let h =
|
|
1939
|
+
function j() {
|
|
1940
|
+
let h = le() || [];
|
|
1939
1941
|
return Array.isArray(h) || (h = ("" + h).split(e.separator)), { selectedIds: h, selected: !0 };
|
|
1940
1942
|
}
|
|
1941
1943
|
return {
|
|
@@ -1946,14 +1948,14 @@ function Rn(e, a) {
|
|
|
1946
1948
|
loadData: m,
|
|
1947
1949
|
updateSearchFieldTitle: O,
|
|
1948
1950
|
getPathCode: T,
|
|
1949
|
-
getChildNodes:
|
|
1951
|
+
getChildNodes: W,
|
|
1950
1952
|
lookupStates: o,
|
|
1951
1953
|
httpService: n,
|
|
1952
|
-
lookupRequest:
|
|
1954
|
+
lookupRequest: M,
|
|
1953
1955
|
expandAllNodes: ie,
|
|
1954
|
-
getIdQueryParams:
|
|
1956
|
+
getIdQueryParams: j,
|
|
1955
1957
|
setTreeInfo: v,
|
|
1956
|
-
getFieldValue:
|
|
1958
|
+
getFieldValue: ze
|
|
1957
1959
|
};
|
|
1958
1960
|
}
|
|
1959
1961
|
function xt(e, a) {
|
|
@@ -1972,21 +1974,21 @@ function xt(e, a) {
|
|
|
1972
1974
|
updatePageInfo: t
|
|
1973
1975
|
};
|
|
1974
1976
|
}
|
|
1975
|
-
const
|
|
1976
|
-
function
|
|
1977
|
-
const t =
|
|
1978
|
-
const
|
|
1979
|
-
return
|
|
1980
|
-
}), l =
|
|
1977
|
+
const He = "F_LOOKUP_USER_DATA_SERVICE";
|
|
1978
|
+
function zn(e, a) {
|
|
1979
|
+
const t = X("FLoadingService", null), { lookupStates: n, lookupRequest: o, httpService: i } = a, { lookupOptions: s } = n, u = J(() => {
|
|
1980
|
+
const C = s.userDataKey || e.id;
|
|
1981
|
+
return C ? sn(C) : "";
|
|
1982
|
+
}), l = ye({ key: u.value, data: {} });
|
|
1981
1983
|
function c() {
|
|
1982
|
-
return i ? i.getSettings(l.key).then((
|
|
1984
|
+
return i ? i.getSettings(l.key).then((C) => (C && C.textValue ? l.data = JSON.parse(C.textValue) : l.data = {}, e.enableUserData || (l.data.tabIndex = pe.dataList), C)) : Promise.resolve();
|
|
1983
1985
|
}
|
|
1984
|
-
function d({ width:
|
|
1986
|
+
function d({ width: C, height: v }) {
|
|
1985
1987
|
var f;
|
|
1986
|
-
l.data.size = ((f = l.data) == null ? void 0 : f.size) || {}, l.data.size = { width:
|
|
1988
|
+
l.data.size = ((f = l.data) == null ? void 0 : f.size) || {}, l.data.size = { width: C, height: v };
|
|
1987
1989
|
}
|
|
1988
|
-
function p(
|
|
1989
|
-
if ((e.enableUserData ||
|
|
1990
|
+
function p(C = !1) {
|
|
1991
|
+
if ((e.enableUserData || C) && i) {
|
|
1990
1992
|
const { key: v, data: f } = l, r = {
|
|
1991
1993
|
configkey1: v,
|
|
1992
1994
|
configkey2: "",
|
|
@@ -1997,8 +1999,8 @@ function Un(e, a) {
|
|
|
1997
1999
|
}
|
|
1998
2000
|
return Promise.resolve();
|
|
1999
2001
|
}
|
|
2000
|
-
function b(
|
|
2001
|
-
const v = { category: "fav", favoriteIds:
|
|
2002
|
+
function b(C) {
|
|
2003
|
+
const v = { category: "fav", favoriteIds: C.favoriteIds };
|
|
2002
2004
|
return {
|
|
2003
2005
|
searchValue: JSON.stringify(v),
|
|
2004
2006
|
pageIndex: 1,
|
|
@@ -2008,10 +2010,10 @@ function Un(e, a) {
|
|
|
2008
2010
|
}
|
|
2009
2011
|
function w() {
|
|
2010
2012
|
var r;
|
|
2011
|
-
const
|
|
2012
|
-
return f ? f(s.uri,
|
|
2013
|
-
var
|
|
2014
|
-
return (
|
|
2013
|
+
const C = b({ favoriteIds: (r = l.data) == null ? void 0 : r.favorites }), v = t == null ? void 0 : t.show(), f = o();
|
|
2014
|
+
return f ? f(s.uri, C).then((g) => {
|
|
2015
|
+
var S;
|
|
2016
|
+
return (S = v.value) == null || S.close(), l.favoriteItems = g && g.items || [], g;
|
|
2015
2017
|
}) : Promise.resolve();
|
|
2016
2018
|
}
|
|
2017
2019
|
return {
|
|
@@ -2023,8 +2025,8 @@ function Un(e, a) {
|
|
|
2023
2025
|
};
|
|
2024
2026
|
}
|
|
2025
2027
|
const Le = Symbol("FARRIS_LOOKUP_LOCALES");
|
|
2026
|
-
function
|
|
2027
|
-
const { getLocaleValue: a } =
|
|
2028
|
+
function _n(e) {
|
|
2029
|
+
const { getLocaleValue: a } = rn;
|
|
2028
2030
|
function t(c, d, p) {
|
|
2029
2031
|
return c === d ? a(p) : c;
|
|
2030
2032
|
}
|
|
@@ -2074,7 +2076,7 @@ function Lt(e) {
|
|
|
2074
2076
|
}
|
|
2075
2077
|
return e;
|
|
2076
2078
|
}
|
|
2077
|
-
function
|
|
2079
|
+
function Je(e, a = !1) {
|
|
2078
2080
|
const t = {
|
|
2079
2081
|
wrapContent: !1,
|
|
2080
2082
|
customRowStyle: null,
|
|
@@ -2087,7 +2089,7 @@ function He(e, a = !1) {
|
|
|
2087
2089
|
return t;
|
|
2088
2090
|
}
|
|
2089
2091
|
function tt(e, a) {
|
|
2090
|
-
const t =
|
|
2092
|
+
const t = X(Ke), n = X(He), o = X(Le), {
|
|
2091
2093
|
userDataState: i
|
|
2092
2094
|
} = n;
|
|
2093
2095
|
i.data = i.data || {};
|
|
@@ -2095,15 +2097,15 @@ function tt(e, a) {
|
|
|
2095
2097
|
function l({
|
|
2096
2098
|
id: r,
|
|
2097
2099
|
data: g
|
|
2098
|
-
},
|
|
2100
|
+
}, S = "add") {
|
|
2099
2101
|
var x, O;
|
|
2100
2102
|
if (r == null && r === "")
|
|
2101
2103
|
return;
|
|
2102
2104
|
const F = r;
|
|
2103
|
-
i.data.favorites = ((x = i.data) == null ? void 0 : x.favorites) || [], i.favoriteItems = i.favoriteItems || [],
|
|
2104
|
-
const
|
|
2105
|
+
i.data.favorites = ((x = i.data) == null ? void 0 : x.favorites) || [], i.favoriteItems = i.favoriteItems || [], S === "add" ? (u.value = !1, i.data.favorites = Array.from(/* @__PURE__ */ new Set([...((O = i.data) == null ? void 0 : O.favorites) || [], F])), i.favoriteItems = [...i.favoriteItems, g]) : (u.value = !0, i.data.favorites = i.data.favorites.filter((y) => y !== F), i.favoriteItems = i.favoriteItems.filter((y) => y[a] !== F)), n == null || n.saveUserData(!0).then((y) => {
|
|
2106
|
+
const M = S === "add" ? o.messages.addedFavSuccess : o.messages.cancelFavSuccess;
|
|
2105
2107
|
t == null || t.success({
|
|
2106
|
-
message:
|
|
2108
|
+
message: M,
|
|
2107
2109
|
position: "top-center"
|
|
2108
2110
|
});
|
|
2109
2111
|
});
|
|
@@ -2112,11 +2114,11 @@ function tt(e, a) {
|
|
|
2112
2114
|
return r ? r.raw[a] : "";
|
|
2113
2115
|
}
|
|
2114
2116
|
const d = J(() => (r) => {
|
|
2115
|
-
var
|
|
2117
|
+
var S, F;
|
|
2116
2118
|
const g = c(r);
|
|
2117
|
-
return (F = (
|
|
2119
|
+
return (F = (S = i.data) == null ? void 0 : S.favorites) == null ? void 0 : F.includes(g);
|
|
2118
2120
|
});
|
|
2119
|
-
function p(r, g,
|
|
2121
|
+
function p(r, g, S) {
|
|
2120
2122
|
r.stopPropagation();
|
|
2121
2123
|
const F = c(g);
|
|
2122
2124
|
l({
|
|
@@ -2126,15 +2128,15 @@ function tt(e, a) {
|
|
|
2126
2128
|
}
|
|
2127
2129
|
const b = (r) => d.value(r) ? o.buttons.removeFav : o.buttons.addFav, w = (r, g) => L("button", {
|
|
2128
2130
|
type: "button",
|
|
2129
|
-
onClick: (
|
|
2130
|
-
p(
|
|
2131
|
+
onClick: (S) => {
|
|
2132
|
+
p(S, g);
|
|
2131
2133
|
},
|
|
2132
2134
|
class: ["btn btn-link f-icon f-icon-star-outline p-0", {
|
|
2133
2135
|
"f-icon-star": d.value(g)
|
|
2134
2136
|
}],
|
|
2135
2137
|
style: "color: #ffbd8c;",
|
|
2136
2138
|
title: b(g)
|
|
2137
|
-
}, null),
|
|
2139
|
+
}, null), C = (r, g) => g.disabled ? "" : w(r, g), v = {
|
|
2138
2140
|
field: s,
|
|
2139
2141
|
title: "",
|
|
2140
2142
|
width: 50,
|
|
@@ -2142,14 +2144,14 @@ function tt(e, a) {
|
|
|
2142
2144
|
align: "center",
|
|
2143
2145
|
formatter: w
|
|
2144
2146
|
};
|
|
2145
|
-
function f(r, g,
|
|
2146
|
-
const F =
|
|
2147
|
-
e.enableFavorite && (v.formatter =
|
|
2147
|
+
function f(r, g, S = !1) {
|
|
2148
|
+
const F = Ve(g);
|
|
2149
|
+
e.enableFavorite && (v.formatter = S ? C : w, F.push(v));
|
|
2148
2150
|
const x = Lt(e.customFormatter);
|
|
2149
2151
|
x && typeof x == "object" && F.forEach((O) => {
|
|
2150
2152
|
const y = x[O.field];
|
|
2151
|
-
y && typeof y == "function" && (O.formatter = (
|
|
2152
|
-
column:
|
|
2153
|
+
y && typeof y == "function" && (O.formatter = (M, G) => y({
|
|
2154
|
+
column: M.column,
|
|
2153
2155
|
rowData: G.raw
|
|
2154
2156
|
}));
|
|
2155
2157
|
}), r == null || r.updateColumns(F);
|
|
@@ -2202,10 +2204,10 @@ function Et(e, a) {
|
|
|
2202
2204
|
console.error("idField is required");
|
|
2203
2205
|
return;
|
|
2204
2206
|
}
|
|
2205
|
-
const g = Array.isArray(r) ? r : [r],
|
|
2207
|
+
const g = Array.isArray(r) ? r : [r], S = u();
|
|
2206
2208
|
g.forEach((F) => {
|
|
2207
|
-
|
|
2208
|
-
}), t.value = Array.from(
|
|
2209
|
+
S.delete(F);
|
|
2210
|
+
}), t.value = Array.from(S.values()), n.value = g;
|
|
2209
2211
|
}
|
|
2210
2212
|
function b(r) {
|
|
2211
2213
|
return u().has(r);
|
|
@@ -2217,14 +2219,14 @@ function Et(e, a) {
|
|
|
2217
2219
|
console.error("idField is required");
|
|
2218
2220
|
return;
|
|
2219
2221
|
}
|
|
2220
|
-
const
|
|
2221
|
-
if (!
|
|
2222
|
+
const S = Array.isArray(r) ? r : [r];
|
|
2223
|
+
if (!S.length)
|
|
2222
2224
|
return;
|
|
2223
|
-
if (!
|
|
2225
|
+
if (!S.every((O) => i.value in O)) {
|
|
2224
2226
|
console.error("Some items do not have the specified idField:", i.value);
|
|
2225
2227
|
return;
|
|
2226
2228
|
}
|
|
2227
|
-
const F =
|
|
2229
|
+
const F = S.map((O) => O[i.value]);
|
|
2228
2230
|
if (!o.multiSelect) {
|
|
2229
2231
|
if (F.length && b(F[0]))
|
|
2230
2232
|
return;
|
|
@@ -2232,7 +2234,7 @@ function Et(e, a) {
|
|
|
2232
2234
|
}
|
|
2233
2235
|
const x = u();
|
|
2234
2236
|
if (g) {
|
|
2235
|
-
const O = new Map(
|
|
2237
|
+
const O = new Map(S.map((y) => [y[i.value], y]));
|
|
2236
2238
|
F.forEach((y) => {
|
|
2237
2239
|
x.has(y) || x.set(y, O.get(y));
|
|
2238
2240
|
});
|
|
@@ -2242,10 +2244,10 @@ function Et(e, a) {
|
|
|
2242
2244
|
});
|
|
2243
2245
|
t.value = Array.from(x.values());
|
|
2244
2246
|
}
|
|
2245
|
-
function
|
|
2247
|
+
function C(r) {
|
|
2246
2248
|
if (!r || !r.length)
|
|
2247
2249
|
return;
|
|
2248
|
-
const g = r.map((
|
|
2250
|
+
const g = r.map((S) => S.data);
|
|
2249
2251
|
w(g);
|
|
2250
2252
|
}
|
|
2251
2253
|
function v(r) {
|
|
@@ -2263,14 +2265,14 @@ function Et(e, a) {
|
|
|
2263
2265
|
getSelectionIds: d,
|
|
2264
2266
|
getSelections: c,
|
|
2265
2267
|
unSelectionsByIds: p,
|
|
2266
|
-
selectTreeNodes:
|
|
2268
|
+
selectTreeNodes: C,
|
|
2267
2269
|
unSelectTreeNode: v,
|
|
2268
2270
|
unSelectTreeNodes: f,
|
|
2269
2271
|
isSelected: b,
|
|
2270
2272
|
getPrimaryKey: s
|
|
2271
2273
|
};
|
|
2272
2274
|
}
|
|
2273
|
-
function
|
|
2275
|
+
function Mt(e, a) {
|
|
2274
2276
|
const { getSelectionIds: t } = Et(e, a), { lookupOptions: n } = a;
|
|
2275
2277
|
function o(u, l) {
|
|
2276
2278
|
u == null || u.updateDataSource(l || []);
|
|
@@ -2303,8 +2305,8 @@ function at(e) {
|
|
|
2303
2305
|
}
|
|
2304
2306
|
return { sortChanged: t, sortInfo: a };
|
|
2305
2307
|
}
|
|
2306
|
-
function
|
|
2307
|
-
const n =
|
|
2308
|
+
function Vt(e, a, t) {
|
|
2309
|
+
const n = X(Oe, N(pe.dataList)), o = X(we), i = X(Ee), {
|
|
2308
2310
|
lookupStates: s,
|
|
2309
2311
|
loadData: u,
|
|
2310
2312
|
includeChilds: l,
|
|
@@ -2314,66 +2316,66 @@ function Mt(e, a, t) {
|
|
|
2314
2316
|
lookupState: p,
|
|
2315
2317
|
navigationState: b,
|
|
2316
2318
|
pageInfoState: w,
|
|
2317
|
-
searchState:
|
|
2319
|
+
searchState: C,
|
|
2318
2320
|
lookupOptions: v,
|
|
2319
2321
|
queryState: f
|
|
2320
2322
|
} = s, {
|
|
2321
2323
|
checkPaination: r,
|
|
2322
2324
|
checkMultiSelect: g,
|
|
2323
|
-
checkColumnOptions:
|
|
2325
|
+
checkColumnOptions: S,
|
|
2324
2326
|
navIsTreeList: F,
|
|
2325
2327
|
isPathCodeTree: x,
|
|
2326
2328
|
sortOption: O
|
|
2327
|
-
} =
|
|
2329
|
+
} = Pe(e, s), {
|
|
2328
2330
|
updatePageInfo: y
|
|
2329
2331
|
} = xt(e, w), {
|
|
2330
|
-
updateSelections:
|
|
2332
|
+
updateSelections: M,
|
|
2331
2333
|
isSelected: G,
|
|
2332
|
-
getPrimaryKey:
|
|
2334
|
+
getPrimaryKey: $
|
|
2333
2335
|
} = i, {
|
|
2334
2336
|
loadAndSelect: B
|
|
2335
|
-
} =
|
|
2336
|
-
navSelectedItems:
|
|
2337
|
-
getNavigationIdField:
|
|
2337
|
+
} = Mt(e, s), m = r(e.pagination), I = g(), T = S(), W = N(), ie = N([]), {
|
|
2338
|
+
navSelectedItems: le,
|
|
2339
|
+
getNavigationIdField: j,
|
|
2338
2340
|
getRelationFilter: h
|
|
2339
2341
|
} = t;
|
|
2340
2342
|
y(m);
|
|
2341
|
-
const
|
|
2342
|
-
setColumns:
|
|
2343
|
-
} = tt(e, v.idField),
|
|
2344
|
-
sortChanged:
|
|
2345
|
-
sortInfo:
|
|
2346
|
-
} = at(p), ae =
|
|
2347
|
-
q(() => w.default, (
|
|
2343
|
+
const k = N(w.default), {
|
|
2344
|
+
setColumns: V
|
|
2345
|
+
} = tt(e, v.idField), R = N("lookup-datagrid"), {
|
|
2346
|
+
sortChanged: te,
|
|
2347
|
+
sortInfo: Y
|
|
2348
|
+
} = at(p), ae = Je(v);
|
|
2349
|
+
q(() => w.default, (_) => {
|
|
2348
2350
|
var K;
|
|
2349
|
-
|
|
2350
|
-
}), nt(e,
|
|
2351
|
-
function
|
|
2351
|
+
k.value = _, (K = W.value) == null || K.updatePagination(_);
|
|
2352
|
+
}), nt(e, W, o.lookupStates, n);
|
|
2353
|
+
function Q(_, K, ce) {
|
|
2352
2354
|
const ge = {
|
|
2353
2355
|
total: K
|
|
2354
2356
|
};
|
|
2355
2357
|
if (ce) {
|
|
2356
2358
|
const {
|
|
2357
2359
|
pageIndex: be,
|
|
2358
|
-
pageSize:
|
|
2360
|
+
pageSize: Re,
|
|
2359
2361
|
enablePager: Qe,
|
|
2360
2362
|
pageList: ot
|
|
2361
2363
|
} = ce;
|
|
2362
2364
|
Object.assign(ge, {
|
|
2363
2365
|
index: be,
|
|
2364
|
-
size:
|
|
2366
|
+
size: Re,
|
|
2365
2367
|
enable: Qe
|
|
2366
2368
|
});
|
|
2367
2369
|
} else
|
|
2368
2370
|
ge.enable = !1;
|
|
2369
|
-
y(ge), B(
|
|
2371
|
+
y(ge), B(W.value, _ || []), R.value = "lookup-datagrid" + (_ && _.length ? "" : " lookup-datagrid-empty");
|
|
2370
2372
|
}
|
|
2371
2373
|
const re = J(() => {
|
|
2372
2374
|
var be;
|
|
2373
|
-
if (!((be =
|
|
2375
|
+
if (!((be = le.value) != null && be.length))
|
|
2374
2376
|
return null;
|
|
2375
|
-
const
|
|
2376
|
-
relationFilter: h(
|
|
2377
|
+
const _ = le.value, K = {
|
|
2378
|
+
relationFilter: h(_)
|
|
2377
2379
|
};
|
|
2378
2380
|
if (!F() || !l.value)
|
|
2379
2381
|
return K;
|
|
@@ -2384,103 +2386,103 @@ function Mt(e, a, t) {
|
|
|
2384
2386
|
...K
|
|
2385
2387
|
};
|
|
2386
2388
|
return x(ce) ? Object.assign(ge, {
|
|
2387
|
-
navNodePathCode: c(
|
|
2389
|
+
navNodePathCode: c(_[0].data, ce)
|
|
2388
2390
|
}) : ge;
|
|
2389
|
-
}),
|
|
2390
|
-
|
|
2391
|
+
}), ue = q([() => p == null ? void 0 : p.columns, () => p == null ? void 0 : p.items, () => p == null ? void 0 : p.pageInfo, () => p == null ? void 0 : p.total, () => p == null ? void 0 : p.selectedData], ([_, K, ce, ge, be]) => {
|
|
2392
|
+
W.value && (_ && V(W.value, _), be && be.length && M(be), K && Q(K, ge || 0, ce));
|
|
2391
2393
|
});
|
|
2392
|
-
q(() => e.idValue, (
|
|
2393
|
-
ie.value =
|
|
2394
|
+
q(() => e.idValue, (_) => {
|
|
2395
|
+
ie.value = _.split(e.separator);
|
|
2394
2396
|
});
|
|
2395
|
-
function
|
|
2396
|
-
if (
|
|
2397
|
-
const K =
|
|
2397
|
+
function H(_) {
|
|
2398
|
+
if (_ && _.length && !v.multiSelect) {
|
|
2399
|
+
const K = $(_[0]);
|
|
2398
2400
|
if (G(K))
|
|
2399
2401
|
return;
|
|
2400
2402
|
}
|
|
2401
|
-
|
|
2402
|
-
items:
|
|
2403
|
+
M(_), a.emit("selectionsChanged", {
|
|
2404
|
+
items: _
|
|
2403
2405
|
});
|
|
2404
2406
|
}
|
|
2405
|
-
function
|
|
2406
|
-
!v.multiSelect && e.openType === "Modal" && (
|
|
2407
|
+
function E(_, K) {
|
|
2408
|
+
!v.multiSelect && e.openType === "Modal" && (M([K]), a.emit("dblClickRow", {
|
|
2407
2409
|
items: [K]
|
|
2408
2410
|
}));
|
|
2409
2411
|
}
|
|
2410
|
-
function
|
|
2411
|
-
|
|
2412
|
+
function U(_) {
|
|
2413
|
+
M(_ == null ? void 0 : _.raw, !1);
|
|
2412
2414
|
}
|
|
2413
|
-
function
|
|
2414
|
-
const
|
|
2415
|
-
search:
|
|
2415
|
+
function P() {
|
|
2416
|
+
const _ = {
|
|
2417
|
+
search: C.default,
|
|
2416
2418
|
action: "list"
|
|
2417
2419
|
};
|
|
2418
|
-
!
|
|
2420
|
+
!C.default && f.value && (_.search = {
|
|
2419
2421
|
field: "*",
|
|
2420
2422
|
value: f.value,
|
|
2421
2423
|
type: "like"
|
|
2422
|
-
}), e.openType === "Modal" && re.value && Object.assign(
|
|
2423
|
-
|
|
2424
|
+
}), e.openType === "Modal" && re.value && Object.assign(_, re.value), Y.value && (_.action = "search", _.sort = Y.value), u(_, (K) => {
|
|
2425
|
+
Q(K.items, K.total || 0, K.pageInfo);
|
|
2424
2426
|
});
|
|
2425
2427
|
}
|
|
2426
|
-
const
|
|
2428
|
+
const z = tn(() => {
|
|
2427
2429
|
y({
|
|
2428
2430
|
index: 1
|
|
2429
|
-
}),
|
|
2430
|
-
}, 200),
|
|
2431
|
+
}), P();
|
|
2432
|
+
}, 200), ne = q(() => le == null ? void 0 : le.value, (_) => {
|
|
2431
2433
|
if (v.uri) {
|
|
2432
|
-
|
|
2434
|
+
z();
|
|
2433
2435
|
return;
|
|
2434
2436
|
}
|
|
2435
|
-
const K =
|
|
2437
|
+
const K = _.map((ce) => ce[j()]);
|
|
2436
2438
|
a.emit("navSelectionsChanged", {
|
|
2437
|
-
items:
|
|
2439
|
+
items: _,
|
|
2438
2440
|
ids: K
|
|
2439
2441
|
});
|
|
2440
|
-
}), he = q(() =>
|
|
2442
|
+
}), he = q(() => C.default, (_) => {
|
|
2441
2443
|
if (v.uri) {
|
|
2442
|
-
|
|
2444
|
+
z();
|
|
2443
2445
|
return;
|
|
2444
2446
|
}
|
|
2445
|
-
a.emit("search",
|
|
2446
|
-
}),
|
|
2447
|
-
if (v.uri &&
|
|
2448
|
-
|
|
2447
|
+
a.emit("search", _);
|
|
2448
|
+
}), A = q(() => l.value, () => {
|
|
2449
|
+
if (v.uri && le.value && le.value.length) {
|
|
2450
|
+
z();
|
|
2449
2451
|
return;
|
|
2450
2452
|
}
|
|
2451
2453
|
});
|
|
2452
2454
|
function Z() {
|
|
2453
|
-
|
|
2455
|
+
ue(), ne(), he(), A();
|
|
2454
2456
|
}
|
|
2455
|
-
q(() => v.displayType, (
|
|
2456
|
-
|
|
2457
|
+
q(() => v.displayType, (_) => {
|
|
2458
|
+
_.toLowerCase() === "treelist" && Z();
|
|
2457
2459
|
});
|
|
2458
|
-
function
|
|
2459
|
-
pageSize:
|
|
2460
|
+
function se({
|
|
2461
|
+
pageSize: _,
|
|
2460
2462
|
pageIndex: K
|
|
2461
2463
|
}) {
|
|
2462
2464
|
var be;
|
|
2463
2465
|
let ce = K;
|
|
2464
|
-
((be =
|
|
2466
|
+
((be = k.value) == null ? void 0 : be.size) !== _ && (ce = 1);
|
|
2465
2467
|
const ge = {
|
|
2466
|
-
size:
|
|
2468
|
+
size: _,
|
|
2467
2469
|
index: ce,
|
|
2468
2470
|
isNavigation: !1
|
|
2469
2471
|
};
|
|
2470
2472
|
if (y(ge), v.uri) {
|
|
2471
|
-
|
|
2473
|
+
P();
|
|
2472
2474
|
return;
|
|
2473
2475
|
}
|
|
2474
2476
|
a.emit("pageSizeChanged", ge);
|
|
2475
2477
|
}
|
|
2476
|
-
function de(
|
|
2477
|
-
|
|
2478
|
+
function de(_) {
|
|
2479
|
+
te(_), P();
|
|
2478
2480
|
}
|
|
2479
2481
|
function me() {
|
|
2480
|
-
return L(
|
|
2481
|
-
ref:
|
|
2482
|
-
customClass:
|
|
2483
|
-
pagination:
|
|
2482
|
+
return L(Ge, {
|
|
2483
|
+
ref: W,
|
|
2484
|
+
customClass: R.value,
|
|
2485
|
+
pagination: k.value,
|
|
2484
2486
|
summary: {
|
|
2485
2487
|
enable: !1
|
|
2486
2488
|
},
|
|
@@ -2494,23 +2496,23 @@ function Mt(e, a, t) {
|
|
|
2494
2496
|
fit: !0,
|
|
2495
2497
|
selection: I,
|
|
2496
2498
|
selectionValues: ie.value,
|
|
2497
|
-
onSelectionUpdate:
|
|
2498
|
-
onUnSelectItem:
|
|
2499
|
-
onChanged:
|
|
2500
|
-
onDoubleClickRow:
|
|
2499
|
+
onSelectionUpdate: H,
|
|
2500
|
+
onUnSelectItem: U,
|
|
2501
|
+
onChanged: se,
|
|
2502
|
+
onDoubleClickRow: E,
|
|
2501
2503
|
rowOption: ae,
|
|
2502
2504
|
sort: O,
|
|
2503
2505
|
onSortChanged: de
|
|
2504
2506
|
}, null);
|
|
2505
2507
|
}
|
|
2506
2508
|
return {
|
|
2507
|
-
datagridRef:
|
|
2509
|
+
datagridRef: W,
|
|
2508
2510
|
selectionValues: ie,
|
|
2509
2511
|
renderDataGrid: me,
|
|
2510
2512
|
unwatches: Z
|
|
2511
2513
|
};
|
|
2512
2514
|
}
|
|
2513
|
-
const
|
|
2515
|
+
const Ae = Symbol("LOOKUP_TREEROW_OPTIONS"), Dt = {
|
|
2514
2516
|
cascadeOption: { autoCheckChildren: !1, autoCheckParent: !1 },
|
|
2515
2517
|
collapseField: "collapse",
|
|
2516
2518
|
hasChildrenField: "hasChildren"
|
|
@@ -2522,20 +2524,20 @@ function Nt(e, a = !1) {
|
|
|
2522
2524
|
return i != null && i.onlySelectLeaf && (o.disabled = !o.raw.leaf), o;
|
|
2523
2525
|
}
|
|
2524
2526
|
function n() {
|
|
2525
|
-
return
|
|
2527
|
+
return Je(e, a);
|
|
2526
2528
|
}
|
|
2527
2529
|
return { customRowStatus: t, ...n() };
|
|
2528
2530
|
}
|
|
2529
2531
|
function Ot(e, a) {
|
|
2530
2532
|
const { lookupState: t, lookupOptions: n } = e;
|
|
2531
2533
|
function o(f, r, g) {
|
|
2532
|
-
return f.reduce((
|
|
2534
|
+
return f.reduce((S, F) => {
|
|
2533
2535
|
var x;
|
|
2534
2536
|
if (F.parents = [], r) {
|
|
2535
2537
|
const O = Ie(r.data, n.idField);
|
|
2536
2538
|
F.parent = r, F.parents = [...g || [], O];
|
|
2537
2539
|
}
|
|
2538
|
-
return F.id = Ie(F, n.idField),
|
|
2540
|
+
return F.id = Ie(F, n.idField), S.push(F), (x = F.children) != null && x.length && S.push(...o(F.children, F, F.parents)), S;
|
|
2539
2541
|
}, []);
|
|
2540
2542
|
}
|
|
2541
2543
|
function i(f) {
|
|
@@ -2545,8 +2547,8 @@ function Ot(e, a) {
|
|
|
2545
2547
|
function s(f) {
|
|
2546
2548
|
var r;
|
|
2547
2549
|
return ((r = t == null ? void 0 : t.flattenTreeNodes) == null ? void 0 : r.filter((g) => {
|
|
2548
|
-
var
|
|
2549
|
-
return (
|
|
2550
|
+
var S;
|
|
2551
|
+
return (S = g.parents) == null ? void 0 : S.includes(f);
|
|
2550
2552
|
})) ?? [];
|
|
2551
2553
|
}
|
|
2552
2554
|
function u(f) {
|
|
@@ -2554,14 +2556,14 @@ function Ot(e, a) {
|
|
|
2554
2556
|
if (!f)
|
|
2555
2557
|
return [];
|
|
2556
2558
|
const r = i(f);
|
|
2557
|
-
return ((g = r == null ? void 0 : r.parents) == null ? void 0 : g.map((
|
|
2559
|
+
return ((g = r == null ? void 0 : r.parents) == null ? void 0 : g.map((S) => i(S))) ?? [];
|
|
2558
2560
|
}
|
|
2559
2561
|
function l(f) {
|
|
2560
2562
|
var F;
|
|
2561
2563
|
if (!f)
|
|
2562
2564
|
return [];
|
|
2563
|
-
const r = i(f), g = ((F = r == null ? void 0 : r.parents) == null ? void 0 : F.map((x) => i(x))) ?? [],
|
|
2564
|
-
return [...g, ...
|
|
2565
|
+
const r = i(f), g = ((F = r == null ? void 0 : r.parents) == null ? void 0 : F.map((x) => i(x))) ?? [], S = s(f);
|
|
2566
|
+
return [...g, ...S];
|
|
2565
2567
|
}
|
|
2566
2568
|
function c(f, r = !0) {
|
|
2567
2569
|
const g = u(f).filter(
|
|
@@ -2571,30 +2573,30 @@ function Ot(e, a) {
|
|
|
2571
2573
|
(O) => {
|
|
2572
2574
|
var y;
|
|
2573
2575
|
return (y = e.selectionState.value) == null ? void 0 : y.some(
|
|
2574
|
-
(
|
|
2576
|
+
(M) => M[n.idField] === O.id
|
|
2575
2577
|
);
|
|
2576
2578
|
}
|
|
2577
2579
|
));
|
|
2578
2580
|
}
|
|
2579
|
-
),
|
|
2580
|
-
return g.concat(
|
|
2581
|
+
), S = r ? [] : s(f);
|
|
2582
|
+
return g.concat(S);
|
|
2581
2583
|
}
|
|
2582
2584
|
function d(f, r, g = !0) {
|
|
2583
2585
|
var F;
|
|
2584
|
-
const
|
|
2586
|
+
const S = {
|
|
2585
2587
|
down: () => s(f),
|
|
2586
2588
|
up: () => g ? u(f) : c(f),
|
|
2587
2589
|
both: () => g ? l(f) : c(f, !1)
|
|
2588
2590
|
};
|
|
2589
|
-
return ((F =
|
|
2591
|
+
return ((F = S[r]) == null ? void 0 : F.call(S)) ?? [];
|
|
2590
2592
|
}
|
|
2591
2593
|
function p(f, r = {}, g = !1) {
|
|
2592
|
-
const { field:
|
|
2593
|
-
if (
|
|
2594
|
+
const { field: S = "*", value: F = "" } = r, x = !!F, { layerType: O, dataField: y, pathField: M, layerField: G } = g ? n.navTreeInfo : n.treeInfo, $ = O === "parentId", B = { category: g ? "navchildren" : "children", searchField: S, searchValue: F, searchType: "like" };
|
|
2595
|
+
if ($)
|
|
2594
2596
|
B.parentId = f.raw.id;
|
|
2595
2597
|
else {
|
|
2596
2598
|
const I = f.raw[y];
|
|
2597
|
-
B.parentPath = Ie(I,
|
|
2599
|
+
B.parentPath = Ie(I, M), B.parentLayer = Ie(I, G);
|
|
2598
2600
|
}
|
|
2599
2601
|
const m = {
|
|
2600
2602
|
searchValue: "",
|
|
@@ -2602,47 +2604,47 @@ function Ot(e, a) {
|
|
|
2602
2604
|
enableFullTree: n.enableFullTree,
|
|
2603
2605
|
loadTreeDataType: n.loadTreeDataType === "all" ? "loadall" : "layerload"
|
|
2604
2606
|
};
|
|
2605
|
-
return x && (m.enableFullTree = !1, m.loadTreeDataType = "layerload",
|
|
2607
|
+
return x && (m.enableFullTree = !1, m.loadTreeDataType = "layerload", $ && (B.searchValue = "", B.searchField = "*")), m.searchValue = JSON.stringify(B), m;
|
|
2606
2608
|
}
|
|
2607
2609
|
function b(f, r = !1) {
|
|
2608
|
-
const { isEnableCascadeCheck: g } = a, { layerType:
|
|
2610
|
+
const { isEnableCascadeCheck: g } = a, { layerType: S } = r ? n.navTreeInfo : n.treeInfo, F = n.loadTreeDataType !== "all" && S === "pathcode" && g() && (n.cascadeValue === "both" || n.cascadeValue === "down");
|
|
2609
2611
|
return f ? f.data && !f.leaf && F : F;
|
|
2610
2612
|
}
|
|
2611
2613
|
function w(f) {
|
|
2612
|
-
const { dataField: r, pathField: g } = n.treeInfo,
|
|
2614
|
+
const { dataField: r, pathField: g } = n.treeInfo, S = f.data[r], F = Ie(S, g);
|
|
2613
2615
|
return {
|
|
2614
2616
|
searchValue: JSON.stringify({ category: "allChildren" }),
|
|
2615
2617
|
parentsIds: [F],
|
|
2616
2618
|
customData: De.value
|
|
2617
2619
|
};
|
|
2618
2620
|
}
|
|
2619
|
-
function
|
|
2620
|
-
let g = f,
|
|
2621
|
+
function C(f, r) {
|
|
2622
|
+
let g = f, S = null;
|
|
2621
2623
|
for (const F of r) {
|
|
2622
2624
|
const x = g.find((O) => O.data[n.idField] === F);
|
|
2623
2625
|
if (!x)
|
|
2624
2626
|
return null;
|
|
2625
|
-
|
|
2627
|
+
S = x, g = x.children || [];
|
|
2626
2628
|
}
|
|
2627
|
-
return
|
|
2629
|
+
return S;
|
|
2628
2630
|
}
|
|
2629
2631
|
function v(f, r, g) {
|
|
2630
|
-
var
|
|
2632
|
+
var M;
|
|
2631
2633
|
if (!g)
|
|
2632
2634
|
return;
|
|
2633
|
-
const
|
|
2635
|
+
const S = i(r), F = [...(S == null ? void 0 : S.parents) ?? [], r], x = (f ?? []).map((G) => ({
|
|
2634
2636
|
...G,
|
|
2635
2637
|
hasChildren: !G.leaf,
|
|
2636
2638
|
parents: [...F]
|
|
2637
|
-
})), O =
|
|
2638
|
-
O && (O.children = [...x], (
|
|
2639
|
+
})), O = C(t.flattenTreeNodes || [], F);
|
|
2640
|
+
O && (O.children = [...x], (M = t.flattenTreeNodes) == null || M.push(...x));
|
|
2639
2641
|
const { isDropdownMode: y } = a;
|
|
2640
2642
|
Ye(() => {
|
|
2641
2643
|
var B;
|
|
2642
2644
|
if (g.addChildrenToNode(x, r), y())
|
|
2643
2645
|
return;
|
|
2644
|
-
const G = ((B = e.selectionState.value) == null ? void 0 : B.map((m) => m[n.idField])) ?? [],
|
|
2645
|
-
|
|
2646
|
+
const G = ((B = e.selectionState.value) == null ? void 0 : B.map((m) => m[n.idField])) ?? [], $ = x.filter((m) => G.includes(m.id)).map((m) => m.id);
|
|
2647
|
+
$.length && g.selectItemByIds($);
|
|
2646
2648
|
});
|
|
2647
2649
|
}
|
|
2648
2650
|
return {
|
|
@@ -2658,89 +2660,89 @@ function Ot(e, a) {
|
|
|
2658
2660
|
};
|
|
2659
2661
|
}
|
|
2660
2662
|
function Bt(e, a) {
|
|
2661
|
-
const t =
|
|
2663
|
+
const t = X(Oe, N(pe.dataList)), n = X(we), {
|
|
2662
2664
|
lookupStates: o
|
|
2663
2665
|
} = n, {
|
|
2664
2666
|
lookupState: i,
|
|
2665
2667
|
searchState: s,
|
|
2666
2668
|
lookupOptions: u,
|
|
2667
2669
|
queryState: l
|
|
2668
|
-
} = o, c =
|
|
2670
|
+
} = o, c = X(Ae), d = X(Ee), p = Pe(e, o), {
|
|
2669
2671
|
checkMultiSelect: b,
|
|
2670
2672
|
checkColumnOptions: w,
|
|
2671
|
-
isEnableCascadeCheck:
|
|
2673
|
+
isEnableCascadeCheck: C,
|
|
2672
2674
|
sortOption: v
|
|
2673
2675
|
} = p, {
|
|
2674
2676
|
setColumns: f
|
|
2675
2677
|
} = tt(e, u.idField), {
|
|
2676
2678
|
selectTreeNodes: r,
|
|
2677
2679
|
unSelectTreeNode: g,
|
|
2678
|
-
unSelectTreeNodes:
|
|
2680
|
+
unSelectTreeNodes: S,
|
|
2679
2681
|
updateSelections: F,
|
|
2680
2682
|
getSelectionIds: x
|
|
2681
|
-
} = d, O = b(), y = w(),
|
|
2682
|
-
sortChanged:
|
|
2683
|
+
} = d, O = b(), y = w(), M = N(), G = N([]), {
|
|
2684
|
+
sortChanged: $,
|
|
2683
2685
|
sortInfo: B
|
|
2684
2686
|
} = at(i), {
|
|
2685
2687
|
loadAndSelect: m
|
|
2686
|
-
} =
|
|
2688
|
+
} = Mt(e, o), {
|
|
2687
2689
|
loadData: I,
|
|
2688
2690
|
expandAllNodes: T,
|
|
2689
|
-
getData:
|
|
2691
|
+
getData: W
|
|
2690
2692
|
} = n, {
|
|
2691
2693
|
flattenTreeNodes: ie,
|
|
2692
|
-
getTreeNodeWithCascadeValue:
|
|
2693
|
-
buildGetChildrenQueryParams:
|
|
2694
|
+
getTreeNodeWithCascadeValue: le,
|
|
2695
|
+
buildGetChildrenQueryParams: j,
|
|
2694
2696
|
needGetAllChildNodes: h,
|
|
2695
|
-
buildGetAllChildrenQueryParams:
|
|
2696
|
-
loadChildNodes:
|
|
2697
|
+
buildGetAllChildrenQueryParams: k,
|
|
2698
|
+
loadChildNodes: V
|
|
2697
2699
|
} = Ot(o, p);
|
|
2698
|
-
function A
|
|
2699
|
-
Z && (
|
|
2700
|
+
function R(A, Z = !1) {
|
|
2701
|
+
Z && (A = T(A)), i.flattenTreeNodes = ie(A || []), m(M.value, A || []);
|
|
2700
2702
|
}
|
|
2701
|
-
nt(e,
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2703
|
+
nt(e, M, o, t);
|
|
2704
|
+
const te = q([() => i == null ? void 0 : i.columns, () => i == null ? void 0 : i.items, () => i == null ? void 0 : i.pageInfo, () => i == null ? void 0 : i.total, () => i == null ? void 0 : i.selectedData], ([A, Z, se, de, me]) => {
|
|
2705
|
+
M.value && (me && me.length && F(me), A && f(M.value, A, !0), R(Z || [], i.action === "search"));
|
|
2704
2706
|
});
|
|
2705
|
-
function
|
|
2707
|
+
function Y(A, Z = !0) {
|
|
2706
2708
|
const {
|
|
2707
|
-
cascadeValue:
|
|
2709
|
+
cascadeValue: se
|
|
2708
2710
|
} = u;
|
|
2709
|
-
return
|
|
2711
|
+
return C() && se !== St.Disable ? le(A, se, Z).filter((me) => me.selectable || me.selectable === void 0).map((me) => me.id) : [];
|
|
2710
2712
|
}
|
|
2711
|
-
function ae(
|
|
2712
|
-
r(
|
|
2713
|
-
items:
|
|
2713
|
+
function ae(A) {
|
|
2714
|
+
r(A), a.emit("selectionsChanged", {
|
|
2715
|
+
items: A
|
|
2714
2716
|
});
|
|
2715
2717
|
}
|
|
2716
|
-
function
|
|
2717
|
-
g(
|
|
2718
|
-
const Z = Ie(
|
|
2719
|
-
if (h(
|
|
2720
|
-
const de =
|
|
2721
|
-
|
|
2718
|
+
function Q(A) {
|
|
2719
|
+
g(A);
|
|
2720
|
+
const Z = Ie(A.raw, u.idField), se = Y(Z);
|
|
2721
|
+
if (h(A.raw)) {
|
|
2722
|
+
const de = k(A.raw);
|
|
2723
|
+
W(de).then((me) => {
|
|
2722
2724
|
const K = (me.items || []).filter((ge) => !ge.addtional && (ge.selectable || ge.selectable === void 0));
|
|
2723
2725
|
K && K.length && r(K);
|
|
2724
2726
|
const ce = (K || []).map((ge) => ge.id);
|
|
2725
|
-
|
|
2727
|
+
S([Z, ...se, ...ce]);
|
|
2726
2728
|
});
|
|
2727
2729
|
} else
|
|
2728
|
-
|
|
2730
|
+
S([Z, ...se]);
|
|
2729
2731
|
}
|
|
2730
|
-
function re(
|
|
2731
|
-
const Z = Ie(
|
|
2732
|
-
if (
|
|
2733
|
-
const de =
|
|
2734
|
-
|
|
2732
|
+
function re(A) {
|
|
2733
|
+
const Z = Ie(A.raw, u.idField), se = Y(Z);
|
|
2734
|
+
if (se.length && M.value.selectItemByIds([Z, ...se]), h(A.raw)) {
|
|
2735
|
+
const de = k(A.raw);
|
|
2736
|
+
W(de).then((me) => {
|
|
2735
2737
|
const K = (me.items || []).filter((ce) => !ce.addtional && (ce.selectable || ce.selectable === void 0));
|
|
2736
2738
|
K && K.length && r(K);
|
|
2737
2739
|
});
|
|
2738
2740
|
}
|
|
2739
2741
|
}
|
|
2740
|
-
function
|
|
2742
|
+
function ue(A) {
|
|
2741
2743
|
const Z = {
|
|
2742
2744
|
search: s.default,
|
|
2743
|
-
action:
|
|
2745
|
+
action: A
|
|
2744
2746
|
};
|
|
2745
2747
|
return !s.default && l.value && (Z.search = {
|
|
2746
2748
|
field: "*",
|
|
@@ -2748,54 +2750,54 @@ function Bt(e, a) {
|
|
|
2748
2750
|
type: "like"
|
|
2749
2751
|
}), B.value && (Z.action = "search", Z.sort = B.value), Z;
|
|
2750
2752
|
}
|
|
2751
|
-
function
|
|
2752
|
-
const Z =
|
|
2753
|
-
I(Z, (
|
|
2754
|
-
|
|
2753
|
+
function H(A = "list") {
|
|
2754
|
+
const Z = ue(A);
|
|
2755
|
+
I(Z, (se) => {
|
|
2756
|
+
R(se.items, A === "search");
|
|
2755
2757
|
});
|
|
2756
2758
|
}
|
|
2757
|
-
const
|
|
2759
|
+
const E = q(() => s.default, (A) => {
|
|
2758
2760
|
if (u.uri) {
|
|
2759
|
-
|
|
2761
|
+
H("search");
|
|
2760
2762
|
return;
|
|
2761
2763
|
}
|
|
2762
|
-
a.emit("search",
|
|
2764
|
+
a.emit("search", A);
|
|
2763
2765
|
});
|
|
2764
|
-
function
|
|
2765
|
-
|
|
2766
|
+
function U() {
|
|
2767
|
+
te(), E();
|
|
2766
2768
|
}
|
|
2767
|
-
q(() => u.displayType, (
|
|
2768
|
-
|
|
2769
|
+
q(() => u.displayType, (A) => {
|
|
2770
|
+
A.toLowerCase() !== "treelist" && U();
|
|
2769
2771
|
});
|
|
2770
|
-
function
|
|
2771
|
-
if (
|
|
2772
|
+
function P(A) {
|
|
2773
|
+
if (M.value.hasChildren(A))
|
|
2772
2774
|
return Promise.resolve();
|
|
2773
|
-
const Z =
|
|
2775
|
+
const Z = A.raw.id, se = j(A, s.default || (l.value ? {
|
|
2774
2776
|
field: "*",
|
|
2775
2777
|
value: l.value,
|
|
2776
2778
|
type: "like"
|
|
2777
2779
|
} : void 0));
|
|
2778
|
-
return
|
|
2779
|
-
|
|
2780
|
+
return W(se).then((de) => {
|
|
2781
|
+
V((de == null ? void 0 : de.items) ?? [], Z, M.value);
|
|
2780
2782
|
});
|
|
2781
2783
|
}
|
|
2782
|
-
function
|
|
2784
|
+
function z(A) {
|
|
2783
2785
|
var de;
|
|
2784
2786
|
const {
|
|
2785
2787
|
node: Z,
|
|
2786
|
-
$event:
|
|
2787
|
-
} =
|
|
2788
|
-
u.enableFavorite && ((de =
|
|
2788
|
+
$event: se
|
|
2789
|
+
} = A;
|
|
2790
|
+
u.enableFavorite && ((de = se.target) == null ? void 0 : de.className.indexOf("f-icon-star")) > -1 || !u.multiSelect && e.openType === "Modal" && (F([Z]), a.emit("dblClickRow", {
|
|
2789
2791
|
items: [Z]
|
|
2790
2792
|
}));
|
|
2791
2793
|
}
|
|
2792
|
-
function
|
|
2793
|
-
|
|
2794
|
+
function ne(A) {
|
|
2795
|
+
$(A), H();
|
|
2794
2796
|
}
|
|
2795
2797
|
function he() {
|
|
2796
2798
|
return L(et, {
|
|
2797
2799
|
class: "lookup-treegrid",
|
|
2798
|
-
ref:
|
|
2800
|
+
ref: M,
|
|
2799
2801
|
fit: !0,
|
|
2800
2802
|
data: e.data,
|
|
2801
2803
|
idField: u.idField,
|
|
@@ -2811,34 +2813,34 @@ function Bt(e, a) {
|
|
|
2811
2813
|
rowOption: c,
|
|
2812
2814
|
hierarchy: Dt,
|
|
2813
2815
|
onSelectionUpdate: ae,
|
|
2814
|
-
onUnSelectItem:
|
|
2816
|
+
onUnSelectItem: Q,
|
|
2815
2817
|
onSelectItem: re,
|
|
2816
|
-
loadData:
|
|
2818
|
+
loadData: P,
|
|
2817
2819
|
sort: v,
|
|
2818
|
-
onDblclickNode:
|
|
2819
|
-
onSortChanged:
|
|
2820
|
+
onDblclickNode: z,
|
|
2821
|
+
onSortChanged: ne
|
|
2820
2822
|
}, null);
|
|
2821
2823
|
}
|
|
2822
2824
|
return {
|
|
2823
|
-
treegridRef:
|
|
2825
|
+
treegridRef: M,
|
|
2824
2826
|
selectionTreeValues: G,
|
|
2825
2827
|
renderTreeGrid: he,
|
|
2826
|
-
unwatches:
|
|
2828
|
+
unwatches: U
|
|
2827
2829
|
};
|
|
2828
2830
|
}
|
|
2829
|
-
const
|
|
2831
|
+
const $n = {
|
|
2830
2832
|
fields: { type: Array, default: () => [] },
|
|
2831
2833
|
showAllColumns: { type: Boolean, default: !0 },
|
|
2832
2834
|
isNavigation: { type: Boolean, default: !1 },
|
|
2833
2835
|
id: { type: String, default: "" },
|
|
2834
2836
|
enableEqualSearch: { type: Boolean, default: !1 },
|
|
2835
2837
|
exactLabel: { type: String, default: "精确" }
|
|
2836
|
-
},
|
|
2838
|
+
}, jn = /* @__PURE__ */ Te({
|
|
2837
2839
|
name: "FLookupSearchBar",
|
|
2838
|
-
props:
|
|
2840
|
+
props: $n,
|
|
2839
2841
|
emits: ["search"],
|
|
2840
2842
|
setup(e, a) {
|
|
2841
|
-
const t = '<i id="' + e.id + '-icon-search" class="f-icon f-icon-search"></i>', n =
|
|
2843
|
+
const t = '<i id="' + e.id + '-icon-search" class="f-icon f-icon-search"></i>', n = X(we), {
|
|
2842
2844
|
queryState: o
|
|
2843
2845
|
} = n.lookupStates, i = N(e.fields || []), s = N(""), u = N(o.value), l = N(e.isNavigation), c = N(), d = N(!1), p = J(() => ({
|
|
2844
2846
|
field: s.value,
|
|
@@ -2851,7 +2853,7 @@ const _n = {
|
|
|
2851
2853
|
return;
|
|
2852
2854
|
let r = "";
|
|
2853
2855
|
e.showAllColumns && (r = "*"), r = i.value[0].value;
|
|
2854
|
-
const g = i.value.find((
|
|
2856
|
+
const g = i.value.find((S) => !!S.isDefault);
|
|
2855
2857
|
g && (r = g.value), s.value = r;
|
|
2856
2858
|
}
|
|
2857
2859
|
q(() => e.fields, (r) => {
|
|
@@ -2860,14 +2862,14 @@ const _n = {
|
|
|
2860
2862
|
function w() {
|
|
2861
2863
|
a.emit("search", p.value);
|
|
2862
2864
|
}
|
|
2863
|
-
const
|
|
2865
|
+
const C = gt(() => w(), 300);
|
|
2864
2866
|
function v() {
|
|
2865
2867
|
u.value = "", w();
|
|
2866
2868
|
}
|
|
2867
2869
|
function f(r) {
|
|
2868
|
-
r.key === "Enter" &&
|
|
2870
|
+
r.key === "Enter" && C();
|
|
2869
2871
|
}
|
|
2870
|
-
return
|
|
2872
|
+
return ke(() => {
|
|
2871
2873
|
b(), l.value && (u.value = "");
|
|
2872
2874
|
}), () => L("div", {
|
|
2873
2875
|
class: "fv-lookup-search-bar d-flex flex-row"
|
|
@@ -2918,7 +2920,7 @@ function it(e, a, t, n) {
|
|
|
2918
2920
|
} = t, {
|
|
2919
2921
|
searchFieldItems: u,
|
|
2920
2922
|
navSearchFieldItems: l
|
|
2921
|
-
} =
|
|
2923
|
+
} = Pt(e, o, s), c = N([]), d = N([]);
|
|
2922
2924
|
function p(f, r = !1) {
|
|
2923
2925
|
let g = f;
|
|
2924
2926
|
e.searchAnyField && (g = [{
|
|
@@ -2948,13 +2950,13 @@ function it(e, a, t, n) {
|
|
|
2948
2950
|
}
|
|
2949
2951
|
i.default = r;
|
|
2950
2952
|
}
|
|
2951
|
-
const
|
|
2953
|
+
const C = J(() => a ? d.value || [] : c.value || []);
|
|
2952
2954
|
function v() {
|
|
2953
|
-
if (e.enableSearchBar &&
|
|
2955
|
+
if (e.enableSearchBar && C.value.length > 0)
|
|
2954
2956
|
return L("div", {
|
|
2955
2957
|
class: "p-2"
|
|
2956
|
-
}, [L(
|
|
2957
|
-
fields:
|
|
2958
|
+
}, [L(jn, {
|
|
2959
|
+
fields: C.value,
|
|
2958
2960
|
id: e.id,
|
|
2959
2961
|
showAllColumns: e.searchAnyField,
|
|
2960
2962
|
isNavigation: a,
|
|
@@ -2967,9 +2969,9 @@ function it(e, a, t, n) {
|
|
|
2967
2969
|
renderSearchBar: v
|
|
2968
2970
|
};
|
|
2969
2971
|
}
|
|
2970
|
-
function
|
|
2971
|
-
var
|
|
2972
|
-
const t =
|
|
2972
|
+
function qn(e, a) {
|
|
2973
|
+
var U;
|
|
2974
|
+
const t = X(Ae), n = X(we), o = X(Le), {
|
|
2973
2975
|
loadData: i,
|
|
2974
2976
|
lookupStates: s,
|
|
2975
2977
|
expandAllNodes: u,
|
|
@@ -2981,26 +2983,26 @@ function jn(e, a) {
|
|
|
2981
2983
|
searchState: b,
|
|
2982
2984
|
lookupOptions: w
|
|
2983
2985
|
} = s, {
|
|
2984
|
-
renderSearchBar:
|
|
2985
|
-
} = it(e, !0, s, o), v =
|
|
2986
|
+
renderSearchBar: C
|
|
2987
|
+
} = it(e, !0, s, o), v = Pe(e, s), {
|
|
2986
2988
|
checkPaination: f,
|
|
2987
2989
|
navIsList: r,
|
|
2988
2990
|
navIsTreeList: g,
|
|
2989
|
-
sortOption:
|
|
2991
|
+
sortOption: S
|
|
2990
2992
|
} = v, {
|
|
2991
2993
|
updatePageInfo: F
|
|
2992
2994
|
} = xt(e, p), x = N([]), {
|
|
2993
2995
|
buildGetChildrenQueryParams: O,
|
|
2994
2996
|
loadChildNodes: y
|
|
2995
2997
|
} = Ot(s, v), {
|
|
2996
|
-
sortChanged:
|
|
2998
|
+
sortChanged: M,
|
|
2997
2999
|
sortInfo: G
|
|
2998
3000
|
} = at(d);
|
|
2999
3001
|
if (r()) {
|
|
3000
|
-
const
|
|
3001
|
-
F(
|
|
3002
|
+
const P = f((U = e.navigation) == null ? void 0 : U.pagination);
|
|
3003
|
+
F(P, !0);
|
|
3002
3004
|
}
|
|
3003
|
-
const
|
|
3005
|
+
const $ = Je(w, !0), B = N(p.navigation), m = {
|
|
3004
3006
|
enableSelectRow: !0,
|
|
3005
3007
|
multiSelect: !1,
|
|
3006
3008
|
showCheckbox: !1,
|
|
@@ -3009,95 +3011,95 @@ function jn(e, a) {
|
|
|
3009
3011
|
fitColumns: !0,
|
|
3010
3012
|
fitMode: "percentage",
|
|
3011
3013
|
resizeColumn: !0
|
|
3012
|
-
}, T = N(),
|
|
3013
|
-
q(() => p.navigation, (
|
|
3014
|
-
var
|
|
3015
|
-
B.value =
|
|
3014
|
+
}, T = N(), W = N(), ie = N("id");
|
|
3015
|
+
q(() => p.navigation, (P) => {
|
|
3016
|
+
var z;
|
|
3017
|
+
B.value = P, (z = W.value) == null || z.updatePagination(P);
|
|
3016
3018
|
});
|
|
3017
|
-
function
|
|
3018
|
-
var he,
|
|
3019
|
-
if (
|
|
3020
|
-
const
|
|
3021
|
-
total:
|
|
3019
|
+
function le(P, z, ne) {
|
|
3020
|
+
var he, A, Z;
|
|
3021
|
+
if (P = P || [], r()) {
|
|
3022
|
+
const se = {
|
|
3023
|
+
total: z
|
|
3022
3024
|
};
|
|
3023
|
-
if (
|
|
3025
|
+
if (ne) {
|
|
3024
3026
|
const {
|
|
3025
3027
|
pageIndex: de,
|
|
3026
3028
|
pageSize: me,
|
|
3027
|
-
enablePager:
|
|
3029
|
+
enablePager: _,
|
|
3028
3030
|
pageList: K
|
|
3029
|
-
} =
|
|
3030
|
-
Object.assign(
|
|
3031
|
+
} = ne;
|
|
3032
|
+
Object.assign(se, {
|
|
3031
3033
|
index: de,
|
|
3032
3034
|
size: me,
|
|
3033
|
-
enable:
|
|
3035
|
+
enable: _
|
|
3034
3036
|
});
|
|
3035
3037
|
}
|
|
3036
|
-
F(
|
|
3037
|
-
} else g() && ((
|
|
3038
|
+
F(se, !0), (he = W.value) == null || he.updateDataSource(P);
|
|
3039
|
+
} else g() && ((A = b.navigation) != null && A.value && (P = u(P, !0)), (Z = T.value) == null || Z.updateDataSource(P));
|
|
3038
3040
|
}
|
|
3039
|
-
function
|
|
3040
|
-
var
|
|
3041
|
-
r() ? (
|
|
3041
|
+
function j(P) {
|
|
3042
|
+
var z, ne;
|
|
3043
|
+
r() ? (z = W.value) == null || z.updateColumns(P) : g() && ((ne = T.value) == null || ne.updateColumns(P));
|
|
3042
3044
|
}
|
|
3043
|
-
q([() => d == null ? void 0 : d.columns, () => d == null ? void 0 : d.items, () => d == null ? void 0 : d.pageInfo, () => d == null ? void 0 : d.total], ([
|
|
3044
|
-
|
|
3045
|
-
}), q(() => d == null ? void 0 : d.idField, (
|
|
3046
|
-
ie.value =
|
|
3045
|
+
q([() => d == null ? void 0 : d.columns, () => d == null ? void 0 : d.items, () => d == null ? void 0 : d.pageInfo, () => d == null ? void 0 : d.total], ([P, z, ne, he]) => {
|
|
3046
|
+
P && j(P), le(z, he || 0, ne);
|
|
3047
|
+
}), q(() => d == null ? void 0 : d.idField, (P) => {
|
|
3048
|
+
ie.value = P || "id";
|
|
3047
3049
|
});
|
|
3048
|
-
function h(
|
|
3049
|
-
var
|
|
3050
|
-
x.value =
|
|
3050
|
+
function h(P) {
|
|
3051
|
+
var z;
|
|
3052
|
+
x.value = P, (!P || !P.length) && ((z = T.value) == null || z.activeRowById(""));
|
|
3051
3053
|
}
|
|
3052
|
-
function P
|
|
3053
|
-
var
|
|
3054
|
-
x.value =
|
|
3054
|
+
function k(P) {
|
|
3055
|
+
var z;
|
|
3056
|
+
x.value = P, (!P || !P.length) && ((z = W.value) == null || z.activeRowById(""));
|
|
3055
3057
|
}
|
|
3056
|
-
function
|
|
3057
|
-
const
|
|
3058
|
+
function V() {
|
|
3059
|
+
const P = {
|
|
3058
3060
|
search: b.navigation,
|
|
3059
3061
|
action: "navsearch"
|
|
3060
3062
|
};
|
|
3061
|
-
G.value && (
|
|
3062
|
-
|
|
3063
|
+
G.value && (P.sort = G.value), i(P, (z) => {
|
|
3064
|
+
le(z.items, z.total || 0, z.pageInfo);
|
|
3063
3065
|
});
|
|
3064
3066
|
}
|
|
3065
|
-
q(() => b.navigation, (
|
|
3067
|
+
q(() => b.navigation, (P) => {
|
|
3066
3068
|
if (w.uri) {
|
|
3067
3069
|
F({
|
|
3068
3070
|
index: 1
|
|
3069
|
-
}, !0),
|
|
3071
|
+
}, !0), V();
|
|
3070
3072
|
return;
|
|
3071
3073
|
}
|
|
3072
|
-
a.emit("search",
|
|
3074
|
+
a.emit("search", P);
|
|
3073
3075
|
});
|
|
3074
|
-
function
|
|
3075
|
-
pageSize:
|
|
3076
|
-
pageIndex:
|
|
3076
|
+
function R({
|
|
3077
|
+
pageSize: P,
|
|
3078
|
+
pageIndex: z
|
|
3077
3079
|
}) {
|
|
3078
|
-
var
|
|
3079
|
-
let
|
|
3080
|
-
((
|
|
3080
|
+
var A;
|
|
3081
|
+
let ne = z;
|
|
3082
|
+
((A = B.value) == null ? void 0 : A.size) !== P && (ne = 1);
|
|
3081
3083
|
const he = {
|
|
3082
|
-
size:
|
|
3083
|
-
index:
|
|
3084
|
+
size: P,
|
|
3085
|
+
index: ne
|
|
3084
3086
|
};
|
|
3085
3087
|
if (F(he, !0), w.uri) {
|
|
3086
|
-
|
|
3088
|
+
V();
|
|
3087
3089
|
return;
|
|
3088
3090
|
}
|
|
3089
3091
|
a.emit("pageSizeChanged", he);
|
|
3090
3092
|
}
|
|
3091
|
-
function
|
|
3092
|
-
if (T.value.hasChildren(
|
|
3093
|
+
function te(P) {
|
|
3094
|
+
if (T.value.hasChildren(P))
|
|
3093
3095
|
return Promise.resolve();
|
|
3094
|
-
const
|
|
3095
|
-
return c(
|
|
3096
|
-
y((he == null ? void 0 : he.items) ?? [],
|
|
3096
|
+
const z = P.raw.id, ne = O(P, b.navigation, !0);
|
|
3097
|
+
return c(ne).then((he) => {
|
|
3098
|
+
y((he == null ? void 0 : he.items) ?? [], z, T.value);
|
|
3097
3099
|
});
|
|
3098
3100
|
}
|
|
3099
|
-
function
|
|
3100
|
-
|
|
3101
|
+
function Y(P) {
|
|
3102
|
+
M(P), V();
|
|
3101
3103
|
}
|
|
3102
3104
|
function ae() {
|
|
3103
3105
|
return L(et, {
|
|
@@ -3114,14 +3116,14 @@ function jn(e, a) {
|
|
|
3114
3116
|
rowOption: t,
|
|
3115
3117
|
hierarchy: Dt,
|
|
3116
3118
|
onSelectionUpdate: h,
|
|
3117
|
-
loadData:
|
|
3118
|
-
sort:
|
|
3119
|
-
onSortChanged:
|
|
3119
|
+
loadData: te,
|
|
3120
|
+
sort: S,
|
|
3121
|
+
onSortChanged: Y
|
|
3120
3122
|
}, null);
|
|
3121
3123
|
}
|
|
3122
|
-
function
|
|
3123
|
-
return L(
|
|
3124
|
-
ref:
|
|
3124
|
+
function Q() {
|
|
3125
|
+
return L(Ge, {
|
|
3126
|
+
ref: W,
|
|
3125
3127
|
pagination: B.value,
|
|
3126
3128
|
summary: {
|
|
3127
3129
|
enable: !1
|
|
@@ -3135,59 +3137,59 @@ function jn(e, a) {
|
|
|
3135
3137
|
fit: !0,
|
|
3136
3138
|
virtualized: !0,
|
|
3137
3139
|
selection: m,
|
|
3138
|
-
onSelectionUpdate:
|
|
3139
|
-
onChanged:
|
|
3140
|
-
rowOption:
|
|
3141
|
-
sort:
|
|
3142
|
-
onSortChanged:
|
|
3140
|
+
onSelectionUpdate: k,
|
|
3141
|
+
onChanged: R,
|
|
3142
|
+
rowOption: $,
|
|
3143
|
+
sort: S,
|
|
3144
|
+
onSortChanged: Y
|
|
3143
3145
|
}, null);
|
|
3144
3146
|
}
|
|
3145
3147
|
function re() {
|
|
3146
3148
|
if (g())
|
|
3147
3149
|
return ae();
|
|
3148
3150
|
if (r())
|
|
3149
|
-
return
|
|
3151
|
+
return Q();
|
|
3150
3152
|
}
|
|
3151
|
-
function
|
|
3153
|
+
function ue() {
|
|
3152
3154
|
return L("div", {
|
|
3153
3155
|
class: "d-flex h-100 w-100 flex-column"
|
|
3154
|
-
}, [
|
|
3156
|
+
}, [C(), L("div", {
|
|
3155
3157
|
class: "f-utils-fill px-2",
|
|
3156
3158
|
style: "position: relative;"
|
|
3157
3159
|
}, [re()])]);
|
|
3158
3160
|
}
|
|
3159
|
-
function
|
|
3161
|
+
function H() {
|
|
3160
3162
|
return ie.value;
|
|
3161
3163
|
}
|
|
3162
|
-
function
|
|
3163
|
-
return d.relations && d.relations.length ? d.relations.map((
|
|
3164
|
+
function E(P) {
|
|
3165
|
+
return d.relations && d.relations.length ? d.relations.map((ne) => {
|
|
3164
3166
|
const {
|
|
3165
3167
|
groupField: he,
|
|
3166
|
-
helpField:
|
|
3167
|
-
} =
|
|
3168
|
-
fieldName:
|
|
3168
|
+
helpField: A
|
|
3169
|
+
} = ne, Z = {
|
|
3170
|
+
fieldName: A,
|
|
3169
3171
|
fieldValue: ""
|
|
3170
|
-
},
|
|
3171
|
-
return Z.fieldValue =
|
|
3172
|
+
}, se = P.map((de) => l(de, he));
|
|
3173
|
+
return Z.fieldValue = se.join(","), Z;
|
|
3172
3174
|
}) : "";
|
|
3173
3175
|
}
|
|
3174
3176
|
return {
|
|
3175
|
-
renderNavigation:
|
|
3177
|
+
renderNavigation: ue,
|
|
3176
3178
|
selectedItems: x,
|
|
3177
|
-
getNavigationIdField:
|
|
3178
|
-
getRelationFilter:
|
|
3179
|
+
getNavigationIdField: H,
|
|
3180
|
+
getRelationFilter: E
|
|
3179
3181
|
};
|
|
3180
3182
|
}
|
|
3181
|
-
function
|
|
3182
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" &&
|
|
3183
|
+
function Wn(e) {
|
|
3184
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$t(e);
|
|
3183
3185
|
}
|
|
3184
|
-
const
|
|
3186
|
+
const Gn = /* @__PURE__ */ Te({
|
|
3185
3187
|
name: "LookupContainer",
|
|
3186
|
-
props:
|
|
3188
|
+
props: Be,
|
|
3187
3189
|
emits: ["update:modelValue", "search", "navSelectionsChanged", "pageIndexChanged", "pageSizeChanged", "changeDialogOptions", "clearSearch", "dblClickRow"],
|
|
3188
3190
|
setup(e, a) {
|
|
3189
|
-
|
|
3190
|
-
const t =
|
|
3191
|
+
X(Oe, N(pe.dataList));
|
|
3192
|
+
const t = X(we), n = X(Le), {
|
|
3191
3193
|
lookupStates: o,
|
|
3192
3194
|
getIdQueryParams: i
|
|
3193
3195
|
} = t, {
|
|
@@ -3201,23 +3203,23 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3201
3203
|
} = it(e, !1, o, n), {
|
|
3202
3204
|
isDoubleList: b,
|
|
3203
3205
|
getNavigationSize: w,
|
|
3204
|
-
isTreeList:
|
|
3205
|
-
} =
|
|
3206
|
+
isTreeList: C
|
|
3207
|
+
} = Pe(e, o), {
|
|
3206
3208
|
renderNavigation: v,
|
|
3207
3209
|
selectedItems: f,
|
|
3208
3210
|
getNavigationIdField: r,
|
|
3209
3211
|
getRelationFilter: g
|
|
3210
|
-
} =
|
|
3211
|
-
renderTreeGrid:
|
|
3212
|
+
} = qn(e, a), {
|
|
3213
|
+
renderTreeGrid: S,
|
|
3212
3214
|
unwatches: F
|
|
3213
3215
|
} = Bt(e, a), {
|
|
3214
3216
|
renderDataGrid: x,
|
|
3215
3217
|
unwatches: O
|
|
3216
|
-
} =
|
|
3218
|
+
} = Vt(e, a, {
|
|
3217
3219
|
navSelectedItems: f,
|
|
3218
3220
|
getNavigationIdField: r,
|
|
3219
3221
|
getRelationFilter: g
|
|
3220
|
-
}), y = J(() =>
|
|
3222
|
+
}), y = J(() => C() ? S : x), M = w();
|
|
3221
3223
|
function G(m) {
|
|
3222
3224
|
var T;
|
|
3223
3225
|
const I = (T = c.dialog) == null ? void 0 : T.title;
|
|
@@ -3225,10 +3227,10 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3225
3227
|
title: m
|
|
3226
3228
|
});
|
|
3227
3229
|
}
|
|
3228
|
-
function
|
|
3229
|
-
s.action = I,
|
|
3230
|
-
var
|
|
3231
|
-
u[T] = (
|
|
3230
|
+
function $(m, I) {
|
|
3231
|
+
s.action = I, C() ? O() : F(), m.navigation && (Object.keys(m.navigation).forEach((T) => {
|
|
3232
|
+
var W;
|
|
3233
|
+
u[T] = (W = m.navigation) == null ? void 0 : W[T];
|
|
3232
3234
|
}), m.navigation.treeInfo && (t == null || t.setTreeInfo(m.navigation.treeInfo, !0)), delete m.navigation), m.treeInfo && (t == null || t.setTreeInfo(m.treeInfo)), Object.keys(m).forEach((T) => {
|
|
3233
3235
|
s[T] = m[T];
|
|
3234
3236
|
});
|
|
@@ -3241,22 +3243,22 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3241
3243
|
type: "like"
|
|
3242
3244
|
}, m.action = "search"), t == null || t.loadData(m, (I) => {
|
|
3243
3245
|
Ye(() => {
|
|
3244
|
-
|
|
3246
|
+
$(I, (m == null ? void 0 : m.action) || ""), G(I.title || "");
|
|
3245
3247
|
});
|
|
3246
3248
|
});
|
|
3247
3249
|
}
|
|
3248
|
-
return
|
|
3250
|
+
return ke(() => {
|
|
3249
3251
|
B(), document.body.classList.add("lookup-modal-open");
|
|
3250
|
-
}),
|
|
3252
|
+
}), Ne(() => {
|
|
3251
3253
|
document.body.classList.remove("lookup-modal-open");
|
|
3252
3254
|
}), () => {
|
|
3253
3255
|
let m;
|
|
3254
|
-
return L(
|
|
3255
|
-
default: () => [b() && e.showNavigation && !
|
|
3256
|
+
return L(ln, null, {
|
|
3257
|
+
default: () => [b() && e.showNavigation && !je() && L(rt, {
|
|
3256
3258
|
position: "left",
|
|
3257
|
-
width:
|
|
3258
|
-
minWidth:
|
|
3259
|
-
},
|
|
3259
|
+
width: M == null ? void 0 : M.width,
|
|
3260
|
+
minWidth: M == null ? void 0 : M.minWidth
|
|
3261
|
+
}, Wn(m = v()) ? m : {
|
|
3260
3262
|
default: () => [m]
|
|
3261
3263
|
}), L(rt, {
|
|
3262
3264
|
position: "center"
|
|
@@ -3271,7 +3273,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3271
3273
|
});
|
|
3272
3274
|
};
|
|
3273
3275
|
}
|
|
3274
|
-
}),
|
|
3276
|
+
}), Hn = {
|
|
3275
3277
|
multiSelect: { type: Boolean, default: !1 },
|
|
3276
3278
|
idField: { type: String, default: "id" },
|
|
3277
3279
|
displayType: { type: String, default: "list" },
|
|
@@ -3279,52 +3281,52 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3279
3281
|
showSelections: { type: Boolean, default: !1 },
|
|
3280
3282
|
treeToList: { type: Boolean, default: !1 },
|
|
3281
3283
|
enableFavorite: { type: Boolean, default: !0 }
|
|
3282
|
-
},
|
|
3284
|
+
}, Jn = /* @__PURE__ */ Te({
|
|
3283
3285
|
name: "FLookupFavorite",
|
|
3284
|
-
props:
|
|
3286
|
+
props: Hn,
|
|
3285
3287
|
emits: ["dblClickRow"],
|
|
3286
3288
|
setup(e, a) {
|
|
3287
|
-
const t =
|
|
3289
|
+
const t = X(Ae), {
|
|
3288
3290
|
userDataState: n,
|
|
3289
3291
|
getFavoriteData: o
|
|
3290
|
-
} =
|
|
3292
|
+
} = X(He), i = X(Oe, N(pe.dataList)), s = X(Ee), u = X(we), {
|
|
3291
3293
|
lookupStates: l,
|
|
3292
3294
|
expandAllNodes: c
|
|
3293
|
-
} = u, d =
|
|
3295
|
+
} = u, d = Je(l.lookupOptions), p = J(() => l.lookupOptions.idField || "id"), b = N(e.selectedIds), {
|
|
3294
3296
|
setColumns: w,
|
|
3295
|
-
removeFavoriteItem:
|
|
3297
|
+
removeFavoriteItem: C
|
|
3296
3298
|
} = tt(e, p.value), {
|
|
3297
3299
|
isTreeList: v
|
|
3298
|
-
} =
|
|
3300
|
+
} = Pe(e, l), {
|
|
3299
3301
|
updateSelections: f,
|
|
3300
3302
|
unSelectTreeNode: r,
|
|
3301
3303
|
selectTreeNodes: g
|
|
3302
|
-
} = s,
|
|
3304
|
+
} = s, S = N(), F = N(), x = J(() => v() ? F.value : S.value);
|
|
3303
3305
|
nt(e, x, l);
|
|
3304
3306
|
function O() {
|
|
3305
3307
|
return n.data && n.data.favorites && n.data.favorites.length;
|
|
3306
3308
|
}
|
|
3307
|
-
function y(
|
|
3308
|
-
x.value.clearSelection(),
|
|
3309
|
+
function y(j) {
|
|
3310
|
+
x.value.clearSelection(), j && j.length && x.value.selectItemByIds(j);
|
|
3309
3311
|
}
|
|
3310
|
-
q(() => e.selectedIds, (
|
|
3311
|
-
JSON.stringify(
|
|
3312
|
+
q(() => e.selectedIds, (j, h) => {
|
|
3313
|
+
JSON.stringify(j) !== JSON.stringify(h) && (b.value = j, b.value.length ? y(b.value) : x.value.clearSelection());
|
|
3312
3314
|
});
|
|
3313
|
-
function
|
|
3314
|
-
h && h.length && w(x.value, h, v()),
|
|
3315
|
+
function M(j, h) {
|
|
3316
|
+
h && h.length && w(x.value, h, v()), j && (v() && (j = c(j)), x.value.updateDataSource(j || [])), y(b.value || []);
|
|
3315
3317
|
}
|
|
3316
3318
|
function G() {
|
|
3317
|
-
o().then((
|
|
3318
|
-
|
|
3319
|
+
o().then((j) => {
|
|
3320
|
+
j ? M(j.items || [], j.columns) : M([], null);
|
|
3319
3321
|
});
|
|
3320
3322
|
}
|
|
3321
|
-
q(() => i.value, (
|
|
3322
|
-
var
|
|
3323
|
-
|
|
3324
|
-
}), q(() =>
|
|
3325
|
-
i.value === pe.favorite &&
|
|
3323
|
+
q(() => i.value, (j, h) => {
|
|
3324
|
+
var k;
|
|
3325
|
+
j === pe.favorite && (O() ? G() : M([], (k = l.lookupState) == null ? void 0 : k.columns));
|
|
3326
|
+
}), q(() => C.value, (j, h) => {
|
|
3327
|
+
i.value === pe.favorite && j && (v() ? G() : M(n.favoriteItems || [], null), C.value = !1);
|
|
3326
3328
|
});
|
|
3327
|
-
const
|
|
3329
|
+
const $ = {
|
|
3328
3330
|
fitColumns: !0,
|
|
3329
3331
|
fitMode: "percentage",
|
|
3330
3332
|
resizeColumn: !0
|
|
@@ -3334,21 +3336,21 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3334
3336
|
showCheckbox: e.multiSelect,
|
|
3335
3337
|
multiSelectMode: "OnCheckAndClick"
|
|
3336
3338
|
};
|
|
3337
|
-
function m(
|
|
3338
|
-
v() ? g(
|
|
3339
|
+
function m(j) {
|
|
3340
|
+
v() ? g(j) : f(j);
|
|
3339
3341
|
}
|
|
3340
|
-
function I(
|
|
3341
|
-
v() ? r(
|
|
3342
|
+
function I(j) {
|
|
3343
|
+
v() ? r(j) : f(j == null ? void 0 : j.raw, !1);
|
|
3342
3344
|
}
|
|
3343
|
-
function T(
|
|
3345
|
+
function T(j, h) {
|
|
3344
3346
|
e.multiSelect || (f([h]), a.emit("dblClickRow", {
|
|
3345
3347
|
items: [h]
|
|
3346
3348
|
}));
|
|
3347
3349
|
}
|
|
3348
|
-
function j
|
|
3350
|
+
function W(j) {
|
|
3349
3351
|
const {
|
|
3350
3352
|
node: h
|
|
3351
|
-
} =
|
|
3353
|
+
} = j;
|
|
3352
3354
|
e.multiSelect || (f([h]), a.emit("dblClickRow", {
|
|
3353
3355
|
items: [h]
|
|
3354
3356
|
}));
|
|
@@ -3361,26 +3363,26 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3361
3363
|
rowNumber: {
|
|
3362
3364
|
enable: !1
|
|
3363
3365
|
},
|
|
3364
|
-
columnOption:
|
|
3366
|
+
columnOption: $,
|
|
3365
3367
|
selection: B,
|
|
3366
3368
|
showBorder: !0,
|
|
3367
3369
|
virtualized: !0,
|
|
3368
3370
|
rowOption: t,
|
|
3369
3371
|
onSelectionUpdate: m,
|
|
3370
3372
|
onUnSelectItem: I,
|
|
3371
|
-
onDblclickNode:
|
|
3373
|
+
onDblclickNode: W
|
|
3372
3374
|
}, null);
|
|
3373
3375
|
}
|
|
3374
|
-
function
|
|
3375
|
-
return L(
|
|
3376
|
-
ref:
|
|
3376
|
+
function le() {
|
|
3377
|
+
return L(Ge, {
|
|
3378
|
+
ref: S,
|
|
3377
3379
|
pagination: {
|
|
3378
3380
|
enable: !1
|
|
3379
3381
|
},
|
|
3380
3382
|
summary: {
|
|
3381
3383
|
enable: !1
|
|
3382
3384
|
},
|
|
3383
|
-
columnOption:
|
|
3385
|
+
columnOption: $,
|
|
3384
3386
|
idField: p.value,
|
|
3385
3387
|
rowNumber: {
|
|
3386
3388
|
enable: !1
|
|
@@ -3395,9 +3397,9 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3395
3397
|
onDoubleClickRow: T
|
|
3396
3398
|
}, null);
|
|
3397
3399
|
}
|
|
3398
|
-
return () => v() ? ie() :
|
|
3400
|
+
return () => v() ? ie() : le();
|
|
3399
3401
|
}
|
|
3400
|
-
}),
|
|
3402
|
+
}), Qn = {
|
|
3401
3403
|
id: { type: String },
|
|
3402
3404
|
title: { type: String },
|
|
3403
3405
|
height: { type: Number, default: 50 },
|
|
@@ -3412,25 +3414,25 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3412
3414
|
showCascadeControl: { type: Boolean, default: !1 },
|
|
3413
3415
|
isMaximized: { type: Boolean, default: !1 },
|
|
3414
3416
|
locales: { type: Object, default: {} }
|
|
3415
|
-
},
|
|
3417
|
+
}, Xn = {
|
|
3416
3418
|
idField: { type: String, default: "id" },
|
|
3417
3419
|
parentRef: { type: Object, default: null },
|
|
3418
3420
|
popoverOffsetX: { type: Number, default: 0 }
|
|
3419
|
-
},
|
|
3420
|
-
props:
|
|
3421
|
+
}, Yn = /* @__PURE__ */ Te({
|
|
3422
|
+
props: Xn,
|
|
3421
3423
|
setup(e, a) {
|
|
3422
|
-
const t =
|
|
3424
|
+
const t = X("FMessageBoxService"), n = X(Ee), o = X(we), {
|
|
3423
3425
|
lookupState: i,
|
|
3424
3426
|
selectionState: s
|
|
3425
|
-
} = o.lookupStates, u =
|
|
3427
|
+
} = o.lookupStates, u = X(Le), {
|
|
3426
3428
|
clearSelections: l,
|
|
3427
3429
|
unSelectionsByIds: c
|
|
3428
3430
|
} = n, d = N(), p = J(() => d), b = N(), w = N(e.popoverOffsetX || -15);
|
|
3429
3431
|
q(() => e.popoverOffsetX, (I) => {
|
|
3430
3432
|
w.value = I;
|
|
3431
3433
|
});
|
|
3432
|
-
const
|
|
3433
|
-
function r(I, T,
|
|
3434
|
+
const C = J(() => w.value === -15 ? 10 : 100), v = N(e.parentRef), f = "_remove_selected_";
|
|
3435
|
+
function r(I, T, W) {
|
|
3434
3436
|
I.stopPropagation();
|
|
3435
3437
|
const ie = T.raw[e.idField];
|
|
3436
3438
|
c(ie);
|
|
@@ -3443,14 +3445,14 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3443
3445
|
align: "center",
|
|
3444
3446
|
formatter: (I, T) => L("button", {
|
|
3445
3447
|
type: "button",
|
|
3446
|
-
onClick: (
|
|
3447
|
-
r(
|
|
3448
|
+
onClick: (W) => {
|
|
3449
|
+
r(W, T);
|
|
3448
3450
|
},
|
|
3449
3451
|
class: "btn btn-link f-icon f-icon-x p-0",
|
|
3450
3452
|
style: "color: #dd2438;"
|
|
3451
3453
|
}, null)
|
|
3452
|
-
},
|
|
3453
|
-
const I =
|
|
3454
|
+
}, S = J(() => {
|
|
3455
|
+
const I = Ve((i == null ? void 0 : i.columns) || []);
|
|
3454
3456
|
if (I.length)
|
|
3455
3457
|
return I.push(g), I;
|
|
3456
3458
|
});
|
|
@@ -3472,27 +3474,27 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3472
3474
|
height: "0px"
|
|
3473
3475
|
});
|
|
3474
3476
|
let y;
|
|
3475
|
-
function
|
|
3476
|
-
var
|
|
3477
|
-
const I = ((
|
|
3477
|
+
function M() {
|
|
3478
|
+
var le, j;
|
|
3479
|
+
const I = ((le = v.value) == null ? void 0 : le.offsetHeight) - 100, T = 200, W = s.value.length * 28 + 60, ie = W > I ? I : W < T ? T : W;
|
|
3478
3480
|
O.value = {
|
|
3479
|
-
width: ((
|
|
3481
|
+
width: ((j = v.value) == null ? void 0 : j.offsetWidth) - 20 + "px",
|
|
3480
3482
|
height: ie + "px"
|
|
3481
3483
|
};
|
|
3482
3484
|
}
|
|
3483
3485
|
q(() => b.value, (I) => {
|
|
3484
|
-
I && (I.updateColumns(
|
|
3486
|
+
I && (I.updateColumns(S.value), I.updateDataSource(Ve(s.value || [])), M());
|
|
3485
3487
|
}), q(() => s.value, (I) => {
|
|
3486
3488
|
var T;
|
|
3487
|
-
(T = b.value) == null || T.updateDataSource(
|
|
3489
|
+
(T = b.value) == null || T.updateDataSource(Ve(I || []), {
|
|
3488
3490
|
keepScrollTop: !0
|
|
3489
3491
|
});
|
|
3490
3492
|
}), q(() => v.value, (I) => {
|
|
3491
3493
|
y = new ResizeObserver(() => {
|
|
3492
|
-
v.value &&
|
|
3494
|
+
v.value && M();
|
|
3493
3495
|
}), y.observe(v.value);
|
|
3494
3496
|
});
|
|
3495
|
-
const G = J(() => (s.value || []).length > 0),
|
|
3497
|
+
const G = J(() => (s.value || []).length > 0), $ = J(() => ({
|
|
3496
3498
|
display: "flex",
|
|
3497
3499
|
"align-items": "center",
|
|
3498
3500
|
opacity: G.value ? 1 : 0.4,
|
|
@@ -3505,9 +3507,9 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3505
3507
|
l();
|
|
3506
3508
|
});
|
|
3507
3509
|
}
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
}),
|
|
3510
|
+
ke(() => {
|
|
3511
|
+
M();
|
|
3512
|
+
}), Ne(() => {
|
|
3511
3513
|
y && v.value && y.unobserve(v.value);
|
|
3512
3514
|
});
|
|
3513
3515
|
function m() {
|
|
@@ -3520,19 +3522,19 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3520
3522
|
class: "d-flex flex-row align-items-center",
|
|
3521
3523
|
style: "line-height:24px"
|
|
3522
3524
|
}, [Ze(L("div", {
|
|
3523
|
-
style:
|
|
3525
|
+
style: $.value,
|
|
3524
3526
|
innerHTML: u.buttons.selectionTotal(s.value.length)
|
|
3525
|
-
}, null), [[
|
|
3527
|
+
}, null), [[jt("popover"), p.value, "toggle"]]), G.value && L("button", {
|
|
3526
3528
|
class: "btn btn-link btn-sm p-0 pl-2",
|
|
3527
3529
|
style: "line-height:24px",
|
|
3528
3530
|
onClick: B
|
|
3529
|
-
}, [u.buttons.clear])]), L(
|
|
3531
|
+
}, [u.buttons.clear])]), L(un, {
|
|
3530
3532
|
id: "lookup-selected-popover",
|
|
3531
3533
|
customStyles: {
|
|
3532
3534
|
filter: "drop-shadow(#c5c5c5 0px 0px 6px)"
|
|
3533
3535
|
},
|
|
3534
3536
|
offsetX: w.value,
|
|
3535
|
-
arrowOffsetX:
|
|
3537
|
+
arrowOffsetX: C.value,
|
|
3536
3538
|
ref: d,
|
|
3537
3539
|
placement: "top-left",
|
|
3538
3540
|
keepWidthWithReference: !1,
|
|
@@ -3542,7 +3544,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3542
3544
|
var I;
|
|
3543
3545
|
return [L("div", {
|
|
3544
3546
|
style: O.value
|
|
3545
|
-
}, [((I = d.value) == null ? void 0 : I.isShow) && L(
|
|
3547
|
+
}, [((I = d.value) == null ? void 0 : I.isShow) && L(Ge, {
|
|
3546
3548
|
ref: b,
|
|
3547
3549
|
pagination: {
|
|
3548
3550
|
enable: !1
|
|
@@ -3563,7 +3565,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3563
3565
|
}
|
|
3564
3566
|
})]);
|
|
3565
3567
|
}
|
|
3566
|
-
}),
|
|
3568
|
+
}), Zn = /* @__PURE__ */ Te({
|
|
3567
3569
|
props: {
|
|
3568
3570
|
modelValue: {
|
|
3569
3571
|
type: Boolean,
|
|
@@ -3594,12 +3596,12 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3594
3596
|
style: "padding-left: 1.2rem;"
|
|
3595
3597
|
}, [e.label])]);
|
|
3596
3598
|
}
|
|
3597
|
-
}),
|
|
3599
|
+
}), Kn = /* @__PURE__ */ Te({
|
|
3598
3600
|
name: "FLookupCascadeSelector",
|
|
3599
3601
|
props: ["modelValue"],
|
|
3600
3602
|
emits: ["update:modelValue"],
|
|
3601
3603
|
setup(e, a) {
|
|
3602
|
-
const t =
|
|
3604
|
+
const t = X(Le), n = N(), o = N(e.modelValue);
|
|
3603
3605
|
return q(() => o.value, (i, s) => {
|
|
3604
3606
|
i !== s && a.emit("update:modelValue", i);
|
|
3605
3607
|
}), Xe.forEach((i) => {
|
|
@@ -3620,23 +3622,23 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3620
3622
|
placement: "top-left"
|
|
3621
3623
|
}, null)]);
|
|
3622
3624
|
}
|
|
3623
|
-
}),
|
|
3625
|
+
}), ea = /* @__PURE__ */ Te({
|
|
3624
3626
|
name: "FLookupModalContainer",
|
|
3625
|
-
props:
|
|
3627
|
+
props: Qn,
|
|
3626
3628
|
emits: ["closeModal", "maximize"],
|
|
3627
3629
|
setup(e, a) {
|
|
3628
3630
|
const t = N(pe.dataList);
|
|
3629
|
-
Se(
|
|
3631
|
+
Se(Oe, t), Se(we, e.useHttpComposition), Se(He, e.userDataService), Se(Ee, e.selectionsManager), Se(Le, e.locales);
|
|
3630
3632
|
const {
|
|
3631
3633
|
tabs: n,
|
|
3632
3634
|
buttons: o,
|
|
3633
3635
|
tree: i
|
|
3634
|
-
} = e.locales, s =
|
|
3636
|
+
} = e.locales, s = ye(e.showIncludeChildNodes), u = N(s.value), {
|
|
3635
3637
|
lookupOptions: l
|
|
3636
3638
|
} = e.useHttpComposition.lookupStates, c = l.dialog, d = J(() => l.displayType.toUpperCase() === ve.TreeList), p = Nt(l, d.value);
|
|
3637
|
-
Se(
|
|
3639
|
+
Se(Ae, p);
|
|
3638
3640
|
const b = N(e.isMaximized);
|
|
3639
|
-
q(() => e.isMaximized, (T,
|
|
3641
|
+
q(() => e.isMaximized, (T, W) => {
|
|
3640
3642
|
b.value = T;
|
|
3641
3643
|
});
|
|
3642
3644
|
const w = J(() => ({
|
|
@@ -3645,10 +3647,10 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3645
3647
|
modalrevert: b.value
|
|
3646
3648
|
}));
|
|
3647
3649
|
N();
|
|
3648
|
-
const
|
|
3649
|
-
q(() => u.value, (T,
|
|
3650
|
+
const C = J(() => s.show && t.value === pe.dataList && l.displayType && d.value && !je()), v = J(() => C.value ? -99 : -15);
|
|
3651
|
+
q(() => u.value, (T, W) => {
|
|
3650
3652
|
e.useHttpComposition.updateIncludeChilds(T);
|
|
3651
|
-
}), q(() => e.showIncludeChildNodes, (T,
|
|
3653
|
+
}), q(() => e.showIncludeChildNodes, (T, W) => {
|
|
3652
3654
|
s.value = T, e.useHttpComposition.updateIncludeChilds(T.value);
|
|
3653
3655
|
});
|
|
3654
3656
|
const {
|
|
@@ -3656,7 +3658,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3656
3658
|
} = e.userDataService, {
|
|
3657
3659
|
cancelDialog: r,
|
|
3658
3660
|
submitDialog: g
|
|
3659
|
-
} = e.useDialog,
|
|
3661
|
+
} = e.useDialog, S = N(), F = N();
|
|
3660
3662
|
function x(T) {
|
|
3661
3663
|
a.emit("maximize", T);
|
|
3662
3664
|
}
|
|
@@ -3666,13 +3668,13 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3666
3668
|
async function y(T) {
|
|
3667
3669
|
await g() && O(T);
|
|
3668
3670
|
}
|
|
3669
|
-
async function
|
|
3671
|
+
async function M(T) {
|
|
3670
3672
|
await r() && O(T);
|
|
3671
3673
|
}
|
|
3672
3674
|
function G(T) {
|
|
3673
3675
|
t.value = T, f.data.tabIndex = T;
|
|
3674
3676
|
}
|
|
3675
|
-
const
|
|
3677
|
+
const $ = J(() => ({
|
|
3676
3678
|
transform: `translate3d(${t.value === pe.favorite ? 84 : 0}px, 0px, 0px)`
|
|
3677
3679
|
})), B = J(() => (T) => ({
|
|
3678
3680
|
visibility: t.value === T ? "visible" : "hidden",
|
|
@@ -3681,7 +3683,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3681
3683
|
transition: "all 0.3s ease-in",
|
|
3682
3684
|
opacity: t.value === T ? 1 : 0
|
|
3683
3685
|
})), m = J(() => {
|
|
3684
|
-
const T = e.enableFavorite ? "50%" : "100%",
|
|
3686
|
+
const T = e.enableFavorite ? "50%" : "100%", W = e.enableFavorite ? 100 : 80, ie = c.showMaxButton || c.showCloseButton ? W : 0;
|
|
3685
3687
|
return {
|
|
3686
3688
|
maxWidth: `calc(${T} - ${ie}px)`
|
|
3687
3689
|
};
|
|
@@ -3689,12 +3691,12 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3689
3691
|
function I(T) {
|
|
3690
3692
|
T.stopPropagation(), document.body.click();
|
|
3691
3693
|
}
|
|
3692
|
-
return
|
|
3694
|
+
return ke(() => {
|
|
3693
3695
|
var T;
|
|
3694
|
-
f.data.favorites && f.data.favorites.length && (t.value = ((T = f.data) == null ? void 0 : T.tabIndex) || pe.dataList),
|
|
3696
|
+
f.data.favorites && f.data.favorites.length && (t.value = ((T = f.data) == null ? void 0 : T.tabIndex) || pe.dataList), C.value && e.useHttpComposition.updateIncludeChilds(u.value);
|
|
3695
3697
|
}), () => L("div", {
|
|
3696
3698
|
class: "d-flex flex-column h-100 lookup-modal",
|
|
3697
|
-
ref:
|
|
3699
|
+
ref: S
|
|
3698
3700
|
}, [L("div", {
|
|
3699
3701
|
class: "d-flex justify-content-between align-items-center px-3 lookup-modal-header"
|
|
3700
3702
|
}, [L("div", {
|
|
@@ -3708,7 +3710,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3708
3710
|
onMousedown: I
|
|
3709
3711
|
}, [L("div", {
|
|
3710
3712
|
class: "active-tab",
|
|
3711
|
-
style:
|
|
3713
|
+
style: $.value
|
|
3712
3714
|
}, null), L("div", {
|
|
3713
3715
|
class: ["tab-item", "d-flex", {
|
|
3714
3716
|
active: t.value === pe.dataList
|
|
@@ -3722,7 +3724,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3722
3724
|
}, [n.favorite])])]), (c.showMaxButton || c.showCloseButton) && L("div", {
|
|
3723
3725
|
class: "d-flex flex-row h-100 justify-content-end align-items-center lookup-modal-header-buttons",
|
|
3724
3726
|
onMousedown: (T) => T.stopPropagation()
|
|
3725
|
-
}, [c.showMaxButton && !
|
|
3727
|
+
}, [c.showMaxButton && !je() && L("span", {
|
|
3726
3728
|
class: w.value,
|
|
3727
3729
|
onClick: x,
|
|
3728
3730
|
style: "cursor: pointer"
|
|
@@ -3743,16 +3745,16 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3743
3745
|
class: "modal-footer"
|
|
3744
3746
|
}, [L("div", {
|
|
3745
3747
|
class: "f-utils-fill align-items-center d-flex flex-row"
|
|
3746
|
-
}, [
|
|
3748
|
+
}, [C.value && L(Zn, {
|
|
3747
3749
|
modelValue: u.value,
|
|
3748
3750
|
"onUpdate:modelValue": (T) => u.value = T,
|
|
3749
3751
|
label: i.includechildren
|
|
3750
|
-
}, null), e.showSelectedList && L(
|
|
3752
|
+
}, null), e.showSelectedList && L(Yn, {
|
|
3751
3753
|
popoverOffsetX: v.value,
|
|
3752
|
-
parentRef:
|
|
3754
|
+
parentRef: S.value,
|
|
3753
3755
|
ref: F,
|
|
3754
3756
|
idField: l.idField
|
|
3755
|
-
}, null), e.showCascadeControl && t.value === pe.dataList && L(
|
|
3757
|
+
}, null), e.showCascadeControl && t.value === pe.dataList && L(Kn, {
|
|
3756
3758
|
modelValue: l.cascadeValue,
|
|
3757
3759
|
"onUpdate:modelValue": (T) => l.cascadeValue = T
|
|
3758
3760
|
}, null)]), L("button", {
|
|
@@ -3760,7 +3762,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3760
3762
|
name: "cancel",
|
|
3761
3763
|
type: "button",
|
|
3762
3764
|
class: "btn btn-secondary",
|
|
3763
|
-
onClick:
|
|
3765
|
+
onClick: M
|
|
3764
3766
|
}, [o.cancel]), L("button", {
|
|
3765
3767
|
id: e.id + "-btnok",
|
|
3766
3768
|
name: "accept",
|
|
@@ -3770,7 +3772,7 @@ const Wn = /* @__PURE__ */ Te({
|
|
|
3770
3772
|
}, [o.ok])])]);
|
|
3771
3773
|
}
|
|
3772
3774
|
});
|
|
3773
|
-
function
|
|
3775
|
+
function We(e, a) {
|
|
3774
3776
|
if (e.context) {
|
|
3775
3777
|
if (!a && e.context.editor) {
|
|
3776
3778
|
for (const n in e.context.editor)
|
|
@@ -3781,7 +3783,7 @@ function je(e, a) {
|
|
|
3781
3783
|
t ? Object.assign(t, a) : e.context.editor = a;
|
|
3782
3784
|
}
|
|
3783
3785
|
}
|
|
3784
|
-
function
|
|
3786
|
+
function ta(e, a, t, {
|
|
3785
3787
|
dictPicked: n,
|
|
3786
3788
|
modelValue: o,
|
|
3787
3789
|
buttonEditInstance: i,
|
|
@@ -3789,26 +3791,26 @@ function ea(e, a, t, {
|
|
|
3789
3791
|
useHttp: u,
|
|
3790
3792
|
lookupLocales: l
|
|
3791
3793
|
}) {
|
|
3792
|
-
const c =
|
|
3794
|
+
const c = X(Ke, null), d = X("FLoadingService"), p = N(), b = N(
|
|
3793
3795
|
"accept"
|
|
3794
3796
|
/* accept */
|
|
3795
|
-
), w = N(), { lookupStates:
|
|
3797
|
+
), w = N(), { lookupStates: C } = u, { queryState: v, lookupState: f, navigationState: r, pageInfoState: g, searchState: S, selectionState: F, lookupOptions: x } = C, { isDoubleList: O } = Pe(e, C), y = Object.assign({}, Sn, x.dialog);
|
|
3796
3798
|
x.dialog = y;
|
|
3797
|
-
const
|
|
3798
|
-
const
|
|
3799
|
-
o.value =
|
|
3799
|
+
const M = { position: "top-center" }, G = () => {
|
|
3800
|
+
const E = t.value.map((P) => ze(P, x.textField)).join(e.separator), U = t.value.map((P) => P[x.idField]).join(e.separator);
|
|
3801
|
+
o.value = E, u.idValues.value = U, a.emit("update:modelValue", E), a.emit("update:idValue", U);
|
|
3800
3802
|
};
|
|
3801
|
-
function
|
|
3802
|
-
return typeof
|
|
3803
|
-
shouldClose:
|
|
3804
|
-
message:
|
|
3805
|
-
} : { shouldClose:
|
|
3803
|
+
function $(E) {
|
|
3804
|
+
return typeof E == "object" ? {
|
|
3805
|
+
shouldClose: E.closeDialog || E.canClose,
|
|
3806
|
+
message: E.message
|
|
3807
|
+
} : { shouldClose: E, message: "" };
|
|
3806
3808
|
}
|
|
3807
3809
|
const B = async () => {
|
|
3808
|
-
const
|
|
3809
|
-
a.emit("update:dataMapping",
|
|
3810
|
-
const
|
|
3811
|
-
return
|
|
3810
|
+
const E = { items: t.value, mappingFields: x.mappingFields, options: { ...x } };
|
|
3811
|
+
a.emit("update:dataMapping", E), We(e, E);
|
|
3812
|
+
const U = await n(E);
|
|
3813
|
+
return $(U);
|
|
3812
3814
|
};
|
|
3813
3815
|
async function m() {
|
|
3814
3816
|
return G(), await B();
|
|
@@ -3816,148 +3818,152 @@ function ea(e, a, t, {
|
|
|
3816
3818
|
function I() {
|
|
3817
3819
|
return b.value = "cancel", !0;
|
|
3818
3820
|
}
|
|
3819
|
-
const T = (
|
|
3820
|
-
Object.keys(
|
|
3821
|
-
delete
|
|
3821
|
+
const T = (E) => {
|
|
3822
|
+
Object.keys(E).forEach((U) => {
|
|
3823
|
+
delete E[U];
|
|
3822
3824
|
});
|
|
3823
|
-
},
|
|
3824
|
-
|
|
3825
|
-
T(
|
|
3825
|
+
}, W = (E) => {
|
|
3826
|
+
E.forEach((U) => {
|
|
3827
|
+
T(U);
|
|
3826
3828
|
});
|
|
3827
3829
|
};
|
|
3828
3830
|
function ie() {
|
|
3829
|
-
document.body.classList.remove("lookup-modal-open"), d == null || d.clearAll(),
|
|
3831
|
+
document.body.classList.remove("lookup-modal-open"), d == null || d.clearAll(), W([f, r, g, S, v]), F.value = [], w.value = null, v.value = null;
|
|
3830
3832
|
}
|
|
3831
|
-
async function
|
|
3832
|
-
var
|
|
3833
|
+
async function le() {
|
|
3834
|
+
var U;
|
|
3833
3835
|
if (t.value.length === 0)
|
|
3834
|
-
return c == null || c.warning({ message: l.messages.mustChoosAdatarow, ...
|
|
3835
|
-
const
|
|
3836
|
+
return c == null || c.warning({ message: l.messages.mustChoosAdatarow, ...M }), { shouldUpdate: !1 };
|
|
3837
|
+
const E = await ((U = e.beforeSelectData) == null ? void 0 : U.call(e, { items: t.value }));
|
|
3836
3838
|
return {
|
|
3837
|
-
shouldUpdate: typeof
|
|
3838
|
-
message:
|
|
3839
|
+
shouldUpdate: typeof E == "boolean" ? E : (E == null ? void 0 : E.canSelect) ?? !0,
|
|
3840
|
+
message: E == null ? void 0 : E.message
|
|
3839
3841
|
};
|
|
3840
3842
|
}
|
|
3841
|
-
async function
|
|
3842
|
-
const { shouldUpdate:
|
|
3843
|
-
if (!
|
|
3844
|
-
return
|
|
3845
|
-
const
|
|
3846
|
-
return
|
|
3843
|
+
async function j() {
|
|
3844
|
+
const { shouldUpdate: E, message: U } = await le();
|
|
3845
|
+
if (!E)
|
|
3846
|
+
return U && (c == null || c.warning({ message: U, ...M })), !1;
|
|
3847
|
+
const P = await m(), { shouldClose: z, message: ne } = P;
|
|
3848
|
+
return z ? (b.value = "accept", !0) : (ne && (c == null || c.warning({ message: ne, ...M })), !1);
|
|
3847
3849
|
}
|
|
3848
3850
|
function h() {
|
|
3849
|
-
const
|
|
3850
|
-
height:
|
|
3851
|
-
width:
|
|
3852
|
-
minWidth:
|
|
3853
|
-
minHeight:
|
|
3851
|
+
const E = (y == null ? void 0 : y.height) || 620, U = (y == null ? void 0 : y.width) || 590, P = (y == null ? void 0 : y.minWidth) || 300, z = (y == null ? void 0 : y.minHeight) || 200, ne = {
|
|
3852
|
+
height: E,
|
|
3853
|
+
width: U,
|
|
3854
|
+
minWidth: P,
|
|
3855
|
+
minHeight: z
|
|
3854
3856
|
};
|
|
3855
|
-
return O() && (
|
|
3857
|
+
return O() && (ne.width = (y == null ? void 0 : y.width) || 960), ne;
|
|
3856
3858
|
}
|
|
3857
|
-
const { width:
|
|
3859
|
+
const { width: k, height: V, minHeight: R, minWidth: te } = h(), Y = !0, ae = Y && ((y == null ? void 0 : y.resizeable) == null ? !0 : y == null ? void 0 : y.resizeable);
|
|
3858
3860
|
y.rememberSize = y.rememberSize && ae;
|
|
3859
|
-
const
|
|
3861
|
+
const Q = async (E) => {
|
|
3862
|
+
if (ie(), a.emit("dialogClosed", E), x.onDialogClosed)
|
|
3863
|
+
return new Promise((U) => {
|
|
3864
|
+
});
|
|
3865
|
+
}, re = {
|
|
3860
3866
|
title: y == null ? void 0 : y.title,
|
|
3861
3867
|
fitContent: !1,
|
|
3862
3868
|
showHeader: !1,
|
|
3863
3869
|
dragHandle: ".lookup-modal-header",
|
|
3864
|
-
height:
|
|
3865
|
-
width:
|
|
3866
|
-
minWidth:
|
|
3867
|
-
minHeight:
|
|
3870
|
+
height: V,
|
|
3871
|
+
width: k,
|
|
3872
|
+
minWidth: te,
|
|
3873
|
+
minHeight: R,
|
|
3868
3874
|
resizeable: ae,
|
|
3869
|
-
draggable:
|
|
3875
|
+
draggable: Y,
|
|
3870
3876
|
enableEsc: (y == null ? void 0 : y.enableEsc) == null ? !0 : y == null ? void 0 : y.enableEsc,
|
|
3871
3877
|
fullscreen: (y == null ? void 0 : y.fullscreen) == null ? !1 : y == null ? void 0 : y.fullscreen,
|
|
3872
|
-
closedCallback: (
|
|
3873
|
-
const
|
|
3874
|
-
if ((
|
|
3878
|
+
closedCallback: (E, U) => {
|
|
3879
|
+
const P = { type: b.value, button: E == null ? void 0 : E.target };
|
|
3880
|
+
if ((U === "esc" || U === "icon") && (P.type = "esc"), P.type === "accept" && (P.items = t.value), (P.type === "cancel" || P.type === "esc") && (e.allowFreeInput || (o.value = e.modelValue)), s && e.enableUserData) {
|
|
3875
3881
|
s.saveUserData().then(() => {
|
|
3876
|
-
|
|
3882
|
+
Q(P);
|
|
3877
3883
|
});
|
|
3878
3884
|
return;
|
|
3879
3885
|
}
|
|
3880
|
-
|
|
3886
|
+
Q(P);
|
|
3881
3887
|
},
|
|
3882
3888
|
showButtons: !1,
|
|
3883
|
-
resizeHandle: (
|
|
3889
|
+
resizeHandle: (E) => {
|
|
3884
3890
|
if (y.rememberSize) {
|
|
3885
|
-
p.value =
|
|
3886
|
-
const { width:
|
|
3887
|
-
!(
|
|
3891
|
+
p.value = E;
|
|
3892
|
+
const { width: U, height: P } = E.newSize.size;
|
|
3893
|
+
!(E.isMaximized ?? !1) && s.setDialogSize({ width: Math.round(U), height: Math.round(P) });
|
|
3888
3894
|
}
|
|
3889
3895
|
},
|
|
3890
3896
|
enableEnter: !0,
|
|
3891
|
-
onEnter: (
|
|
3892
|
-
|
|
3893
|
-
var
|
|
3894
|
-
if (
|
|
3895
|
-
const
|
|
3896
|
-
|
|
3897
|
+
onEnter: (E) => {
|
|
3898
|
+
E.event.preventDefault(), !E.event.target.closest(".fv-lookup-search-bar") && j().then((P) => {
|
|
3899
|
+
var z;
|
|
3900
|
+
if (P) {
|
|
3901
|
+
const ne = (z = i.value) == null ? void 0 : z.getModal();
|
|
3902
|
+
ne && ne.close(E.event, "enter");
|
|
3897
3903
|
}
|
|
3898
3904
|
});
|
|
3899
3905
|
}
|
|
3900
3906
|
};
|
|
3901
|
-
async function
|
|
3902
|
-
var
|
|
3903
|
-
if (e.enableUserData && e.openType === "Modal" && (await s.getUserData(), (
|
|
3904
|
-
const { size:
|
|
3905
|
-
|
|
3907
|
+
async function ue() {
|
|
3908
|
+
var E;
|
|
3909
|
+
if (e.enableUserData && e.openType === "Modal" && (await s.getUserData(), (E = s == null ? void 0 : s.userDataState) != null && E.data && y.rememberSize)) {
|
|
3910
|
+
const { size: U } = s.userDataState.data;
|
|
3911
|
+
U && Object.assign(re, U);
|
|
3906
3912
|
}
|
|
3907
3913
|
}
|
|
3908
|
-
async function
|
|
3909
|
-
let
|
|
3910
|
-
const
|
|
3911
|
-
if (
|
|
3912
|
-
const
|
|
3913
|
-
typeof
|
|
3914
|
+
async function H(E) {
|
|
3915
|
+
let U = !0;
|
|
3916
|
+
const P = e.dictPicking;
|
|
3917
|
+
if (P && typeof P == "function") {
|
|
3918
|
+
const z = await P({ customData: w, options: x, idValue: u.idValues, instance: C.compatInstance });
|
|
3919
|
+
typeof z == "boolean" && !z && (U = !1), typeof z == "object" && (z.canOpen ? z.data && (w.value = z.data) : (U = !1, z.message && (c == null || c.error({ message: z.message, position: "top-center" }))));
|
|
3914
3920
|
}
|
|
3915
|
-
return
|
|
3921
|
+
return U && await ue(), U;
|
|
3916
3922
|
}
|
|
3917
3923
|
return {
|
|
3918
|
-
modalOptions:
|
|
3919
|
-
beforeOpenDialog:
|
|
3924
|
+
modalOptions: re,
|
|
3925
|
+
beforeOpenDialog: H,
|
|
3920
3926
|
dialogSize: p,
|
|
3921
3927
|
customData: w,
|
|
3922
3928
|
updateModelValue: m,
|
|
3923
3929
|
cancelDialog: I,
|
|
3924
|
-
submitDialog:
|
|
3930
|
+
submitDialog: j,
|
|
3925
3931
|
destroyed: ie,
|
|
3926
3932
|
setModelAndIdValue: G,
|
|
3927
3933
|
runDictPickedAsync: B
|
|
3928
3934
|
};
|
|
3929
3935
|
}
|
|
3930
|
-
function
|
|
3936
|
+
function na(e) {
|
|
3931
3937
|
return { dictPicked: async ({ items: t, mappingFields: n }) => e.dictPicked && typeof e.dictPicked == "function" ? await e.dictPicked({ items: t, mappingFields: n }) ?? !0 : !0 };
|
|
3932
3938
|
}
|
|
3933
3939
|
function ct(e, a, t, n) {
|
|
3934
3940
|
if (!e.editable)
|
|
3935
3941
|
return;
|
|
3936
3942
|
const o = { items: null, mappingFields: n.mappingFields, isFreeInput: !0, options: { ...n } };
|
|
3937
|
-
a.emit("clearMapping", o), a.emit("update:modelValue", t), a.emit("update:idValue", ""),
|
|
3943
|
+
a.emit("clearMapping", o), a.emit("update:modelValue", t), a.emit("update:idValue", ""), We(e, o);
|
|
3938
3944
|
}
|
|
3939
|
-
function
|
|
3940
|
-
const n = J(() => e.textChangeType === "blur" || e.textChangeType === "any"), o = J(() => e.textChangeType === "enter" || e.textChangeType === "any"), { beforeOpenDialog: i, updateModelValue: s, selectedItems: u, openDialog: l, lookupOptions: c, useHttpComposition: d, isPopuped: p, usePopupComposition: b, modelValue: w } = t, { updateSearchFieldTitle:
|
|
3941
|
-
function
|
|
3942
|
-
return
|
|
3945
|
+
function aa(e, a, t) {
|
|
3946
|
+
const n = J(() => e.textChangeType === "blur" || e.textChangeType === "any"), o = J(() => e.textChangeType === "enter" || e.textChangeType === "any"), { beforeOpenDialog: i, updateModelValue: s, selectedItems: u, openDialog: l, lookupOptions: c, useHttpComposition: d, isPopuped: p, usePopupComposition: b, modelValue: w } = t, { updateSearchFieldTitle: C } = d, { lookupState: v, queryState: f, searchValueChanged: r } = d.lookupStates, g = N(!1);
|
|
3947
|
+
function S($) {
|
|
3948
|
+
return nn($) && r.value && !p.value ? (g.value = !0, r.value = !1, !1) : r.value;
|
|
3943
3949
|
}
|
|
3944
|
-
function F(
|
|
3950
|
+
function F($) {
|
|
3945
3951
|
var m;
|
|
3946
|
-
if (
|
|
3952
|
+
if (!$ || $.length !== 1)
|
|
3947
3953
|
return;
|
|
3948
|
-
const [B] =
|
|
3954
|
+
const [B] = $;
|
|
3949
3955
|
return (m = B.children) != null && m.length ? F(B.children) : B.data;
|
|
3950
3956
|
}
|
|
3951
|
-
function x(
|
|
3957
|
+
function x($, B) {
|
|
3952
3958
|
var I;
|
|
3953
3959
|
if (!B || B.length !== 1)
|
|
3954
3960
|
return !1;
|
|
3955
3961
|
const [m] = B;
|
|
3956
|
-
return
|
|
3962
|
+
return $ ? (I = m.children) != null && I.length ? F(m.children) : m.data : m;
|
|
3957
3963
|
}
|
|
3958
|
-
async function O(
|
|
3964
|
+
async function O($) {
|
|
3959
3965
|
const B = {
|
|
3960
|
-
search: { field: "*", value:
|
|
3966
|
+
search: { field: "*", value: $, type: e.openType === "Modal" ? "equal" : "like" },
|
|
3961
3967
|
action: "search"
|
|
3962
3968
|
};
|
|
3963
3969
|
if (r.value) {
|
|
@@ -3968,7 +3974,7 @@ function na(e, a, t) {
|
|
|
3968
3974
|
document.body.classList.add("lookup-modal-open"), d.loadData(B, async (m) => {
|
|
3969
3975
|
var I;
|
|
3970
3976
|
if (m.searchFields && m.columns) {
|
|
3971
|
-
const T =
|
|
3977
|
+
const T = C(m.searchFields, m.columns);
|
|
3972
3978
|
v.searchFields = T;
|
|
3973
3979
|
}
|
|
3974
3980
|
if (r.value = !1, e.openType === "Modal") {
|
|
@@ -3979,14 +3985,14 @@ function na(e, a, t) {
|
|
|
3979
3985
|
}
|
|
3980
3986
|
l();
|
|
3981
3987
|
} else
|
|
3982
|
-
v.action =
|
|
3988
|
+
v.action = $ ? "search" : "list", v.items = m.items, v.total = m.total, v.selectedData = m.selectedData || [], m.pageInfo && (v.pageInfo = { ...m.pageInfo });
|
|
3983
3989
|
});
|
|
3984
3990
|
}
|
|
3985
3991
|
}
|
|
3986
|
-
function y(
|
|
3992
|
+
function y($, B) {
|
|
3987
3993
|
var I;
|
|
3988
|
-
let m = (I =
|
|
3989
|
-
if (m !== "" && (m = m.trim()),
|
|
3994
|
+
let m = (I = $.target) == null ? void 0 : I.value;
|
|
3995
|
+
if (m !== "" && (m = m.trim()), S(m)) {
|
|
3990
3996
|
if (e.allowFreeInput)
|
|
3991
3997
|
if (e.openType === "Modal") {
|
|
3992
3998
|
ct(e, a, m, c);
|
|
@@ -4004,22 +4010,22 @@ function na(e, a, t) {
|
|
|
4004
4010
|
c.uri ? O(m) : a.emit("textChanged", { value: m, type: B ? "blur" : "enter" });
|
|
4005
4011
|
}
|
|
4006
4012
|
}
|
|
4007
|
-
function
|
|
4008
|
-
n.value && y(
|
|
4013
|
+
function M($) {
|
|
4014
|
+
n.value && y($, !0);
|
|
4009
4015
|
}
|
|
4010
|
-
function G(
|
|
4011
|
-
|
|
4016
|
+
function G($) {
|
|
4017
|
+
$.key === "Enter" && o.value && y($, !1);
|
|
4012
4018
|
}
|
|
4013
4019
|
return {
|
|
4014
4020
|
changeOnBlur: n,
|
|
4015
4021
|
changeOnEnter: o,
|
|
4016
|
-
onInputBlur:
|
|
4022
|
+
onInputBlur: M,
|
|
4017
4023
|
onEnterKeyDown: G,
|
|
4018
4024
|
isClear: g,
|
|
4019
4025
|
queryDataBySearchKeys: O
|
|
4020
4026
|
};
|
|
4021
4027
|
}
|
|
4022
|
-
const
|
|
4028
|
+
const ia = {
|
|
4023
4029
|
height: { type: Number, default: 500 },
|
|
4024
4030
|
width: { type: Number, default: 500 },
|
|
4025
4031
|
useHttpComposition: { type: Object, default: {} },
|
|
@@ -4062,9 +4068,9 @@ const aa = {
|
|
|
4062
4068
|
enableSearchBar: { type: Boolean, default: !0 },
|
|
4063
4069
|
searchAnyField: { type: Boolean, default: !0 },
|
|
4064
4070
|
locales: { type: Object, default: {} }
|
|
4065
|
-
},
|
|
4071
|
+
}, oa = /* @__PURE__ */ Te({
|
|
4066
4072
|
name: "FLookupPopupContainer",
|
|
4067
|
-
props:
|
|
4073
|
+
props: ia,
|
|
4068
4074
|
emits: ["selectItemsChanged", "hiddenPopup"],
|
|
4069
4075
|
setup(e, a) {
|
|
4070
4076
|
const t = e.locales, {
|
|
@@ -4077,7 +4083,7 @@ const aa = {
|
|
|
4077
4083
|
lookupOptions: l
|
|
4078
4084
|
} = n, {
|
|
4079
4085
|
isTreeList: c
|
|
4080
|
-
} =
|
|
4086
|
+
} = Pe(e, n);
|
|
4081
4087
|
it(e, !1, n, t);
|
|
4082
4088
|
const d = J(() => ({
|
|
4083
4089
|
width: `${e.width}px`,
|
|
@@ -4085,10 +4091,10 @@ const aa = {
|
|
|
4085
4091
|
padding: "5px"
|
|
4086
4092
|
})), {
|
|
4087
4093
|
renderDataGrid: p
|
|
4088
|
-
} =
|
|
4094
|
+
} = Vt(e, a, {}), {
|
|
4089
4095
|
renderTreeGrid: b
|
|
4090
4096
|
} = Bt(e, a), w = J(() => c() ? b : p);
|
|
4091
|
-
function
|
|
4097
|
+
function C() {
|
|
4092
4098
|
const v = {};
|
|
4093
4099
|
e.enableToSelect && (v.selectedInfo = o(), u.value != null && (v.search = {
|
|
4094
4100
|
field: "*",
|
|
@@ -4099,17 +4105,17 @@ const aa = {
|
|
|
4099
4105
|
f == null || f.loadData(v, (r) => {
|
|
4100
4106
|
Ye(() => {
|
|
4101
4107
|
i.action = v.action, r.navigation && (Object.keys(r.navigation).forEach((g) => {
|
|
4102
|
-
var
|
|
4103
|
-
s[g] = (
|
|
4108
|
+
var S;
|
|
4109
|
+
s[g] = (S = r.navigation) == null ? void 0 : S[g];
|
|
4104
4110
|
}), r.navigation.treeInfo && (f == null || f.setTreeInfo(r.navigation.treeInfo, !0)), delete r.navigation), r.treeInfo && (f == null || f.setTreeInfo(r.treeInfo)), Object.keys(r).forEach((g) => {
|
|
4105
4111
|
i[g] = r[g];
|
|
4106
4112
|
});
|
|
4107
4113
|
});
|
|
4108
4114
|
});
|
|
4109
4115
|
}
|
|
4110
|
-
return
|
|
4111
|
-
|
|
4112
|
-
}),
|
|
4116
|
+
return ke(() => {
|
|
4117
|
+
C();
|
|
4118
|
+
}), Ne(() => {
|
|
4113
4119
|
a.emit("hiddenPopup");
|
|
4114
4120
|
}), () => L("div", {
|
|
4115
4121
|
style: d.value,
|
|
@@ -4117,7 +4123,7 @@ const aa = {
|
|
|
4117
4123
|
}, [w.value()]);
|
|
4118
4124
|
}
|
|
4119
4125
|
});
|
|
4120
|
-
function
|
|
4126
|
+
function la(e, a, t, {
|
|
4121
4127
|
useHttpComposition: n,
|
|
4122
4128
|
selectionsManager: o,
|
|
4123
4129
|
userDataService: i,
|
|
@@ -4128,17 +4134,17 @@ function oa(e, a, t, {
|
|
|
4128
4134
|
runDictPickedAsync: d,
|
|
4129
4135
|
popupState: p
|
|
4130
4136
|
}) {
|
|
4131
|
-
Se(
|
|
4137
|
+
Se(He, i), Se(we, n), Se(Ee, o);
|
|
4132
4138
|
const {
|
|
4133
4139
|
selectionState: b,
|
|
4134
4140
|
queryState: w,
|
|
4135
|
-
lookupOptions:
|
|
4141
|
+
lookupOptions: C,
|
|
4136
4142
|
searchState: v
|
|
4137
|
-
} = n.lookupStates, f = Nt(
|
|
4138
|
-
Se(
|
|
4139
|
-
const r =
|
|
4143
|
+
} = n.lookupStates, f = Nt(C, !1);
|
|
4144
|
+
Se(Ae, f);
|
|
4145
|
+
const r = X(Ke, null), {
|
|
4140
4146
|
idValues: g
|
|
4141
|
-
} = n,
|
|
4147
|
+
} = n, S = J(() => {
|
|
4142
4148
|
var I;
|
|
4143
4149
|
const m = (I = t.value) == null ? void 0 : I.popoverRef;
|
|
4144
4150
|
return m ? m.shown : !1;
|
|
@@ -4149,7 +4155,7 @@ function oa(e, a, t, {
|
|
|
4149
4155
|
if (!b.value.length)
|
|
4150
4156
|
return c(), !0;
|
|
4151
4157
|
let m = null;
|
|
4152
|
-
|
|
4158
|
+
C.multiSelect ? m = await d() : m = await s();
|
|
4153
4159
|
const {
|
|
4154
4160
|
shouldClose: I,
|
|
4155
4161
|
message: T
|
|
@@ -4164,7 +4170,7 @@ function oa(e, a, t, {
|
|
|
4164
4170
|
(m = t.value) == null || m.hidePopup();
|
|
4165
4171
|
}
|
|
4166
4172
|
e.openType === "Popup" && q(() => b.value, (m) => {
|
|
4167
|
-
|
|
4173
|
+
S.value && e.multiSelect && c();
|
|
4168
4174
|
});
|
|
4169
4175
|
const O = () => {
|
|
4170
4176
|
const {
|
|
@@ -4179,34 +4185,34 @@ function oa(e, a, t, {
|
|
|
4179
4185
|
var m;
|
|
4180
4186
|
return (m = t.value) == null ? void 0 : m.popoverRef;
|
|
4181
4187
|
});
|
|
4182
|
-
async function
|
|
4183
|
-
|
|
4188
|
+
async function M() {
|
|
4189
|
+
S.value && x(), w.value = null, l(), a.emit("popupClosed"), p.canClose = !0, document.body.classList.remove("lookup-modal-open");
|
|
4184
4190
|
}
|
|
4185
4191
|
function G() {
|
|
4186
4192
|
var m;
|
|
4187
|
-
|
|
4193
|
+
S.value || (m = t.value) == null || m.showPopup();
|
|
4188
4194
|
}
|
|
4189
|
-
function
|
|
4190
|
-
p.canClose = !0,
|
|
4195
|
+
function $() {
|
|
4196
|
+
p.canClose = !0, C.multiSelect || x();
|
|
4191
4197
|
}
|
|
4192
4198
|
function B() {
|
|
4193
4199
|
const {
|
|
4194
4200
|
width: m,
|
|
4195
4201
|
height: I
|
|
4196
4202
|
} = O();
|
|
4197
|
-
return L(
|
|
4203
|
+
return L(oa, ht({
|
|
4198
4204
|
width: m,
|
|
4199
4205
|
height: I,
|
|
4200
4206
|
useHttpComposition: n,
|
|
4201
4207
|
locales: u,
|
|
4202
4208
|
selectionsManager: o,
|
|
4203
|
-
onHiddenPopup:
|
|
4204
|
-
onSelectionsChanged:
|
|
4209
|
+
onHiddenPopup: M,
|
|
4210
|
+
onSelectionsChanged: $
|
|
4205
4211
|
}, e), null);
|
|
4206
4212
|
}
|
|
4207
4213
|
return {
|
|
4208
4214
|
popoverInstance: y,
|
|
4209
|
-
isPopuped:
|
|
4215
|
+
isPopuped: S,
|
|
4210
4216
|
renderPopup: B,
|
|
4211
4217
|
showPopup: G,
|
|
4212
4218
|
hidePopup: x,
|
|
@@ -4214,100 +4220,114 @@ function oa(e, a, t, {
|
|
|
4214
4220
|
popupState: p
|
|
4215
4221
|
};
|
|
4216
4222
|
}
|
|
4223
|
+
function sa(e, a) {
|
|
4224
|
+
const t = ye({});
|
|
4225
|
+
return t.http = { getData: e.loader }, q(t, (n, o) => {
|
|
4226
|
+
var i, s, u;
|
|
4227
|
+
for (const [l, c] of Object.entries(n)) {
|
|
4228
|
+
const d = o[l];
|
|
4229
|
+
c !== d && l in a && (a[l] = c);
|
|
4230
|
+
}
|
|
4231
|
+
((i = n.http) == null ? void 0 : i.getData) !== ((s = o.http) == null ? void 0 : s.getData) && (a.loader = (u = n.http) == null ? void 0 : u.getData);
|
|
4232
|
+
}, { deep: !0, immediate: !1 }), Ne(() => {
|
|
4233
|
+
}), t;
|
|
4234
|
+
}
|
|
4217
4235
|
const xe = /* @__PURE__ */ Te({
|
|
4218
4236
|
name: "FLookup",
|
|
4219
|
-
props:
|
|
4237
|
+
props: Be,
|
|
4220
4238
|
emits: ["update:modelValue", "update:idValue", "search", "navSelectionsChanged", "pageIndexChanged", "pageSizeChanged", "resize", "dialogClosed", "textChanged", "clear", "update:dataMapping", "clearMapping", "popupClosed", "expandClick"],
|
|
4221
4239
|
setup(e, a) {
|
|
4222
4240
|
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>', o = N(), i = N(e.modelValue), s = N("");
|
|
4223
4241
|
De.value = e.customData;
|
|
4224
|
-
const u = J(() =>
|
|
4242
|
+
const u = J(() => je() ? "Modal" : e.openType === "Popup" ? "Popup" : "Modal"), l = J(() => u.value === "Popup" ? n : t), c = _n(e), d = Un(e), {
|
|
4225
4243
|
lookupOptions: p,
|
|
4226
4244
|
selectionState: b,
|
|
4227
4245
|
searchValueChanged: w,
|
|
4228
|
-
queryState:
|
|
4246
|
+
queryState: C,
|
|
4229
4247
|
popupState: v
|
|
4230
|
-
} = d.lookupStates, f =
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4248
|
+
} = d.lookupStates, f = zn(e, d), r = J(() => e.showSelections && p.multiSelect), g = J(() => e.editable && (u.value === "Modal" || !p.multiSelect)), S = sa(e, p);
|
|
4249
|
+
d.lookupStates.compatInstance = S;
|
|
4250
|
+
const F = J(() => e.showIncludeChildNodes && e.showNavigation && !p.navTreeToList), x = Et(e, d.lookupStates), {
|
|
4251
|
+
dictPicked: O
|
|
4252
|
+
} = na(e), {
|
|
4253
|
+
modalOptions: y,
|
|
4254
|
+
beforeOpenDialog: M,
|
|
4255
|
+
dialogSize: G,
|
|
4256
|
+
customData: $,
|
|
4257
|
+
updateModelValue: B,
|
|
4258
|
+
cancelDialog: m,
|
|
4259
|
+
submitDialog: I,
|
|
4260
|
+
destroyed: T,
|
|
4261
|
+
setModelAndIdValue: W,
|
|
4262
|
+
runDictPickedAsync: ie
|
|
4263
|
+
} = ta(e, a, b, {
|
|
4264
|
+
dictPicked: O,
|
|
4245
4265
|
modelValue: i,
|
|
4246
4266
|
buttonEditInstance: o,
|
|
4247
4267
|
userDataService: f,
|
|
4248
4268
|
useHttp: d,
|
|
4249
4269
|
lookupLocales: c
|
|
4250
|
-
}),
|
|
4270
|
+
}), le = la(e, a, o, {
|
|
4251
4271
|
useHttpComposition: d,
|
|
4252
|
-
selectionsManager:
|
|
4272
|
+
selectionsManager: x,
|
|
4253
4273
|
userDataService: f,
|
|
4254
|
-
updateModelValue:
|
|
4274
|
+
updateModelValue: B,
|
|
4255
4275
|
lookupLocales: c,
|
|
4256
|
-
destroyed:
|
|
4257
|
-
setModelAndIdValue:
|
|
4258
|
-
runDictPickedAsync:
|
|
4276
|
+
destroyed: T,
|
|
4277
|
+
setModelAndIdValue: W,
|
|
4278
|
+
runDictPickedAsync: ie,
|
|
4259
4279
|
popupState: v
|
|
4260
4280
|
}), {
|
|
4261
|
-
renderPopup:
|
|
4262
|
-
showPopup:
|
|
4263
|
-
isPopuped:
|
|
4264
|
-
hidePopup:
|
|
4265
|
-
onBeforeClosePopup:
|
|
4266
|
-
} =
|
|
4267
|
-
function
|
|
4281
|
+
renderPopup: j,
|
|
4282
|
+
showPopup: h,
|
|
4283
|
+
isPopuped: k,
|
|
4284
|
+
hidePopup: V,
|
|
4285
|
+
onBeforeClosePopup: R
|
|
4286
|
+
} = le;
|
|
4287
|
+
function te() {
|
|
4268
4288
|
if (u.value === "Popup") {
|
|
4269
|
-
|
|
4289
|
+
h();
|
|
4270
4290
|
return;
|
|
4271
4291
|
}
|
|
4272
4292
|
o.value && !o.value.getModal() && o.value.openDialog();
|
|
4273
4293
|
}
|
|
4274
4294
|
const {
|
|
4275
|
-
onInputBlur:
|
|
4276
|
-
onEnterKeyDown:
|
|
4277
|
-
isClear:
|
|
4278
|
-
queryDataBySearchKeys:
|
|
4279
|
-
} =
|
|
4280
|
-
beforeOpenDialog:
|
|
4281
|
-
updateModelValue:
|
|
4295
|
+
onInputBlur: Y,
|
|
4296
|
+
onEnterKeyDown: ae,
|
|
4297
|
+
isClear: Q,
|
|
4298
|
+
queryDataBySearchKeys: re
|
|
4299
|
+
} = aa(e, a, {
|
|
4300
|
+
beforeOpenDialog: M,
|
|
4301
|
+
updateModelValue: B,
|
|
4282
4302
|
selectedItems: b,
|
|
4283
|
-
openDialog:
|
|
4303
|
+
openDialog: te,
|
|
4284
4304
|
modelValue: i,
|
|
4285
4305
|
useHttpComposition: d,
|
|
4286
4306
|
lookupOptions: p,
|
|
4287
|
-
usePopupComposition:
|
|
4288
|
-
isPopuped:
|
|
4289
|
-
}),
|
|
4290
|
-
q(() =>
|
|
4307
|
+
usePopupComposition: le,
|
|
4308
|
+
isPopuped: k
|
|
4309
|
+
}), ue = ye(y), H = X(on);
|
|
4310
|
+
q(() => $.value, (D) => {
|
|
4291
4311
|
De.value = D;
|
|
4292
4312
|
}), q(() => e.modelValue, (D) => {
|
|
4293
4313
|
i.value = D;
|
|
4294
4314
|
});
|
|
4295
|
-
function
|
|
4315
|
+
function E(D) {
|
|
4296
4316
|
d.idValues.value = D, D || (b.value = []), a.emit("update:idValue", D);
|
|
4297
4317
|
}
|
|
4298
4318
|
q(() => e.idValue, (D) => {
|
|
4299
|
-
|
|
4300
|
-
}),
|
|
4301
|
-
}),
|
|
4302
|
-
|
|
4303
|
-
}), q(() =>
|
|
4319
|
+
E(D);
|
|
4320
|
+
}), ke(() => {
|
|
4321
|
+
}), Ne(() => {
|
|
4322
|
+
We(e);
|
|
4323
|
+
}), q(() => G.value, (D) => {
|
|
4304
4324
|
a.emit("resize", D);
|
|
4305
4325
|
}), u.value === "Popup" && q([() => e.readonly, () => e.disabled], ([D, fe]) => {
|
|
4306
|
-
var
|
|
4307
|
-
(D || fe) && ((
|
|
4326
|
+
var Me;
|
|
4327
|
+
(D || fe) && ((Me = o.value) == null || Me.forceClosePopup());
|
|
4308
4328
|
});
|
|
4309
|
-
async function
|
|
4310
|
-
a.emit("update:modelValue", ""),
|
|
4329
|
+
async function U() {
|
|
4330
|
+
a.emit("update:modelValue", ""), E(""), C.value = null, u.value === "Popup" && k.value && (v.canClose = !0, Q.value || (w.value = !0, re("")));
|
|
4311
4331
|
const D = {
|
|
4312
4332
|
items: null,
|
|
4313
4333
|
mappingFields: p.mappingFields,
|
|
@@ -4315,76 +4335,77 @@ const xe = /* @__PURE__ */ Te({
|
|
|
4315
4335
|
...p
|
|
4316
4336
|
}
|
|
4317
4337
|
};
|
|
4318
|
-
a.emit("clear", D),
|
|
4338
|
+
a.emit("clear", D), We(e, D);
|
|
4319
4339
|
}
|
|
4320
|
-
q(() =>
|
|
4321
|
-
D && (
|
|
4340
|
+
q(() => Q.value, (D) => {
|
|
4341
|
+
D && (U(), Q.value = !1);
|
|
4322
4342
|
});
|
|
4323
|
-
function
|
|
4343
|
+
function P(D) {
|
|
4324
4344
|
a.emit("search", D);
|
|
4325
4345
|
}
|
|
4326
|
-
function
|
|
4346
|
+
function z(D) {
|
|
4327
4347
|
a.emit("navSelectionsChanged", D);
|
|
4328
4348
|
}
|
|
4329
|
-
function
|
|
4349
|
+
function ne(D) {
|
|
4330
4350
|
a.emit("pageIndexChanged", D);
|
|
4331
4351
|
}
|
|
4332
|
-
function
|
|
4352
|
+
function he(D) {
|
|
4333
4353
|
a.emit("pageSizeChanged", D);
|
|
4334
4354
|
}
|
|
4335
|
-
async function
|
|
4336
|
-
const fe =
|
|
4355
|
+
async function A(D) {
|
|
4356
|
+
const fe = H == null ? void 0 : H.getCurrentModal();
|
|
4337
4357
|
fe && fe.updateModalOptions(D), D.title && (s.value = D.title);
|
|
4338
4358
|
}
|
|
4339
|
-
function R(D) {
|
|
4340
|
-
const fe = Y == null ? void 0 : Y.getCurrentModal();
|
|
4341
|
-
Y && fe.close(D);
|
|
4342
|
-
}
|
|
4343
4359
|
function Z(D) {
|
|
4344
|
-
const fe =
|
|
4360
|
+
const fe = H == null ? void 0 : H.getCurrentModal();
|
|
4361
|
+
H && fe.close(D);
|
|
4362
|
+
}
|
|
4363
|
+
function se(D) {
|
|
4364
|
+
const fe = H == null ? void 0 : H.getCurrentModal();
|
|
4345
4365
|
fe && fe.maxDialog(D);
|
|
4346
4366
|
}
|
|
4347
|
-
const
|
|
4348
|
-
const D =
|
|
4367
|
+
const de = J(() => {
|
|
4368
|
+
const D = H == null ? void 0 : H.getCurrentModal();
|
|
4349
4369
|
return D == null ? void 0 : D.isMaximized;
|
|
4350
|
-
}),
|
|
4351
|
-
function
|
|
4370
|
+
}), me = J(() => p.multiSelect && p.showCascadeControl && p.enableCascade && ve.Tree === p.displayType.toUpperCase() && !p.treeToList), _ = J(() => b.value && b.value.length ? b.value.map((D) => D[p.idField]) : []);
|
|
4371
|
+
function K(D) {
|
|
4352
4372
|
for (const fe in p)
|
|
4353
4373
|
D[fe] !== void 0 && (p[fe] = D[fe]);
|
|
4354
4374
|
}
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4375
|
+
const ce = gt((D) => {
|
|
4376
|
+
Y(D);
|
|
4357
4377
|
}, 200);
|
|
4358
|
-
function
|
|
4359
|
-
var
|
|
4360
|
-
let fe = (
|
|
4361
|
-
fe !== "" && (fe = fe.trim()), w.value = D.target._value !== fe, e.allowFreeInput &&
|
|
4378
|
+
function ge(D) {
|
|
4379
|
+
var Me;
|
|
4380
|
+
let fe = (Me = D.target) == null ? void 0 : Me.value;
|
|
4381
|
+
fe !== "" && (fe = fe.trim()), w.value = D.target._value !== fe, e.allowFreeInput && E(""), w.value && (C.value = fe), u.value === "Popup" && w.value && ce(D);
|
|
4362
4382
|
}
|
|
4363
|
-
function
|
|
4383
|
+
function be() {
|
|
4364
4384
|
w.value = !1;
|
|
4365
4385
|
}
|
|
4366
|
-
async function
|
|
4367
|
-
await
|
|
4386
|
+
async function Re(D) {
|
|
4387
|
+
await I() && (H == null || H.close());
|
|
4368
4388
|
}
|
|
4369
|
-
function
|
|
4370
|
-
e.togglePopupOnClickInput && (
|
|
4389
|
+
function Qe(D) {
|
|
4390
|
+
e.togglePopupOnClickInput && (k.value ? V() : h());
|
|
4371
4391
|
}
|
|
4372
|
-
function
|
|
4392
|
+
function ot() {
|
|
4373
4393
|
document.body.classList.add("lookup-modal-open"), e.editable && setTimeout(() => {
|
|
4374
4394
|
var D;
|
|
4375
4395
|
(D = o.value.getTextbox()) == null || D.focus();
|
|
4376
4396
|
}, 100);
|
|
4377
4397
|
}
|
|
4378
|
-
const
|
|
4398
|
+
const At = () => {
|
|
4379
4399
|
a.emit("expandClick");
|
|
4380
4400
|
};
|
|
4381
4401
|
return a.expose({
|
|
4382
|
-
openDialog:
|
|
4383
|
-
updateIdValue:
|
|
4402
|
+
openDialog: te,
|
|
4403
|
+
updateIdValue: E,
|
|
4384
4404
|
mappingFields: p.mappingFields,
|
|
4385
4405
|
idField: p.idField,
|
|
4386
|
-
setProps:
|
|
4387
|
-
clear:
|
|
4406
|
+
setProps: K,
|
|
4407
|
+
clear: U,
|
|
4408
|
+
showDialog: te
|
|
4388
4409
|
}), () => L(mt, {
|
|
4389
4410
|
ref: o,
|
|
4390
4411
|
id: e.id,
|
|
@@ -4397,74 +4418,74 @@ const xe = /* @__PURE__ */ Te({
|
|
|
4397
4418
|
enableClear: e.enableClear,
|
|
4398
4419
|
buttonContent: l.value,
|
|
4399
4420
|
buttonBehavior: u.value,
|
|
4400
|
-
modalOptions:
|
|
4401
|
-
onClear:
|
|
4402
|
-
beforeOpen:
|
|
4403
|
-
onBlur:
|
|
4404
|
-
onKeydown:
|
|
4421
|
+
modalOptions: ue,
|
|
4422
|
+
onClear: U,
|
|
4423
|
+
beforeOpen: M,
|
|
4424
|
+
onBlur: Y,
|
|
4425
|
+
onKeydown: ae,
|
|
4405
4426
|
placeholder: c.placeholder,
|
|
4406
4427
|
keepWidthWithReference: !1,
|
|
4407
4428
|
popupOnClick: !e.editable && u.value === "Popup",
|
|
4408
|
-
onInput:
|
|
4429
|
+
onInput: ge,
|
|
4409
4430
|
enableTitle: e.enableTitle,
|
|
4410
4431
|
placement: "auto",
|
|
4411
4432
|
textAlign: e.textAlign,
|
|
4412
|
-
onBeforeClearValue:
|
|
4433
|
+
onBeforeClearValue: be,
|
|
4413
4434
|
customClass: "f-cmp-lookup",
|
|
4414
|
-
onClick:
|
|
4415
|
-
onShown:
|
|
4416
|
-
beforeClosePopup:
|
|
4435
|
+
onClick: Qe,
|
|
4436
|
+
onShown: ot,
|
|
4437
|
+
beforeClosePopup: R,
|
|
4417
4438
|
popupClass: "lookup-popup-panel",
|
|
4418
4439
|
expandable: e.expandable,
|
|
4419
4440
|
expandMode: e.expandMode,
|
|
4420
4441
|
expandContent: e.expandContent,
|
|
4421
4442
|
expandDisabled: e.expandDisabled,
|
|
4422
|
-
onExpandClick:
|
|
4443
|
+
onExpandClick: At
|
|
4423
4444
|
}, {
|
|
4424
|
-
default: () => [u.value === "Modal" && L(
|
|
4445
|
+
default: () => [u.value === "Modal" && L(ea, {
|
|
4425
4446
|
title: s.value || "",
|
|
4426
4447
|
enableFavorite: e.enableFavorite,
|
|
4427
|
-
onCloseModal:
|
|
4428
|
-
onMaximize: (D) =>
|
|
4448
|
+
onCloseModal: Z,
|
|
4449
|
+
onMaximize: (D) => se(D),
|
|
4429
4450
|
useHttpComposition: d,
|
|
4430
4451
|
userDataService: f,
|
|
4431
4452
|
useDialog: {
|
|
4432
|
-
cancelDialog:
|
|
4433
|
-
submitDialog:
|
|
4453
|
+
cancelDialog: m,
|
|
4454
|
+
submitDialog: I
|
|
4434
4455
|
},
|
|
4435
4456
|
showSelectedList: r.value,
|
|
4436
|
-
selectionsManager:
|
|
4457
|
+
selectionsManager: x,
|
|
4437
4458
|
showIncludeChildNodes: {
|
|
4438
|
-
show:
|
|
4459
|
+
show: F.value,
|
|
4439
4460
|
value: e.includeChildNodesValue
|
|
4440
4461
|
},
|
|
4441
|
-
showCascadeControl:
|
|
4442
|
-
isMaximized:
|
|
4462
|
+
showCascadeControl: me.value,
|
|
4463
|
+
isMaximized: de.value,
|
|
4443
4464
|
locales: c,
|
|
4444
4465
|
id: e.id
|
|
4445
4466
|
}, {
|
|
4446
|
-
default: () => L(
|
|
4447
|
-
onSearch:
|
|
4448
|
-
onNavSelectionsChanged:
|
|
4449
|
-
onPageIndexChanged:
|
|
4450
|
-
onPageSizeChanged:
|
|
4451
|
-
onChangeDialogOptions:
|
|
4452
|
-
onDblClickRow:
|
|
4467
|
+
default: () => L(Gn, ht(e, {
|
|
4468
|
+
onSearch: P,
|
|
4469
|
+
onNavSelectionsChanged: z,
|
|
4470
|
+
onPageIndexChanged: ne,
|
|
4471
|
+
onPageSizeChanged: he,
|
|
4472
|
+
onChangeDialogOptions: A,
|
|
4473
|
+
onDblClickRow: Re
|
|
4453
4474
|
}), null),
|
|
4454
|
-
fav: () => e.enableFavorite && L(
|
|
4475
|
+
fav: () => e.enableFavorite && L(Jn, {
|
|
4455
4476
|
idField: p.idField,
|
|
4456
4477
|
displayType: p.displayType,
|
|
4457
|
-
selectedIds:
|
|
4478
|
+
selectedIds: _.value,
|
|
4458
4479
|
multiSelect: p.multiSelect,
|
|
4459
4480
|
showSelections: r.value,
|
|
4460
4481
|
treeToList: p.treeToList,
|
|
4461
|
-
onDblClickRow:
|
|
4482
|
+
onDblClickRow: Re
|
|
4462
4483
|
}, null)
|
|
4463
|
-
}), u.value === "Popup" &&
|
|
4484
|
+
}), u.value === "Popup" && j()]
|
|
4464
4485
|
});
|
|
4465
4486
|
}
|
|
4466
4487
|
});
|
|
4467
|
-
function
|
|
4488
|
+
function ra(e) {
|
|
4468
4489
|
const { formSchemaUtils: a, formStateMachineUtils: t } = e;
|
|
4469
4490
|
function n(l, c = "") {
|
|
4470
4491
|
return {
|
|
@@ -4492,7 +4513,7 @@ function la(e) {
|
|
|
4492
4513
|
}
|
|
4493
4514
|
return { getVariables: i, getControlName: s, getStateMachines: u };
|
|
4494
4515
|
}
|
|
4495
|
-
class
|
|
4516
|
+
class ua {
|
|
4496
4517
|
constructor(a) {
|
|
4497
4518
|
oe(this, "sessionVariables", [
|
|
4498
4519
|
{
|
|
@@ -4759,7 +4780,7 @@ class sa {
|
|
|
4759
4780
|
};
|
|
4760
4781
|
}
|
|
4761
4782
|
}
|
|
4762
|
-
class
|
|
4783
|
+
class da {
|
|
4763
4784
|
constructor(a, t) {
|
|
4764
4785
|
oe(this, "componentId");
|
|
4765
4786
|
oe(this, "viewModelId");
|
|
@@ -4856,7 +4877,7 @@ class ra {
|
|
|
4856
4877
|
switch (s && s.propertyID) {
|
|
4857
4878
|
case "class":
|
|
4858
4879
|
case "style": {
|
|
4859
|
-
|
|
4880
|
+
Gt.value++;
|
|
4860
4881
|
break;
|
|
4861
4882
|
}
|
|
4862
4883
|
}
|
|
@@ -4876,7 +4897,7 @@ class ra {
|
|
|
4876
4897
|
* @returns
|
|
4877
4898
|
*/
|
|
4878
4899
|
getPropertyEditorParams(a, t = [], n = "visible", o = {}, i = {}, s = "") {
|
|
4879
|
-
const { getVariables: u, getControlName: l, getStateMachines: c } =
|
|
4900
|
+
const { getVariables: u, getControlName: l, getStateMachines: c } = ra(this.designerHostService), d = this.getRealTargetType(a), p = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], b = {
|
|
4880
4901
|
type: "property-editor",
|
|
4881
4902
|
propertyTypes: p
|
|
4882
4903
|
};
|
|
@@ -4901,8 +4922,8 @@ class ra {
|
|
|
4901
4922
|
newVariableType: "Boolean",
|
|
4902
4923
|
variables: u(this.viewModelId),
|
|
4903
4924
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
4904
|
-
onBeforeOpenVariables: (
|
|
4905
|
-
|
|
4925
|
+
onBeforeOpenVariables: (C) => {
|
|
4926
|
+
C.value = u(this.viewModelId);
|
|
4906
4927
|
}
|
|
4907
4928
|
}, i), this.designerContext.designerMode === "PC_RTC" && (b.newVariablePrefix = "ext_" + b.newVariablePrefix);
|
|
4908
4929
|
break;
|
|
@@ -4970,8 +4991,8 @@ class ra {
|
|
|
4970
4991
|
const n = t && t.parent && t.parent.schema;
|
|
4971
4992
|
if (!n)
|
|
4972
4993
|
return;
|
|
4973
|
-
const o = n.contents.findIndex((s) => s.id === a), i =
|
|
4974
|
-
n.contents.splice(o, 1), n.contents.splice(o, 0, i),
|
|
4994
|
+
const o = n.contents.findIndex((s) => s.id === a), i = Ve(n.contents[o]);
|
|
4995
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, i), Ht();
|
|
4975
4996
|
}
|
|
4976
4997
|
/**
|
|
4977
4998
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -5004,14 +5025,14 @@ class ra {
|
|
|
5004
5025
|
const { expressionId: i, expressionInfo: s } = t, { targetId: u, targetType: l, expressionType: c, value: d, message: p } = s, b = this.formSchemaUtils.getModule();
|
|
5005
5026
|
b.expressions = b.expressions || [];
|
|
5006
5027
|
const { expressions: w } = b;
|
|
5007
|
-
let
|
|
5008
|
-
|
|
5009
|
-
const v =
|
|
5028
|
+
let C = w.find((f) => f.target === u);
|
|
5029
|
+
C || (C = { target: u, rules: [], targetType: l }, w.push(C));
|
|
5030
|
+
const v = C.rules.find((f) => f.type === c);
|
|
5010
5031
|
if (v)
|
|
5011
5032
|
v.value = d, v.message = p;
|
|
5012
5033
|
else {
|
|
5013
5034
|
const f = { id: i, type: c, value: d, message: p };
|
|
5014
|
-
|
|
5035
|
+
C.rules.push(f);
|
|
5015
5036
|
}
|
|
5016
5037
|
delete t.expressionInfo;
|
|
5017
5038
|
}
|
|
@@ -5029,7 +5050,7 @@ class ra {
|
|
|
5029
5050
|
!l || !l.rules || (l.rules = l.rules.filter((c) => c.type !== i));
|
|
5030
5051
|
}
|
|
5031
5052
|
getExpressionOptions(a, t, n) {
|
|
5032
|
-
return new
|
|
5053
|
+
return new ua(this.formSchemaUtils).getExpressionOptions(a, t, n);
|
|
5033
5054
|
}
|
|
5034
5055
|
getRealTargetType(a) {
|
|
5035
5056
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(a.type) > -1 ? "Button" : a.binding && a.binding.field ? "Field" : "Container";
|
|
@@ -5048,7 +5069,7 @@ class ra {
|
|
|
5048
5069
|
}, t;
|
|
5049
5070
|
}
|
|
5050
5071
|
}
|
|
5051
|
-
class
|
|
5072
|
+
class Ma extends da {
|
|
5052
5073
|
constructor(t, n) {
|
|
5053
5074
|
super(t, n);
|
|
5054
5075
|
oe(this, "propertyConfigFilters", {
|
|
@@ -5089,7 +5110,7 @@ class La extends ra {
|
|
|
5089
5110
|
"showCloseButton"
|
|
5090
5111
|
]
|
|
5091
5112
|
});
|
|
5092
|
-
oe(this, "events",
|
|
5113
|
+
oe(this, "events", Mn);
|
|
5093
5114
|
}
|
|
5094
5115
|
/**
|
|
5095
5116
|
* 获取帮助的属性
|
|
@@ -5097,7 +5118,7 @@ class La extends ra {
|
|
|
5097
5118
|
* @returns
|
|
5098
5119
|
*/
|
|
5099
5120
|
getPropertyConfig(t) {
|
|
5100
|
-
const n = new
|
|
5121
|
+
const n = new kt("root-component", this.designerHostService), o = n.getLookupConfig(t), i = n.getPageConfig(t.editor), s = n.getTreePropConfig(t.editor), u = n.getDialogPropertyConfig(t), l = this.getEventPropConfig(t), c = {
|
|
5101
5122
|
type: "object",
|
|
5102
5123
|
categories: {
|
|
5103
5124
|
lookup: o,
|
|
@@ -5142,36 +5163,36 @@ xe.install = (e) => {
|
|
|
5142
5163
|
e.component(xe.name, xe);
|
|
5143
5164
|
};
|
|
5144
5165
|
xe.register = (e, a, t, n, o) => {
|
|
5145
|
-
e.lookup = xe, a.lookup = Ft(o), n.lookup = { callbackResolver:
|
|
5166
|
+
e.lookup = xe, a.lookup = Ft(o), n.lookup = { callbackResolver: wn };
|
|
5146
5167
|
};
|
|
5147
5168
|
xe.registerDesigner = (e, a, t, n) => {
|
|
5148
|
-
e.lookup =
|
|
5169
|
+
e.lookup = An, a.lookup = Ft(n);
|
|
5149
5170
|
};
|
|
5150
5171
|
export {
|
|
5151
5172
|
St as CascadeEnum,
|
|
5152
|
-
|
|
5153
|
-
|
|
5173
|
+
_e as Compare,
|
|
5174
|
+
Sn as DEFAULT_LOOKUP_DIALOG_OPTIONS,
|
|
5154
5175
|
wt as DEFAULT_PAGINATION_OPTIONS,
|
|
5155
5176
|
Tt as DefaultDialogTitle,
|
|
5156
|
-
|
|
5157
|
-
|
|
5177
|
+
Cn as ExpressValueType,
|
|
5178
|
+
Ma as ExternalLookupPropertyConfig,
|
|
5158
5179
|
xe as FLookup,
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5180
|
+
yn as F_LOOKUP_HTTP_SERVICE_TOKEN,
|
|
5181
|
+
$e as FilterRelation,
|
|
5182
|
+
Oe as LOOKUP_ACTIVE_TAB,
|
|
5183
|
+
La as LOOKUP_USER_DATA_ID,
|
|
5163
5184
|
Fe as LoadTreeDataType,
|
|
5164
5185
|
ve as LookupDisplayType,
|
|
5165
5186
|
Vn as LookupSchemaRepositoryToken,
|
|
5166
5187
|
pe as LookupTabs,
|
|
5167
|
-
|
|
5188
|
+
wn as callbackResolver,
|
|
5168
5189
|
Xe as cascadeItems,
|
|
5169
5190
|
xe as default,
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5191
|
+
Nn as getLookupDialogCommonProperties,
|
|
5192
|
+
Dn as getLookupEditorCommonProperties,
|
|
5193
|
+
On as getLookupPaginationProperties,
|
|
5173
5194
|
It as lookupDataSourceConverter,
|
|
5174
|
-
|
|
5175
|
-
|
|
5195
|
+
Be as lookupProps,
|
|
5196
|
+
Ea as propsResolver,
|
|
5176
5197
|
Ft as propsResolverGenerator
|
|
5177
5198
|
};
|