@farris/ui-vue 1.6.5-beta.7 → 1.6.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +28 -29
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +521 -517
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +163 -157
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +10 -10
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1122 -1121
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +190 -190
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2693 -2693
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +8 -8
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +8 -8
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1470 -1460
- package/components/expression-editor/index.umd.cjs +3 -3
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +853 -843
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +922 -911
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +12 -12
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +104 -108
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1311 -1307
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +7 -7
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +9 -9
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +326 -326
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +168 -167
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +739 -737
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +1 -1
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +565 -565
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +409 -409
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1488 -1478
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1765 -1762
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +114 -114
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1184 -1181
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +927 -916
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +76 -72
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1527 -1524
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +361 -361
- package/components/textarea/index.umd.cjs +2 -2
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +130 -134
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +25 -25
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +1746 -1743
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +8 -8
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/farris.all.esm.js +16987 -17002
- package/farris.all.umd.cjs +27 -27
- package/package.json +1 -1
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
- package/components/time-picker/index.css +0 -1
- package/components/time-picker/index.esm.js +0 -9793
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/time-picker/package.json +0 -8
- package/components/time-picker/style.js +0 -6
- package/designer/button-edit/index.css +0 -1
- package/designer/button-edit/index.esm.js +0 -4856
- package/designer/button-edit/index.umd.cjs +0 -1
- package/designer/checkbox/index.esm.js +0 -250
- package/designer/checkbox/index.umd.cjs +0 -1
- package/designer/checkbox-group/index.esm.js +0 -377
- package/designer/checkbox-group/index.umd.cjs +0 -1
- package/designer/data-grid/index.css +0 -1
- package/designer/data-grid/index.esm.js +0 -15413
- package/designer/data-grid/index.umd.cjs +0 -23
- package/designer/data-view/index.esm.js +0 -854
- package/designer/data-view/index.umd.cjs +0 -38
- package/designer/drawer/index.css +0 -1
- package/designer/drawer/index.esm.js +0 -525
- package/designer/drawer/index.umd.cjs +0 -1
- package/designer/farris-designer.all.esm.js +0 -22320
- package/designer/farris-designer.all.umd.cjs +0 -34
- package/designer/index.css +0 -1
- package/designer/input-group/index.esm.js +0 -1098
- package/designer/input-group/index.umd.cjs +0 -1
- package/designer/list-view/index.css +0 -1
- package/designer/list-view/index.esm.js +0 -4675
- package/designer/list-view/index.umd.cjs +0 -40
- package/designer/radio-group/index.css +0 -1
- package/designer/radio-group/index.esm.js +0 -6980
- package/designer/radio-group/index.umd.cjs +0 -1
- package/designer/tree-grid/index.esm.js +0 -1099
- package/designer/tree-grid/index.umd.cjs +0 -1
|
@@ -1,4675 +0,0 @@
|
|
|
1
|
-
var Jt = Object.defineProperty;
|
|
2
|
-
var Qt = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var me = (e, t, n) => Qt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { useGuid as Zt, useNumberFormat as it, resolveField as ve, useCommonUtils as at, useDateFormat as Kt, setFieldValue as qe, getCustomStyle as Qe, getCustomClass as Ze, excludeProperties as en, withInstall as tn } from "../../components/common/index.esm.js";
|
|
5
|
-
import nn, { listViewProps as on, FListViewTable as rn } from "../../components/list-view/index.esm.js";
|
|
6
|
-
import { getSchemaByTypeForDesigner as an, createPropsResolver as sn, createCollectionBindingResolver as ln } from "../../components/dynamic-resolver/index.esm.js";
|
|
7
|
-
import { ref as O, createVNode as F, createTextVNode as Te, computed as Y, defineComponent as $e, watch as Ne, Fragment as Oe, reactive as st, createApp as cn, onUnmounted as un, onMounted as Ye, Transition as dn, mergeProps as fn, withModifiers as mn, withDirectives as vn, vModelText as pn, inject as ze } from "vue";
|
|
8
|
-
import "../../components/popover/index.esm.js";
|
|
9
|
-
import { useI18n as je } from "vue-i18n";
|
|
10
|
-
import "../../components/modal/index.esm.js";
|
|
11
|
-
import { cloneDeep as Ae, isUndefined as Ke, isPlainObject as et } from "lodash-es";
|
|
12
|
-
import "../../components/transfer/index.esm.js";
|
|
13
|
-
import "../../components/tabs/index.esm.js";
|
|
14
|
-
import { FCheckbox as Xe } from "../../components/checkbox/index.esm.js";
|
|
15
|
-
import "../../components/filter-bar/index.esm.js";
|
|
16
|
-
import "../../components/pagination/index.esm.js";
|
|
17
|
-
import tt from "../../components/button/index.esm.js";
|
|
18
|
-
import "../../components/date-picker/index.esm.js";
|
|
19
|
-
import "../../components/number-spinner/index.esm.js";
|
|
20
|
-
import "../../components/search-box/index.esm.js";
|
|
21
|
-
import "../../components/tags/index.esm.js";
|
|
22
|
-
import { LocaleService as gn } from "../../components/locale/index.esm.js";
|
|
23
|
-
import { useCondition as hn, CompareType as we, ValueType as Ve, TextValue as Ue, RadioGroupValue as _n, NumberSpinnerValue as yn, NumberRangeValue as bn, MonthRangeValue as wn, MonthPickerValue as Cn, DateRangeValue as nt, DateTimePickerValue as Sn, DatePickerValue as kn, ComboLookupValue as En, ComboListValue as Tn, CheckBoxValue as Fn } from "../../components/condition/index.esm.js";
|
|
24
|
-
import { FDynamicFormInput as Mn } from "../../components/dynamic-form/index.esm.js";
|
|
25
|
-
import { DgControl as Ge } from "../../components/designer-canvas/index.esm.js";
|
|
26
|
-
function Nn(e, t) {
|
|
27
|
-
function n(a) {
|
|
28
|
-
const r = [];
|
|
29
|
-
let c = a.nextNode();
|
|
30
|
-
for (; c; )
|
|
31
|
-
r.push(c), c = a.nextNode();
|
|
32
|
-
return r;
|
|
33
|
-
}
|
|
34
|
-
function o(a, r) {
|
|
35
|
-
const c = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
36
|
-
return n(c).map((s) => ({ textNode: s, text: (s.textContent || "").toLocaleLowerCase() })).map(({ textNode: s, text: l }) => {
|
|
37
|
-
const _ = [];
|
|
38
|
-
let f = 0;
|
|
39
|
-
for (; f < l.length; ) {
|
|
40
|
-
const w = l.indexOf(r, f);
|
|
41
|
-
if (w === -1)
|
|
42
|
-
break;
|
|
43
|
-
_.push(w), f = w + r.length;
|
|
44
|
-
}
|
|
45
|
-
return _.map((w) => {
|
|
46
|
-
const C = new Range();
|
|
47
|
-
return C.setStart(s, w), C.setEnd(s, w + r.length), C;
|
|
48
|
-
});
|
|
49
|
-
}).flat();
|
|
50
|
-
}
|
|
51
|
-
function i(a) {
|
|
52
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !a || !t))
|
|
53
|
-
return;
|
|
54
|
-
const r = o(t.value, a.toLocaleLowerCase()), c = new Highlight(...r);
|
|
55
|
-
CSS.highlights.set("search-result", c);
|
|
56
|
-
}
|
|
57
|
-
return { search: i };
|
|
58
|
-
}
|
|
59
|
-
const xe = {
|
|
60
|
-
button: { type: "button", name: "按钮" },
|
|
61
|
-
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
62
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
63
|
-
"content-container": { type: "content-container", name: "容器" },
|
|
64
|
-
"input-group": { type: "input-group", name: "文本" },
|
|
65
|
-
textarea: { type: "textarea", name: "多行文本" },
|
|
66
|
-
lookup: { type: "lookup", name: "帮助" },
|
|
67
|
-
"number-spinner": { type: "number-spinner", name: "数值" },
|
|
68
|
-
"date-picker": { type: "date-picker", name: "日期" },
|
|
69
|
-
switch: { type: "switch", name: "开关" },
|
|
70
|
-
"radio-group": { type: "radio-group", name: "单选组" },
|
|
71
|
-
"check-box": { type: "check-box", name: "复选框" },
|
|
72
|
-
"check-group": { type: "check-group", name: "复选框组" },
|
|
73
|
-
"combo-list": { type: "combo-list", name: "下拉列表" },
|
|
74
|
-
"response-form": { type: "response-form", name: "卡片面板" },
|
|
75
|
-
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
|
|
76
|
-
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
|
|
77
|
-
"tree-grid": { type: "tree-grid", name: "树表格" },
|
|
78
|
-
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
79
|
-
"data-grid": { type: "data-grid", name: "表格" },
|
|
80
|
-
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
81
|
-
module: { type: "Module", name: "模块" },
|
|
82
|
-
component: { type: "component", name: "组件" },
|
|
83
|
-
tabs: { type: "tabs", name: "标签页" },
|
|
84
|
-
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
85
|
-
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
86
|
-
"html-template": { type: "html-template", name: "模板容器" },
|
|
87
|
-
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
88
|
-
section: { type: "section", name: "分组面板" },
|
|
89
|
-
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
90
|
-
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
91
|
-
splitter: { type: "splitter", name: "分栏面板" },
|
|
92
|
-
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
93
|
-
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
94
|
-
uploader: { type: "uploader", name: "附件上传" },
|
|
95
|
-
"page-header": { type: "page-header", name: "页头" },
|
|
96
|
-
"page-footer": { type: "page-footer", name: "页脚" },
|
|
97
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
98
|
-
fieldset: { type: "fieldset", name: "分组" },
|
|
99
|
-
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
100
|
-
drawer: { type: "drawer", name: "抽屉" },
|
|
101
|
-
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
102
|
-
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
103
|
-
"list-view": { type: "list-view", name: "列表" },
|
|
104
|
-
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
105
|
-
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
106
|
-
};
|
|
107
|
-
function lt(e, t, n) {
|
|
108
|
-
var W;
|
|
109
|
-
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", a = O();
|
|
110
|
-
let r;
|
|
111
|
-
function c() {
|
|
112
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
113
|
-
}
|
|
114
|
-
function m() {
|
|
115
|
-
return !1;
|
|
116
|
-
}
|
|
117
|
-
function u() {
|
|
118
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
119
|
-
}
|
|
120
|
-
function d() {
|
|
121
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
122
|
-
}
|
|
123
|
-
function s(N) {
|
|
124
|
-
if (!N || !N.value)
|
|
125
|
-
return null;
|
|
126
|
-
if (N.value.schema && N.value.schema.type === "component")
|
|
127
|
-
return N.value;
|
|
128
|
-
const j = O(N == null ? void 0 : N.value.parent), I = s(j);
|
|
129
|
-
return I || null;
|
|
130
|
-
}
|
|
131
|
-
function l(N = t) {
|
|
132
|
-
var T;
|
|
133
|
-
if (n != null && n.getDraggableDesignItemElement)
|
|
134
|
-
return n.getDraggableDesignItemElement(N);
|
|
135
|
-
const { componentInstance: j, designerItemElementRef: I } = N;
|
|
136
|
-
if (!j || !j.value)
|
|
137
|
-
return null;
|
|
138
|
-
const { getCustomButtons: D } = j.value;
|
|
139
|
-
return j.value.canMove || D && ((T = D()) != null && T.length) ? I : l(N.parent);
|
|
140
|
-
}
|
|
141
|
-
function _(N) {
|
|
142
|
-
return !!n && n.canAccepts(N);
|
|
143
|
-
}
|
|
144
|
-
function f() {
|
|
145
|
-
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
146
|
-
}
|
|
147
|
-
function w() {
|
|
148
|
-
}
|
|
149
|
-
function C(N, j) {
|
|
150
|
-
var I;
|
|
151
|
-
!N || !j || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(N, j), (I = t == null ? void 0 : t.setupContext) == null || I.emit("dragEnd"));
|
|
152
|
-
}
|
|
153
|
-
function E(N, j) {
|
|
154
|
-
const { componentType: I } = N;
|
|
155
|
-
let D = an(I, N, j);
|
|
156
|
-
n && n.onResolveNewComponentSchema && (D = n.onResolveNewComponentSchema(N, D));
|
|
157
|
-
const T = I.toLowerCase().replace(/-/g, "_");
|
|
158
|
-
return D && !D.id && D.type === I && (D.id = `${T}_${Math.random().toString().slice(2, 6)}`), D;
|
|
159
|
-
}
|
|
160
|
-
function S(N) {
|
|
161
|
-
N && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(N);
|
|
162
|
-
}
|
|
163
|
-
function k(...N) {
|
|
164
|
-
if (n && n.getPropsConfig)
|
|
165
|
-
return n.getPropsConfig(...N);
|
|
166
|
-
}
|
|
167
|
-
function p(N) {
|
|
168
|
-
if (!N)
|
|
169
|
-
return;
|
|
170
|
-
const j = t == null ? void 0 : t.schema, { formSchemaUtils: I } = N;
|
|
171
|
-
if (j && I.getExpressions().length) {
|
|
172
|
-
const D = I.getExpressions().findIndex((T) => T.target === j.id);
|
|
173
|
-
D > -1 && I.getExpressions().splice(D, 1);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
function h(N) {
|
|
177
|
-
if (!N || !(t != null && t.schema))
|
|
178
|
-
return;
|
|
179
|
-
const j = t.schema, { formSchemaUtils: I } = N;
|
|
180
|
-
I.removeCommunicationInComponent(j);
|
|
181
|
-
}
|
|
182
|
-
function y(N) {
|
|
183
|
-
n && n.onRemoveComponent && n.onRemoveComponent(), p(N), h(N), t != null && t.schema.contents && t.schema.contents.map((j) => {
|
|
184
|
-
let I = j.id;
|
|
185
|
-
j.type === "component-ref" && (I = j.component);
|
|
186
|
-
const D = e.value.querySelectorAll(`#${I}-design-item`);
|
|
187
|
-
D != null && D.length && Array.from(D).map((T) => {
|
|
188
|
-
var B;
|
|
189
|
-
(B = T == null ? void 0 : T.componentInstance) != null && B.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent(N);
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
function v() {
|
|
194
|
-
if (n && n.getCustomButtons)
|
|
195
|
-
return n.getCustomButtons();
|
|
196
|
-
}
|
|
197
|
-
function g(N) {
|
|
198
|
-
var I, D;
|
|
199
|
-
if (!((I = t == null ? void 0 : t.schema) != null && I.id))
|
|
200
|
-
return;
|
|
201
|
-
if (!r && N && (r = N.formSchemaUtils), n != null && n.setComponentBasicInfoMap) {
|
|
202
|
-
n.setComponentBasicInfoMap();
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
let j = "";
|
|
206
|
-
if (n != null && n.getComponentTitle)
|
|
207
|
-
j = n.getComponentTitle();
|
|
208
|
-
else {
|
|
209
|
-
const { text: T, title: B, label: L, mainTitle: Q, name: oe, type: P } = t.schema;
|
|
210
|
-
j = T || B || L || Q || oe || ((D = xe[P]) == null ? void 0 : D.name);
|
|
211
|
-
}
|
|
212
|
-
j && r.getControlBasicInfoMap().set(t.schema.id, {
|
|
213
|
-
componentTitle: j,
|
|
214
|
-
parentPathName: j
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
function b(N) {
|
|
218
|
-
var T;
|
|
219
|
-
const { changeObject: j } = N, { propertyID: I, propertyValue: D } = j;
|
|
220
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((T = N == null ? void 0 : N.changeObject) == null ? void 0 : T.propertyID) && I && D && (g(), r)) {
|
|
221
|
-
const B = r.getControlBasicInfoMap(), L = B.keys().toArray().filter((Q) => {
|
|
222
|
-
var oe, P;
|
|
223
|
-
return ((oe = B.get(Q)) == null ? void 0 : oe.reliedComponentId) === ((P = t == null ? void 0 : t.schema) == null ? void 0 : P.id);
|
|
224
|
-
});
|
|
225
|
-
L != null && L.length && L.forEach((Q) => {
|
|
226
|
-
const oe = B.get(Q).parentPathName.split(" > ");
|
|
227
|
-
oe[0] = D, B.get(Q).parentPathName = oe.join(" > ");
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function x(N) {
|
|
232
|
-
if (b(N), n && n.onPropertyChanged)
|
|
233
|
-
return n.onPropertyChanged(N);
|
|
234
|
-
}
|
|
235
|
-
return a.value = {
|
|
236
|
-
canMove: c(),
|
|
237
|
-
canSelectParent: m(),
|
|
238
|
-
canDelete: u(),
|
|
239
|
-
canNested: !d(),
|
|
240
|
-
contents: t == null ? void 0 : t.schema.contents,
|
|
241
|
-
elementRef: e,
|
|
242
|
-
parent: (W = t == null ? void 0 : t.parent) == null ? void 0 : W.componentInstance,
|
|
243
|
-
schema: t == null ? void 0 : t.schema,
|
|
244
|
-
styles: o,
|
|
245
|
-
designerClass: i,
|
|
246
|
-
canAccepts: _,
|
|
247
|
-
getBelongedComponentInstance: s,
|
|
248
|
-
getDraggableDesignItemElement: l,
|
|
249
|
-
getDraggingDisplayText: f,
|
|
250
|
-
getPropConfig: k,
|
|
251
|
-
getDragScopeElement: w,
|
|
252
|
-
onAcceptMovedChildElement: C,
|
|
253
|
-
onChildElementMovedOut: S,
|
|
254
|
-
addNewChildComponentSchema: E,
|
|
255
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || O(!1),
|
|
256
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || O(!1),
|
|
257
|
-
onRemoveComponent: y,
|
|
258
|
-
getCustomButtons: v,
|
|
259
|
-
onPropertyChanged: x,
|
|
260
|
-
setComponentBasicInfoMap: g,
|
|
261
|
-
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
262
|
-
}, a;
|
|
263
|
-
}
|
|
264
|
-
var _e = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(_e || {}), Fe = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(Fe || {}), Ie = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(Ie || {}), Ee = /* @__PURE__ */ ((e) => (e.DATE = "date", e.DATE_TIME = "datetime", e.NUMBER = "number", e.ENUM = "enum", e.IMAGE = "image", e.BOOLEAN = "boolean", e.BOOLEAN2 = "boolean2", e.TIMEAGO = "timeago", e.NONE = "none", e.CUSTOM = "custom", e.MULTI_LINGUAL = "multilingual", e))(Ee || {});
|
|
265
|
-
function Vn(e) {
|
|
266
|
-
const {
|
|
267
|
-
t
|
|
268
|
-
} = je();
|
|
269
|
-
function n(r, c) {
|
|
270
|
-
switch (r.command) {
|
|
271
|
-
case "edit":
|
|
272
|
-
case "remove":
|
|
273
|
-
return c.status === Fe.initial;
|
|
274
|
-
case "accept":
|
|
275
|
-
case "cancel":
|
|
276
|
-
return c.status === Fe.editing;
|
|
277
|
-
default:
|
|
278
|
-
return !r.hidden;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
function o(r, c, m, u) {
|
|
282
|
-
var d, s, l, _, f;
|
|
283
|
-
switch ((d = r.onClick) == null || d.call(r, c, m.dataIndex, m), r.command) {
|
|
284
|
-
case "edit":
|
|
285
|
-
m.status, Fe.editing, (l = (s = e.commandOption) == null ? void 0 : s.onClickEditCommand) == null || l.call(s, u, m);
|
|
286
|
-
break;
|
|
287
|
-
case "accept":
|
|
288
|
-
case "cancel":
|
|
289
|
-
m.status, Fe.initial;
|
|
290
|
-
break;
|
|
291
|
-
case "remove":
|
|
292
|
-
(f = (_ = e.commandOption) == null ? void 0 : _.onClickDeleteCommand) == null || f.call(_, u, m);
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function i(r) {
|
|
297
|
-
return r === "编辑" ? t("datagrid.commandColumn.edit") : r === "确定" ? t("datagrid.commandColumn.accept") : r === "取消" ? t("datagrid.commandColumn.cancel") : r === "删除" ? t("datagrid.commandColumn.remove") : r;
|
|
298
|
-
}
|
|
299
|
-
function a(r, c) {
|
|
300
|
-
const {
|
|
301
|
-
column: m
|
|
302
|
-
} = r;
|
|
303
|
-
return m.commands && m.commands.map((u, d) => d ? n(u, c) && F(tt, {
|
|
304
|
-
class: "ml-1",
|
|
305
|
-
type: u.type,
|
|
306
|
-
size: u.size || "small",
|
|
307
|
-
onClick: (s) => o(u, s, c, r),
|
|
308
|
-
style: {
|
|
309
|
-
"margin-bottom": "3px"
|
|
310
|
-
}
|
|
311
|
-
}, {
|
|
312
|
-
default: () => [Te(" "), i(u.text), Te(" ")]
|
|
313
|
-
}) : n(u, c) && F(tt, {
|
|
314
|
-
type: u.type,
|
|
315
|
-
size: u.size || "small",
|
|
316
|
-
onClick: (s) => o(u, s, c, r),
|
|
317
|
-
style: {
|
|
318
|
-
"margin-bottom": "3px"
|
|
319
|
-
}
|
|
320
|
-
}, {
|
|
321
|
-
default: () => [Te(" "), i(u.text), Te(" ")]
|
|
322
|
-
}));
|
|
323
|
-
}
|
|
324
|
-
return {
|
|
325
|
-
renderCommandColumn: a
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
function ct(e, t) {
|
|
329
|
-
var k;
|
|
330
|
-
const { uuid: n } = Zt(), { idField: o } = t, i = O(e.summary), a = O(e.group), r = O(((k = e.group) == null ? void 0 : k.groupFields) || []), c = Y(() => {
|
|
331
|
-
var p;
|
|
332
|
-
return (p = e.group) == null ? void 0 : p.enable;
|
|
333
|
-
}), m = Y(() => {
|
|
334
|
-
var p;
|
|
335
|
-
return (p = e.group) == null ? void 0 : p.showGroupPanel;
|
|
336
|
-
}), u = Y(() => {
|
|
337
|
-
const p = i.value;
|
|
338
|
-
return (p == null ? void 0 : p.groupFields) || [];
|
|
339
|
-
}), d = Y(() => {
|
|
340
|
-
const p = a.value;
|
|
341
|
-
return p && p.showSummary;
|
|
342
|
-
}), s = O(0), l = /* @__PURE__ */ new Map();
|
|
343
|
-
let _ = [];
|
|
344
|
-
function f(p, h, y, v, g) {
|
|
345
|
-
const b = v[y];
|
|
346
|
-
b && (h.reduce((x, W, N) => {
|
|
347
|
-
var D;
|
|
348
|
-
const j = W[b];
|
|
349
|
-
let I = x.get(j);
|
|
350
|
-
if (!I) {
|
|
351
|
-
const T = u.value.reduce((B, L) => (B.set(L, 0), B), /* @__PURE__ */ new Map());
|
|
352
|
-
I = {
|
|
353
|
-
field: b,
|
|
354
|
-
title: ((D = g.get(b)) == null ? void 0 : D.title) || b,
|
|
355
|
-
value: j,
|
|
356
|
-
layer: y,
|
|
357
|
-
details: [],
|
|
358
|
-
groupSummaries: T
|
|
359
|
-
}, x.set(j, I);
|
|
360
|
-
}
|
|
361
|
-
return u.value && u.value.forEach((T) => {
|
|
362
|
-
if (I) {
|
|
363
|
-
const B = I.groupSummaries.get(T) || 0;
|
|
364
|
-
I.groupSummaries.set(T, B + W[T]);
|
|
365
|
-
}
|
|
366
|
-
}), u.value && u.value.forEach((T) => {
|
|
367
|
-
if (I) {
|
|
368
|
-
const B = I.groupSummaries.get(T) || 0;
|
|
369
|
-
I.groupSummaries.set(T, Number(B.toFixed(2)));
|
|
370
|
-
}
|
|
371
|
-
}), I.details.push(W), x;
|
|
372
|
-
}, p), y < v.length - 1 && p.forEach((x, W) => {
|
|
373
|
-
x.nestGroup = /* @__PURE__ */ new Map(), f(x.nestGroup, x.details, y + 1, v, g), x.details = [];
|
|
374
|
-
}));
|
|
375
|
-
}
|
|
376
|
-
function w(p, h) {
|
|
377
|
-
return e.group && e.group.formatter ? e.group.formatter(p.value, { ...p, total: h }) : `${p.title}:${p.value} (${h})`;
|
|
378
|
-
}
|
|
379
|
-
function C(p, h) {
|
|
380
|
-
const y = [];
|
|
381
|
-
return p.forEach((v) => {
|
|
382
|
-
const g = {
|
|
383
|
-
// 如果存在二级分组,分组行标识保持唯一
|
|
384
|
-
[o.value]: `group_of_${h ? h[o.value] + "_" : ""}${v.field}_${v.value}`,
|
|
385
|
-
__fv_data_grid_group_collapse__: !1,
|
|
386
|
-
__fv_data_grid_group_field__: v.field,
|
|
387
|
-
__fv_data_grid_group_layer__: v.layer,
|
|
388
|
-
__fv_data_grid_group_row__: !0,
|
|
389
|
-
__fv_data_grid_group_value__: v.value,
|
|
390
|
-
groupParents: []
|
|
391
|
-
};
|
|
392
|
-
h && (g.groupParents = [...h.groupParents, h]);
|
|
393
|
-
let b = 0;
|
|
394
|
-
if (y.push(g), v.nestGroup) {
|
|
395
|
-
const x = C(v.nestGroup, g);
|
|
396
|
-
y.push(...x), b += x.length;
|
|
397
|
-
}
|
|
398
|
-
if (v.details && v.details.length && (y.push(...v.details), b += v.details.length), d.value) {
|
|
399
|
-
const x = {
|
|
400
|
-
__fv_data_grid_group_field__: v.field,
|
|
401
|
-
__fv_data_grid_group_layer__: v.layer,
|
|
402
|
-
__fv_data_grid_group_summary__: !0
|
|
403
|
-
};
|
|
404
|
-
x[o.value] = `summary_of_${v.field}_${v.value}`, x[v.field] = Array.from(v.groupSummaries.entries()).reduce(
|
|
405
|
-
(W, [N, j]) => `${W} ${N} total:${j} `,
|
|
406
|
-
""
|
|
407
|
-
), y.push(x);
|
|
408
|
-
}
|
|
409
|
-
v.groupSummaries && v.groupSummaries.size && v.groupSummaries.forEach((x, W) => {
|
|
410
|
-
g[W] = x;
|
|
411
|
-
}), g[v.field] = w(v, b), g.value = v.value;
|
|
412
|
-
}), y.forEach((v, g) => {
|
|
413
|
-
v.__fv_data_index__ = g;
|
|
414
|
-
}), y;
|
|
415
|
-
}
|
|
416
|
-
function E(p, h, y) {
|
|
417
|
-
return !p || p.length === 0 || !h.length ? h : (p.join(","), l.clear(), _ = [], h = h.filter((v) => !v.__fv_data_grid_group_row__), f(l, h, 0, p, y), _ = C(l), _);
|
|
418
|
-
}
|
|
419
|
-
function S(p) {
|
|
420
|
-
return {
|
|
421
|
-
"f-icon": !0,
|
|
422
|
-
"f-icon-arrow-chevron-down": !0,
|
|
423
|
-
"fv-grid-group-row-icon-collapse": p.collapse
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
return { collpaseGroupIconClass: S, generateGroupData: E, groupFields: r, shouldGroupingData: c, showGroupPanel: m, groupRowSize: s };
|
|
427
|
-
}
|
|
428
|
-
function ut(e) {
|
|
429
|
-
const t = "parent", n = "layer", o = "hasChildren", i = (r, c = 1, m = [], u = null) => (r = r || [], r.reduce((d, s) => (s.id = s.id || s.data[e.idField], s[t] = u, s[n] = c, s[o] = s[o] === void 0 ? !1 : s[o], s.data && Object.keys(s.data).forEach((l) => {
|
|
430
|
-
Object.keys(s).includes(l) || (s[l] = s.data[l]);
|
|
431
|
-
}), m.push(s), s.children && s.children.length && (s[o] = !0, i(s.children, c + 1, m, s.id)), d), m), m);
|
|
432
|
-
return { flatTreeData: i, isNestedTree: (r) => r.some((c) => Array.isArray(c.children)) };
|
|
433
|
-
}
|
|
434
|
-
function xn(e, t, n, o) {
|
|
435
|
-
const i = O(0), a = O(!!e.hierarchy), { idField: r } = o, { collapseField: c, hasChildrenField: m, parentIdField: u } = n, d = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), { flatTreeData: _, isNestedTree: f } = ut(e);
|
|
436
|
-
function w(R, A) {
|
|
437
|
-
s.clear(), R.reduce(($, U) => {
|
|
438
|
-
const Z = U[u.value] !== void 0 ? U[u.value] : "";
|
|
439
|
-
if (Z && A.has(Z)) {
|
|
440
|
-
const ie = A.get(Z), te = isNaN(Number(ie.__fv_layer__)) ? 1 : Number(ie.__fv_layer__);
|
|
441
|
-
U.__fv_layer__ = te + 1, U.__fv_parent_index__ = ie.__fv_index__, ie.__fv_hasChildren__ = !0;
|
|
442
|
-
} else
|
|
443
|
-
U.__fv_layer__ = 1;
|
|
444
|
-
const ae = $.has(Z) ? $.get(Z) : [];
|
|
445
|
-
return ae.push(U), $.set(Z, ae), $;
|
|
446
|
-
}, s);
|
|
447
|
-
}
|
|
448
|
-
function C(R) {
|
|
449
|
-
l.clear(), R.reduce((A, $) => {
|
|
450
|
-
const U = $[r.value];
|
|
451
|
-
return A.set(U, $), A;
|
|
452
|
-
}, l);
|
|
453
|
-
}
|
|
454
|
-
function E(R) {
|
|
455
|
-
R.forEach((A) => {
|
|
456
|
-
const $ = A[r.value];
|
|
457
|
-
A.__fv_children_index__.map((Z) => R[Z]).forEach((Z) => {
|
|
458
|
-
Z.__fv_parents__ = new Map([
|
|
459
|
-
...A.__fv_parents__.entries(),
|
|
460
|
-
[$, !0]
|
|
461
|
-
]);
|
|
462
|
-
});
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
function S(R) {
|
|
466
|
-
R.forEach((A) => {
|
|
467
|
-
const $ = new Set(A.__fv_children_index__);
|
|
468
|
-
A.__fv_children_index__ = [...$].sort((U, Z) => U - Z);
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
function k(R) {
|
|
472
|
-
R.forEach((A) => {
|
|
473
|
-
const $ = A.__fv_parents__;
|
|
474
|
-
Array.from($.keys()).map((U) => l.get(U)).forEach((U) => {
|
|
475
|
-
U.__fv_children_index__.push(A.__fv_index__);
|
|
476
|
-
});
|
|
477
|
-
}), S(R);
|
|
478
|
-
}
|
|
479
|
-
function p(R) {
|
|
480
|
-
R.forEach((A) => {
|
|
481
|
-
A.__fv_child_with_lines__ = [], A.__fv_child_length__ = A.__fv_descendant_index__.length, A.__fv_descendant_index__.map(($) => R[$]).reduce(($, U) => ($.__fv_child_length__ += U.__fv_children_index__.length, $.__fv_child_with_lines__.push(...U.__fv_children_index__, U.__fv_index__), $), A);
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
function h(R, A) {
|
|
485
|
-
return { id: R, index: A, parentId: "", parentIndex: -1, parents: /* @__PURE__ */ new Map(), children: /* @__PURE__ */ new Map(), descendant: /* @__PURE__ */ new Map(), collapsed: !1, visibleInHierarchy: !0 };
|
|
486
|
-
}
|
|
487
|
-
function y(R, A, $) {
|
|
488
|
-
Array.from(A.keys()).forEach((U) => {
|
|
489
|
-
A.get(U).reduce((ae, ie) => {
|
|
490
|
-
const te = ie[r.value], se = R.get(ie[r.value]), be = R.get(U), ce = $.get(U);
|
|
491
|
-
return be && ce && (be.children.set(te, se), be.children.set(te, se), se.parentId = U, se.parentIndex = be.index, se.parents.set(U, be)), ae;
|
|
492
|
-
}, R);
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
function v(R) {
|
|
496
|
-
R.children.forEach(($) => {
|
|
497
|
-
$.parents = new Map([
|
|
498
|
-
...R.parents.entries(),
|
|
499
|
-
[R.id, R]
|
|
500
|
-
]), v($);
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
function g(R, A) {
|
|
504
|
-
R.filter(($) => $[u.value] === void 0 || $[u.value] === "").forEach(($) => {
|
|
505
|
-
const U = $[r.value], Z = A.get(U);
|
|
506
|
-
v(Z);
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
function b(R) {
|
|
510
|
-
Array.from(R.values()).forEach((A) => {
|
|
511
|
-
Array.from(A.parents.values()).forEach(($) => {
|
|
512
|
-
$.descendant.set(A.id, A);
|
|
513
|
-
});
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
function x(R) {
|
|
517
|
-
d.clear(), R.forEach((A, $) => {
|
|
518
|
-
const U = A[r.value];
|
|
519
|
-
d.set(U, h(U, $));
|
|
520
|
-
}), C(R), w(R, l), y(d, s, l), g(R, d), b(d);
|
|
521
|
-
}
|
|
522
|
-
function W(R) {
|
|
523
|
-
const A = R[r.value], $ = d.get(A);
|
|
524
|
-
return $ && $.children.size > 0;
|
|
525
|
-
}
|
|
526
|
-
function N(R) {
|
|
527
|
-
return R[m.value] && !W(R);
|
|
528
|
-
}
|
|
529
|
-
function j(R) {
|
|
530
|
-
const A = R[r.value], $ = d.get(A);
|
|
531
|
-
return $ && $.visibleInHierarchy;
|
|
532
|
-
}
|
|
533
|
-
function I() {
|
|
534
|
-
i.value = Date.now();
|
|
535
|
-
}
|
|
536
|
-
function D(R, A) {
|
|
537
|
-
A.forEach(($) => {
|
|
538
|
-
const U = d.get($[r.value]), Z = d.get(R), ae = l.get(R);
|
|
539
|
-
Z && ae && (U.visibleInHierarchy = !ae[c.value] && Z.visibleInHierarchy);
|
|
540
|
-
}), I();
|
|
541
|
-
}
|
|
542
|
-
function T(R) {
|
|
543
|
-
if (s.has(R)) {
|
|
544
|
-
const $ = s.get(R);
|
|
545
|
-
D(R, $), $.map((U) => U[r.value]).forEach((U) => T(U));
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
function B(R) {
|
|
549
|
-
const A = R[r.value];
|
|
550
|
-
T(A);
|
|
551
|
-
}
|
|
552
|
-
function L(R, A, $ = 0) {
|
|
553
|
-
R.forEach((U) => {
|
|
554
|
-
const Z = N(U), ae = U.__fv_layer__ <= $, ie = A === "ToCollapse" ? U.__fv_layer__ <= $ : !(U.__fv_layer__ <= $), te = ae ? ie : U[c.value];
|
|
555
|
-
U[c.value] = Z || te;
|
|
556
|
-
});
|
|
557
|
-
for (const [U, Z] of s.entries())
|
|
558
|
-
D(U, Z);
|
|
559
|
-
return R;
|
|
560
|
-
}
|
|
561
|
-
function Q(R, A) {
|
|
562
|
-
L(R, "ToCollapse", A);
|
|
563
|
-
}
|
|
564
|
-
function oe(R, A) {
|
|
565
|
-
L(R, "ToExpand", A);
|
|
566
|
-
}
|
|
567
|
-
function P(R) {
|
|
568
|
-
R.forEach((A, $) => {
|
|
569
|
-
var ie;
|
|
570
|
-
const U = A[r.value], Z = s.has(U) ? (ie = s.get(U)) == null ? void 0 : ie.map((te) => te.__fv_index__) : [], ae = h(U, $);
|
|
571
|
-
A.__fv_graph_node__ = ae, A.__fv_children_index__ = Z, A.__fv_descendant_index__ = [...Z], A.__fv_parents__ = /* @__PURE__ */ new Map(), N(A) && (A[c.value] = !0);
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
function z(R) {
|
|
575
|
-
var U, Z;
|
|
576
|
-
x(t.value), P(R), E(R), k(R), e.showLines && p(R);
|
|
577
|
-
const $ = ((U = e.hierarchy) == null ? void 0 : U.collapseTo) !== void 0 ? Number((Z = e.hierarchy) == null ? void 0 : Z.collapseTo) : 0;
|
|
578
|
-
return L(R, "ToCollapse", $), R;
|
|
579
|
-
}
|
|
580
|
-
function J(R, A, $) {
|
|
581
|
-
const Z = $.value[R][r.value], ae = d.get(Z);
|
|
582
|
-
if (ae) {
|
|
583
|
-
const ie = d.get(ae.parentId);
|
|
584
|
-
let te = $.value.length - 1;
|
|
585
|
-
if (ie) {
|
|
586
|
-
const se = Array.from(ie.children.keys()).indexOf(ae.id);
|
|
587
|
-
if (se === ie.children.size - 1) {
|
|
588
|
-
const ce = Array.from(ie.descendant.values())[ie.descendant.size - 1];
|
|
589
|
-
te = $.value.findIndex((M) => M[r.value] === ce.id) + 1;
|
|
590
|
-
} else {
|
|
591
|
-
const ce = Array.from(ie.children.values())[se + 1];
|
|
592
|
-
te = $.value.findIndex((M) => M[r.value] === ce.id);
|
|
593
|
-
}
|
|
594
|
-
A[m.value] = !1, A[u.value] = ie.id, $.value.splice(te, 0, A);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
function K(R, A, $) {
|
|
599
|
-
const U = $.value[R], Z = U[r.value];
|
|
600
|
-
if (d.get(Z)) {
|
|
601
|
-
const te = $.value.findIndex((se) => se[r.value] === Z) + 1;
|
|
602
|
-
U[m.value] = !0, U[c.value] = !1, A[m.value] = !1, A[u.value] = Z, $.value.splice(te, 0, A);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
function re(R, A, $) {
|
|
606
|
-
const Z = $.value[R][r.value];
|
|
607
|
-
if (d.get(Z)) {
|
|
608
|
-
const te = $.value.findIndex((be) => be[r.value] === Z) + 1;
|
|
609
|
-
let se = A;
|
|
610
|
-
f(A) && (se = _(A)), se.forEach((be) => {
|
|
611
|
-
be[u.value] = Z;
|
|
612
|
-
}), $.value.splice(te, 0, ...se);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
function ee(R, A) {
|
|
616
|
-
const $ = R[r.value], U = d.get($), Z = Array.from(U.descendant.keys());
|
|
617
|
-
Z.unshift($);
|
|
618
|
-
const ae = d.get(U.parentId);
|
|
619
|
-
if (ae && (ae.children.delete($), ae.children.size === 0)) {
|
|
620
|
-
const te = A.find((se) => se[r.value] === U.parentId);
|
|
621
|
-
te[m.value] = !1, te[c.value] = !1;
|
|
622
|
-
}
|
|
623
|
-
return A.filter((te) => Z.indexOf(te.id) === -1);
|
|
624
|
-
}
|
|
625
|
-
return {
|
|
626
|
-
checkVisibleInHierarchy: i,
|
|
627
|
-
collapseTo: Q,
|
|
628
|
-
expandTo: oe,
|
|
629
|
-
generateHierarchyData: z,
|
|
630
|
-
hasRealChildren: W,
|
|
631
|
-
insertSibling: J,
|
|
632
|
-
insertChild: K,
|
|
633
|
-
insertChildren: re,
|
|
634
|
-
isVisibleInTree: j,
|
|
635
|
-
shouldStratifyData: a,
|
|
636
|
-
toggleChildrenVisibiltyByCollapseStatus: B,
|
|
637
|
-
trimmedOriginalData: ee
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
const In = {
|
|
641
|
-
showCloseButton: { type: Boolean, default: !0 },
|
|
642
|
-
position: { type: String, default: "top-center" },
|
|
643
|
-
timeout: { type: Number, default: 3e3 },
|
|
644
|
-
theme: { type: String, default: "bootstrap" },
|
|
645
|
-
left: { type: Number },
|
|
646
|
-
right: { type: Number },
|
|
647
|
-
top: { type: Number },
|
|
648
|
-
bottom: { type: Number },
|
|
649
|
-
id: { type: String },
|
|
650
|
-
animate: { type: String, default: "fadeIn" },
|
|
651
|
-
options: { type: Object },
|
|
652
|
-
safeHtml: { type: Boolean, default: !0 }
|
|
653
|
-
}, On = {
|
|
654
|
-
showCloseButton: { type: Boolean, default: !0 },
|
|
655
|
-
animate: { type: String, default: "fadeIn" },
|
|
656
|
-
options: { type: Object }
|
|
657
|
-
}, We = /* @__PURE__ */ $e({
|
|
658
|
-
name: "Toast",
|
|
659
|
-
props: On,
|
|
660
|
-
emits: ["close", "click"],
|
|
661
|
-
setup: (e, t) => {
|
|
662
|
-
const {
|
|
663
|
-
locale: n,
|
|
664
|
-
t: o
|
|
665
|
-
} = je(), i = O(e.animate), a = "fadeOut", r = Y(() => e.options), c = O(!1), m = Y(() => r.value.title && r.value.message), u = Y(() => !r.value.title && r.value.message), d = Y(() => {
|
|
666
|
-
const p = {
|
|
667
|
-
animated: c.value,
|
|
668
|
-
toast: !0,
|
|
669
|
-
"toast--only-content": !m.value
|
|
670
|
-
};
|
|
671
|
-
return p[e.animate] = !1, p[a] = c.value, p["toasty-type-" + r.value.type] = !0, r.value.theme && (p[r.value.theme] = !0), p;
|
|
672
|
-
}), s = Y(() => {
|
|
673
|
-
const y = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, v = {
|
|
674
|
-
"f-icon": !0
|
|
675
|
-
};
|
|
676
|
-
return v[y] = !0, v;
|
|
677
|
-
}), l = Y(() => r.value.title || r.value.message), _ = Y(() => e.showCloseButton), f = Y(() => !!r.value.buttons || !!t.slots.default), w = Y(() => n.value === "en" ? {
|
|
678
|
-
wordBreak: "keep-all",
|
|
679
|
-
overflowWrap: "break-word"
|
|
680
|
-
} : {});
|
|
681
|
-
function C(p) {
|
|
682
|
-
p.stopPropagation(), p.preventDefault(), c.value = !1, setTimeout(() => {
|
|
683
|
-
t.emit("close", r.value);
|
|
684
|
-
}, 200);
|
|
685
|
-
}
|
|
686
|
-
function E(p, h) {
|
|
687
|
-
}
|
|
688
|
-
function S(p) {
|
|
689
|
-
return `f-preten-link ${p.customClass ? p.customClass : ""}`;
|
|
690
|
-
}
|
|
691
|
-
Ne(i, () => {
|
|
692
|
-
i.value;
|
|
693
|
-
});
|
|
694
|
-
const k = () => {
|
|
695
|
-
var p;
|
|
696
|
-
return F(Oe, null, [F("div", {
|
|
697
|
-
class: "after-toast-msg text-right"
|
|
698
|
-
}, [!t.slots.default && ((p = r.value.buttons) == null ? void 0 : p.map((h) => F("span", {
|
|
699
|
-
class: S(h),
|
|
700
|
-
onClick: (y) => void 0
|
|
701
|
-
}, [h.text]))), t.slots.default && t.slots.default()])]);
|
|
702
|
-
};
|
|
703
|
-
return () => F("div", {
|
|
704
|
-
class: d.value,
|
|
705
|
-
style: "min-height:44px"
|
|
706
|
-
}, [_.value && F("button", {
|
|
707
|
-
title: o("messageBox.close"),
|
|
708
|
-
class: "toast-close f-btn-icon f-bare",
|
|
709
|
-
onClick: C
|
|
710
|
-
}, [F("span", {
|
|
711
|
-
class: "f-icon modal_close"
|
|
712
|
-
}, null)]), l.value && F("section", {
|
|
713
|
-
class: "modal-tips"
|
|
714
|
-
}, [!m.value && F("div", {
|
|
715
|
-
class: "float-left modal-tips-iconwrap"
|
|
716
|
-
}, [F("span", {
|
|
717
|
-
class: s.value
|
|
718
|
-
}, null)]), F("div", {
|
|
719
|
-
class: "modal-tips-content"
|
|
720
|
-
}, [m.value && F(Oe, null, [F("h5", {
|
|
721
|
-
class: "toast-title modal-tips-title",
|
|
722
|
-
innerHTML: r.value.title
|
|
723
|
-
}, null), F("p", {
|
|
724
|
-
class: "toast-msg",
|
|
725
|
-
innerHTML: r.value.message,
|
|
726
|
-
style: w.value
|
|
727
|
-
}, null), f.value && k()]), u.value && (r.value.buttons ? F("div", {
|
|
728
|
-
class: "toast-title-btns-wrapper d-flex"
|
|
729
|
-
}, [F("h5", {
|
|
730
|
-
class: "toast-title modal-tips-title only-toast-msg",
|
|
731
|
-
style: w.value,
|
|
732
|
-
innerHTML: r.value.message
|
|
733
|
-
}, null), F("div", {
|
|
734
|
-
class: "after-toast-title text-right ml-auto"
|
|
735
|
-
}, [k()])]) : F("h5", {
|
|
736
|
-
class: "toast-title modal-tips-title only-toast-msg",
|
|
737
|
-
style: w.value,
|
|
738
|
-
innerHTML: r.value.message
|
|
739
|
-
}, null))])])]);
|
|
740
|
-
}
|
|
741
|
-
}), Re = /* @__PURE__ */ $e({
|
|
742
|
-
name: "Notify",
|
|
743
|
-
props: In,
|
|
744
|
-
emits: ["close", "empty"],
|
|
745
|
-
setup(e, t) {
|
|
746
|
-
const n = Y(() => ({
|
|
747
|
-
"farris-notify": !0
|
|
748
|
-
})), o = {
|
|
749
|
-
left: 12,
|
|
750
|
-
right: 12,
|
|
751
|
-
top: 20,
|
|
752
|
-
bottom: 12
|
|
753
|
-
}, i = O(), a = O(e.options), r = O(e.showCloseButton), c = Y(() => e.position || "bottom-right"), m = Y(() => e.timeout != null ? e.timeout : 3e3), u = Y(() => {
|
|
754
|
-
const l = e.bottom ? e.bottom : o.bottom, _ = e.top ? e.top : o.top, f = {
|
|
755
|
-
transition: "all 0.2s ease",
|
|
756
|
-
left: c.value.indexOf("left") > -1 ? `${e.left ? e.left : o.left}px` : "",
|
|
757
|
-
right: c.value.indexOf("right") > -1 ? `${e.right ? e.right : o.right}px` : "",
|
|
758
|
-
top: c.value.indexOf("top") > -1 ? `${_}px` : "",
|
|
759
|
-
bottom: c.value.indexOf("bottom") > -1 ? `${l}px` : ""
|
|
760
|
-
};
|
|
761
|
-
return c.value.indexOf("center") > -1 && (f.left = "50%", f.marginLeft = "calc(-24rem / 2)", c.value === "center-center" && (f.top = "50%", f.transform = "translate(-50%, -50%)")), f;
|
|
762
|
-
});
|
|
763
|
-
function d(l) {
|
|
764
|
-
t.emit("close");
|
|
765
|
-
}
|
|
766
|
-
m.value && setTimeout(() => {
|
|
767
|
-
d();
|
|
768
|
-
}, m.value), t.expose({
|
|
769
|
-
closeToast: d,
|
|
770
|
-
container: i,
|
|
771
|
-
notifyPosition: c
|
|
772
|
-
});
|
|
773
|
-
function s(l, _) {
|
|
774
|
-
d();
|
|
775
|
-
}
|
|
776
|
-
return () => F("div", {
|
|
777
|
-
class: n.value,
|
|
778
|
-
style: u.value,
|
|
779
|
-
ref: i
|
|
780
|
-
}, [F(We, {
|
|
781
|
-
options: a.value,
|
|
782
|
-
showCloseButton: r.value,
|
|
783
|
-
animate: e.animate,
|
|
784
|
-
onClose: (l) => s(l, a.value)
|
|
785
|
-
}, null)]);
|
|
786
|
-
}
|
|
787
|
-
});
|
|
788
|
-
class dt {
|
|
789
|
-
constructor() {
|
|
790
|
-
me(this, "notifyRefs", []);
|
|
791
|
-
me(this, "globalConfig", st({}));
|
|
792
|
-
}
|
|
793
|
-
escapeAllHtml(t) {
|
|
794
|
-
if (typeof t != "string" || !t)
|
|
795
|
-
return "";
|
|
796
|
-
const n = document.createElement("div");
|
|
797
|
-
return n.textContent = t || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
|
|
798
|
-
}
|
|
799
|
-
createNotifyInstance(t) {
|
|
800
|
-
const n = this, i = Object.assign({
|
|
801
|
-
timeout: 3e3,
|
|
802
|
-
position: "bottom-right",
|
|
803
|
-
showCloseButton: !0,
|
|
804
|
-
safeHtml: !0
|
|
805
|
-
}, this.globalConfig, {
|
|
806
|
-
...t
|
|
807
|
-
}), a = document.createElement("div");
|
|
808
|
-
a.style.display = "contents";
|
|
809
|
-
const r = cn({
|
|
810
|
-
setup() {
|
|
811
|
-
var u;
|
|
812
|
-
const c = O();
|
|
813
|
-
function m() {
|
|
814
|
-
c.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
815
|
-
n.updateNotifyPositionForClose(i, c), r.unmount();
|
|
816
|
-
}, 220);
|
|
817
|
-
}
|
|
818
|
-
if (i.position.indexOf("top") > -1) {
|
|
819
|
-
const d = n.getNotifyInstances(i.position), s = d[d.length - 1];
|
|
820
|
-
if (s) {
|
|
821
|
-
const l = s.value.container.getBoundingClientRect();
|
|
822
|
-
i.top = l.bottom;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
return i.safeHtml && ((u = i.options) != null && u.message) && (i.options.message = n.escapeAllHtml(i.options.message)), un(() => {
|
|
826
|
-
document.body.removeChild(a);
|
|
827
|
-
}), Ye(() => {
|
|
828
|
-
n.updateNotifyPositionForCreate(i, c);
|
|
829
|
-
}), () => F(dn, {
|
|
830
|
-
mode: "out-in",
|
|
831
|
-
name: "fade",
|
|
832
|
-
appear: !0
|
|
833
|
-
}, {
|
|
834
|
-
default: () => [F(Re, fn({
|
|
835
|
-
ref: c
|
|
836
|
-
}, i, {
|
|
837
|
-
onClose: m
|
|
838
|
-
}), null)]
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
});
|
|
842
|
-
return r.provide("NotifyService", this), document.body.appendChild(a), r.use(gn.i18n), r.mount(a), r;
|
|
843
|
-
}
|
|
844
|
-
getNotifyInstances(t) {
|
|
845
|
-
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
|
|
846
|
-
}
|
|
847
|
-
updateNotifyPositionForCreate(t, n) {
|
|
848
|
-
if (this.notifyRefs && this.notifyRefs.length) {
|
|
849
|
-
const o = window.innerHeight;
|
|
850
|
-
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((i) => {
|
|
851
|
-
const a = i.value.container.getBoundingClientRect();
|
|
852
|
-
i.value.container.style.bottom = a.height + o - a.bottom + "px";
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
this.notifyRefs = [...this.notifyRefs, n];
|
|
856
|
-
}
|
|
857
|
-
updateNotifyPositionForClose(t, n) {
|
|
858
|
-
const o = this.notifyRefs.indexOf(n);
|
|
859
|
-
if (t.position.indexOf("top") > -1) {
|
|
860
|
-
const i = this.getNotifyInstances(t.position), a = i.indexOf(n);
|
|
861
|
-
i.slice(a + 1).forEach((r) => {
|
|
862
|
-
r.value.container.style.top = r.value.container.offsetTop - r.value.container.offsetHeight + "px";
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
o > -1 && this.notifyRefs.splice(o, 1);
|
|
866
|
-
}
|
|
867
|
-
show(t) {
|
|
868
|
-
return this.createNotifyInstance(t);
|
|
869
|
-
}
|
|
870
|
-
buildNotifyProps(t, n) {
|
|
871
|
-
let o = "", i = "", a, r, c;
|
|
872
|
-
typeof n == "string" ? o = n : n && (o = n.message || "", i = n.title || "", r = n.position || null, c = n.showCloseButton != null ? n.showCloseButton : null, a = n.timeout != null ? n.timeout : null);
|
|
873
|
-
const u = {
|
|
874
|
-
options: {
|
|
875
|
-
type: t,
|
|
876
|
-
message: o,
|
|
877
|
-
title: i
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
return r != null && (u.position = r), c != null && (u.showCloseButton = c), a != null && (u.timeout = a), u;
|
|
881
|
-
}
|
|
882
|
-
info(t) {
|
|
883
|
-
const n = this.buildNotifyProps("info", t);
|
|
884
|
-
return this.show(n);
|
|
885
|
-
}
|
|
886
|
-
success(t) {
|
|
887
|
-
const n = this.buildNotifyProps("success", t);
|
|
888
|
-
return this.show(n);
|
|
889
|
-
}
|
|
890
|
-
warning(t) {
|
|
891
|
-
const n = this.buildNotifyProps("warning", t);
|
|
892
|
-
return this.show(n);
|
|
893
|
-
}
|
|
894
|
-
error(t) {
|
|
895
|
-
const n = this.buildNotifyProps("error", t);
|
|
896
|
-
return this.show(n);
|
|
897
|
-
}
|
|
898
|
-
close(t) {
|
|
899
|
-
t && t.unmount();
|
|
900
|
-
}
|
|
901
|
-
closeAll() {
|
|
902
|
-
this.notifyRefs.forEach((t) => {
|
|
903
|
-
t == null || t.value.closeToast();
|
|
904
|
-
}), this.notifyRefs.length = 0;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
const Dn = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
908
|
-
Re.install = (e) => {
|
|
909
|
-
e.component(Re.name, Re), e.component(We.name, We);
|
|
910
|
-
const t = new dt();
|
|
911
|
-
e.provide(Dn, t), e.provide("FNotifyService", t);
|
|
912
|
-
};
|
|
913
|
-
function Pn(e, t, n, o, i) {
|
|
914
|
-
const { toNumber: a } = it(), r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), s = O([]), l = O([]), _ = ct(e, i), { generateGroupData: f, groupFields: w, shouldGroupingData: C } = _, E = O(e.data || []), S = xn(e, E, o, i), {
|
|
915
|
-
collapseTo: k,
|
|
916
|
-
expandTo: p,
|
|
917
|
-
generateHierarchyData: h,
|
|
918
|
-
hasRealChildren: y,
|
|
919
|
-
insertSibling: v,
|
|
920
|
-
insertChild: g,
|
|
921
|
-
insertChildren: b,
|
|
922
|
-
isVisibleInTree: x,
|
|
923
|
-
shouldStratifyData: W,
|
|
924
|
-
toggleChildrenVisibiltyByCollapseStatus: N,
|
|
925
|
-
trimmedOriginalData: j,
|
|
926
|
-
checkVisibleInHierarchy: I
|
|
927
|
-
} = S, { idField: D, reviseIdentifyField: T } = i, B = O(e.newDataItem), L = O(e.data || []), Q = O(e.data), { flatTreeData: oe, isNestedTree: P } = ut(e);
|
|
928
|
-
if (e.hierarchy && P(e.data)) {
|
|
929
|
-
const V = oe(e.data);
|
|
930
|
-
E.value = V, L.value = V, Q.value = V;
|
|
931
|
-
}
|
|
932
|
-
const z = O(e.summary), J = Y(() => {
|
|
933
|
-
const V = z.value;
|
|
934
|
-
return (V == null ? void 0 : V.groupFields) || [];
|
|
935
|
-
});
|
|
936
|
-
let K = /* @__PURE__ */ new Map();
|
|
937
|
-
const re = O(L.value.length), ee = O(e.pagination);
|
|
938
|
-
function R() {
|
|
939
|
-
return ee.value && ee.value.enable && ee.value.size > 0 ? ee.value.size : L.value.length;
|
|
940
|
-
}
|
|
941
|
-
const A = O(1), $ = Y(() => ee.value && ee.value.enable && ee.value.mode !== "server"), U = Y(() => ee.value && ee.value.enable && ee.value.mode === "server"), Z = new dt();
|
|
942
|
-
function ae(V, H) {
|
|
943
|
-
const X = Math.ceil(V.length / H);
|
|
944
|
-
let ne = 0;
|
|
945
|
-
const fe = [], Ce = [], ke = [];
|
|
946
|
-
for (; ne < X; ) {
|
|
947
|
-
const ye = V.slice(ne * H, (ne + 1) * H), le = f(w.value, ye, t);
|
|
948
|
-
Ce[ne] = le.filter((ue) => ue.__fv_data_grid_group_row__).length, fe.push(...le), ne++;
|
|
949
|
-
}
|
|
950
|
-
return Ce.reduce((ye, le, ue) => (ye = ye + le, ke.push(ye), ye), 0), {
|
|
951
|
-
groupData: fe,
|
|
952
|
-
groupRowSizeList: Ce,
|
|
953
|
-
accumulateGroupRowSize: ke
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
function ie() {
|
|
957
|
-
var le;
|
|
958
|
-
L.value = E.value, $.value && (re.value = L.value.length), C.value && !$.value && (L.value = f(w.value, E.value, t)), K = J.value.reduce((ue, de) => (ue.set(de, 0), ue), K);
|
|
959
|
-
const V = 0, H = R(), X = (A.value - 1) * H;
|
|
960
|
-
let fe = X > L.value.length - 1 || U.value ? V : X, Ce = U.value ? L.value.length : Math.min(fe + H, L.value.length);
|
|
961
|
-
if (C.value && $.value) {
|
|
962
|
-
const { accumulateGroupRowSize: ue, groupData: de, groupRowSizeList: he } = ae(E.value, H);
|
|
963
|
-
L.value = de;
|
|
964
|
-
const Me = he[A.value - 1];
|
|
965
|
-
fe += A.value - 2 < 0 ? 0 : ue[A.value - 2], Ce = fe + H + Me;
|
|
966
|
-
}
|
|
967
|
-
let ke = 0;
|
|
968
|
-
const ye = [];
|
|
969
|
-
if (L.value.length) {
|
|
970
|
-
T(L.value);
|
|
971
|
-
const ue = D.value !== e.idField;
|
|
972
|
-
for (let de = fe; de < Ce; de++) {
|
|
973
|
-
const he = L.value[de];
|
|
974
|
-
he.__fv_data_grid_group_row__ ? (ke = 0, he.__fv_data_index__ = "") : he.__fv_data_grid_group_summary__ ? he.__fv_data_index__ = "" : (ke++, he.__fv_data_index__ = ke + (A.value - 1) * H), he.__fv_index__ = de, he.__fv_visible_index__ = de, e.rowOption && e.rowOption.disabledField && (he.__fv_disabled__ = he[(le = e.rowOption) == null ? void 0 : le.disabledField]), ue && (he[D.value] = de), J.value.forEach((Me) => {
|
|
975
|
-
const Pe = K.get(Me) || 0;
|
|
976
|
-
K.set(Me, Pe + ve(he, Me));
|
|
977
|
-
}), ye.push(he);
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
return W.value && h(ye), J.value.forEach((ue) => {
|
|
981
|
-
const de = K.get(ue) || 0;
|
|
982
|
-
K.set(ue, a(de.toFixed(2)));
|
|
983
|
-
}), Q.value = [...ye], ye;
|
|
984
|
-
}
|
|
985
|
-
const te = O(ie()), se = Y(() => (I.value, te.value.filter((V) => W.value ? V.__fv_visible__ !== !1 && x(V) : V.__fv_visible__ !== !1)));
|
|
986
|
-
function be() {
|
|
987
|
-
se.value.forEach((V, H) => (V.__fv_visible_index__ = H, V));
|
|
988
|
-
}
|
|
989
|
-
function ce(V, H, X = !1) {
|
|
990
|
-
var ye;
|
|
991
|
-
const ne = X ? ie() : [...Q.value];
|
|
992
|
-
let fe = ne;
|
|
993
|
-
((ye = e.filter) == null ? void 0 : ye.mode) !== "server" && (fe = ne.filter((le) => n.apply(le)));
|
|
994
|
-
const Ce = V && V.length ? fe.filter((le) => V.reduce((ue, de) => ue && de.filter(le), !0)) : fe, ke = H && H.length ? Ce.sort((le, ue) => {
|
|
995
|
-
const de = [...H], he = de.shift();
|
|
996
|
-
let Me = he.compare(ve(le, he.field), ve(ue, he.field));
|
|
997
|
-
for (; Me === 0 && de.length !== 0; ) {
|
|
998
|
-
const Pe = de.shift();
|
|
999
|
-
Pe && (Me = Pe.compare(ve(le, Pe.field), ve(ue, Pe.field)));
|
|
1000
|
-
}
|
|
1001
|
-
return Me;
|
|
1002
|
-
}) : Ce;
|
|
1003
|
-
return te.value = ke.map((le, ue) => {
|
|
1004
|
-
if (le.__fv_data_grid_group_row__) {
|
|
1005
|
-
const de = `group_of_${le.__fv_data_grid_group_field__}_${le.__fv_data_grid_group_value__}`;
|
|
1006
|
-
le.__fv_data_grid_group_collapse__ = !!r.get(de);
|
|
1007
|
-
}
|
|
1008
|
-
return le.__fv_index__ = ue, le.__fv_visible_index__ = ue, le;
|
|
1009
|
-
}), te.value;
|
|
1010
|
-
}
|
|
1011
|
-
function Be(V) {
|
|
1012
|
-
return d.clear(), l.value = V, l.value.reduce((H, X) => (H.set(X.field, X), H), d), ce([], l.value);
|
|
1013
|
-
}
|
|
1014
|
-
function M(V, H) {
|
|
1015
|
-
return d.set(V, H), l.value = Array.from(d.values()), ce([], l.value);
|
|
1016
|
-
}
|
|
1017
|
-
function G(V) {
|
|
1018
|
-
return d.delete(V), l.value = Array.from(d.values()), ce([], l.value);
|
|
1019
|
-
}
|
|
1020
|
-
function q(V, H) {
|
|
1021
|
-
return c.set(V, H), s.value = Array.from(c.values()), ce([], Array.from(d.values()));
|
|
1022
|
-
}
|
|
1023
|
-
function pe(V) {
|
|
1024
|
-
return c.delete(V), s.value = Array.from(c.values()), ce([], Array.from(d.values()), !0);
|
|
1025
|
-
}
|
|
1026
|
-
function ge() {
|
|
1027
|
-
return c.clear(), s.value = [], ce([], Array.from(d.values()), !0);
|
|
1028
|
-
}
|
|
1029
|
-
function De(V, H, X) {
|
|
1030
|
-
const ne = `group_of_${V}_${H}`;
|
|
1031
|
-
r.set(ne, !0);
|
|
1032
|
-
const fe = (Ce) => Ce[V] !== H;
|
|
1033
|
-
return m.set(`collapse_${V}_${H}`, {
|
|
1034
|
-
field: V,
|
|
1035
|
-
fieldName: V,
|
|
1036
|
-
fieldType: "string",
|
|
1037
|
-
filterValue: H,
|
|
1038
|
-
filter: fe
|
|
1039
|
-
}), ce(Array.from(m.values()), Array.from(d.values()));
|
|
1040
|
-
}
|
|
1041
|
-
function Nt(V) {
|
|
1042
|
-
k(te.value, V);
|
|
1043
|
-
}
|
|
1044
|
-
function Vt(V) {
|
|
1045
|
-
p(te.value, V);
|
|
1046
|
-
}
|
|
1047
|
-
function xt(V, H, X) {
|
|
1048
|
-
const ne = `group_of_${V}_${H}`;
|
|
1049
|
-
return r.set(ne, !1), m.delete(`collapse_${V}_${H}`), ce(Array.from(m.values()), Array.from(d.values()), !0);
|
|
1050
|
-
}
|
|
1051
|
-
function It(V) {
|
|
1052
|
-
const H = V.raw[D.value], X = (ne) => !ne.__fv_parents__.has(H);
|
|
1053
|
-
u.set(`fold_${H}`, {
|
|
1054
|
-
field: "id",
|
|
1055
|
-
fieldName: "id",
|
|
1056
|
-
fieldType: "string",
|
|
1057
|
-
filterValue: String(H),
|
|
1058
|
-
filter: X
|
|
1059
|
-
}), ce(Array.from(u.values()), Array.from(d.values())), h(te.value);
|
|
1060
|
-
}
|
|
1061
|
-
function He(V) {
|
|
1062
|
-
const H = V[D.value];
|
|
1063
|
-
u.delete(`fold_${H}`);
|
|
1064
|
-
}
|
|
1065
|
-
function Ot(V) {
|
|
1066
|
-
He(V.raw), ce(Array.from(u.values()), Array.from(d.values()), !0), h(te.value);
|
|
1067
|
-
}
|
|
1068
|
-
function Se() {
|
|
1069
|
-
const V = ie();
|
|
1070
|
-
te.value = V, e.hierarchy && (ce(Array.from(u.values()), Array.from(d.values())), h(te.value));
|
|
1071
|
-
}
|
|
1072
|
-
function Dt(V) {
|
|
1073
|
-
const X = e.hierarchy && P(V) ? oe(V) : V;
|
|
1074
|
-
E.value = X, Se();
|
|
1075
|
-
}
|
|
1076
|
-
function Pt(V, H, X) {
|
|
1077
|
-
return (V && V.length ? te.value.filter((fe, Ce) => V.reduce((ke, ye) => ke && ye.filter(fe), !0)) : te.value).slice(H, X);
|
|
1078
|
-
}
|
|
1079
|
-
function Bt(V) {
|
|
1080
|
-
const H = R(), X = Math.ceil(re.value / H);
|
|
1081
|
-
0 <= V && V <= X && (A.value = V, Se());
|
|
1082
|
-
}
|
|
1083
|
-
function Rt(V) {
|
|
1084
|
-
E.value.push(Ae(V)), te.value = ie();
|
|
1085
|
-
}
|
|
1086
|
-
function At(V = 0) {
|
|
1087
|
-
if (!(V > -1))
|
|
1088
|
-
return !1;
|
|
1089
|
-
const X = B.value();
|
|
1090
|
-
e.hierarchy ? v(V, X, E) : E.value.splice(V, 0, X), Se();
|
|
1091
|
-
}
|
|
1092
|
-
function Lt(V = 0) {
|
|
1093
|
-
if (!(V > -1 && e.hierarchy))
|
|
1094
|
-
return !1;
|
|
1095
|
-
const X = B.value(), ne = E.value[V];
|
|
1096
|
-
He(ne), g(V, X, E), Se();
|
|
1097
|
-
}
|
|
1098
|
-
function $t(V, H = 0) {
|
|
1099
|
-
if (!(H > -1 && e.hierarchy))
|
|
1100
|
-
return !1;
|
|
1101
|
-
const ne = E.value[H];
|
|
1102
|
-
He(ne), b(H, V, E), Se();
|
|
1103
|
-
}
|
|
1104
|
-
function jt(V) {
|
|
1105
|
-
const H = V ? V - 1 : 0;
|
|
1106
|
-
E.value.splice(H, 1), Se();
|
|
1107
|
-
}
|
|
1108
|
-
function Ht(V) {
|
|
1109
|
-
const H = E.value.findIndex((X) => X[D.value] === V);
|
|
1110
|
-
H !== -1 && (E.value.splice(H, 1), Se());
|
|
1111
|
-
}
|
|
1112
|
-
function Ut(V) {
|
|
1113
|
-
const H = V > -1 ? E.value[V] : null;
|
|
1114
|
-
if (!(H && H.deletable !== !1))
|
|
1115
|
-
return !1;
|
|
1116
|
-
E.value = j(H, E.value), Se();
|
|
1117
|
-
}
|
|
1118
|
-
function Gt() {
|
|
1119
|
-
const V = m.size > 0 ? Array.from(m.values()) : [];
|
|
1120
|
-
return ce(V, Array.from(d.values()));
|
|
1121
|
-
}
|
|
1122
|
-
function Je(V) {
|
|
1123
|
-
ee.value.size = V;
|
|
1124
|
-
}
|
|
1125
|
-
function qt(V) {
|
|
1126
|
-
ee.value && (Je(V), Se());
|
|
1127
|
-
}
|
|
1128
|
-
function zt(V, H) {
|
|
1129
|
-
const X = E.value[Number(V) - 1];
|
|
1130
|
-
X.editable !== !1 ? (X.name = H, Se()) : Z.show({
|
|
1131
|
-
showCloseButton: !1,
|
|
1132
|
-
timeout: 3e3,
|
|
1133
|
-
animate: "fadeIn",
|
|
1134
|
-
toasts: [{ type: "string", title: "提示", msg: "当前节点禁止编辑" }]
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
function Wt(V) {
|
|
1138
|
-
return V.map((X) => {
|
|
1139
|
-
const ne = Q.value.findIndex((fe) => "" + fe[D.value] == "" + X);
|
|
1140
|
-
return ne > -1 ? Q.value[ne] : null;
|
|
1141
|
-
}).filter((X) => X != null);
|
|
1142
|
-
}
|
|
1143
|
-
function Yt() {
|
|
1144
|
-
const V = e.summary.groupFields;
|
|
1145
|
-
K = V.reduce((H, X) => (H.set(X, 0), H), K);
|
|
1146
|
-
for (const H of L.value)
|
|
1147
|
-
V.forEach((X) => {
|
|
1148
|
-
const ne = K.get(X) || 0;
|
|
1149
|
-
K.set(X, ne + ve(H, X));
|
|
1150
|
-
});
|
|
1151
|
-
V.forEach((H) => {
|
|
1152
|
-
const X = K.get(H) || 0;
|
|
1153
|
-
K.set(H, a(X.toFixed(2)));
|
|
1154
|
-
});
|
|
1155
|
-
}
|
|
1156
|
-
function Xt(V) {
|
|
1157
|
-
const H = e.summary.groupFields;
|
|
1158
|
-
K = H.reduce((X, ne) => (X.set(ne, 0), X), K);
|
|
1159
|
-
for (const X of V)
|
|
1160
|
-
H.forEach((ne) => {
|
|
1161
|
-
const fe = K.get(ne) || 0;
|
|
1162
|
-
K.set(ne, fe + ve(X.raw, ne));
|
|
1163
|
-
});
|
|
1164
|
-
H.forEach((X) => {
|
|
1165
|
-
const ne = K.get(X) || 0;
|
|
1166
|
-
K.set(X, a(ne.toFixed(2)));
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
return {
|
|
1170
|
-
addFilter: q,
|
|
1171
|
-
addNewDataItem: Rt,
|
|
1172
|
-
addSorter: M,
|
|
1173
|
-
updatePageSize: Je,
|
|
1174
|
-
changePageSizeTo: qt,
|
|
1175
|
-
collapse: De,
|
|
1176
|
-
collapseTo: Nt,
|
|
1177
|
-
dataView: te,
|
|
1178
|
-
editDataItem: zt,
|
|
1179
|
-
expand: xt,
|
|
1180
|
-
expandTo: Vt,
|
|
1181
|
-
filters: s,
|
|
1182
|
-
fold: It,
|
|
1183
|
-
getRange: Pt,
|
|
1184
|
-
getSelectionItems: Wt,
|
|
1185
|
-
hasRealChildren: y,
|
|
1186
|
-
insertNewChildDataItem: Lt,
|
|
1187
|
-
insertNewChildDataItems: $t,
|
|
1188
|
-
insertNewDataItem: At,
|
|
1189
|
-
isVisibleInTree: x,
|
|
1190
|
-
load: Dt,
|
|
1191
|
-
navigatePageTo: Bt,
|
|
1192
|
-
pageIndex: A,
|
|
1193
|
-
rawView: Q,
|
|
1194
|
-
refresh: Gt,
|
|
1195
|
-
removeAllFilter: ge,
|
|
1196
|
-
removeDataItem: jt,
|
|
1197
|
-
removeDataItemById: Ht,
|
|
1198
|
-
removeFilter: pe,
|
|
1199
|
-
removeHierarchyDataItem: Ut,
|
|
1200
|
-
removeSorter: G,
|
|
1201
|
-
reOrderVisibleIndex: be,
|
|
1202
|
-
setSorters: Be,
|
|
1203
|
-
sorters: l,
|
|
1204
|
-
summaries: K,
|
|
1205
|
-
updateSummary: Yt,
|
|
1206
|
-
toggleChildrenVisibiltyByCollapseStatus: N,
|
|
1207
|
-
totalItems: re,
|
|
1208
|
-
unFold: Ot,
|
|
1209
|
-
updateDataView: Se,
|
|
1210
|
-
visibleDataItems: se,
|
|
1211
|
-
shouldGroupingData: C,
|
|
1212
|
-
pagination: ee,
|
|
1213
|
-
updateVisibleDataSummary: Xt
|
|
1214
|
-
};
|
|
1215
|
-
}
|
|
1216
|
-
const Bn = [
|
|
1217
|
-
"equal",
|
|
1218
|
-
"notEqual",
|
|
1219
|
-
"greaterThan",
|
|
1220
|
-
"greaterThanOrEqual",
|
|
1221
|
-
"lessThan",
|
|
1222
|
-
"lessThanOrEqual",
|
|
1223
|
-
"contain",
|
|
1224
|
-
"startWidth",
|
|
1225
|
-
"endWidth",
|
|
1226
|
-
"in",
|
|
1227
|
-
"notIn"
|
|
1228
|
-
], Rn = {
|
|
1229
|
-
equal: (e, t, n) => e && e[t] === n,
|
|
1230
|
-
notEqual: (e, t, n) => e && e[t] !== n,
|
|
1231
|
-
contain: (e, t, n) => e ? (e[t] || "").indexOf(n) > -1 : !1,
|
|
1232
|
-
startWidth: (e, t, n) => e ? (e[t] || "").startsWith(n) : !1,
|
|
1233
|
-
endWidth: (e, t, n) => e ? (e[t] || "").endsWith(n) : !1
|
|
1234
|
-
}, An = {
|
|
1235
|
-
equal: (e, t, n) => e && e[t] === n,
|
|
1236
|
-
in: (e, t, n) => {
|
|
1237
|
-
if (e) {
|
|
1238
|
-
const o = e[t];
|
|
1239
|
-
return n.indexOf(o) > -1;
|
|
1240
|
-
}
|
|
1241
|
-
return !1;
|
|
1242
|
-
},
|
|
1243
|
-
notEqual: (e, t, n) => e && e[t] !== n
|
|
1244
|
-
}, Ln = {
|
|
1245
|
-
equal: (e, t, n) => {
|
|
1246
|
-
if (e) {
|
|
1247
|
-
const o = new Date(n).getTime();
|
|
1248
|
-
return new Date(e[t]).getTime() === o;
|
|
1249
|
-
}
|
|
1250
|
-
return !1;
|
|
1251
|
-
},
|
|
1252
|
-
notEqual: (e, t, n) => {
|
|
1253
|
-
if (e) {
|
|
1254
|
-
const o = new Date(n).getTime();
|
|
1255
|
-
return new Date(e[t]).getTime() !== o;
|
|
1256
|
-
}
|
|
1257
|
-
return !1;
|
|
1258
|
-
},
|
|
1259
|
-
greaterThan: (e, t, n) => {
|
|
1260
|
-
if (e) {
|
|
1261
|
-
const o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
1262
|
-
return new Date(new Date(e[t]).toLocaleDateString()).valueOf() > o;
|
|
1263
|
-
}
|
|
1264
|
-
return !1;
|
|
1265
|
-
},
|
|
1266
|
-
greaterThanOrEqual: (e, t, n) => {
|
|
1267
|
-
if (e) {
|
|
1268
|
-
const o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
1269
|
-
return new Date(new Date(e[t]).toLocaleDateString()).valueOf() >= o;
|
|
1270
|
-
}
|
|
1271
|
-
return !1;
|
|
1272
|
-
},
|
|
1273
|
-
lessThan: (e, t, n) => {
|
|
1274
|
-
if (e) {
|
|
1275
|
-
const o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
1276
|
-
return new Date(new Date(e[t]).toLocaleDateString()).valueOf() < o;
|
|
1277
|
-
}
|
|
1278
|
-
return !1;
|
|
1279
|
-
},
|
|
1280
|
-
lessThanOrEqual: (e, t, n) => {
|
|
1281
|
-
if (e) {
|
|
1282
|
-
const o = new Date(new Date(n).toLocaleDateString()).valueOf();
|
|
1283
|
-
return new Date(new Date(e[t]).toLocaleDateString()).valueOf() <= o;
|
|
1284
|
-
}
|
|
1285
|
-
return !1;
|
|
1286
|
-
}
|
|
1287
|
-
}, $n = {
|
|
1288
|
-
equal: (e, t, n) => e ? String(n).split(",").includes(String(e[t])) : !1,
|
|
1289
|
-
in: (e, t, n) => {
|
|
1290
|
-
if (e) {
|
|
1291
|
-
const o = e[t];
|
|
1292
|
-
return n.indexOf(o) > -1;
|
|
1293
|
-
}
|
|
1294
|
-
return !1;
|
|
1295
|
-
},
|
|
1296
|
-
notEqual: (e, t, n) => e ? String(n).split(",").findIndex((i) => i === String(e[t])) === -1 : !1
|
|
1297
|
-
}, jn = {
|
|
1298
|
-
equal: (e, t, n) => {
|
|
1299
|
-
if (e) {
|
|
1300
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1301
|
-
return isNaN(o) ? isNaN(i) : o === i;
|
|
1302
|
-
}
|
|
1303
|
-
return !1;
|
|
1304
|
-
},
|
|
1305
|
-
notEqual: (e, t, n) => {
|
|
1306
|
-
if (e) {
|
|
1307
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1308
|
-
return isNaN(o) ? !0 : o !== i;
|
|
1309
|
-
}
|
|
1310
|
-
return !1;
|
|
1311
|
-
},
|
|
1312
|
-
greaterThan: (e, t, n) => {
|
|
1313
|
-
if (e) {
|
|
1314
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1315
|
-
return isNaN(o) ? isNaN(i) : i > o;
|
|
1316
|
-
}
|
|
1317
|
-
return !1;
|
|
1318
|
-
},
|
|
1319
|
-
greaterThanOrEqual: (e, t, n) => {
|
|
1320
|
-
if (e) {
|
|
1321
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1322
|
-
return isNaN(o) ? isNaN(i) : i >= o;
|
|
1323
|
-
}
|
|
1324
|
-
return !1;
|
|
1325
|
-
},
|
|
1326
|
-
lessThan: (e, t, n) => {
|
|
1327
|
-
if (e) {
|
|
1328
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1329
|
-
return isNaN(o) ? isNaN(i) : i < o;
|
|
1330
|
-
}
|
|
1331
|
-
return !1;
|
|
1332
|
-
},
|
|
1333
|
-
lessThanOrEqual: (e, t, n) => {
|
|
1334
|
-
if (e) {
|
|
1335
|
-
const o = Number.parseFloat(String(n)), i = Number.parseFloat(String(e[t]));
|
|
1336
|
-
return isNaN(o) ? isNaN(i) : i <= o;
|
|
1337
|
-
}
|
|
1338
|
-
return !1;
|
|
1339
|
-
}
|
|
1340
|
-
}, Hn = /* @__PURE__ */ new Map([
|
|
1341
|
-
["boolean", An],
|
|
1342
|
-
["datetime", Ln],
|
|
1343
|
-
["enum", $n],
|
|
1344
|
-
["number", jn],
|
|
1345
|
-
["text", Rn]
|
|
1346
|
-
]);
|
|
1347
|
-
function Un(e, t) {
|
|
1348
|
-
const n = O([]), o = /* @__PURE__ */ new Map(), { loadConditionGroup: i } = hn();
|
|
1349
|
-
function a(p, h) {
|
|
1350
|
-
switch (p) {
|
|
1351
|
-
case "check-box":
|
|
1352
|
-
return new Fn({ value: h });
|
|
1353
|
-
case "combo-list":
|
|
1354
|
-
return new Tn({ value: h });
|
|
1355
|
-
case "combo-lookup":
|
|
1356
|
-
return new En({ value: h });
|
|
1357
|
-
case "input-group":
|
|
1358
|
-
return new Ue({ value: h });
|
|
1359
|
-
case "date-picker":
|
|
1360
|
-
return new kn({ value: h });
|
|
1361
|
-
case "date-range":
|
|
1362
|
-
return new nt({ value: h });
|
|
1363
|
-
case "datetime-picker":
|
|
1364
|
-
return new Sn({ value: h });
|
|
1365
|
-
case "datetime-range":
|
|
1366
|
-
return new nt({ value: h });
|
|
1367
|
-
case "lookup":
|
|
1368
|
-
return new Ue({ value: h });
|
|
1369
|
-
case "month-picker":
|
|
1370
|
-
return new Cn({ value: h });
|
|
1371
|
-
case "month-range":
|
|
1372
|
-
return new wn({ value: h });
|
|
1373
|
-
case "number-range":
|
|
1374
|
-
return new bn({ value: h });
|
|
1375
|
-
case "number-spinner":
|
|
1376
|
-
return new yn({ value: h });
|
|
1377
|
-
case "radio-group":
|
|
1378
|
-
return new _n({ value: h });
|
|
1379
|
-
default:
|
|
1380
|
-
return new Ue({ value: h });
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
const r = /* @__PURE__ */ new Map([
|
|
1384
|
-
["boolean", "check-box"],
|
|
1385
|
-
["date", "date-picker"],
|
|
1386
|
-
["datetime", "datetime-picker"],
|
|
1387
|
-
["number", "number-spinner"],
|
|
1388
|
-
["string", "text"],
|
|
1389
|
-
["text", "text"],
|
|
1390
|
-
["enum", "combo-list"],
|
|
1391
|
-
["reference", "lookup"]
|
|
1392
|
-
]), c = /* @__PURE__ */ new Map([
|
|
1393
|
-
// ['boolean', CompareType.In],
|
|
1394
|
-
["boolean", we.Equal],
|
|
1395
|
-
["date", we.Equal],
|
|
1396
|
-
["datetime", we.Equal],
|
|
1397
|
-
["number", we.Equal],
|
|
1398
|
-
["string", we.Equal],
|
|
1399
|
-
["text", we.Equal],
|
|
1400
|
-
["enum", we.In],
|
|
1401
|
-
["reference", we.Equal]
|
|
1402
|
-
]);
|
|
1403
|
-
function m() {
|
|
1404
|
-
const p = n.value.filter((g) => g.value.valueType === "boolean"), h = [];
|
|
1405
|
-
p.forEach((g) => {
|
|
1406
|
-
const b = g.value.value;
|
|
1407
|
-
b.length === 1 && h.push({
|
|
1408
|
-
filterField: g.fieldCode,
|
|
1409
|
-
compare: g.compareType || g.compareType === 0 ? g.compareType : we.Like,
|
|
1410
|
-
value: g.value.value[0],
|
|
1411
|
-
relation: n.value.length > 1 ? g.relation || g.relation === 0 ? g.relation : 1 : 0,
|
|
1412
|
-
expresstype: Ve.Value,
|
|
1413
|
-
lbracket: g.lBracket || null,
|
|
1414
|
-
rbracket: g.rBracket || null
|
|
1415
|
-
}), b.length > 1 && h.push({
|
|
1416
|
-
filterField: g.fieldCode,
|
|
1417
|
-
compare: g.compareType || g.compareType === 0 ? g.compareType : we.Like,
|
|
1418
|
-
value: g.value.value[0],
|
|
1419
|
-
relation: 2,
|
|
1420
|
-
expresstype: Ve.Value,
|
|
1421
|
-
lbracket: g.lBracket ? g.lBracket + "(" : "(",
|
|
1422
|
-
rbracket: g.rBracket || null
|
|
1423
|
-
}, {
|
|
1424
|
-
filterField: g.fieldCode,
|
|
1425
|
-
compare: g.compareType || g.compareType === 0 ? g.compareType : we.Like,
|
|
1426
|
-
value: g.value.value[1],
|
|
1427
|
-
relation: n.value.length > 1 ? g.relation || g.relation === 0 ? g.relation : 1 : 0,
|
|
1428
|
-
expresstype: Ve.Value,
|
|
1429
|
-
lbracket: g.lBracket || null,
|
|
1430
|
-
rbracket: g.rBracket ? g.rBracket + ")" : ")"
|
|
1431
|
-
});
|
|
1432
|
-
});
|
|
1433
|
-
const v = n.value.filter((g) => g.value.valueType !== "boolean").map((g) => ({
|
|
1434
|
-
filterField: g.fieldCode,
|
|
1435
|
-
compare: g.compareType || g.compareType === 0 ? g.compareType : we.Like,
|
|
1436
|
-
value: g.value.value,
|
|
1437
|
-
relation: n.value.length > 1 ? g.relation || g.relation === 0 ? g.relation : 1 : 0,
|
|
1438
|
-
expresstype: Ve.Value,
|
|
1439
|
-
lbracket: g.lBracket || null,
|
|
1440
|
-
rbracket: g.rBracket || null
|
|
1441
|
-
}));
|
|
1442
|
-
return [...h, ...v];
|
|
1443
|
-
}
|
|
1444
|
-
function u(p) {
|
|
1445
|
-
var y;
|
|
1446
|
-
const h = p.dataType || "string";
|
|
1447
|
-
return ((y = p.editor) == null ? void 0 : y.type) || r.get(h) || "text";
|
|
1448
|
-
}
|
|
1449
|
-
function d(p) {
|
|
1450
|
-
var I, D, T, B, L;
|
|
1451
|
-
const h = `field_filter_${p.field}`, y = Date.now(), v = p.field, g = ((I = p.column) == null ? void 0 : I.title) || "", b = ((D = p.column) == null ? void 0 : D.dataType) || "string", x = c.get(b) || we.Equal, W = ((B = (T = p.column) == null ? void 0 : T.editor) == null ? void 0 : B.type) || r.get(b) || "text", N = a(W, (L = p.column) == null ? void 0 : L.filter), j = W === "lookup" || W === "combo-lookup" ? Ve.SmartHelp : W === "combo-list" ? Ve.Enum : Ve.Value;
|
|
1452
|
-
o.set(h, { id: h, fieldCode: v, fieldName: g, compareType: x, valueType: j, value: N, conditionId: y }), n.value = Array.from(o.values());
|
|
1453
|
-
}
|
|
1454
|
-
function s(p) {
|
|
1455
|
-
const h = `field_filter_${p.field}`;
|
|
1456
|
-
o.delete(h), n.value = Array.from(o.values());
|
|
1457
|
-
}
|
|
1458
|
-
function l(p) {
|
|
1459
|
-
o.delete(p), n.value = Array.from(o.values());
|
|
1460
|
-
}
|
|
1461
|
-
function _() {
|
|
1462
|
-
o.clear(), n.value = [];
|
|
1463
|
-
}
|
|
1464
|
-
function f(p) {
|
|
1465
|
-
const { valueType: h } = p.value, y = p.compareType || "0", v = Bn[Number(y)];
|
|
1466
|
-
return Hn.get(h)[v];
|
|
1467
|
-
}
|
|
1468
|
-
function w(p) {
|
|
1469
|
-
const h = p.relation === 2 ? 0 : 1, y = p.items.map((g) => {
|
|
1470
|
-
const b = f(g);
|
|
1471
|
-
return (W) => b(W, g.fieldCode, g.value.getValue());
|
|
1472
|
-
}), v = p.children && p.children.length ? p.children.map((g) => w(g)) : [];
|
|
1473
|
-
return { relation: h, filterFunctions: y, children: v };
|
|
1474
|
-
}
|
|
1475
|
-
function C() {
|
|
1476
|
-
const p = i(n.value);
|
|
1477
|
-
return w(p);
|
|
1478
|
-
}
|
|
1479
|
-
function E(p, h) {
|
|
1480
|
-
const y = h.filterFunctions.map((g) => g(p)), v = h.children.map((g) => E(p, g));
|
|
1481
|
-
return h.relation === 1 ? y.every((g) => g) && v.every((g) => g) : y.includes(!0) || v.includes(!0);
|
|
1482
|
-
}
|
|
1483
|
-
function S(p) {
|
|
1484
|
-
const h = C();
|
|
1485
|
-
return E(p, h);
|
|
1486
|
-
}
|
|
1487
|
-
function k(p) {
|
|
1488
|
-
t.emit("filterChanged", p);
|
|
1489
|
-
}
|
|
1490
|
-
return {
|
|
1491
|
-
addColumnFilter: d,
|
|
1492
|
-
apply: S,
|
|
1493
|
-
clearCondition: _,
|
|
1494
|
-
conditions: n,
|
|
1495
|
-
getFilterEditorType: u,
|
|
1496
|
-
removeColumnFilter: s,
|
|
1497
|
-
removeCondition: l,
|
|
1498
|
-
filterFromServer: k,
|
|
1499
|
-
createFilterConditions: m
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
function Gn(e) {
|
|
1503
|
-
O(e.selection.showCheckbox || !1);
|
|
1504
|
-
const t = Y(() => {
|
|
1505
|
-
var r;
|
|
1506
|
-
return ((r = e.hierarchy) == null ? void 0 : r.collapseField) || "__fv_collapse__";
|
|
1507
|
-
}), n = Y(() => {
|
|
1508
|
-
var r;
|
|
1509
|
-
return ((r = e.hierarchy) == null ? void 0 : r.hasChildrenField) || "__fv_hasChildren__";
|
|
1510
|
-
}), o = Y(() => {
|
|
1511
|
-
var r;
|
|
1512
|
-
return ((r = e.hierarchy) == null ? void 0 : r.parentIdField) || "parent";
|
|
1513
|
-
}), i = Y(() => e.hierarchy && e.selection.showCheckbox), a = Y(() => (e.treeNodeIconsData.fold || e.iconField) && e.showTreeNodeIcons);
|
|
1514
|
-
return { collapseField: t, hasChildrenField: n, parentIdField: o, shouldShowCheckBox: i, shouldShowIcon: a };
|
|
1515
|
-
}
|
|
1516
|
-
function qn(e, t, n, o, i, a, r, c) {
|
|
1517
|
-
const m = O(o.value - 1 + i), u = O(0), { renderDataRow: d } = a, s = r ? r.renderGroupRow : d, l = c ? c.renderSummaryRow : d;
|
|
1518
|
-
function _(C) {
|
|
1519
|
-
let E = d;
|
|
1520
|
-
return C.__fv_data_grid_group_row__ && (E = s), C.__fv_data_grid_group_summary__ && (E = l), E;
|
|
1521
|
-
}
|
|
1522
|
-
function f(C, E, S, k) {
|
|
1523
|
-
const { dataView: p, visibleDataItems: h } = n, y = [], v = e.virtualized ? h.value : p.value;
|
|
1524
|
-
if (v.length > 0) {
|
|
1525
|
-
const g = k ? Date.now().toString() : "";
|
|
1526
|
-
let b = C, x = 0;
|
|
1527
|
-
const W = E - C + 1;
|
|
1528
|
-
for (; y.length < W && b < v.length; ) {
|
|
1529
|
-
const N = v[b], j = v[b - 1] || S, I = y[x - 1], D = j ? (j.__fv_data_position__ || 0) + (j.__fv_data_height__ || 0) : 0, B = _(N)(N, j, I, b, D, t.value);
|
|
1530
|
-
B.refreshKey = g, B.visible && (y.push(B), x++), b++;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
return u.value = y.length > 0 ? y[0].raw.__fv_visible_index__ : 0, m.value = y.length > 0 ? y[y.length - 1].raw.__fv_visible_index__ : 0, y;
|
|
1534
|
-
}
|
|
1535
|
-
function w(C, E, S) {
|
|
1536
|
-
const k = E.groupField || "", { groupValue: p, raw: h } = E;
|
|
1537
|
-
n[C](k, p, h.groupParents || []);
|
|
1538
|
-
const { dataView: y } = n, v = S[0].index, g = Math.min(v + o.value + i + 1, y.value.length - 1);
|
|
1539
|
-
return f(v, g);
|
|
1540
|
-
}
|
|
1541
|
-
return { getVisualData: f, maxVisibleRowIndex: m, minVisibleRowIndex: u, toggleGroupRow: w };
|
|
1542
|
-
}
|
|
1543
|
-
function zn(e) {
|
|
1544
|
-
var a;
|
|
1545
|
-
const { isUndefined: t } = at(), n = ((a = e.rowOption) == null ? void 0 : a.height) || 28;
|
|
1546
|
-
function o(r, c) {
|
|
1547
|
-
const m = r.pre;
|
|
1548
|
-
if (m) {
|
|
1549
|
-
let u = m.__fv_data_position__, d = m.__fv_data_height__;
|
|
1550
|
-
(t(u) || // when virtual loading, position of tree node should recalculate after collapse tree node.
|
|
1551
|
-
e.virtualized && e.hierarchy && m.__fv_visible_index__ * n !== u) && (u = m.__fv_visible_index__ * n), t(d) && (d = n);
|
|
1552
|
-
const s = r.visible ? u + d : m.__fv_data_position__;
|
|
1553
|
-
r.top = s, c.__fv_data_position__ = s;
|
|
1554
|
-
} else
|
|
1555
|
-
r.top = 0, c.__fv_data_position__ = 0;
|
|
1556
|
-
}
|
|
1557
|
-
function i(r, c, m) {
|
|
1558
|
-
if (r && !c.ref) {
|
|
1559
|
-
c.ref = r;
|
|
1560
|
-
const u = c.parent;
|
|
1561
|
-
c.cellHeight !== r.offsetHeight && (c.cellHeight = r.offsetHeight), c.cellHeight && c.cellHeight > (u.height || 0) && (u.height = c.cellHeight, m.__fv_data_height__ = u.height), o(u, m);
|
|
1562
|
-
}
|
|
1563
|
-
!r && c.ref && (c.ref = r);
|
|
1564
|
-
}
|
|
1565
|
-
return { updateRowPosition: o, updateVisualInfomation: i };
|
|
1566
|
-
}
|
|
1567
|
-
function Wn() {
|
|
1568
|
-
function e(t, n) {
|
|
1569
|
-
var r, c;
|
|
1570
|
-
if (!n.data || !n.data.length)
|
|
1571
|
-
return "";
|
|
1572
|
-
const o = Object.prototype.hasOwnProperty.call(n, "valueField") && n.valueField || "value", i = Object.prototype.hasOwnProperty.call(n, "textField") && n.textField || "name";
|
|
1573
|
-
if (t != null && t.includes(",")) {
|
|
1574
|
-
const m = t.split(",");
|
|
1575
|
-
if (!n.data.filter((l) => m.includes(l[o])).length)
|
|
1576
|
-
return "";
|
|
1577
|
-
const d = (r = n.data) == null ? void 0 : r.reduce((l, _) => (l[_[o]] = _, l), {});
|
|
1578
|
-
return m.map((l) => {
|
|
1579
|
-
var _;
|
|
1580
|
-
return (_ = d[l]) == null ? void 0 : _[i];
|
|
1581
|
-
}).join(",") || t;
|
|
1582
|
-
}
|
|
1583
|
-
const a = (c = n.data) == null ? void 0 : c.find((m) => m[o] === t);
|
|
1584
|
-
return (a == null ? void 0 : a[i]) || t || "";
|
|
1585
|
-
}
|
|
1586
|
-
return {
|
|
1587
|
-
renderEnumColumn: e
|
|
1588
|
-
};
|
|
1589
|
-
}
|
|
1590
|
-
function Yn() {
|
|
1591
|
-
function e(t, n) {
|
|
1592
|
-
return t ? n == null ? void 0 : n.trueText : n == null ? void 0 : n.falseText;
|
|
1593
|
-
}
|
|
1594
|
-
return {
|
|
1595
|
-
renderText: e
|
|
1596
|
-
};
|
|
1597
|
-
}
|
|
1598
|
-
function Xn() {
|
|
1599
|
-
const {
|
|
1600
|
-
formatTo: e
|
|
1601
|
-
} = Kt();
|
|
1602
|
-
function t(o, i) {
|
|
1603
|
-
if (o) {
|
|
1604
|
-
let a = "yyyy-MM-dd";
|
|
1605
|
-
if (typeof i == "string" ? a = i : typeof i == "object" && (a = i.format || "yyyy-MM-dd"), a = a.replace("YYYY", "yyyy").replace("-DD", "-dd"), typeof i == "object" && i.dateRange) {
|
|
1606
|
-
const r = i.dateRangeDatesDelimiter || "~";
|
|
1607
|
-
let [c, m] = o.split(r);
|
|
1608
|
-
return c = e(c, a), m = e(m, a), c + r + m;
|
|
1609
|
-
}
|
|
1610
|
-
return e(o, a);
|
|
1611
|
-
}
|
|
1612
|
-
return o;
|
|
1613
|
-
}
|
|
1614
|
-
function n(o, i) {
|
|
1615
|
-
const a = i.dateFormat || "yyyy-MM-dd";
|
|
1616
|
-
return e(o, a);
|
|
1617
|
-
}
|
|
1618
|
-
return {
|
|
1619
|
-
renderDateColumn: n,
|
|
1620
|
-
renderDateTimeColumn: t
|
|
1621
|
-
};
|
|
1622
|
-
}
|
|
1623
|
-
function Jn() {
|
|
1624
|
-
const {
|
|
1625
|
-
formatTo: e
|
|
1626
|
-
} = it();
|
|
1627
|
-
function t(n, o) {
|
|
1628
|
-
const i = {
|
|
1629
|
-
precision: o.precision,
|
|
1630
|
-
prefix: o.prefix || "",
|
|
1631
|
-
suffix: o.suffix || "",
|
|
1632
|
-
decimalSeparator: o.decimal || ".",
|
|
1633
|
-
groupSeparator: o.thousand || ""
|
|
1634
|
-
};
|
|
1635
|
-
return e(n, i) || n;
|
|
1636
|
-
}
|
|
1637
|
-
return {
|
|
1638
|
-
renderNumberColumn: t
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1641
|
-
function Qn() {
|
|
1642
|
-
function e(t, n) {
|
|
1643
|
-
if (t) {
|
|
1644
|
-
const o = {};
|
|
1645
|
-
return n != null && n.width && (o.width = `${n.width}px`), n != null && n.height && (o.height = `${n.height}px`), F("img", {
|
|
1646
|
-
src: t,
|
|
1647
|
-
style: o
|
|
1648
|
-
}, null);
|
|
1649
|
-
}
|
|
1650
|
-
return t;
|
|
1651
|
-
}
|
|
1652
|
-
return {
|
|
1653
|
-
renderImageColumn: e
|
|
1654
|
-
};
|
|
1655
|
-
}
|
|
1656
|
-
function Zn() {
|
|
1657
|
-
const {
|
|
1658
|
-
locale: e
|
|
1659
|
-
} = je();
|
|
1660
|
-
function t(n, o) {
|
|
1661
|
-
return (n == null ? void 0 : n[e.value || "zh-CHS"]) || "";
|
|
1662
|
-
}
|
|
1663
|
-
return {
|
|
1664
|
-
renderMultilingualColumn: t
|
|
1665
|
-
};
|
|
1666
|
-
}
|
|
1667
|
-
function Kn() {
|
|
1668
|
-
const {
|
|
1669
|
-
renderText: e
|
|
1670
|
-
} = Yn(), {
|
|
1671
|
-
renderEnumColumn: t
|
|
1672
|
-
} = Wn(), {
|
|
1673
|
-
renderNumberColumn: n
|
|
1674
|
-
} = Jn(), {
|
|
1675
|
-
renderDateColumn: o,
|
|
1676
|
-
renderDateTimeColumn: i
|
|
1677
|
-
} = Xn(), {
|
|
1678
|
-
renderImageColumn: a
|
|
1679
|
-
} = Qn(), {
|
|
1680
|
-
renderMultilingualColumn: r
|
|
1681
|
-
} = Zn();
|
|
1682
|
-
function c(d) {
|
|
1683
|
-
return typeof d == "boolean" ? d.toString() : d;
|
|
1684
|
-
}
|
|
1685
|
-
function m(d, s, l) {
|
|
1686
|
-
return s.customFormat ? (
|
|
1687
|
-
// new Function(`return ${options.customFormat}`)() :
|
|
1688
|
-
s.customFormat(d, l.raw)
|
|
1689
|
-
) : c(d);
|
|
1690
|
-
}
|
|
1691
|
-
function u(d, s, l) {
|
|
1692
|
-
const {
|
|
1693
|
-
column: _
|
|
1694
|
-
} = d, f = ve(s.raw, _.field), w = l.options || l;
|
|
1695
|
-
return l.type === Ee.NONE ? c(f) : l.type === Ee.CUSTOM ? m(f, l, s) : l.type === Ee.ENUM ? t(f, w) : l.type === Ee.NUMBER ? n(f, w) : l.type === Ee.BOOLEAN ? e(f, w) : l.type === Ee.DATE ? o(f, w) : l.type === Ee.DATE_TIME ? i(f, l) : l.type === Ee.IMAGE ? a(f, w) : l.type === Ee.MULTI_LINGUAL ? r(f, w) : c(f);
|
|
1696
|
-
}
|
|
1697
|
-
return {
|
|
1698
|
-
renderFormatColumn: u
|
|
1699
|
-
};
|
|
1700
|
-
}
|
|
1701
|
-
function eo(e, t, n) {
|
|
1702
|
-
var E;
|
|
1703
|
-
const { isUndefined: o } = at(), i = O(e.mergeCell);
|
|
1704
|
-
(E = O(e.rowOption).value) != null && E.wrapContent;
|
|
1705
|
-
const { updateVisualInfomation: r } = n, { renderCommandColumn: c } = Vn(e), { renderFormatColumn: m } = Kn();
|
|
1706
|
-
function u(S, k, p, h, y, v = 1) {
|
|
1707
|
-
const g = {
|
|
1708
|
-
colSpan: v,
|
|
1709
|
-
rowSpan: 1,
|
|
1710
|
-
index: p,
|
|
1711
|
-
field: S,
|
|
1712
|
-
data: ve(h, S),
|
|
1713
|
-
editingData: ve(h, S),
|
|
1714
|
-
parent: y,
|
|
1715
|
-
mode: k,
|
|
1716
|
-
align: "left",
|
|
1717
|
-
valign: "start",
|
|
1718
|
-
showEllipsis: !0,
|
|
1719
|
-
getEditor: (b) => b.data,
|
|
1720
|
-
setRef: (b) => r(b, g, h),
|
|
1721
|
-
update: () => {
|
|
1722
|
-
},
|
|
1723
|
-
accept: () => {
|
|
1724
|
-
},
|
|
1725
|
-
cancel: () => {
|
|
1726
|
-
},
|
|
1727
|
-
updateData: () => {
|
|
1728
|
-
}
|
|
1729
|
-
};
|
|
1730
|
-
return g;
|
|
1731
|
-
}
|
|
1732
|
-
function d(S, k, p) {
|
|
1733
|
-
return S.getEditor = (h) => t.getEditor(h, k, h.parent), S.setRef = (h) => r(h, S, p), S.update = (h) => {
|
|
1734
|
-
h !== void 0 && (S.editingData = h);
|
|
1735
|
-
}, S.accept = () => {
|
|
1736
|
-
qe(S.editingData, p, k.field), S.data = ve(p, k.field);
|
|
1737
|
-
}, S.cancel = () => {
|
|
1738
|
-
S.editingData = S.data;
|
|
1739
|
-
}, S.updateData = (h) => {
|
|
1740
|
-
qe(ve(h, k.field), p, k.field), S.data = ve(p, k.field), S.editingData = ve(p, k.field);
|
|
1741
|
-
}, S;
|
|
1742
|
-
}
|
|
1743
|
-
function s(S, k) {
|
|
1744
|
-
k.dataType === "commands" ? S.formatter = (p, h) => k.formatter ? k.formatter(S, h) : c(S, h) : k.formatter && (S.formatter = (p, h) => typeof k.formatter == "function" ? k.formatter(p, h) : m(S, h, k.formatter));
|
|
1745
|
-
}
|
|
1746
|
-
function l(S, k, p) {
|
|
1747
|
-
const h = k && k.data[p];
|
|
1748
|
-
if (h && h.data === S.data) {
|
|
1749
|
-
const v = h && h.spannedBy || h;
|
|
1750
|
-
v.rowSpan++, v.spanned = v.spanned || [], v.spanned.push(S), S.colSpan = 0, S.rowSpan = 0, S.spannedBy = v;
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
function _(S, k, p) {
|
|
1754
|
-
i.value && l(S, k, p.field);
|
|
1755
|
-
}
|
|
1756
|
-
function f(S, k) {
|
|
1757
|
-
k.showEllipsis !== void 0 && (S.showEllipsis = k.showEllipsis), S.showTips = o(k.showTips) ? !0 : k.showTips, S.column = k, S.align = k.align || "left", S.valign = k.valign || "middle", S.mode = e.editable ? _e.editable : _e.readonly;
|
|
1758
|
-
}
|
|
1759
|
-
function w(S, k, p, h) {
|
|
1760
|
-
f(S, k), d(S, k, h), s(S, k), _(S, p, k);
|
|
1761
|
-
}
|
|
1762
|
-
function C(S, k, p, h, y) {
|
|
1763
|
-
const v = e.editable ? _e.editable : _e.readonly, g = u(S.field, v, k, p, h);
|
|
1764
|
-
return w(g, S, y, p), g;
|
|
1765
|
-
}
|
|
1766
|
-
return { createCellByColumn: C, createCellByField: u, updateCellByColumn: w };
|
|
1767
|
-
}
|
|
1768
|
-
function to(e, t, n, o, i, a, r) {
|
|
1769
|
-
var k, p;
|
|
1770
|
-
const c = O(e.rowOption), m = ((k = c.value) == null ? void 0 : k.height) || 28, u = ((p = c.value) == null ? void 0 : p.wrapContent) || !1, { idField: d } = i, { collapseField: s } = o, { updateRowPosition: l } = a, { createCellByColumn: _ } = r, f = (h, y, v, g) => {
|
|
1771
|
-
qe(ve(h, g), y, g), v.data[g].data = ve(y, g), v.data[g].editingData = ve(y, g);
|
|
1772
|
-
};
|
|
1773
|
-
function w(h, y, v, g, b, x) {
|
|
1774
|
-
var J, K, re;
|
|
1775
|
-
const {
|
|
1776
|
-
__fv_data_grid_group_field__: W,
|
|
1777
|
-
__fv_data_grid_group_value__: N,
|
|
1778
|
-
__fv_data_index__: j
|
|
1779
|
-
} = v, I = v.__fv_data_grid_group_layer__ || (v.__fv_parents__ ? (J = v.__fv_parents__) == null ? void 0 : J.size : 0) || 0, D = typeof v.parent == "number" ? Number(v.parent) : -1, T = v.__fv_data_grid_group_collapse__ || v[s.value], B = v.__fv_visible__ === void 0 ? !0 : v.__fv_visible__, L = v.__fv_checked__, Q = v.__fv_indeterminate__, oe = v.__fv_disabled__ || v[((K = e.rowOption) == null ? void 0 : K.disabledField) || "disabled"], P = e.hierarchy && t.isVisibleInTree(v), z = {
|
|
1780
|
-
collapse: T,
|
|
1781
|
-
data: {},
|
|
1782
|
-
dataIndex: j,
|
|
1783
|
-
groupField: W,
|
|
1784
|
-
groupValue: N,
|
|
1785
|
-
layer: I,
|
|
1786
|
-
index: y,
|
|
1787
|
-
parentIndex: D,
|
|
1788
|
-
pre: g,
|
|
1789
|
-
top: x,
|
|
1790
|
-
type: h,
|
|
1791
|
-
raw: v,
|
|
1792
|
-
checked: L,
|
|
1793
|
-
disabled: oe,
|
|
1794
|
-
indeterminate: Q,
|
|
1795
|
-
setRef: (ee) => {
|
|
1796
|
-
z.ref = ee;
|
|
1797
|
-
},
|
|
1798
|
-
visible: B && P || B && !e.hierarchy,
|
|
1799
|
-
status: Fe.initial,
|
|
1800
|
-
updateCell: (ee, R) => {
|
|
1801
|
-
f(ee, v, z, R), t.updateSummary();
|
|
1802
|
-
},
|
|
1803
|
-
updateCells: (ee, R) => {
|
|
1804
|
-
R.forEach((A) => {
|
|
1805
|
-
f(ee, v, z, A);
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
};
|
|
1809
|
-
return g || (v.__fv_data_position__ = 0), u || (z.height = m, v.__fv_data_height__ = z.height, l(z, v)), (re = c.value) != null && re.customRowStatus && (c.value.customRowStatus(z), v.__fv_disabled__ = z.disabled), z;
|
|
1810
|
-
}
|
|
1811
|
-
function C(h, y, v, g, b, x) {
|
|
1812
|
-
const W = w(Ie.data, b, y, v, g, x);
|
|
1813
|
-
return h.forEach((N, j) => {
|
|
1814
|
-
W.data[N.field] = _(N, j, y, W, g);
|
|
1815
|
-
}), W;
|
|
1816
|
-
}
|
|
1817
|
-
function E(h, y, v, g, b) {
|
|
1818
|
-
return Object.assign(h, { index: y, dataIndex: v, top: g, pre: b });
|
|
1819
|
-
}
|
|
1820
|
-
function S(h, y, v, g, b, x) {
|
|
1821
|
-
const W = h.__fv_data_index__, N = h[d.value], j = n.getEditingSnapshot(N);
|
|
1822
|
-
return j === null ? C(
|
|
1823
|
-
x,
|
|
1824
|
-
h,
|
|
1825
|
-
y,
|
|
1826
|
-
v,
|
|
1827
|
-
g,
|
|
1828
|
-
b
|
|
1829
|
-
) : E(j, g, W, b, y);
|
|
1830
|
-
}
|
|
1831
|
-
return { createEmptyRow: w, createNewRowFromDataItem: C, renderDataRow: S };
|
|
1832
|
-
}
|
|
1833
|
-
function no(e, t, n, o) {
|
|
1834
|
-
const i = O(e.summary), { idField: a } = t, { createCellByField: r } = n, { createEmptyRow: c } = o, m = Y(() => {
|
|
1835
|
-
const l = i.value;
|
|
1836
|
-
return (l == null ? void 0 : l.groupFields) || [];
|
|
1837
|
-
}), u = Y(() => {
|
|
1838
|
-
const l = i.value;
|
|
1839
|
-
return l && l.enable && l.groupFields && l.groupFields.length > 0;
|
|
1840
|
-
});
|
|
1841
|
-
function d(l, _, f, w) {
|
|
1842
|
-
if (u.value) {
|
|
1843
|
-
const C = l.data[_];
|
|
1844
|
-
let E = C.colSpan;
|
|
1845
|
-
const S = m.value.reduce((k, p) => (k.set(p, !0), k), /* @__PURE__ */ new Map());
|
|
1846
|
-
w.reduce((k, p, h) => {
|
|
1847
|
-
if (S.has(p.field)) {
|
|
1848
|
-
const y = r(p.field, _e.readonly, h, f, l);
|
|
1849
|
-
l.data[p.field] = y, E - 1 > h && (E = h);
|
|
1850
|
-
}
|
|
1851
|
-
return k;
|
|
1852
|
-
}, l), C.colSpan = E;
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
|
-
function s(l, _, f, w, C, E, S) {
|
|
1856
|
-
const k = l.__fv_data_grid_group_field__, p = c(Ie.group, w, l, _, f, C);
|
|
1857
|
-
return p.data[a.value] = r(a.value, _e.readonly, -1, l, p, 0), p.data[k] = r(k, _e.readonly, 1, l, p, E.length), d(p, k, l, E), p;
|
|
1858
|
-
}
|
|
1859
|
-
return { renderGroupRow: s };
|
|
1860
|
-
}
|
|
1861
|
-
function oo(e, t, n, o) {
|
|
1862
|
-
const { idField: i } = t, { createCellByField: a } = n, { createEmptyRow: r } = o;
|
|
1863
|
-
function c(m, u, d, s, l, _, f) {
|
|
1864
|
-
const w = m.__fv_data_grid_group_field__, C = r(Ie.summary, s, m, u, d, l);
|
|
1865
|
-
return C.data[i.value] = a(i.value, _e.readonly, -1, m, C), C.data[w] = a(w, _e.readonly, 1, m, C, _.length), C;
|
|
1866
|
-
}
|
|
1867
|
-
return { renderSummaryRow: c };
|
|
1868
|
-
}
|
|
1869
|
-
function ro(e, t, n, o, i) {
|
|
1870
|
-
var oe;
|
|
1871
|
-
const {
|
|
1872
|
-
idField: a
|
|
1873
|
-
} = n, r = O(e.editable), c = O(e.editOption), m = O(((oe = e.rowOption) == null ? void 0 : oe.wrapContent) || !1), {
|
|
1874
|
-
onClickRow: u,
|
|
1875
|
-
onClickRowExcludeDblclick: d
|
|
1876
|
-
} = o, s = /* @__PURE__ */ new Map([["boolean", "check-box"], ["datetime", "date-picker"], ["enum", "combo-list"], ["number", "number-spinner"], ["string", "input-group"], ["text", "text"], ["commands", "commands-editor"]]);
|
|
1877
|
-
let l, _, f, w, C;
|
|
1878
|
-
function E(P) {
|
|
1879
|
-
return _ && _.raw[a.value] === P ? _ : null;
|
|
1880
|
-
}
|
|
1881
|
-
const S = st({});
|
|
1882
|
-
function k(P, z, J = {}) {
|
|
1883
|
-
P.mode = _e.editing, l = P, _ = z, f = ve(z == null ? void 0 : z.raw, P.field), w = J;
|
|
1884
|
-
for (const K in S)
|
|
1885
|
-
delete S[K];
|
|
1886
|
-
}
|
|
1887
|
-
function p(P) {
|
|
1888
|
-
P.accept(), P.mode = _e.editable, l = null;
|
|
1889
|
-
const z = {};
|
|
1890
|
-
_ && (Object.keys(_).forEach((J) => {
|
|
1891
|
-
z[J] = _ == null ? void 0 : _[J];
|
|
1892
|
-
}), _ = null), t.emit("endEditCell", {
|
|
1893
|
-
cell: P,
|
|
1894
|
-
row: z,
|
|
1895
|
-
newValue: ve(z == null ? void 0 : z.raw, P.field),
|
|
1896
|
-
oldValue: f,
|
|
1897
|
-
column: w,
|
|
1898
|
-
editor: S
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
function h(P) {
|
|
1902
|
-
const z = Promise.resolve(!0);
|
|
1903
|
-
return P ? z.then(() => Ke(e.beforeEndEditCell) ? !0 : typeof e.beforeEndEditCell == "function" ? e.beforeEndEditCell({
|
|
1904
|
-
cell: P,
|
|
1905
|
-
row: _,
|
|
1906
|
-
newValue: P.editingData,
|
|
1907
|
-
oldValue: f
|
|
1908
|
-
}) : () => !0).then((J) => (J && (p(P), _ && (_ = null)), J)) : z;
|
|
1909
|
-
}
|
|
1910
|
-
function y(P) {
|
|
1911
|
-
if (C && C !== P.target) {
|
|
1912
|
-
C = null;
|
|
1913
|
-
return;
|
|
1914
|
-
}
|
|
1915
|
-
if (document.body.classList.contains("lookup-modal-open"))
|
|
1916
|
-
return;
|
|
1917
|
-
const J = P.target;
|
|
1918
|
-
if (!(J != null && J.closest(".popover"))) {
|
|
1919
|
-
if (P instanceof MouseEvent || P.key !== "Enter") {
|
|
1920
|
-
const K = J.closest(".fv-grid-cell");
|
|
1921
|
-
if (l && l.ref && l.ref === K)
|
|
1922
|
-
return;
|
|
1923
|
-
}
|
|
1924
|
-
h(l).then((K) => {
|
|
1925
|
-
K && document.body.removeEventListener("click", y, !0);
|
|
1926
|
-
});
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
function v(P, z, J) {
|
|
1930
|
-
return Promise.resolve().then(() => {
|
|
1931
|
-
var re;
|
|
1932
|
-
const K = (re = J.editor) == null ? void 0 : re.readonly;
|
|
1933
|
-
return !Ke(e.beforeEditCell) && typeof e.beforeEditCell == "function" ? e.beforeEditCell({
|
|
1934
|
-
row: P,
|
|
1935
|
-
cell: z,
|
|
1936
|
-
rawData: P.raw,
|
|
1937
|
-
column: J
|
|
1938
|
-
}) : !K;
|
|
1939
|
-
}).then((K) => {
|
|
1940
|
-
K && (k(z, P, J), document.body.removeEventListener("click", y, !0), document.body.addEventListener("click", y, !0));
|
|
1941
|
-
});
|
|
1942
|
-
}
|
|
1943
|
-
function g(P, z, J, K = {}) {
|
|
1944
|
-
P.stopPropagation(), d(P, J), r.value && c.value.editMode === "cell" && z.mode === _e.editable && h(l).then(() => {
|
|
1945
|
-
l || v(J, z, K);
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
function b(P, z, J, K = {}) {
|
|
1949
|
-
P.stopPropagation(), u(P, J), r.value && c.value.editMode === "cell" && z.mode === _e.editable && h(l).then(() => {
|
|
1950
|
-
l || v(J, z, K);
|
|
1951
|
-
});
|
|
1952
|
-
}
|
|
1953
|
-
function x(P) {
|
|
1954
|
-
P.stopPropagation(), C = P.target;
|
|
1955
|
-
}
|
|
1956
|
-
function W(P) {
|
|
1957
|
-
P.stopPropagation(), C && (C = null);
|
|
1958
|
-
}
|
|
1959
|
-
function N(P) {
|
|
1960
|
-
Object.values(P.data).filter((z) => z.mode === _e.editable && z.field !== "__commands__").forEach((z) => {
|
|
1961
|
-
z.mode = _e.editing;
|
|
1962
|
-
}), P.status = Fe.editing, _ = P;
|
|
1963
|
-
}
|
|
1964
|
-
function j(P, z) {
|
|
1965
|
-
Object.values(P.data).filter((J) => J.mode === _e.editing).forEach((J) => {
|
|
1966
|
-
z ? J.accept() : J.cancel(), J.mode = _e.editable;
|
|
1967
|
-
}), P.status = Fe.initial, _ === P && (_ = null);
|
|
1968
|
-
}
|
|
1969
|
-
function I(P) {
|
|
1970
|
-
r.value && c.value.editMode === "row" && _ !== P && (_ && j(_, !1), N(P));
|
|
1971
|
-
}
|
|
1972
|
-
function D(P) {
|
|
1973
|
-
j(P, !0), P.status = Fe.initial;
|
|
1974
|
-
}
|
|
1975
|
-
function T(P) {
|
|
1976
|
-
j(P, !1), P.status = Fe.initial;
|
|
1977
|
-
}
|
|
1978
|
-
function B(P, z, J) {
|
|
1979
|
-
const K = z.dataType, re = z.editor || {
|
|
1980
|
-
type: s.get(K) || "input-group"
|
|
1981
|
-
};
|
|
1982
|
-
return !m.value && re.type === "text" && (re.type = "input-group"), re ? (re.type === "input-group" && (re.textAlign = z.align !== "center" && z.align !== "right" ? "left" : z.align, re.updateOn = "change"), re.type === "number-spinner" && (re.updateOn = "change"), re.type === "textarea" && (re.lineBreak = "alt enter"), re.context = {
|
|
1983
|
-
rowData: J.raw,
|
|
1984
|
-
column: z,
|
|
1985
|
-
cell: P,
|
|
1986
|
-
editor: S
|
|
1987
|
-
}, re.readonly = !1, F(Mn, {
|
|
1988
|
-
focusOnCreated: e.focusOnEditingCell,
|
|
1989
|
-
selectOnCreated: e.selectOnEditingCell,
|
|
1990
|
-
editor: re,
|
|
1991
|
-
modelValue: P.editingData,
|
|
1992
|
-
"onUpdate:modelValue": (ee) => P.editingData = ee,
|
|
1993
|
-
id: z.id,
|
|
1994
|
-
onMousedown: (ee) => x(ee),
|
|
1995
|
-
onMouseup: (ee) => W(ee)
|
|
1996
|
-
}, null)) : P.data;
|
|
1997
|
-
}
|
|
1998
|
-
function L() {
|
|
1999
|
-
h(l);
|
|
2000
|
-
}
|
|
2001
|
-
Ne(() => e.editable, () => {
|
|
2002
|
-
r.value = e.editable;
|
|
2003
|
-
}), Ne(() => {
|
|
2004
|
-
var P;
|
|
2005
|
-
return (P = e.editOption) == null ? void 0 : P.editMode;
|
|
2006
|
-
}, (P) => {
|
|
2007
|
-
c.value.editMode = P;
|
|
2008
|
-
});
|
|
2009
|
-
function Q() {
|
|
2010
|
-
l = null, _ = null, w = null, C = null, document.body.removeEventListener("click", y, !0);
|
|
2011
|
-
}
|
|
2012
|
-
return {
|
|
2013
|
-
clear: Q,
|
|
2014
|
-
onClickOutOfCell: y,
|
|
2015
|
-
onClickCell: b,
|
|
2016
|
-
onClickCellByKeyboard: g,
|
|
2017
|
-
onEditingRow: I,
|
|
2018
|
-
acceptEditingRow: D,
|
|
2019
|
-
cancelEditingRow: T,
|
|
2020
|
-
getEditingSnapshot: E,
|
|
2021
|
-
getEditor: B,
|
|
2022
|
-
endEditCell: L,
|
|
2023
|
-
onMousedownCell: x,
|
|
2024
|
-
onMouseupCell: W
|
|
2025
|
-
};
|
|
2026
|
-
}
|
|
2027
|
-
function io(e) {
|
|
2028
|
-
const t = O(e.idField);
|
|
2029
|
-
function n(o) {
|
|
2030
|
-
if (o && o.length) {
|
|
2031
|
-
const i = o[0];
|
|
2032
|
-
Object.keys(i).includes(t.value) || (t.value = "__fv_indetify__");
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
return { idField: t, reviseIdentifyField: n };
|
|
2036
|
-
}
|
|
2037
|
-
function ao(e, t, n, o) {
|
|
2038
|
-
const { idField: i } = o, {
|
|
2039
|
-
currentSelectedDataId: a,
|
|
2040
|
-
multiSelectOnClickRow: r,
|
|
2041
|
-
multiSelectOnClickRowWithShift: c,
|
|
2042
|
-
selectItem: m,
|
|
2043
|
-
selectedValues: u,
|
|
2044
|
-
toggleSelectItem: d,
|
|
2045
|
-
updateSelectAllStatus: s,
|
|
2046
|
-
enableSelectRow: l,
|
|
2047
|
-
multiSelectMode: _,
|
|
2048
|
-
isSingleSelect: f,
|
|
2049
|
-
getSelectedItems: w
|
|
2050
|
-
} = n, C = O(0), E = O(-1);
|
|
2051
|
-
function S(T) {
|
|
2052
|
-
a.value = T;
|
|
2053
|
-
}
|
|
2054
|
-
function k(T) {
|
|
2055
|
-
return T.raw[i.value] === a.value;
|
|
2056
|
-
}
|
|
2057
|
-
function p(T, B) {
|
|
2058
|
-
var oe;
|
|
2059
|
-
const L = B ?? T.dataIndex, Q = {
|
|
2060
|
-
"fv-grid-row": T.type === Ie.data,
|
|
2061
|
-
"fv-grid-group-row": T.type === Ie.group,
|
|
2062
|
-
"fv-grid-summary-row": T.type === Ie.summary,
|
|
2063
|
-
"fv-grid-row-hover": L === E.value,
|
|
2064
|
-
"fv-grid-row-selected": k(T),
|
|
2065
|
-
"fv-grid-row-odd": L % 2 > 0,
|
|
2066
|
-
"fv-grid-row-even": L % 2 === 0,
|
|
2067
|
-
"fv-grid-disabled": T.disabled
|
|
2068
|
-
};
|
|
2069
|
-
if ((oe = e.rowOption) != null && oe.customRowStyle) {
|
|
2070
|
-
const P = e.rowOption.customRowStyle(T.raw) || {};
|
|
2071
|
-
return Object.assign({}, Q, P.class || {});
|
|
2072
|
-
}
|
|
2073
|
-
return Q;
|
|
2074
|
-
}
|
|
2075
|
-
function h(T) {
|
|
2076
|
-
var L;
|
|
2077
|
-
const B = {
|
|
2078
|
-
"fv-grid-cell": !0
|
|
2079
|
-
};
|
|
2080
|
-
if ((L = e.rowOption) != null && L.customCellStyle) {
|
|
2081
|
-
const Q = e.rowOption.customCellStyle(T) || {};
|
|
2082
|
-
return Object.assign({}, B, Q.class || {});
|
|
2083
|
-
}
|
|
2084
|
-
return B;
|
|
2085
|
-
}
|
|
2086
|
-
function y(T) {
|
|
2087
|
-
var L;
|
|
2088
|
-
const B = {
|
|
2089
|
-
"fv-grid-hierarchy-cell": !0
|
|
2090
|
-
};
|
|
2091
|
-
if ((L = e.rowOption) != null && L.customCellStyle) {
|
|
2092
|
-
const Q = e.rowOption.customCellStyle(T) || {};
|
|
2093
|
-
return Object.assign({}, B, Q.class || {});
|
|
2094
|
-
}
|
|
2095
|
-
return B;
|
|
2096
|
-
}
|
|
2097
|
-
function v(T) {
|
|
2098
|
-
const B = a.value, L = T.raw[i.value];
|
|
2099
|
-
S(L), B !== L && t.emit("selectionChange", [T.raw], { id: L, data: T.raw });
|
|
2100
|
-
}
|
|
2101
|
-
function g(T, B) {
|
|
2102
|
-
var oe, P;
|
|
2103
|
-
if (c.value && !(B != null && B.shiftKey) || f.value) {
|
|
2104
|
-
(oe = e.selection) != null && oe.keepSelectingOnClick ? m(T) : d(T, (P = e.selection) == null ? void 0 : P.keepSelectingOnClick), s();
|
|
2105
|
-
return;
|
|
2106
|
-
}
|
|
2107
|
-
if (c.value && (B == null ? void 0 : B.shiftKey) || r.value) {
|
|
2108
|
-
d(T), s();
|
|
2109
|
-
return;
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
function b(T, B) {
|
|
2113
|
-
B.disabled || (t.emit("clickRow", B.index, B.raw), v(B), g(B, T));
|
|
2114
|
-
}
|
|
2115
|
-
function x(T) {
|
|
2116
|
-
C.value += 1, setTimeout(() => {
|
|
2117
|
-
C.value === 1 && t.emit("clickRow", T.index, T.raw), C.value = 0;
|
|
2118
|
-
}, 250), C.value > 1 && (t.emit("doubleClickRow", T.index, T.raw), C.value = 0);
|
|
2119
|
-
}
|
|
2120
|
-
function W(T, B) {
|
|
2121
|
-
B.disabled || (x(B), v(B), g(B, T));
|
|
2122
|
-
}
|
|
2123
|
-
function N(T) {
|
|
2124
|
-
T.disabled || x(T);
|
|
2125
|
-
}
|
|
2126
|
-
function j(T, B) {
|
|
2127
|
-
}
|
|
2128
|
-
function I(T, B) {
|
|
2129
|
-
}
|
|
2130
|
-
function D(T, B) {
|
|
2131
|
-
var oe;
|
|
2132
|
-
const L = B ?? T.dataIndex, Q = {
|
|
2133
|
-
"fv-grid-sidebar-row": !0,
|
|
2134
|
-
"fv-grid-sidebar-row-hover": L === E.value,
|
|
2135
|
-
"fv-grid-sidebar-row-selected": k(T),
|
|
2136
|
-
"fv-grid-sidebar-row-odd": L % 2 > 0,
|
|
2137
|
-
"fv-grid-sidebar-row-even": L % 2 === 0,
|
|
2138
|
-
"d-flex": !0,
|
|
2139
|
-
"align-items-center": !0
|
|
2140
|
-
};
|
|
2141
|
-
if ((oe = e.rowOption) != null && oe.customRowStyle) {
|
|
2142
|
-
const P = e.rowOption.customRowStyle(T.raw) || {};
|
|
2143
|
-
return Object.assign({}, Q, P.class || {});
|
|
2144
|
-
}
|
|
2145
|
-
return Q;
|
|
2146
|
-
}
|
|
2147
|
-
return {
|
|
2148
|
-
activeRowById: S,
|
|
2149
|
-
clickRowItem: N,
|
|
2150
|
-
selectRow: g,
|
|
2151
|
-
changeRow: v,
|
|
2152
|
-
gridCellClass: h,
|
|
2153
|
-
gridHierarchyCellClass: y,
|
|
2154
|
-
gridRowClass: p,
|
|
2155
|
-
onClickRow: W,
|
|
2156
|
-
onClickRowExcludeDblclick: b,
|
|
2157
|
-
onMouseoverRow: j,
|
|
2158
|
-
sidebarRowClass: D,
|
|
2159
|
-
onMouseoutRow: I
|
|
2160
|
-
};
|
|
2161
|
-
}
|
|
2162
|
-
function so(e, t, n, o, i) {
|
|
2163
|
-
const { idField: a } = n, { dataView: r, getSelectionItems: c } = t, m = O(""), u = Y(() => e.selection.enableSelectRow), d = O(e.selection.multiSelect ?? !1), s = O(e.selection.multiSelectMode || "DependOnCheck"), l = O(e.selection.showCheckbox), _ = O(e.selection.showSelectAll), f = O(e.selectionValues || []), w = Y(() => e.selection.showSelection), C = Y(() => {
|
|
2164
|
-
var M;
|
|
2165
|
-
return ((M = e.selection) == null ? void 0 : M.keepSelectingOnPaging) === void 0 ? !0 : e.selection.keepSelectingOnPaging;
|
|
2166
|
-
}), E = O(!!f.value.length && o.value.length === f.value.length), S = O(!!f.value.length && o.value.length !== f.value.length);
|
|
2167
|
-
Ne(() => e.selection.showSelectAll, (M, G) => {
|
|
2168
|
-
M !== G && (_.value = M);
|
|
2169
|
-
});
|
|
2170
|
-
function k() {
|
|
2171
|
-
if (!C.value) {
|
|
2172
|
-
const M = r.value.map((G) => G[a.value]);
|
|
2173
|
-
f.value = f.value.filter((G) => M.includes(G));
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
function p() {
|
|
2177
|
-
const M = r.value.every((q) => f.value.includes(q[a.value])), G = r.value.every((q) => !f.value.includes(q[a.value]));
|
|
2178
|
-
M && (E.value = !0, S.value = !1), G && (E.value = !1, S.value = !1), !M && !G && (E.value = !1, S.value = !0);
|
|
2179
|
-
}
|
|
2180
|
-
function h() {
|
|
2181
|
-
return c(f.value);
|
|
2182
|
-
}
|
|
2183
|
-
function y() {
|
|
2184
|
-
const M = o.value.reduce((q, pe) => (q.set(pe.raw[a.value], pe), q), /* @__PURE__ */ new Map());
|
|
2185
|
-
return f.value.map((q) => M.get(q)).filter((q) => !!q);
|
|
2186
|
-
}
|
|
2187
|
-
function v(M) {
|
|
2188
|
-
var q;
|
|
2189
|
-
const G = M.raw.__fv_children_index__;
|
|
2190
|
-
if (G && G.length) {
|
|
2191
|
-
const pe = G.map((ge) => r.value[ge]);
|
|
2192
|
-
(q = f.value) != null && q.length && pe.some((De) => !f.value.includes(De[a.value])) && (M.indeterminate = !0, M.raw.__fv_indeterminate__ = !0);
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
const g = Y(() => u.value && d.value), b = Y(
|
|
2196
|
-
() => u.value && !d.value && !l.value
|
|
2197
|
-
), x = Y(() => !!e.hierarchy), W = Y(() => {
|
|
2198
|
-
const M = l.value && s.value === "DependOnCheck";
|
|
2199
|
-
return g.value && M;
|
|
2200
|
-
}), N = Y(() => g.value && !l.value), j = Y(() => g.value && l.value && s.value === "OnCheckAndClick");
|
|
2201
|
-
Y(() => j.value);
|
|
2202
|
-
function I() {
|
|
2203
|
-
const M = c(f.value);
|
|
2204
|
-
i.emit("selectionUpdate", M, f.value);
|
|
2205
|
-
}
|
|
2206
|
-
function D(M) {
|
|
2207
|
-
i.emit("unSelectItem", M);
|
|
2208
|
-
}
|
|
2209
|
-
function T(M) {
|
|
2210
|
-
i.emit("selectItem", M);
|
|
2211
|
-
}
|
|
2212
|
-
function B() {
|
|
2213
|
-
const M = o.value.filter((q) => q.indeterminate).map((q) => q.raw[a.value]);
|
|
2214
|
-
o.value.forEach((q) => {
|
|
2215
|
-
q.checked = !1, q.indeterminate = !1, q.raw.__fv_checked__ = !1, q.raw.__fv_indeterminate__ = !1;
|
|
2216
|
-
}), y().forEach((q) => {
|
|
2217
|
-
q.checked = !0, q.raw.__fv_checked__ = !0;
|
|
2218
|
-
}), M.forEach((q) => {
|
|
2219
|
-
const pe = o.value.find((ge) => ge.raw[a.value] === q);
|
|
2220
|
-
v(pe);
|
|
2221
|
-
});
|
|
2222
|
-
}
|
|
2223
|
-
Ne(() => o.value, () => {
|
|
2224
|
-
B();
|
|
2225
|
-
}), Ne(() => e.selectionValues, (M) => {
|
|
2226
|
-
f.value = M, B();
|
|
2227
|
-
}, { immediate: !0 }), Ne(() => e.selection, (M) => {
|
|
2228
|
-
d.value = !!M.multiSelect, s.value = M.multiSelectMode || "DependOnCheck", l.value = !!M.showCheckbox;
|
|
2229
|
-
});
|
|
2230
|
-
const L = Y(() => !d.value);
|
|
2231
|
-
function Q(M) {
|
|
2232
|
-
return M.raw[a.value];
|
|
2233
|
-
}
|
|
2234
|
-
function oe(M) {
|
|
2235
|
-
return f.value.findIndex((q) => q === Q(M));
|
|
2236
|
-
}
|
|
2237
|
-
function P() {
|
|
2238
|
-
y().forEach((q) => {
|
|
2239
|
-
q.checked = !1;
|
|
2240
|
-
}), c(f.value).forEach((q) => {
|
|
2241
|
-
q.__fv_checked__ = !1;
|
|
2242
|
-
}), f.value = [], m.value = "", p();
|
|
2243
|
-
}
|
|
2244
|
-
function z(M) {
|
|
2245
|
-
const G = M;
|
|
2246
|
-
G.__fv_checked__ = !0, G.__fv_indeterminate__ = !1;
|
|
2247
|
-
const q = new Set(f.value);
|
|
2248
|
-
q.add(G[a.value]), f.value = Array.from(q.values()), k();
|
|
2249
|
-
}
|
|
2250
|
-
function J(M) {
|
|
2251
|
-
const G = M;
|
|
2252
|
-
G.__fv_checked__ = !1, G.__fv_indeterminate__ = !1, f.value = f.value.filter((q) => q !== G[a.value]), k();
|
|
2253
|
-
}
|
|
2254
|
-
function K(M) {
|
|
2255
|
-
const G = M.raw;
|
|
2256
|
-
G.__fv_checked__ = !0, G.__fv_indeterminate__ = !1;
|
|
2257
|
-
const q = new Set(f.value);
|
|
2258
|
-
q.add(G[a.value]), f.value = Array.from(q.values()), k(), M.checked = !0, M.indeterminate = !1, I(), T(M);
|
|
2259
|
-
}
|
|
2260
|
-
function re(M) {
|
|
2261
|
-
const G = M.raw;
|
|
2262
|
-
G.__fv_checked__ = !1, G.__fv_indeterminate__ = !1, f.value = f.value.filter((q) => q !== G[a.value]), k(), M.checked = !1, M.indeterminate = !1, I(), D(M);
|
|
2263
|
-
}
|
|
2264
|
-
function ee(M) {
|
|
2265
|
-
K(M), m.value = M.raw[a.value];
|
|
2266
|
-
}
|
|
2267
|
-
function R(M) {
|
|
2268
|
-
re(M), m.value = "";
|
|
2269
|
-
}
|
|
2270
|
-
function A(M) {
|
|
2271
|
-
M.__fv_checked__ = !1, M.__fv_indeterminate__ = !0, f.value = f.value.filter((G) => G !== M[a.value]), k();
|
|
2272
|
-
}
|
|
2273
|
-
function $(M) {
|
|
2274
|
-
const G = M.raw;
|
|
2275
|
-
G.__fv_checked__ = !1, G.__fv_indeterminate__ = !0, f.value = f.value.filter((q) => q !== G[a.value]), k(), M.checked = !1, M.indeterminate = !0;
|
|
2276
|
-
}
|
|
2277
|
-
function U(M) {
|
|
2278
|
-
L.value && P(), M.checked ? re(M) : K(M);
|
|
2279
|
-
}
|
|
2280
|
-
function Z(M, G = !0) {
|
|
2281
|
-
const q = M.checked;
|
|
2282
|
-
L.value && P(), G ? M.checked ? R(M) : ee(M) : q ? R(M) : ee(M);
|
|
2283
|
-
}
|
|
2284
|
-
function ae(M) {
|
|
2285
|
-
M.raw[a.value] !== m.value && (P(), ee(M));
|
|
2286
|
-
}
|
|
2287
|
-
function ie(M) {
|
|
2288
|
-
const G = o.value.find((q) => q.raw[a.value] === M);
|
|
2289
|
-
if (G)
|
|
2290
|
-
ae(G);
|
|
2291
|
-
else {
|
|
2292
|
-
const q = r.value.find((pe) => pe[a.value] === M);
|
|
2293
|
-
q && z(q);
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
function te(M) {
|
|
2297
|
-
const G = o.value.filter((ge) => M.includes(ge.raw[a.value])), q = G.map((ge) => ge.raw[a.value]), pe = r.value.filter((ge) => {
|
|
2298
|
-
const De = ge[a.value];
|
|
2299
|
-
return !q.includes(De) && M.includes(De);
|
|
2300
|
-
});
|
|
2301
|
-
(G.length || pe.length) && b.value && (m.value = M[0]), G.forEach((ge) => {
|
|
2302
|
-
ee(ge);
|
|
2303
|
-
}), pe.forEach((ge) => {
|
|
2304
|
-
z(ge);
|
|
2305
|
-
});
|
|
2306
|
-
}
|
|
2307
|
-
function se(M) {
|
|
2308
|
-
for (const G of M) {
|
|
2309
|
-
if (!f.value.includes(G))
|
|
2310
|
-
continue;
|
|
2311
|
-
const q = o.value.find((pe) => pe.raw[a.value] === G);
|
|
2312
|
-
if (q)
|
|
2313
|
-
R(q);
|
|
2314
|
-
else {
|
|
2315
|
-
const pe = r.value.find((ge) => ge[a.value] === G);
|
|
2316
|
-
pe && J(pe);
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
f.value = f.value.filter(
|
|
2320
|
-
(G) => !M.includes(G)
|
|
2321
|
-
), k();
|
|
2322
|
-
}
|
|
2323
|
-
function be() {
|
|
2324
|
-
o.value.forEach((M) => {
|
|
2325
|
-
const G = M.raw;
|
|
2326
|
-
G.__fv_checked__ = !0, G.__fv_indeterminate__ = !1;
|
|
2327
|
-
const q = new Set(f.value);
|
|
2328
|
-
q.add(G[a.value]), f.value = Array.from(q.values()), k(), M.checked = !0, M.indeterminate = !1;
|
|
2329
|
-
}), I();
|
|
2330
|
-
}
|
|
2331
|
-
function ce() {
|
|
2332
|
-
o.value.forEach((M) => {
|
|
2333
|
-
const G = M.raw;
|
|
2334
|
-
G.__fv_checked__ = !1, G.__fv_indeterminate__ = !1, f.value = f.value.filter((q) => q !== G[a.value]), k(), M.checked = !1, M.indeterminate = !1;
|
|
2335
|
-
}), I();
|
|
2336
|
-
}
|
|
2337
|
-
function Be() {
|
|
2338
|
-
return o.value.find((M) => M.raw[a.value] === m.value);
|
|
2339
|
-
}
|
|
2340
|
-
return {
|
|
2341
|
-
clearSelection: P,
|
|
2342
|
-
currentSelectedDataId: m,
|
|
2343
|
-
enableMultiSelect: d,
|
|
2344
|
-
enableSelectRow: u,
|
|
2345
|
-
findIndexInSelectedItems: oe,
|
|
2346
|
-
getSelectedItems: h,
|
|
2347
|
-
getSelectionRow: Be,
|
|
2348
|
-
indeterminate: $,
|
|
2349
|
-
indeterminateDataItem: A,
|
|
2350
|
-
isSelectingHirarchyItem: x,
|
|
2351
|
-
multiSelectMode: s,
|
|
2352
|
-
multiSelectOnClickRow: j,
|
|
2353
|
-
multiSelectOnClickRowWithShift: N,
|
|
2354
|
-
multiSelectOnlyOnCheck: W,
|
|
2355
|
-
select: ee,
|
|
2356
|
-
selectAll: be,
|
|
2357
|
-
selectedValues: f,
|
|
2358
|
-
selectDataItem: z,
|
|
2359
|
-
selectItem: ae,
|
|
2360
|
-
selectItemById: ie,
|
|
2361
|
-
selectItemByIds: te,
|
|
2362
|
-
showCheckBox: l,
|
|
2363
|
-
showSelectAll: _,
|
|
2364
|
-
toggleSelectItem: Z,
|
|
2365
|
-
toggleSelectItemWithoutRow: U,
|
|
2366
|
-
unSelect: R,
|
|
2367
|
-
unSelectAll: ce,
|
|
2368
|
-
unSelectDataItem: J,
|
|
2369
|
-
unSelectItemByIds: se,
|
|
2370
|
-
updateSelectAllStatus: p,
|
|
2371
|
-
selectAllStatus: E,
|
|
2372
|
-
indeterminateStatus: S,
|
|
2373
|
-
isSingleSelect: b,
|
|
2374
|
-
showSelection: w,
|
|
2375
|
-
keepSelectingOnPaging: C
|
|
2376
|
-
};
|
|
2377
|
-
}
|
|
2378
|
-
function ot(e, t, n, o, i, a, r, c, m, u) {
|
|
2379
|
-
const d = O(e.size), s = O(e.textField), l = O(e.titleField), _ = O(e.disableField), f = Y(() => {
|
|
2380
|
-
var b, x;
|
|
2381
|
-
return ((b = e.selection) == null ? void 0 : b.multiSelect) && ((x = e.selection) == null ? void 0 : x.showCheckbox);
|
|
2382
|
-
}), {
|
|
2383
|
-
onMouseenterItem: w,
|
|
2384
|
-
onMouseoverItem: C,
|
|
2385
|
-
onMouseoutItem: E
|
|
2386
|
-
} = a, {
|
|
2387
|
-
getKey: S,
|
|
2388
|
-
listViewItemClass: k,
|
|
2389
|
-
listViewItemStyle: p,
|
|
2390
|
-
onCheckItem: h,
|
|
2391
|
-
onClickItem: y
|
|
2392
|
-
} = r, v = Y(() => {
|
|
2393
|
-
const b = {
|
|
2394
|
-
"text-overflow": "ellipsis",
|
|
2395
|
-
overflow: "hidden",
|
|
2396
|
-
"white-space": "nowrap"
|
|
2397
|
-
};
|
|
2398
|
-
return e.itemClass ? b : {
|
|
2399
|
-
margin: d.value === "small" ? "0.25rem 0" : "8px 0",
|
|
2400
|
-
...b
|
|
2401
|
-
};
|
|
2402
|
-
});
|
|
2403
|
-
function g(b, x, W) {
|
|
2404
|
-
return b.checked = c.findIndexInSelectedItems(b) > -1, F("li", {
|
|
2405
|
-
class: k(b, x),
|
|
2406
|
-
id: S(b, x),
|
|
2407
|
-
key: S(b, x),
|
|
2408
|
-
style: p(b, x),
|
|
2409
|
-
onClick: (N) => y(b, x, N),
|
|
2410
|
-
onMouseenter: (N) => w(N, b, x),
|
|
2411
|
-
onMouseover: (N) => C(N, b, x),
|
|
2412
|
-
onMouseout: (N) => E(N, b, x)
|
|
2413
|
-
}, [f.value && F("div", {
|
|
2414
|
-
class: "f-list-select",
|
|
2415
|
-
onClick: (N) => N.stopPropagation()
|
|
2416
|
-
}, [F(Xe, {
|
|
2417
|
-
id: "list-" + S(b, x),
|
|
2418
|
-
customClass: "listview-checkbox float-left",
|
|
2419
|
-
disabled: b[_.value],
|
|
2420
|
-
checked: b.checked,
|
|
2421
|
-
"onUpdate:checked": (N) => b.checked = N,
|
|
2422
|
-
onChange: (N) => {
|
|
2423
|
-
h(b, x, !N.checked);
|
|
2424
|
-
}
|
|
2425
|
-
}, null)]), F("div", {
|
|
2426
|
-
class: "f-list-content"
|
|
2427
|
-
}, [F("div", {
|
|
2428
|
-
class: e.itemContentClass,
|
|
2429
|
-
style: v.value,
|
|
2430
|
-
title: b.raw[l.value] || b.raw[s.value]
|
|
2431
|
-
}, [b.raw[s.value]])])]);
|
|
2432
|
-
}
|
|
2433
|
-
return {
|
|
2434
|
-
renderItem: g
|
|
2435
|
-
};
|
|
2436
|
-
}
|
|
2437
|
-
function lo(e, t, n, o, i, a, r, c, m, u) {
|
|
2438
|
-
const d = O(e.multiSelect), s = O(e.disableField), l = O(e.textField), {
|
|
2439
|
-
onMouseenterItem: _,
|
|
2440
|
-
onMouseoverItem: f,
|
|
2441
|
-
onMouseoutItem: w
|
|
2442
|
-
} = a, {
|
|
2443
|
-
getKey: C,
|
|
2444
|
-
listViewItemClass: E,
|
|
2445
|
-
listViewItemStyle: S,
|
|
2446
|
-
onCheckItem: k,
|
|
2447
|
-
onClickItem: p
|
|
2448
|
-
} = r;
|
|
2449
|
-
function h(v, g, b) {
|
|
2450
|
-
return e.contentTemplate ? F(Oe, null, [e.contentTemplate({
|
|
2451
|
-
item: v.raw,
|
|
2452
|
-
index: g,
|
|
2453
|
-
selectedItem: b
|
|
2454
|
-
})]) : t.slots.content ? F(Oe, null, [t.slots.content && t.slots.content({
|
|
2455
|
-
item: v.raw,
|
|
2456
|
-
index: g,
|
|
2457
|
-
selectedItem: b
|
|
2458
|
-
})]) : F("div", {
|
|
2459
|
-
style: "margin: 10px 0;"
|
|
2460
|
-
}, [v.raw[l.value || "name"]]);
|
|
2461
|
-
}
|
|
2462
|
-
function y(v, g, b) {
|
|
2463
|
-
return F("li", {
|
|
2464
|
-
class: E(v, g),
|
|
2465
|
-
id: C(v, g),
|
|
2466
|
-
key: C(v, g),
|
|
2467
|
-
style: S(v, g),
|
|
2468
|
-
onClick: (x) => p(v, g, x),
|
|
2469
|
-
onMouseenter: (x) => _(x, v, g),
|
|
2470
|
-
onMouseover: (x) => f(x, v, g),
|
|
2471
|
-
onMouseout: (x) => w(x, v, g)
|
|
2472
|
-
}, [d.value && F("div", {
|
|
2473
|
-
class: "f-list-select",
|
|
2474
|
-
onClick: (x) => x.stopPropagation()
|
|
2475
|
-
}, [F(Xe, {
|
|
2476
|
-
id: "list-" + C(v, g),
|
|
2477
|
-
customClass: "listview-checkbox",
|
|
2478
|
-
disabled: v[s.value] || !v.checked,
|
|
2479
|
-
checked: v.checked,
|
|
2480
|
-
"onUpdate:checked": (x) => v.checked = x,
|
|
2481
|
-
onChange: (x) => k(v, g, !x.checked)
|
|
2482
|
-
}, null)]), F("div", {
|
|
2483
|
-
class: "f-list-content"
|
|
2484
|
-
}, [h(v, g, b)])]);
|
|
2485
|
-
}
|
|
2486
|
-
return {
|
|
2487
|
-
renderItem: y
|
|
2488
|
-
};
|
|
2489
|
-
}
|
|
2490
|
-
function co(e, t, n, o, i, a, r, c, m, u) {
|
|
2491
|
-
const d = O(e.multiSelect), s = O(e.disableField), l = O(e.textField), {
|
|
2492
|
-
onMouseenterItem: _,
|
|
2493
|
-
onMouseoverItem: f,
|
|
2494
|
-
onMouseoutItem: w
|
|
2495
|
-
} = a, {
|
|
2496
|
-
getKey: C,
|
|
2497
|
-
listViewItemClass: E,
|
|
2498
|
-
onCheckItem: S,
|
|
2499
|
-
onClickItem: k
|
|
2500
|
-
} = r, {
|
|
2501
|
-
dragstart: p,
|
|
2502
|
-
dragenter: h,
|
|
2503
|
-
dragover: y,
|
|
2504
|
-
dragend: v
|
|
2505
|
-
} = o, {
|
|
2506
|
-
removeItem: g
|
|
2507
|
-
} = m, b = Y(() => ({
|
|
2508
|
-
margin: d.value ? "10px 0" : "10px 0px 10px 14px"
|
|
2509
|
-
}));
|
|
2510
|
-
function x(D, T = "") {
|
|
2511
|
-
const B = D.target;
|
|
2512
|
-
B.title = B.scrollWidth > B.clientWidth ? T : "";
|
|
2513
|
-
}
|
|
2514
|
-
function W(D) {
|
|
2515
|
-
return F("div", {
|
|
2516
|
-
style: b.value,
|
|
2517
|
-
onMouseenter: (T) => x(T, D.raw[l.value || "name"])
|
|
2518
|
-
}, [D.raw[l.value || "name"]]);
|
|
2519
|
-
}
|
|
2520
|
-
function N() {
|
|
2521
|
-
return t.slots.itemContent ? t.slots.itemContent : W;
|
|
2522
|
-
}
|
|
2523
|
-
const j = N();
|
|
2524
|
-
function I(D, T, B) {
|
|
2525
|
-
return F("li", {
|
|
2526
|
-
class: E(D, T),
|
|
2527
|
-
id: C(D, T),
|
|
2528
|
-
key: C(D, T),
|
|
2529
|
-
onClick: (L) => k(D, T, L),
|
|
2530
|
-
onMouseenter: (L) => _(L, D, T),
|
|
2531
|
-
onMouseover: (L) => f(L, D, T),
|
|
2532
|
-
onMouseout: (L) => w(L, D, T),
|
|
2533
|
-
draggable: "true",
|
|
2534
|
-
onDragstart: (L) => p(L, D, T),
|
|
2535
|
-
onDragenter: (L) => h(L, T),
|
|
2536
|
-
onDragend: (L) => v(L, D),
|
|
2537
|
-
onDragover: (L) => y(L)
|
|
2538
|
-
}, [d.value && F("div", {
|
|
2539
|
-
class: "f-list-select",
|
|
2540
|
-
onClick: (L) => L.stopPropagation()
|
|
2541
|
-
}, [F(Xe, {
|
|
2542
|
-
id: "list-" + C(D, T),
|
|
2543
|
-
customClass: "listview-checkbox",
|
|
2544
|
-
disabled: D[s.value] || !D.checked,
|
|
2545
|
-
checked: D.checked,
|
|
2546
|
-
"onUpdate:checked": (L) => D.checked = L,
|
|
2547
|
-
onChange: (L) => S(D, T, !L.checked)
|
|
2548
|
-
}, null)]), F("div", {
|
|
2549
|
-
class: "f-list-content"
|
|
2550
|
-
}, [j(D)]), F("div", {
|
|
2551
|
-
class: "f-list-remove",
|
|
2552
|
-
onClick: (L) => g(T)
|
|
2553
|
-
}, [F("div", {
|
|
2554
|
-
class: "f-list-remove-icon"
|
|
2555
|
-
}, [F("i", {
|
|
2556
|
-
class: "f-icon f-icon-remove_face"
|
|
2557
|
-
}, null)])]), F("div", {
|
|
2558
|
-
class: "f-list-handle"
|
|
2559
|
-
}, [F("div", null, [F("i", {
|
|
2560
|
-
class: "f-icon f-icon-drag-vertical"
|
|
2561
|
-
}, null)])])]);
|
|
2562
|
-
}
|
|
2563
|
-
return {
|
|
2564
|
-
renderItem: I
|
|
2565
|
-
};
|
|
2566
|
-
}
|
|
2567
|
-
function uo(e, t, n, o, i, a, r, c, m, u) {
|
|
2568
|
-
var C;
|
|
2569
|
-
const d = O(((C = e.group) == null ? void 0 : C.groupFields) || []), {
|
|
2570
|
-
collpaseGroupIconClass: s
|
|
2571
|
-
} = i, {
|
|
2572
|
-
toggleGroupRow: l
|
|
2573
|
-
} = u;
|
|
2574
|
-
function _(E, S) {
|
|
2575
|
-
S.collapse = !S.collapse, n.value = l(S.collapse ? "collapse" : "expand", S, n.value);
|
|
2576
|
-
}
|
|
2577
|
-
function f(E, S, k) {
|
|
2578
|
-
return t.slots.group ? F(Oe, null, [t.slots.content && t.slots.group({
|
|
2579
|
-
item: E.raw,
|
|
2580
|
-
index: S,
|
|
2581
|
-
selectedItem: k
|
|
2582
|
-
})]) : F("div", {
|
|
2583
|
-
class: "f-navlookup-recentHeader",
|
|
2584
|
-
onClick: (p) => _(p, E)
|
|
2585
|
-
}, [F("div", {
|
|
2586
|
-
class: "fv-grid-group-row-icon"
|
|
2587
|
-
}, [F("span", {
|
|
2588
|
-
class: s(E)
|
|
2589
|
-
}, null)]), F("div", {
|
|
2590
|
-
class: "f-navlookup-recommandLabel"
|
|
2591
|
-
}, [E.raw[d.value[E.layer]]])]);
|
|
2592
|
-
}
|
|
2593
|
-
function w(E, S, k) {
|
|
2594
|
-
return E.layer > -1 && f(E, S, k);
|
|
2595
|
-
}
|
|
2596
|
-
return {
|
|
2597
|
-
renderItem: w
|
|
2598
|
-
};
|
|
2599
|
-
}
|
|
2600
|
-
function fo(e, t, n, o) {
|
|
2601
|
-
const { dataView: i } = n, { updateSelectedItems: a } = o;
|
|
2602
|
-
function r(c) {
|
|
2603
|
-
if (c > -1 && c < i.value.length) {
|
|
2604
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(i.value[c]))
|
|
2605
|
-
return;
|
|
2606
|
-
const m = i.value.splice(c, 1);
|
|
2607
|
-
a(), t.emit("removeItem", m[0]);
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2610
|
-
return { removeItem: r };
|
|
2611
|
-
}
|
|
2612
|
-
function mo(e, t, n, o, i, a, r, c, m, u) {
|
|
2613
|
-
const {
|
|
2614
|
-
t: d
|
|
2615
|
-
} = je(), s = O(e.view), l = O(e.view === "CardView"), _ = O({}), f = O(d("listView.emptyMessage")), w = fo(e, t, o, m), C = Y(() => ({
|
|
2616
|
-
"f-list-view-group": !0,
|
|
2617
|
-
"f-list-view-group-multiselect": e.multiSelect,
|
|
2618
|
-
"d-flex": l.value,
|
|
2619
|
-
"flex-wrap": l.value
|
|
2620
|
-
})), E = Y(() => !!n.value && n.value.length > 0), S = Y(() => n.value.length === 0);
|
|
2621
|
-
Y(() => S.value && !t.slots.empty);
|
|
2622
|
-
function k() {
|
|
2623
|
-
return s.value === "SingleView" ? ot : s.value === "DraggableView" ? co : (s.value === "ContentView" || s.value === "CardView") && (e.contentTemplate || t.slots.content) ? lo : ot;
|
|
2624
|
-
}
|
|
2625
|
-
const p = k(), {
|
|
2626
|
-
renderItem: h
|
|
2627
|
-
} = p(e, t, n, u, i, a, m, r, w, c), {
|
|
2628
|
-
renderItem: y
|
|
2629
|
-
} = uo(e, t, n, u, i, a, m, r, w, c), v = [h, y];
|
|
2630
|
-
function g() {
|
|
2631
|
-
return n.value.filter((W) => W.visible !== !1).map((W, N) => v[W.type](W, N, _));
|
|
2632
|
-
}
|
|
2633
|
-
function b() {
|
|
2634
|
-
return F("div", {
|
|
2635
|
-
class: "f-list-view-emptydata",
|
|
2636
|
-
style: "margin: 0 auto;"
|
|
2637
|
-
}, [F("p", {
|
|
2638
|
-
class: "f-empty-title"
|
|
2639
|
-
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : f.value])]);
|
|
2640
|
-
}
|
|
2641
|
-
function x() {
|
|
2642
|
-
return F("ul", {
|
|
2643
|
-
class: C.value,
|
|
2644
|
-
style: "list-style: none;"
|
|
2645
|
-
}, [E.value && g(), S.value && b()]);
|
|
2646
|
-
}
|
|
2647
|
-
return {
|
|
2648
|
-
renderListArea: x
|
|
2649
|
-
};
|
|
2650
|
-
}
|
|
2651
|
-
function vo(e, t, n) {
|
|
2652
|
-
function o() {
|
|
2653
|
-
return t.slots.header && F("div", {
|
|
2654
|
-
class: "f-list-view-header"
|
|
2655
|
-
}, [t.slots.header()]);
|
|
2656
|
-
}
|
|
2657
|
-
return {
|
|
2658
|
-
renderHeader: o
|
|
2659
|
-
};
|
|
2660
|
-
}
|
|
2661
|
-
function rt(e, t, n) {
|
|
2662
|
-
const o = O(e.headerClass), i = O(e.placeholder), a = O(""), r = Y(() => !a.value), c = Y(() => !!a.value);
|
|
2663
|
-
function m(l) {
|
|
2664
|
-
a.value = "";
|
|
2665
|
-
}
|
|
2666
|
-
Ne(a, (l) => {
|
|
2667
|
-
e.enableHighlightSearch && n.search(l), t.emit("afterSearch", l);
|
|
2668
|
-
});
|
|
2669
|
-
const u = Y(() => {
|
|
2670
|
-
const l = {
|
|
2671
|
-
"form-group": !0,
|
|
2672
|
-
"farris-form-group": !0
|
|
2673
|
-
};
|
|
2674
|
-
return o.value && o.value.split(" ").reduce((f, w) => (f[w] = !0, f), l), l;
|
|
2675
|
-
});
|
|
2676
|
-
function d(l) {
|
|
2677
|
-
}
|
|
2678
|
-
function s() {
|
|
2679
|
-
return F("div", {
|
|
2680
|
-
class: "f-list-view-header",
|
|
2681
|
-
onClick: mn(() => d, ["prevent", "stop"])
|
|
2682
|
-
}, [F("div", {
|
|
2683
|
-
class: u.value
|
|
2684
|
-
}, [F("div", {
|
|
2685
|
-
class: "farris-input-wrap"
|
|
2686
|
-
}, [F("div", {
|
|
2687
|
-
class: "f-cmp-inputgroup"
|
|
2688
|
-
}, [F("div", {
|
|
2689
|
-
class: "input-group f-state-editable"
|
|
2690
|
-
}, [vn(F("input", {
|
|
2691
|
-
class: "form-control f-utils-fill text-left",
|
|
2692
|
-
"onUpdate:modelValue": (l) => a.value = l,
|
|
2693
|
-
name: "input-group-value",
|
|
2694
|
-
type: "text",
|
|
2695
|
-
placeholder: i.value,
|
|
2696
|
-
autocomplete: "off"
|
|
2697
|
-
}, null), [[pn, a.value]]), F("div", {
|
|
2698
|
-
class: "input-group-append"
|
|
2699
|
-
}, [c.value && F("span", {
|
|
2700
|
-
class: "input-group-text input-group-clear",
|
|
2701
|
-
onClick: (l) => m()
|
|
2702
|
-
}, [F("i", {
|
|
2703
|
-
class: "f-icon f-icon-close-circle"
|
|
2704
|
-
}, null)]), r.value && F("span", {
|
|
2705
|
-
class: "input-group-text"
|
|
2706
|
-
}, [F("span", {
|
|
2707
|
-
class: "f-icon f-icon-search"
|
|
2708
|
-
}, null)])])])])])])]);
|
|
2709
|
-
}
|
|
2710
|
-
return {
|
|
2711
|
-
renderHeader: s
|
|
2712
|
-
};
|
|
2713
|
-
}
|
|
2714
|
-
function po() {
|
|
2715
|
-
const e = O(""), t = O(-1), n = O(""), o = O(-1), i = O(!1);
|
|
2716
|
-
function a(s, l, _) {
|
|
2717
|
-
o.value = _;
|
|
2718
|
-
}
|
|
2719
|
-
function r(s, l, _) {
|
|
2720
|
-
i.value || (o.value = _);
|
|
2721
|
-
}
|
|
2722
|
-
function c(s, l, _) {
|
|
2723
|
-
o.value = -1;
|
|
2724
|
-
}
|
|
2725
|
-
function m() {
|
|
2726
|
-
i.value = !0;
|
|
2727
|
-
}
|
|
2728
|
-
function u() {
|
|
2729
|
-
i.value = !1;
|
|
2730
|
-
}
|
|
2731
|
-
function d() {
|
|
2732
|
-
t.value = -1, e.value = "";
|
|
2733
|
-
}
|
|
2734
|
-
return {
|
|
2735
|
-
activeIndex: t,
|
|
2736
|
-
focusedItemId: n,
|
|
2737
|
-
hoverIndex: o,
|
|
2738
|
-
clearActiveItem: d,
|
|
2739
|
-
onMouseenterItem: a,
|
|
2740
|
-
onMouseoverItem: r,
|
|
2741
|
-
onMouseoutItem: c,
|
|
2742
|
-
resumeHover: u,
|
|
2743
|
-
suspendHover: m
|
|
2744
|
-
};
|
|
2745
|
-
}
|
|
2746
|
-
function go(e, t, n, o) {
|
|
2747
|
-
const i = O(e.idField), { dataView: a } = n, r = O(-1), c = O(!1), { activeIndex: m, focusedItemId: u, hoverIndex: d, resumeHover: s, suspendHover: l } = o;
|
|
2748
|
-
let _, f = 0, w = 0;
|
|
2749
|
-
function C(y, v) {
|
|
2750
|
-
const g = y - f, b = v - w;
|
|
2751
|
-
_.style.left = parseInt(_.style.left) + g + "px", _.style.top = parseInt(_.style.top) + b + "px", f = y, w = v;
|
|
2752
|
-
}
|
|
2753
|
-
function E(y) {
|
|
2754
|
-
const { left: v, top: g } = y.getBoundingClientRect(), b = y.cloneNode(!0);
|
|
2755
|
-
return b.style.cssText = `
|
|
2756
|
-
position:absolute;
|
|
2757
|
-
left:${v}px;
|
|
2758
|
-
top:${document.documentElement.scrollTop ? g + document.documentElement.scrollTop : g}px;
|
|
2759
|
-
z-index: 999999;
|
|
2760
|
-
border: 1px solid #e2e3e5;
|
|
2761
|
-
pointer-events: none;
|
|
2762
|
-
background-color: #edf5ff;
|
|
2763
|
-
border-radius: 10px;
|
|
2764
|
-
margin: 4px 2px;
|
|
2765
|
-
display: flex;
|
|
2766
|
-
align-items: center;
|
|
2767
|
-
float: none;
|
|
2768
|
-
text-align: initial;
|
|
2769
|
-
width:${getComputedStyle(y).width};
|
|
2770
|
-
height:${getComputedStyle(y).height};
|
|
2771
|
-
`, b.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", b.children[0].children[0].style.cssText = `
|
|
2772
|
-
margin: 10px 0px 10px 14px;
|
|
2773
|
-
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
2774
|
-
`, b.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", b.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(b), b;
|
|
2775
|
-
}
|
|
2776
|
-
function S(y, v, g) {
|
|
2777
|
-
if (y.stopPropagation(), l(), v) {
|
|
2778
|
-
if (_ = E(y.target), y.dataTransfer) {
|
|
2779
|
-
const b = new Image();
|
|
2780
|
-
b.src = "", y.dataTransfer.setDragImage(b, 0, 0);
|
|
2781
|
-
}
|
|
2782
|
-
f = y.pageX, w = y.pageY, setTimeout(() => {
|
|
2783
|
-
r.value = g, c.value = !0, v.moving = !0;
|
|
2784
|
-
});
|
|
2785
|
-
}
|
|
2786
|
-
}
|
|
2787
|
-
function k(y, v) {
|
|
2788
|
-
if (y.preventDefault(), r.value !== v) {
|
|
2789
|
-
const g = a.value[r.value], b = a.value;
|
|
2790
|
-
b.splice(r.value, 1), b.splice(v, 0, g), r.value = v, C(y.pageX, y.pageY);
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
function p(y) {
|
|
2794
|
-
y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move"), C(y.pageX, y.pageY);
|
|
2795
|
-
}
|
|
2796
|
-
function h(y, v) {
|
|
2797
|
-
v && (v.moving = !1, _ && (document.body.removeChild(_), _ = null)), a.value.forEach((g, b) => {
|
|
2798
|
-
g.__fv_index__ = b;
|
|
2799
|
-
}), c.value = !1, s(), d.value = v.raw.__fv_index__, m.value = v.raw.__fv_index__, u.value = v.raw[i.value], t.emit("change", a.value), t.emit("activeChange", [v.raw]);
|
|
2800
|
-
}
|
|
2801
|
-
return {
|
|
2802
|
-
dragstart: S,
|
|
2803
|
-
dragenter: k,
|
|
2804
|
-
dragover: p,
|
|
2805
|
-
dragend: h,
|
|
2806
|
-
isDragging: c
|
|
2807
|
-
};
|
|
2808
|
-
}
|
|
2809
|
-
function ho(e, t, n, o, i, a) {
|
|
2810
|
-
const r = O(e.idField), c = O(e.disableField), m = O(e.draggable);
|
|
2811
|
-
O(e.itemClass);
|
|
2812
|
-
const u = O(e.selection.multiSelect ?? !1), d = O(e.selection.multiSelectMode), { isDragging: s } = o, { activeIndex: l, focusedItemId: _, hoverIndex: f } = i, { clearSelection: w, getSelectedItems: C, toggleSelectItem: E, currentSelectedDataId: S } = a, k = O(C()), p = (I) => k.value.length === 0 ? !1 : k.value.some((D) => {
|
|
2813
|
-
let T = "";
|
|
2814
|
-
return D.data ? T = D.data[r.value] : T = D[r.value], T === I;
|
|
2815
|
-
});
|
|
2816
|
-
function h() {
|
|
2817
|
-
k.value = C();
|
|
2818
|
-
}
|
|
2819
|
-
function y(I, D) {
|
|
2820
|
-
return I.raw[r.value] != null ? I.raw[r.value] : "";
|
|
2821
|
-
}
|
|
2822
|
-
function v(I, D) {
|
|
2823
|
-
const T = {
|
|
2824
|
-
"f-list-view-group-item": !0,
|
|
2825
|
-
"f-list-view-draggable-item": m.value,
|
|
2826
|
-
"f-un-click": !I.checked,
|
|
2827
|
-
"f-un-select": !!I.raw[c.value],
|
|
2828
|
-
"f-listview-active": (
|
|
2829
|
-
// 多选
|
|
2830
|
-
u.value && p(y(I)) || // 单选
|
|
2831
|
-
!u.value && I.raw[r.value] === S.value
|
|
2832
|
-
),
|
|
2833
|
-
"f-listview-hover": !s.value && D === f.value,
|
|
2834
|
-
moving: !!I.moving
|
|
2835
|
-
};
|
|
2836
|
-
if (typeof e.itemClass == "string")
|
|
2837
|
-
return Ze(T, e.itemClass);
|
|
2838
|
-
if (typeof e.itemClass == "function") {
|
|
2839
|
-
const B = e.itemClass(I);
|
|
2840
|
-
return Ze(T, B);
|
|
2841
|
-
}
|
|
2842
|
-
return T;
|
|
2843
|
-
}
|
|
2844
|
-
function g(I, D) {
|
|
2845
|
-
const T = (
|
|
2846
|
-
// 多选
|
|
2847
|
-
u.value && p(y(I)) || // 单选
|
|
2848
|
-
!u.value && I.raw[r.value] === S.value
|
|
2849
|
-
), B = {};
|
|
2850
|
-
if (T && (B.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
2851
|
-
return Qe(B, e.itemStyle);
|
|
2852
|
-
if (typeof e.itemStyle == "function") {
|
|
2853
|
-
const L = e.itemStyle(I);
|
|
2854
|
-
return Qe(B, L);
|
|
2855
|
-
}
|
|
2856
|
-
return B;
|
|
2857
|
-
}
|
|
2858
|
-
const b = Y(() => !u.value);
|
|
2859
|
-
function x(I, D, T) {
|
|
2860
|
-
I.checked = T, !I.raw[c.value] && (b.value && (_.value = I.raw[r.value]), E(I));
|
|
2861
|
-
}
|
|
2862
|
-
const W = Y(() => u.value && d.value === "OnCheckClearByClick"), N = Y(() => !u.value || u.value && (d.value === "OnCheckAndClick" || d.value === "OnClick"));
|
|
2863
|
-
function j(I, D, T) {
|
|
2864
|
-
if (I.raw[c.value]) {
|
|
2865
|
-
T == null || T.preventDefault(), T == null || T.stopPropagation();
|
|
2866
|
-
return;
|
|
2867
|
-
}
|
|
2868
|
-
_.value = I.raw[r.value], l.value = D, W.value && w(), N.value && (E(I), h()), t.emit("clickItem", { data: k.value, index: D, dataItem: I.raw }), t.emit("activeChange", k.value);
|
|
2869
|
-
}
|
|
2870
|
-
return {
|
|
2871
|
-
getKey: y,
|
|
2872
|
-
selectedItems: k,
|
|
2873
|
-
listViewItemClass: v,
|
|
2874
|
-
listViewItemStyle: g,
|
|
2875
|
-
updateSelectedItems: h,
|
|
2876
|
-
onCheckItem: x,
|
|
2877
|
-
onClickItem: j
|
|
2878
|
-
};
|
|
2879
|
-
}
|
|
2880
|
-
function ft(e, t) {
|
|
2881
|
-
let n;
|
|
2882
|
-
function o(s) {
|
|
2883
|
-
const { properties: l, title: _, ignore: f } = s, w = f && Array.isArray(f), C = Object.keys(l).reduce((E, S) => ((!w || !f.find((k) => k === S)) && (E[S] = l[S].type === "object" && l[S].properties ? o(l[S]) : Ae(l[S].default)), E), {});
|
|
2884
|
-
if (_ && (!w || !f.find((E) => E === "id"))) {
|
|
2885
|
-
const E = _.toLowerCase().replace(/-/g, "_");
|
|
2886
|
-
C.id = `${E}_${Math.random().toString().slice(2, 6)}`;
|
|
2887
|
-
}
|
|
2888
|
-
return C;
|
|
2889
|
-
}
|
|
2890
|
-
function i(s) {
|
|
2891
|
-
const { properties: l, title: _, required: f } = s;
|
|
2892
|
-
if (f && Array.isArray(f)) {
|
|
2893
|
-
const w = f.reduce((C, E) => (C[E] = l[E].type === "object" && l[E].properties ? o(l[E]) : Ae(l[E].default), C), {});
|
|
2894
|
-
if (_ && f.find((C) => C === "id")) {
|
|
2895
|
-
const C = _.toLowerCase().replace(/-/g, "_");
|
|
2896
|
-
w.id = `${C}_${Math.random().toString().slice(2, 6)}`;
|
|
2897
|
-
}
|
|
2898
|
-
return w;
|
|
2899
|
-
}
|
|
2900
|
-
return {
|
|
2901
|
-
type: _
|
|
2902
|
-
};
|
|
2903
|
-
}
|
|
2904
|
-
function a(s, l = {}, _) {
|
|
2905
|
-
const f = e[s];
|
|
2906
|
-
if (f) {
|
|
2907
|
-
let w = i(f);
|
|
2908
|
-
const C = t[s];
|
|
2909
|
-
return w = C ? C({ getSchemaByType: a }, w, l, _) : w, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(w), w;
|
|
2910
|
-
}
|
|
2911
|
-
return null;
|
|
2912
|
-
}
|
|
2913
|
-
function r(s, l) {
|
|
2914
|
-
const _ = o(l);
|
|
2915
|
-
return Object.keys(_).reduce((f, w) => (Object.prototype.hasOwnProperty.call(s, w) && (f[w] && et(f[w]) && et(s[w] || !s[w]) ? Object.assign(f[w], s[w] || {}) : f[w] = s[w]), f), _), _;
|
|
2916
|
-
}
|
|
2917
|
-
function c(s, l) {
|
|
2918
|
-
return Object.keys(s).filter((f) => s[f] != null).reduce((f, w) => {
|
|
2919
|
-
if (l.has(w)) {
|
|
2920
|
-
const C = l.get(w);
|
|
2921
|
-
if (typeof C == "string")
|
|
2922
|
-
f[C] = s[w];
|
|
2923
|
-
else {
|
|
2924
|
-
const E = C(w, s[w], s);
|
|
2925
|
-
Object.assign(f, E);
|
|
2926
|
-
}
|
|
2927
|
-
} else
|
|
2928
|
-
f[w] = s[w];
|
|
2929
|
-
return f;
|
|
2930
|
-
}, {});
|
|
2931
|
-
}
|
|
2932
|
-
function m(s, l, _ = /* @__PURE__ */ new Map()) {
|
|
2933
|
-
const f = r(s, l);
|
|
2934
|
-
return c(f, _);
|
|
2935
|
-
}
|
|
2936
|
-
function u(s) {
|
|
2937
|
-
var _;
|
|
2938
|
-
const l = s.type;
|
|
2939
|
-
if (l) {
|
|
2940
|
-
const f = e[l];
|
|
2941
|
-
if (!f)
|
|
2942
|
-
return s;
|
|
2943
|
-
const w = r(s, f), C = ((_ = s.editor) == null ? void 0 : _.type) || "";
|
|
2944
|
-
if (C) {
|
|
2945
|
-
const E = e[C], S = r(s.editor, E);
|
|
2946
|
-
w.editor = S;
|
|
2947
|
-
}
|
|
2948
|
-
return w;
|
|
2949
|
-
}
|
|
2950
|
-
return s;
|
|
2951
|
-
}
|
|
2952
|
-
function d(s) {
|
|
2953
|
-
n = s;
|
|
2954
|
-
}
|
|
2955
|
-
return { getSchemaByType: a, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: m, mappingSchemaToProps: c, setDesignerContext: d };
|
|
2956
|
-
}
|
|
2957
|
-
const mt = {}, vt = {}, { resolveSchemaWithDefaultValue: _o, resolveSchemaToProps: yo, mappingSchemaToProps: bo } = ft(mt, vt);
|
|
2958
|
-
function wo(e = {}) {
|
|
2959
|
-
function t(u, d, s, l) {
|
|
2960
|
-
if (typeof s == "number")
|
|
2961
|
-
return l[u].length === s;
|
|
2962
|
-
if (typeof s == "object") {
|
|
2963
|
-
const _ = Object.keys(s)[0], f = s[_];
|
|
2964
|
-
if (_ === "not")
|
|
2965
|
-
return Number(l[u].length) !== Number(f);
|
|
2966
|
-
if (_ === "moreThan")
|
|
2967
|
-
return Number(l[u].length) >= Number(f);
|
|
2968
|
-
if (_ === "lessThan")
|
|
2969
|
-
return Number(l[u].length) <= Number(f);
|
|
2970
|
-
}
|
|
2971
|
-
return !1;
|
|
2972
|
-
}
|
|
2973
|
-
function n(u, d, s, l) {
|
|
2974
|
-
return l[u] && l[u].propertyValue && String(l[u].propertyValue.value) === String(s);
|
|
2975
|
-
}
|
|
2976
|
-
const o = /* @__PURE__ */ new Map([
|
|
2977
|
-
["length", t],
|
|
2978
|
-
["getProperty", n]
|
|
2979
|
-
]);
|
|
2980
|
-
Object.keys(e).reduce((u, d) => (u.set(d, e[d]), u), o);
|
|
2981
|
-
function i(u, d) {
|
|
2982
|
-
const s = u;
|
|
2983
|
-
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: u, value: !!d }] : typeof d == "object" ? Object.keys(d).map((l) => {
|
|
2984
|
-
if (l === "length")
|
|
2985
|
-
return { target: s, operator: "length", param: null, value: d[l] };
|
|
2986
|
-
const _ = l, f = d[l];
|
|
2987
|
-
return { target: s, operator: "getProperty", param: _, value: f };
|
|
2988
|
-
}) : [];
|
|
2989
|
-
}
|
|
2990
|
-
function a(u) {
|
|
2991
|
-
return Object.keys(u).reduce((s, l) => {
|
|
2992
|
-
const _ = i(l, u[l]);
|
|
2993
|
-
return s.push(..._), s;
|
|
2994
|
-
}, []);
|
|
2995
|
-
}
|
|
2996
|
-
function r(u, d) {
|
|
2997
|
-
if (o.has(u.operator)) {
|
|
2998
|
-
const s = o.get(u.operator);
|
|
2999
|
-
return s && s(u.target, u.param, u.value, d) || !1;
|
|
3000
|
-
}
|
|
3001
|
-
return !1;
|
|
3002
|
-
}
|
|
3003
|
-
function c(u, d) {
|
|
3004
|
-
return a(u).reduce((_, f) => _ && r(f, d), !0);
|
|
3005
|
-
}
|
|
3006
|
-
function m(u, d) {
|
|
3007
|
-
const s = Object.keys(u), l = s.includes("allOf"), _ = s.includes("anyOf"), f = l || _, E = (f ? u[f ? l ? "allOf" : "anyOf" : "allOf"] : [u]).map((k) => c(k, d));
|
|
3008
|
-
return l ? !E.includes(!1) : E.includes(!0);
|
|
3009
|
-
}
|
|
3010
|
-
return { parseValueSchema: m };
|
|
3011
|
-
}
|
|
3012
|
-
const Co = {
|
|
3013
|
-
convertTo: (e, t, n, o) => {
|
|
3014
|
-
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
3015
|
-
},
|
|
3016
|
-
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
3017
|
-
}, So = {
|
|
3018
|
-
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
3019
|
-
}, ko = {
|
|
3020
|
-
convertTo: (e, t, n, o) => {
|
|
3021
|
-
e.editor && (e.editor[t] = n);
|
|
3022
|
-
},
|
|
3023
|
-
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
3024
|
-
}, Eo = {
|
|
3025
|
-
convertFrom: (e, t, n) => {
|
|
3026
|
-
var i;
|
|
3027
|
-
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
3028
|
-
return ((i = xe[o]) == null ? void 0 : i.name) || o;
|
|
3029
|
-
}
|
|
3030
|
-
}, To = {
|
|
3031
|
-
convertTo: (e, t, n, o) => {
|
|
3032
|
-
e[t] = e[t];
|
|
3033
|
-
},
|
|
3034
|
-
convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
|
|
3035
|
-
}, Fo = {
|
|
3036
|
-
convertTo: (e, t, n, o) => {
|
|
3037
|
-
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
|
|
3038
|
-
[t]: n
|
|
3039
|
-
});
|
|
3040
|
-
},
|
|
3041
|
-
convertFrom: (e, t, n) => {
|
|
3042
|
-
if (e.formatter) {
|
|
3043
|
-
if (t === "trueText")
|
|
3044
|
-
return e.formatter.trueText;
|
|
3045
|
-
if (t === "falseText")
|
|
3046
|
-
return e.formatter.falseText;
|
|
3047
|
-
if (t === "prefix")
|
|
3048
|
-
return e.formatter.prefix;
|
|
3049
|
-
if (t === "suffix")
|
|
3050
|
-
return e.formatter.suffix;
|
|
3051
|
-
if (t === "precision")
|
|
3052
|
-
return e.formatter.precision;
|
|
3053
|
-
if (t === "decimal")
|
|
3054
|
-
return e.formatter.decimal;
|
|
3055
|
-
if (t === "thousand")
|
|
3056
|
-
return e.formatter.thousand;
|
|
3057
|
-
if (t === "dateFormat")
|
|
3058
|
-
return e.formatter.dateFormat || "yyyy-MM-dd";
|
|
3059
|
-
if (t === "customFormat")
|
|
3060
|
-
return e.formatter.customFormat;
|
|
3061
|
-
if (t === "type")
|
|
3062
|
-
return e.formatter.type || "none";
|
|
3063
|
-
}
|
|
3064
|
-
return "none";
|
|
3065
|
-
}
|
|
3066
|
-
}, Mo = {
|
|
3067
|
-
convertTo: (e, t, n, o) => {
|
|
3068
|
-
e.command ? e.command[t] = n : e.command = {
|
|
3069
|
-
[t]: n
|
|
3070
|
-
}, t === "enable" && n && (e.command.commands || (e.command.commands = [
|
|
3071
|
-
{
|
|
3072
|
-
text: "编辑",
|
|
3073
|
-
type: "primary",
|
|
3074
|
-
command: "edit"
|
|
3075
|
-
},
|
|
3076
|
-
{
|
|
3077
|
-
text: "删除",
|
|
3078
|
-
type: "danger",
|
|
3079
|
-
command: "remove"
|
|
3080
|
-
}
|
|
3081
|
-
]));
|
|
3082
|
-
},
|
|
3083
|
-
convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
|
|
3084
|
-
}, No = {
|
|
3085
|
-
convertTo: (e, t, n, o) => {
|
|
3086
|
-
e.column ? e.column[t] = n : e.column = {
|
|
3087
|
-
[t]: n
|
|
3088
|
-
}, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
3089
|
-
},
|
|
3090
|
-
convertFrom: (e, t, n) => {
|
|
3091
|
-
if (e.column) {
|
|
3092
|
-
if (t === "fitColumns")
|
|
3093
|
-
return e.column.fitColumns;
|
|
3094
|
-
if (t === "fitMode")
|
|
3095
|
-
return e.column.fitMode;
|
|
3096
|
-
}
|
|
3097
|
-
return "";
|
|
3098
|
-
}
|
|
3099
|
-
}, Vo = {
|
|
3100
|
-
convertTo: (e, t, n, o) => {
|
|
3101
|
-
e.summary ? e.summary[t] = n : e.summary = {
|
|
3102
|
-
[t]: n
|
|
3103
|
-
}, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
3104
|
-
enable: n,
|
|
3105
|
-
groupFields: []
|
|
3106
|
-
});
|
|
3107
|
-
},
|
|
3108
|
-
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
3109
|
-
}, xo = {
|
|
3110
|
-
convertTo: (e, t, n, o) => {
|
|
3111
|
-
e.group ? e.group[t] = n : e.group = {
|
|
3112
|
-
[t]: n
|
|
3113
|
-
}, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
3114
|
-
enable: n,
|
|
3115
|
-
groupFields: [],
|
|
3116
|
-
showSummary: !1
|
|
3117
|
-
});
|
|
3118
|
-
},
|
|
3119
|
-
convertFrom: (e, t, n) => {
|
|
3120
|
-
if (e.group) {
|
|
3121
|
-
if (t === "enable")
|
|
3122
|
-
return e.group.enable;
|
|
3123
|
-
if (t === "showSummary")
|
|
3124
|
-
return e.group.showSummary;
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
}, Io = {
|
|
3128
|
-
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
3129
|
-
convertTo: (e, t, n) => {
|
|
3130
|
-
if (n && n.length > 0) {
|
|
3131
|
-
const o = n[0];
|
|
3132
|
-
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath;
|
|
3133
|
-
}
|
|
3134
|
-
}
|
|
3135
|
-
}, Oo = {
|
|
3136
|
-
convertTo: (e, t, n, o) => {
|
|
3137
|
-
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
3138
|
-
},
|
|
3139
|
-
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
3140
|
-
}, Do = {
|
|
3141
|
-
convertTo: (e, t, n, o) => {
|
|
3142
|
-
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
3143
|
-
},
|
|
3144
|
-
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
3145
|
-
}, Po = {
|
|
3146
|
-
convertTo: (e, t, n, o) => {
|
|
3147
|
-
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
3148
|
-
},
|
|
3149
|
-
convertFrom: (e, t, n) => {
|
|
3150
|
-
var o, i;
|
|
3151
|
-
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (i = e.selection) == null ? void 0 : i.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
3152
|
-
}
|
|
3153
|
-
}, Bo = {
|
|
3154
|
-
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
3155
|
-
}, Ro = {
|
|
3156
|
-
convertFrom: (e, t) => e[t] || "",
|
|
3157
|
-
convertTo: (e, t, n) => {
|
|
3158
|
-
e[t] = n;
|
|
3159
|
-
}
|
|
3160
|
-
}, Ao = {
|
|
3161
|
-
convertTo: (e, t, n, o) => {
|
|
3162
|
-
e.size || (e.size = {}), e.size[t] = n;
|
|
3163
|
-
},
|
|
3164
|
-
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
3165
|
-
}, Lo = {
|
|
3166
|
-
convertFrom: (e, t, n) => {
|
|
3167
|
-
var o, i;
|
|
3168
|
-
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (i = e.formatter) == null ? void 0 : i.data : e.formatterEnumData;
|
|
3169
|
-
}
|
|
3170
|
-
}, $o = {
|
|
3171
|
-
convertTo: (e, t, n, o) => {
|
|
3172
|
-
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
3173
|
-
},
|
|
3174
|
-
convertFrom: (e, t, n) => {
|
|
3175
|
-
var o, i;
|
|
3176
|
-
if (t === "mode")
|
|
3177
|
-
return ((o = e.sort) == null ? void 0 : o.mode) || "client";
|
|
3178
|
-
if (t === "multiSort")
|
|
3179
|
-
return !!((i = e.sort) != null && i.multiSort);
|
|
3180
|
-
}
|
|
3181
|
-
}, jo = {
|
|
3182
|
-
convertTo: (e, t, n, o) => {
|
|
3183
|
-
e.filter || (e.filter = {}), e.filter[t] = n;
|
|
3184
|
-
},
|
|
3185
|
-
convertFrom: (e, t, n) => {
|
|
3186
|
-
var o;
|
|
3187
|
-
if (t === "mode")
|
|
3188
|
-
return ((o = e.filter) == null ? void 0 : o.mode) || "client";
|
|
3189
|
-
}
|
|
3190
|
-
}, Ho = {
|
|
3191
|
-
convertTo: (e, t, n, o) => {
|
|
3192
|
-
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
3193
|
-
[t]: n
|
|
3194
|
-
};
|
|
3195
|
-
},
|
|
3196
|
-
convertFrom: (e, t, n) => {
|
|
3197
|
-
if (e.rowOption) {
|
|
3198
|
-
if (t === "customRowStyle")
|
|
3199
|
-
return e.rowOption.customRowStyle;
|
|
3200
|
-
if (t === "customCellStyle")
|
|
3201
|
-
return e.rowOption.customCellStyle;
|
|
3202
|
-
}
|
|
3203
|
-
return "";
|
|
3204
|
-
}
|
|
3205
|
-
};
|
|
3206
|
-
function pt(e, t, n) {
|
|
3207
|
-
const o = /* @__PURE__ */ new Map([
|
|
3208
|
-
["/converter/appearance.converter", Co],
|
|
3209
|
-
["/converter/buttons.converter", So],
|
|
3210
|
-
["/converter/property-editor.converter", ko],
|
|
3211
|
-
["/converter/items-count.converter", Bo],
|
|
3212
|
-
["/converter/type.converter", Eo],
|
|
3213
|
-
["/converter/change-editor.converter", To],
|
|
3214
|
-
["/converter/change-formatter.converter", Fo],
|
|
3215
|
-
["/converter/column-command.converter", Mo],
|
|
3216
|
-
["/converter/column-option.converter", No],
|
|
3217
|
-
["/converter/summary.converter", Vo],
|
|
3218
|
-
["/converter/group.converter", xo],
|
|
3219
|
-
["/converter/form-group-label.converter", Ro],
|
|
3220
|
-
["/converter/field-selector.converter", Io],
|
|
3221
|
-
["/converter/pagination.converter", Oo],
|
|
3222
|
-
["/converter/row-number.converter", Do],
|
|
3223
|
-
["/converter/grid-selection.converter", Po],
|
|
3224
|
-
["/converter/size.converter", Ao],
|
|
3225
|
-
["/converter/change-formatter-enum.converter", Lo],
|
|
3226
|
-
["/converter/grid-sort.converter", $o],
|
|
3227
|
-
["/converter/grid-filter.converter", jo],
|
|
3228
|
-
["/converter/row-option.converter", Ho]
|
|
3229
|
-
]), i = /* @__PURE__ */ new Map([
|
|
3230
|
-
["string", { type: "input-group", enableClear: !1 }],
|
|
3231
|
-
["boolean", {
|
|
3232
|
-
type: "combo-list",
|
|
3233
|
-
textField: "name",
|
|
3234
|
-
valueField: "value",
|
|
3235
|
-
idField: "value",
|
|
3236
|
-
enableClear: !1,
|
|
3237
|
-
editable: !1,
|
|
3238
|
-
data: [
|
|
3239
|
-
{
|
|
3240
|
-
value: !0,
|
|
3241
|
-
name: "是"
|
|
3242
|
-
},
|
|
3243
|
-
{
|
|
3244
|
-
value: !1,
|
|
3245
|
-
name: "否"
|
|
3246
|
-
}
|
|
3247
|
-
]
|
|
3248
|
-
}],
|
|
3249
|
-
["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
|
|
3250
|
-
["array", { type: "button-edit" }],
|
|
3251
|
-
["number", { type: "number-spinner", placeholder: "" }],
|
|
3252
|
-
["events-editor", { type: "events-editor", hide: !0 }]
|
|
3253
|
-
]), a = wo();
|
|
3254
|
-
function r(f, w) {
|
|
3255
|
-
return () => a.parseValueSchema(f, w);
|
|
3256
|
-
}
|
|
3257
|
-
function c(f, w, C) {
|
|
3258
|
-
return f.includes("visible") && w.visible !== void 0 ? typeof w.visible == "boolean" ? () => !!w.visible : w.visible === void 0 ? !0 : r(w.visible, C) : () => !0;
|
|
3259
|
-
}
|
|
3260
|
-
function m(f, w, C) {
|
|
3261
|
-
return f.includes("readonly") && w.readonly !== void 0 ? typeof w.readonly == "boolean" ? () => !!w.readonly : r(w.readonly, C) : () => !1;
|
|
3262
|
-
}
|
|
3263
|
-
function u(f, w) {
|
|
3264
|
-
const C = f.$converter || w;
|
|
3265
|
-
return typeof C == "string" && C && o.has(C) ? o.get(C) || null : C || null;
|
|
3266
|
-
}
|
|
3267
|
-
function d(f, w, C, E, S, k = "", p = "") {
|
|
3268
|
-
return Object.keys(f).map((y) => {
|
|
3269
|
-
const v = O(1), g = y, b = f[y], x = Object.keys(b), W = b.title, N = b.type, j = i.get(N) || { type: "input-group", enableClear: !1 }, I = b.editor ? Object.assign({}, j, b.editor) : Object.assign({}, j), D = c(x, b, w), T = m(x, b, w);
|
|
3270
|
-
I.readonly = I.readonly === void 0 ? T() : I.readonly;
|
|
3271
|
-
const B = b.type === "cascade" ? d(b.properties, w, C, E, S, k, p) : [], L = !0;
|
|
3272
|
-
let Q = u(b, p);
|
|
3273
|
-
const oe = Y({
|
|
3274
|
-
get() {
|
|
3275
|
-
if (v.value) {
|
|
3276
|
-
if (["class", "style"].find((R) => R === g) && !Q && (Q = o.get("/converter/appearance.converter") || null), Q && Q.convertFrom)
|
|
3277
|
-
return Q.convertFrom(C, y, S, k);
|
|
3278
|
-
const ee = C[y];
|
|
3279
|
-
return Object.prototype.hasOwnProperty.call(b, "defaultValue") && (ee === void 0 || typeof ee == "string" && ee === "") ? b.type === "boolean" ? b.defaultValue : b.defaultValue || "" : ee;
|
|
3280
|
-
}
|
|
3281
|
-
return null;
|
|
3282
|
-
},
|
|
3283
|
-
set(ee) {
|
|
3284
|
-
v.value += 1, Q && Q.convertTo ? (Q.convertTo(E, y, ee, S, k), Q.convertTo(C, y, ee, S, k)) : (E[y] = ee, C[y] = ee);
|
|
3285
|
-
}
|
|
3286
|
-
}), { refreshPanelAfterChanged: P, description: z, isExpand: J, parentPropertyID: K } = b, re = { propertyID: g, propertyName: W, propertyType: N, propertyValue: oe, editor: I, visible: D, readonly: T, cascadeConfig: B, hideCascadeTitle: L, refreshPanelAfterChanged: P, description: z, isExpand: J, parentPropertyID: K };
|
|
3287
|
-
return w[g] = re, re;
|
|
3288
|
-
});
|
|
3289
|
-
}
|
|
3290
|
-
function s(f, w, C = {}) {
|
|
3291
|
-
const E = {}, S = e[f];
|
|
3292
|
-
return S && S.categories ? Object.keys(S.categories).map((p) => {
|
|
3293
|
-
const h = S.categories[p], y = h == null ? void 0 : h.title, v = d(h.properties || {}, E, {}, C, w);
|
|
3294
|
-
return { categoryId: p, categoryName: y, properties: v };
|
|
3295
|
-
}) : [];
|
|
3296
|
-
}
|
|
3297
|
-
function l(f, w, C, E, S = "") {
|
|
3298
|
-
const k = w.$ref.schema, p = w.$ref.converter, h = C[k], y = h.type, v = n(h), g = {}, b = e[y];
|
|
3299
|
-
if (b && b.categories) {
|
|
3300
|
-
const x = b.categories[f], W = x == null ? void 0 : x.title;
|
|
3301
|
-
p && Object.keys(x.properties).forEach((I) => {
|
|
3302
|
-
x.properties[I].$converter = p;
|
|
3303
|
-
});
|
|
3304
|
-
const N = (x == null ? void 0 : x.properties) || {}, j = d(N, g, v, h, E, S);
|
|
3305
|
-
return { categoryId: f, categoryName: W, properties: j };
|
|
3306
|
-
}
|
|
3307
|
-
return { categoryId: f, categoryName: "", properties: [] };
|
|
3308
|
-
}
|
|
3309
|
-
function _(f, w, C, E, S) {
|
|
3310
|
-
const k = f.type, p = n(f), h = {};
|
|
3311
|
-
let y = S || e[k];
|
|
3312
|
-
if (y && Object.keys(y).length === 0 && C && C.getPropConfig && (y = C.getPropConfig(E)), y && y.categories) {
|
|
3313
|
-
const v = [];
|
|
3314
|
-
return Object.keys(y.categories).map((g) => {
|
|
3315
|
-
const b = y.categories[g];
|
|
3316
|
-
if (b.$ref) {
|
|
3317
|
-
v.push(l(g, b, f, w, E));
|
|
3318
|
-
return;
|
|
3319
|
-
}
|
|
3320
|
-
const x = b == null ? void 0 : b.title, W = b == null ? void 0 : b.tabId, N = b == null ? void 0 : b.tabName, j = b == null ? void 0 : b.hide, I = b == null ? void 0 : b.hideTitle, D = d(b.properties || {}, h, p, f, w, E, b.$converter), { setPropertyRelates: T } = b, B = b == null ? void 0 : b.parentPropertyID;
|
|
3321
|
-
v.push({ categoryId: g, categoryName: x, tabId: W, tabName: N, hide: j, properties: D, hideTitle: I, setPropertyRelates: T, parentPropertyID: B });
|
|
3322
|
-
}), v;
|
|
3323
|
-
}
|
|
3324
|
-
return [];
|
|
3325
|
-
}
|
|
3326
|
-
return {
|
|
3327
|
-
getPropertyConfigBySchema: _,
|
|
3328
|
-
getPropertyConfigByType: s,
|
|
3329
|
-
propertyConverterMap: o
|
|
3330
|
-
};
|
|
3331
|
-
}
|
|
3332
|
-
const gt = {}, ht = {};
|
|
3333
|
-
pt(gt, ht, _o);
|
|
3334
|
-
const _t = {}, yt = {}, { resolveSchemaWithDefaultValue: Uo } = ft(_t, yt), bt = {}, wt = {};
|
|
3335
|
-
pt(bt, wt, Uo);
|
|
3336
|
-
function Go(e, t, n = /* @__PURE__ */ new Map(), o = (r, c, m, u) => c, i = {}, a = (r) => r) {
|
|
3337
|
-
return mt[t.title] = t, vt[t.title] = o, gt[t.title] = i, ht[t.title] = a, _t[t.title] = t, yt[t.title] = o, bt[t.title] = i, wt[t.title] = a, (r = {}, c = !0) => {
|
|
3338
|
-
if (!c)
|
|
3339
|
-
return bo(r, n);
|
|
3340
|
-
const m = yo(r, t, n), u = Object.keys(e).reduce((d, s) => (d[s] = e[s].default, d), {});
|
|
3341
|
-
return Object.assign(u, m);
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
function qo(e, t) {
|
|
3345
|
-
return { customClass: t.class, customStyle: t.style };
|
|
3346
|
-
}
|
|
3347
|
-
const Ct = /* @__PURE__ */ new Map([
|
|
3348
|
-
["appearance", qo]
|
|
3349
|
-
]), zo = "root-viewmodel";
|
|
3350
|
-
function Wo(e, t) {
|
|
3351
|
-
const {
|
|
3352
|
-
formSchemaUtils: n,
|
|
3353
|
-
designViewModelUtils: o
|
|
3354
|
-
} = t;
|
|
3355
|
-
function i(d) {
|
|
3356
|
-
return {
|
|
3357
|
-
id: `${d.componentId}-component-viewmodel`,
|
|
3358
|
-
code: `${d.componentId}-component-viewmodel`,
|
|
3359
|
-
name: d.componentName,
|
|
3360
|
-
bindTo: d.bindTo,
|
|
3361
|
-
parent: zo,
|
|
3362
|
-
fields: [],
|
|
3363
|
-
commands: [],
|
|
3364
|
-
states: [],
|
|
3365
|
-
enableValidation: !0
|
|
3366
|
-
};
|
|
3367
|
-
}
|
|
3368
|
-
function a(d) {
|
|
3369
|
-
const s = e.getSchemaByType("component-ref");
|
|
3370
|
-
return Object.assign(s, {
|
|
3371
|
-
id: `${d.componentId}-component-ref`,
|
|
3372
|
-
component: `${d.componentId}-component`
|
|
3373
|
-
}), s;
|
|
3374
|
-
}
|
|
3375
|
-
function r(d, s, l) {
|
|
3376
|
-
var C, E, S, k;
|
|
3377
|
-
const _ = (E = (C = s == null ? void 0 : s.parentComponentInstance) == null ? void 0 : C.schema) == null ? void 0 : E.type, f = (k = (S = n.getFormSchema()) == null ? void 0 : S.module) == null ? void 0 : k.templateId;
|
|
3378
|
-
if (["double-list-template", "tree-list-template", "list-template"].includes(f))
|
|
3379
|
-
return d;
|
|
3380
|
-
const w = [Ge["content-container"].type, Ge["response-layout-item"].type, Ge["splitter-pane"].type];
|
|
3381
|
-
if (_ && w.includes(_)) {
|
|
3382
|
-
const p = e.getSchemaByType(
|
|
3383
|
-
"section",
|
|
3384
|
-
{
|
|
3385
|
-
parentComponentInstance: s.parentComponentInstance,
|
|
3386
|
-
mainTitle: s.componentName
|
|
3387
|
-
},
|
|
3388
|
-
t
|
|
3389
|
-
);
|
|
3390
|
-
if (p && p.contents && p.contents.length) {
|
|
3391
|
-
const h = p.contents[0];
|
|
3392
|
-
return h.contents = [d], p;
|
|
3393
|
-
}
|
|
3394
|
-
}
|
|
3395
|
-
return d;
|
|
3396
|
-
}
|
|
3397
|
-
function c(d) {
|
|
3398
|
-
const s = e.getSchemaByType("list-view");
|
|
3399
|
-
return Object.assign(s, {
|
|
3400
|
-
id: d.componentId + "-listView",
|
|
3401
|
-
appearance: {
|
|
3402
|
-
class: ""
|
|
3403
|
-
},
|
|
3404
|
-
type: "list-view",
|
|
3405
|
-
dataSource: d.dataSource || "",
|
|
3406
|
-
pagination: {
|
|
3407
|
-
enable: !1
|
|
3408
|
-
}
|
|
3409
|
-
}), [s];
|
|
3410
|
-
}
|
|
3411
|
-
function m(d) {
|
|
3412
|
-
var w, C;
|
|
3413
|
-
const s = e.getSchemaByType("component"), l = c(d);
|
|
3414
|
-
let _ = "";
|
|
3415
|
-
const f = (C = (w = n.getFormSchema()) == null ? void 0 : w.module) == null ? void 0 : C.templateId;
|
|
3416
|
-
return ["double-list-template", "tree-list-template", "list-template"].includes(f) && (_ = "f-struct-wrapper f-utils-fill-flex-column"), Object.assign(s, {
|
|
3417
|
-
id: `${d.componentId}-component`,
|
|
3418
|
-
viewModel: `${d.componentId}-component-viewmodel`,
|
|
3419
|
-
componentType: d.componentType,
|
|
3420
|
-
contents: l,
|
|
3421
|
-
appearance: { class: _ }
|
|
3422
|
-
}), s;
|
|
3423
|
-
}
|
|
3424
|
-
function u(d) {
|
|
3425
|
-
const s = a(d), l = m(d), _ = i(d), f = n.getFormSchema();
|
|
3426
|
-
return f.module.viewmodels.push(_), f.module.components.push(l), o.assembleDesignViewModel(), r(s, d);
|
|
3427
|
-
}
|
|
3428
|
-
return { createComponent: u };
|
|
3429
|
-
}
|
|
3430
|
-
function St(e, t, n, o) {
|
|
3431
|
-
var a, r, c, m, u, d;
|
|
3432
|
-
const i = n.parentComponentInstance;
|
|
3433
|
-
if (i && o) {
|
|
3434
|
-
const s = Math.random().toString(36).slice(2, 6), l = {
|
|
3435
|
-
componentId: `list-view-${s}`,
|
|
3436
|
-
componentName: ((a = n.bindingSourceContext) == null ? void 0 : a.entityTitle) || ((c = (r = n.bindingSourceContext) == null ? void 0 : r.bindingEntity) == null ? void 0 : c.name) || `列表-${s}`,
|
|
3437
|
-
componentType: "list-view",
|
|
3438
|
-
parentContainerId: i.schema.id,
|
|
3439
|
-
parentComponentInstance: i,
|
|
3440
|
-
// editable: true,
|
|
3441
|
-
bindTo: ((m = n.bindingSourceContext) == null ? void 0 : m.bindTo) || "",
|
|
3442
|
-
dataSource: (d = (u = n.bindingSourceContext) == null ? void 0 : u.bindingEntity) == null ? void 0 : d.label
|
|
3443
|
-
// selectedFields: context.bindingSourceContext?.bindingEntityFields
|
|
3444
|
-
}, { createComponent: _ } = Wo(e, o);
|
|
3445
|
-
return _(l);
|
|
3446
|
-
} else
|
|
3447
|
-
return t;
|
|
3448
|
-
}
|
|
3449
|
-
const Yo = "https://json-schema.org/draft/2020-12/schema", Xo = "https://farris-design.gitee.io/list-view.schema.json", Jo = "list-view", Qo = "A Farris Component", Zo = "object", Ko = {
|
|
3450
|
-
id: {
|
|
3451
|
-
description: "The unique identifier for list-view",
|
|
3452
|
-
type: "string"
|
|
3453
|
-
},
|
|
3454
|
-
type: {
|
|
3455
|
-
description: "The type string of list-view",
|
|
3456
|
-
type: "string",
|
|
3457
|
-
default: "list-view"
|
|
3458
|
-
},
|
|
3459
|
-
dataSource: {
|
|
3460
|
-
description: "",
|
|
3461
|
-
type: "string",
|
|
3462
|
-
default: ""
|
|
3463
|
-
},
|
|
3464
|
-
appearance: {
|
|
3465
|
-
description: "",
|
|
3466
|
-
type: "object",
|
|
3467
|
-
properties: {
|
|
3468
|
-
class: {
|
|
3469
|
-
type: "string"
|
|
3470
|
-
},
|
|
3471
|
-
style: {
|
|
3472
|
-
type: "string"
|
|
3473
|
-
}
|
|
3474
|
-
},
|
|
3475
|
-
default: {}
|
|
3476
|
-
},
|
|
3477
|
-
binding: {
|
|
3478
|
-
description: "",
|
|
3479
|
-
type: "object",
|
|
3480
|
-
default: {}
|
|
3481
|
-
},
|
|
3482
|
-
disable: {
|
|
3483
|
-
type: "string",
|
|
3484
|
-
default: !1
|
|
3485
|
-
},
|
|
3486
|
-
editable: {
|
|
3487
|
-
description: "",
|
|
3488
|
-
type: "boolean",
|
|
3489
|
-
default: !0
|
|
3490
|
-
},
|
|
3491
|
-
placeholder: {
|
|
3492
|
-
description: "",
|
|
3493
|
-
type: "string",
|
|
3494
|
-
default: ""
|
|
3495
|
-
},
|
|
3496
|
-
readonly: {
|
|
3497
|
-
description: "",
|
|
3498
|
-
type: "boolean",
|
|
3499
|
-
default: !1
|
|
3500
|
-
},
|
|
3501
|
-
require: {
|
|
3502
|
-
description: "",
|
|
3503
|
-
type: "boolean",
|
|
3504
|
-
default: !1
|
|
3505
|
-
},
|
|
3506
|
-
tabindex: {
|
|
3507
|
-
description: "",
|
|
3508
|
-
type: "number",
|
|
3509
|
-
default: -1
|
|
3510
|
-
},
|
|
3511
|
-
visible: {
|
|
3512
|
-
description: "",
|
|
3513
|
-
type: "boolean",
|
|
3514
|
-
default: !0
|
|
3515
|
-
},
|
|
3516
|
-
itemClass: {
|
|
3517
|
-
description: "",
|
|
3518
|
-
type: "string",
|
|
3519
|
-
default: ""
|
|
3520
|
-
},
|
|
3521
|
-
itemStyle: {
|
|
3522
|
-
description: "",
|
|
3523
|
-
type: "string",
|
|
3524
|
-
default: ""
|
|
3525
|
-
},
|
|
3526
|
-
contentTemplate: {
|
|
3527
|
-
description: "",
|
|
3528
|
-
type: "string",
|
|
3529
|
-
default: ""
|
|
3530
|
-
},
|
|
3531
|
-
footerTemplate: {
|
|
3532
|
-
description: "",
|
|
3533
|
-
type: "string",
|
|
3534
|
-
default: ""
|
|
3535
|
-
},
|
|
3536
|
-
emptyTemplate: {
|
|
3537
|
-
description: "",
|
|
3538
|
-
type: "string",
|
|
3539
|
-
default: ""
|
|
3540
|
-
}
|
|
3541
|
-
}, er = [
|
|
3542
|
-
"id",
|
|
3543
|
-
"type"
|
|
3544
|
-
], tr = {
|
|
3545
|
-
onClickItem: "行点击事件"
|
|
3546
|
-
}, nr = {
|
|
3547
|
-
$schema: Yo,
|
|
3548
|
-
$id: Xo,
|
|
3549
|
-
title: Jo,
|
|
3550
|
-
description: Qo,
|
|
3551
|
-
type: Zo,
|
|
3552
|
-
properties: Ko,
|
|
3553
|
-
required: er,
|
|
3554
|
-
events: tr
|
|
3555
|
-
}, kt = en(on, "headerTemplate"), Et = sn(kt, nr, Ct, St), or = O(0);
|
|
3556
|
-
function rr() {
|
|
3557
|
-
or.value++;
|
|
3558
|
-
}
|
|
3559
|
-
const ir = O(0);
|
|
3560
|
-
function ar(e) {
|
|
3561
|
-
const { formSchemaUtils: t, formStateMachineUtils: n } = e;
|
|
3562
|
-
function o(m, u = "") {
|
|
3563
|
-
return {
|
|
3564
|
-
path: u + m.code,
|
|
3565
|
-
field: m.id,
|
|
3566
|
-
fullPath: m.code
|
|
3567
|
-
};
|
|
3568
|
-
}
|
|
3569
|
-
function i(m, u = "") {
|
|
3570
|
-
return t.getViewModelById(m).states.map((s) => o(s, u));
|
|
3571
|
-
}
|
|
3572
|
-
function a(m) {
|
|
3573
|
-
const u = t.getRootViewModelId(), d = i(m);
|
|
3574
|
-
if (m === u)
|
|
3575
|
-
return d;
|
|
3576
|
-
const s = i(u, "root-component.");
|
|
3577
|
-
return [...d, ...s];
|
|
3578
|
-
}
|
|
3579
|
-
function r(m) {
|
|
3580
|
-
return m.binding && m.binding.path || m.id || "";
|
|
3581
|
-
}
|
|
3582
|
-
function c() {
|
|
3583
|
-
return n && n.getRenderStates() || [];
|
|
3584
|
-
}
|
|
3585
|
-
return { getVariables: a, getControlName: r, getStateMachines: c };
|
|
3586
|
-
}
|
|
3587
|
-
class sr {
|
|
3588
|
-
constructor(t) {
|
|
3589
|
-
me(this, "sessionVariables", [
|
|
3590
|
-
{
|
|
3591
|
-
key: "CurrentSysOrgName",
|
|
3592
|
-
name: "当前组织Name",
|
|
3593
|
-
description: "当前组织Name"
|
|
3594
|
-
},
|
|
3595
|
-
// {
|
|
3596
|
-
// key: "CurrentSysOrgCode",
|
|
3597
|
-
// name: "当前组织Code",
|
|
3598
|
-
// description: "当前组织Code"
|
|
3599
|
-
// },
|
|
3600
|
-
{
|
|
3601
|
-
key: "CurrentSysOrgId",
|
|
3602
|
-
name: "当前组织Id",
|
|
3603
|
-
description: "当前组织Id"
|
|
3604
|
-
},
|
|
3605
|
-
{
|
|
3606
|
-
key: "CurrentUserName",
|
|
3607
|
-
name: "当前用户Name",
|
|
3608
|
-
description: "当前用户Name"
|
|
3609
|
-
},
|
|
3610
|
-
{
|
|
3611
|
-
key: "CurrentUserCode",
|
|
3612
|
-
name: "当前用户Code",
|
|
3613
|
-
description: "当前用户Code"
|
|
3614
|
-
},
|
|
3615
|
-
{
|
|
3616
|
-
key: "CurrentUserId",
|
|
3617
|
-
name: "当前用户Id",
|
|
3618
|
-
description: "当前用户Id"
|
|
3619
|
-
},
|
|
3620
|
-
{
|
|
3621
|
-
key: "CurrentLanguage",
|
|
3622
|
-
name: "当前语言编号",
|
|
3623
|
-
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
3624
|
-
}
|
|
3625
|
-
]);
|
|
3626
|
-
me(this, "expressionNames", {
|
|
3627
|
-
compute: "计算表达式",
|
|
3628
|
-
dependency: "依赖表达式",
|
|
3629
|
-
validate: "验证表达式",
|
|
3630
|
-
dataPicking: "帮助前表达式",
|
|
3631
|
-
visible: "可见表达式",
|
|
3632
|
-
readonly: "只读表达式",
|
|
3633
|
-
required: "必填表达式"
|
|
3634
|
-
});
|
|
3635
|
-
me(this, "getExpressionConverter", (t, n) => ({
|
|
3636
|
-
convertFrom: (o, i, a, r) => {
|
|
3637
|
-
const c = a.getExpressionRuleValue(t, n || i);
|
|
3638
|
-
return c && c.value || "";
|
|
3639
|
-
},
|
|
3640
|
-
convertTo: (o, i, a, r, c) => {
|
|
3641
|
-
var m;
|
|
3642
|
-
if (i === "dataPicking" && (a != null && a.target)) {
|
|
3643
|
-
const u = `${a.target}_dataPicking`;
|
|
3644
|
-
((m = a.rules) == null ? void 0 : m.some(
|
|
3645
|
-
(s) => s.id === u && s.value
|
|
3646
|
-
)) ? o.dictPickingExpressionId = u : delete o.dictPickingExpressionId;
|
|
3647
|
-
}
|
|
3648
|
-
r.updateExpression(a);
|
|
3649
|
-
}
|
|
3650
|
-
}));
|
|
3651
|
-
this.formSchemaService = t;
|
|
3652
|
-
}
|
|
3653
|
-
getExpressionRule(t, n) {
|
|
3654
|
-
const o = this.formSchemaService.getExpressions();
|
|
3655
|
-
if (!o)
|
|
3656
|
-
return "";
|
|
3657
|
-
const i = o.find((r) => r.target === t);
|
|
3658
|
-
if (!i)
|
|
3659
|
-
return "";
|
|
3660
|
-
const a = i.rules.find((r) => r.type === n);
|
|
3661
|
-
return a || "";
|
|
3662
|
-
}
|
|
3663
|
-
// 获取上下文表单变量
|
|
3664
|
-
getContextFormVariables() {
|
|
3665
|
-
const { module: t } = this.formSchemaService.getFormSchema();
|
|
3666
|
-
if (!t.viewmodels || t.viewmodels.length === 0)
|
|
3667
|
-
return [];
|
|
3668
|
-
const n = this.formSchemaService.getRootViewModelId(), o = this.formSchemaService.getViewModelById(n);
|
|
3669
|
-
if (!o || !o.states || o.states.length === 0)
|
|
3670
|
-
return [];
|
|
3671
|
-
const i = [];
|
|
3672
|
-
return o.states.forEach((a) => {
|
|
3673
|
-
i.push({
|
|
3674
|
-
key: a.code,
|
|
3675
|
-
name: a.name,
|
|
3676
|
-
description: a.name,
|
|
3677
|
-
category: a.category
|
|
3678
|
-
});
|
|
3679
|
-
}), i;
|
|
3680
|
-
}
|
|
3681
|
-
createTreeNode(t, n, o = "label") {
|
|
3682
|
-
return {
|
|
3683
|
-
id: t.id,
|
|
3684
|
-
name: t.name,
|
|
3685
|
-
bindingPath: t[o],
|
|
3686
|
-
parents: n,
|
|
3687
|
-
type: "field"
|
|
3688
|
-
};
|
|
3689
|
-
}
|
|
3690
|
-
buildEntityFieldsTreeData(t = null, n) {
|
|
3691
|
-
const o = [];
|
|
3692
|
-
return t == null || t.forEach((i) => {
|
|
3693
|
-
var c;
|
|
3694
|
-
const a = this.createTreeNode(i, n);
|
|
3695
|
-
let r = [];
|
|
3696
|
-
(c = i.type) != null && c.fields && (r = this.buildEntityFieldsTreeData(i.type.fields, [...n, i.label])), o.push({
|
|
3697
|
-
data: a,
|
|
3698
|
-
children: r,
|
|
3699
|
-
expanded: !0
|
|
3700
|
-
});
|
|
3701
|
-
}), o;
|
|
3702
|
-
}
|
|
3703
|
-
buildChildEntityTreeData(t = null, n) {
|
|
3704
|
-
const o = [];
|
|
3705
|
-
return t == null || t.forEach((i) => {
|
|
3706
|
-
var m, u;
|
|
3707
|
-
const a = this.createTreeNode(i, n);
|
|
3708
|
-
a.type = "entity";
|
|
3709
|
-
const r = this.buildEntityFieldsTreeData((m = i.type) == null ? void 0 : m.fields, [...n, i.label]), c = this.buildChildEntityTreeData((u = i.type) == null ? void 0 : u.entities, [...n, i.label]);
|
|
3710
|
-
c != null && c.length && (r == null || r.push(...c)), o.push({
|
|
3711
|
-
data: a,
|
|
3712
|
-
children: r || [],
|
|
3713
|
-
// 空值回退
|
|
3714
|
-
expanded: !0
|
|
3715
|
-
});
|
|
3716
|
-
}), o;
|
|
3717
|
-
}
|
|
3718
|
-
getEntitiesTreeData() {
|
|
3719
|
-
const t = this.formSchemaService.getSchemaEntities();
|
|
3720
|
-
if (!(t != null && t.length))
|
|
3721
|
-
return [];
|
|
3722
|
-
const n = t[0];
|
|
3723
|
-
if (!(n != null && n.type))
|
|
3724
|
-
return [];
|
|
3725
|
-
const o = this.buildEntityFieldsTreeData(n.type.fields, [n.code]), i = this.buildChildEntityTreeData(n.type.entities, [n.code]);
|
|
3726
|
-
return i != null && i.length && (o == null || o.push(...i)), {
|
|
3727
|
-
entityCode: n.code,
|
|
3728
|
-
fields: [{
|
|
3729
|
-
data: this.createTreeNode(n, [], "code"),
|
|
3730
|
-
children: o || []
|
|
3731
|
-
}]
|
|
3732
|
-
};
|
|
3733
|
-
}
|
|
3734
|
-
getEntitiesAndVariables() {
|
|
3735
|
-
return {
|
|
3736
|
-
entities: this.getEntitiesTreeData(),
|
|
3737
|
-
variables: {
|
|
3738
|
-
session: {
|
|
3739
|
-
name: "系统变量",
|
|
3740
|
-
items: this.sessionVariables,
|
|
3741
|
-
visible: !1
|
|
3742
|
-
},
|
|
3743
|
-
forms: {
|
|
3744
|
-
name: "表单变量",
|
|
3745
|
-
items: this.getContextFormVariables(),
|
|
3746
|
-
visible: !0
|
|
3747
|
-
}
|
|
3748
|
-
}
|
|
3749
|
-
};
|
|
3750
|
-
}
|
|
3751
|
-
onBeforeOpenExpression(t, n, o) {
|
|
3752
|
-
const i = o === "Field" ? t.binding.field : t.id, a = this.getExpressionRule(i, n), r = this.getEntitiesAndVariables(), c = {
|
|
3753
|
-
message: ["validate", "required", "dataPicking"].includes(n) && a ? a.message : "",
|
|
3754
|
-
...r
|
|
3755
|
-
};
|
|
3756
|
-
return a.messageType != null && (c.messageType = a.messageType), c;
|
|
3757
|
-
}
|
|
3758
|
-
buildRule(t, n, o, i) {
|
|
3759
|
-
const { expression: a, message: r, messageType: c } = n, m = {
|
|
3760
|
-
id: `${t}_${o}`,
|
|
3761
|
-
type: o,
|
|
3762
|
-
value: a
|
|
3763
|
-
};
|
|
3764
|
-
return (o === "validate" || o === "dataPicking" || o === "required") && (m.message = r), o === "dataPicking" && (m.messageType = c), o === "validate" && i && (m.elementId = i), m;
|
|
3765
|
-
}
|
|
3766
|
-
getExpressionData() {
|
|
3767
|
-
const { expressions: t } = this.formSchemaService.getFormSchema().module;
|
|
3768
|
-
return t || [];
|
|
3769
|
-
}
|
|
3770
|
-
updateExpression(t, n, o, i) {
|
|
3771
|
-
const a = n === "Field" ? t.binding.field : t.id, r = this.buildRule(a, o, i, t.type === "form-group" ? t.id : "");
|
|
3772
|
-
let m = this.getExpressionData().find((d) => d.targetType === n && d.target === a);
|
|
3773
|
-
const u = (d) => d.value.trim() === "";
|
|
3774
|
-
if (m) {
|
|
3775
|
-
const d = m.rules.find((s) => s.id === r.id);
|
|
3776
|
-
if (d)
|
|
3777
|
-
u(r) ? m.rules = m.rules.filter((s) => s.id !== r.id) : (Object.assign(d, r), i === "validate" && t.type === "form-group" && (d.elementId = t.id));
|
|
3778
|
-
else {
|
|
3779
|
-
if (u(r))
|
|
3780
|
-
return null;
|
|
3781
|
-
m.rules = m.rules || [], m.rules.push(r);
|
|
3782
|
-
}
|
|
3783
|
-
} else {
|
|
3784
|
-
if (u(r))
|
|
3785
|
-
return null;
|
|
3786
|
-
m = {
|
|
3787
|
-
target: `${a}`,
|
|
3788
|
-
rules: [r],
|
|
3789
|
-
targetType: n
|
|
3790
|
-
};
|
|
3791
|
-
}
|
|
3792
|
-
return m;
|
|
3793
|
-
}
|
|
3794
|
-
getExpressionEditorOptions(t, n, o, i) {
|
|
3795
|
-
return o.reduce((a, r) => {
|
|
3796
|
-
var m, u;
|
|
3797
|
-
const c = n === "Field" ? (m = t == null ? void 0 : t.binding) == null ? void 0 : m.field : t.id;
|
|
3798
|
-
return a[r] = {
|
|
3799
|
-
hide: n === "Field" ? !!((u = t == null ? void 0 : t.binding) != null && u.field) : !1,
|
|
3800
|
-
description: "",
|
|
3801
|
-
title: this.expressionNames[r],
|
|
3802
|
-
type: "string",
|
|
3803
|
-
$converter: this.getExpressionConverter(c),
|
|
3804
|
-
refreshPanelAfterChanged: !0,
|
|
3805
|
-
editor: {
|
|
3806
|
-
type: "expression-editor",
|
|
3807
|
-
singleExpand: !1,
|
|
3808
|
-
dialogTitle: `${this.expressionNames[r]}编辑器`,
|
|
3809
|
-
showMessage: r === "validate" || r === "dataPicking" || r === "required",
|
|
3810
|
-
showMessageType: r === "dataPicking",
|
|
3811
|
-
beforeOpen: () => this.onBeforeOpenExpression(t, r, n),
|
|
3812
|
-
onSubmitModal: (d) => {
|
|
3813
|
-
const s = this.updateExpression(t, n, d, r);
|
|
3814
|
-
if (i) {
|
|
3815
|
-
const l = this.buildRule(c, d, r);
|
|
3816
|
-
i(l);
|
|
3817
|
-
}
|
|
3818
|
-
return s;
|
|
3819
|
-
}
|
|
3820
|
-
}
|
|
3821
|
-
}, a;
|
|
3822
|
-
}, {});
|
|
3823
|
-
}
|
|
3824
|
-
getExpressionInfo(t, n, o) {
|
|
3825
|
-
const i = n === "Field" ? t.binding.field : t.id, a = this.getExpressionRule(i, o), r = {
|
|
3826
|
-
value: a && a.value,
|
|
3827
|
-
targetId: i,
|
|
3828
|
-
targetType: n,
|
|
3829
|
-
expressionType: o
|
|
3830
|
-
};
|
|
3831
|
-
return a && a.message && (r.message = a.message), r;
|
|
3832
|
-
}
|
|
3833
|
-
getExpressionConfig(t, n, o = ["compute", "dependency", "validate"], i) {
|
|
3834
|
-
return {
|
|
3835
|
-
description: "表达式",
|
|
3836
|
-
title: "表达式",
|
|
3837
|
-
hide: !t.binding,
|
|
3838
|
-
properties: {
|
|
3839
|
-
...this.getExpressionEditorOptions(t, n, o, i)
|
|
3840
|
-
}
|
|
3841
|
-
};
|
|
3842
|
-
}
|
|
3843
|
-
getExpressionOptions(t, n, o) {
|
|
3844
|
-
const i = this.getExpressionInfo(t, n, o);
|
|
3845
|
-
return {
|
|
3846
|
-
dialogTitle: `${this.expressionNames[o]}编辑器`,
|
|
3847
|
-
singleExpand: !1,
|
|
3848
|
-
showMessage: o === "required",
|
|
3849
|
-
beforeOpen: () => this.onBeforeOpenExpression(t, o, n),
|
|
3850
|
-
expressionInfo: i
|
|
3851
|
-
};
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3854
|
-
class lr {
|
|
3855
|
-
constructor(t, n) {
|
|
3856
|
-
me(this, "componentId");
|
|
3857
|
-
me(this, "viewModelId");
|
|
3858
|
-
me(this, "eventsEditorUtils");
|
|
3859
|
-
me(this, "formSchemaUtils");
|
|
3860
|
-
me(this, "formMetadataConverter");
|
|
3861
|
-
me(this, "designViewModelUtils");
|
|
3862
|
-
me(this, "designViewModelField");
|
|
3863
|
-
me(this, "controlCreatorUtils");
|
|
3864
|
-
me(this, "designerHostService");
|
|
3865
|
-
me(this, "designerContext");
|
|
3866
|
-
me(this, "schemaService", null);
|
|
3867
|
-
me(this, "metadataService", null);
|
|
3868
|
-
me(this, "propertyConfig", {
|
|
3869
|
-
type: "object",
|
|
3870
|
-
categories: {}
|
|
3871
|
-
});
|
|
3872
|
-
var o;
|
|
3873
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService, this.designerContext = n.designerContext;
|
|
3874
|
-
}
|
|
3875
|
-
getFormDesignerInstance() {
|
|
3876
|
-
var t, n;
|
|
3877
|
-
return (n = (t = this.designerContext) == null ? void 0 : t.instances) == null ? void 0 : n.formDesigner.value;
|
|
3878
|
-
}
|
|
3879
|
-
getTableInfo() {
|
|
3880
|
-
var t;
|
|
3881
|
-
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
3882
|
-
}
|
|
3883
|
-
setDesignViewModelField(t) {
|
|
3884
|
-
var o;
|
|
3885
|
-
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
3886
|
-
if (n) {
|
|
3887
|
-
if (!this.designViewModelField) {
|
|
3888
|
-
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
3889
|
-
this.designViewModelField = i.fields.find((a) => a.id === n);
|
|
3890
|
-
}
|
|
3891
|
-
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
3892
|
-
}
|
|
3893
|
-
}
|
|
3894
|
-
getBasicPropConfig(t) {
|
|
3895
|
-
return {
|
|
3896
|
-
description: "Basic Information",
|
|
3897
|
-
title: "基本信息",
|
|
3898
|
-
properties: {
|
|
3899
|
-
id: {
|
|
3900
|
-
description: "组件标识",
|
|
3901
|
-
title: "标识",
|
|
3902
|
-
type: "string",
|
|
3903
|
-
readonly: !0
|
|
3904
|
-
},
|
|
3905
|
-
type: {
|
|
3906
|
-
description: "组件类型",
|
|
3907
|
-
title: "控件类型",
|
|
3908
|
-
type: "select",
|
|
3909
|
-
editor: {
|
|
3910
|
-
type: "combo-list",
|
|
3911
|
-
textField: "name",
|
|
3912
|
-
valueField: "value",
|
|
3913
|
-
idField: "value",
|
|
3914
|
-
editable: !1,
|
|
3915
|
-
data: [{ value: t.type, name: xe[t.type] && xe[t.type].name }]
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
}
|
|
3919
|
-
};
|
|
3920
|
-
}
|
|
3921
|
-
getAppearanceConfig(t = null, n = {}, o) {
|
|
3922
|
-
const i = {
|
|
3923
|
-
title: "外观",
|
|
3924
|
-
description: "Appearance"
|
|
3925
|
-
}, a = {
|
|
3926
|
-
class: {
|
|
3927
|
-
title: "class样式",
|
|
3928
|
-
type: "string",
|
|
3929
|
-
description: "组件的CSS样式",
|
|
3930
|
-
$converter: "/converter/appearance.converter",
|
|
3931
|
-
parentPropertyID: "appearance"
|
|
3932
|
-
},
|
|
3933
|
-
style: {
|
|
3934
|
-
title: "style样式",
|
|
3935
|
-
type: "string",
|
|
3936
|
-
description: "组件的样式",
|
|
3937
|
-
$converter: "/converter/appearance.converter",
|
|
3938
|
-
parentPropertyID: "appearance"
|
|
3939
|
-
}
|
|
3940
|
-
};
|
|
3941
|
-
for (const r in n)
|
|
3942
|
-
a[r] = Object.assign(a[r] || {}, n[r]);
|
|
3943
|
-
return {
|
|
3944
|
-
...i,
|
|
3945
|
-
properties: { ...a },
|
|
3946
|
-
setPropertyRelates(r, c) {
|
|
3947
|
-
if (r) {
|
|
3948
|
-
switch (r && r.propertyID) {
|
|
3949
|
-
case "class":
|
|
3950
|
-
case "style": {
|
|
3951
|
-
ir.value++;
|
|
3952
|
-
break;
|
|
3953
|
-
}
|
|
3954
|
-
}
|
|
3955
|
-
o && o(r, t, c);
|
|
3956
|
-
}
|
|
3957
|
-
}
|
|
3958
|
-
};
|
|
3959
|
-
}
|
|
3960
|
-
/**
|
|
3961
|
-
*
|
|
3962
|
-
* @param propertyData
|
|
3963
|
-
* @param propertyTypes
|
|
3964
|
-
* @param propertyName
|
|
3965
|
-
* @param constInfos
|
|
3966
|
-
* @param variableInfos
|
|
3967
|
-
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
3968
|
-
* @returns
|
|
3969
|
-
*/
|
|
3970
|
-
getPropertyEditorParams(t, n = [], o = "visible", i = {}, a = {}, r = "") {
|
|
3971
|
-
const { getVariables: c, getControlName: m, getStateMachines: u } = ar(this.designerHostService), d = this.getRealTargetType(t), s = n && n.length > 0 ? n : ["Const", "Variable", "StateMachine", "Expression"], l = {
|
|
3972
|
-
type: "property-editor",
|
|
3973
|
-
propertyTypes: s
|
|
3974
|
-
};
|
|
3975
|
-
return s.map((_) => {
|
|
3976
|
-
switch (_) {
|
|
3977
|
-
case "Const":
|
|
3978
|
-
Object.assign(l, {
|
|
3979
|
-
constType: "enum",
|
|
3980
|
-
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
3981
|
-
}, i);
|
|
3982
|
-
break;
|
|
3983
|
-
case "Expression":
|
|
3984
|
-
l.expressionConfig = this.getExpressionOptions(t, d, r || o);
|
|
3985
|
-
break;
|
|
3986
|
-
case "StateMachine":
|
|
3987
|
-
l.stateMachines = u();
|
|
3988
|
-
break;
|
|
3989
|
-
case "Variable":
|
|
3990
|
-
Object.assign(l, {
|
|
3991
|
-
controlName: m(t),
|
|
3992
|
-
newVariablePrefix: "is",
|
|
3993
|
-
newVariableType: "Boolean",
|
|
3994
|
-
variables: c(this.viewModelId),
|
|
3995
|
-
onBeforeOpenVariables: (f) => {
|
|
3996
|
-
f.value = c(this.viewModelId);
|
|
3997
|
-
}
|
|
3998
|
-
}, a);
|
|
3999
|
-
break;
|
|
4000
|
-
}
|
|
4001
|
-
}), l;
|
|
4002
|
-
}
|
|
4003
|
-
getVisibleProperty(t, n = "") {
|
|
4004
|
-
var a;
|
|
4005
|
-
let o = ["Const", "Variable", "StateMachine", "Expression"];
|
|
4006
|
-
return n === "gridFieldEditor" ? o = ["Const", "Expression"] : n === "form-group" && !((a = t.binding) != null && a.field) && (o = ["Const", "Variable", "StateMachine"]), {
|
|
4007
|
-
visible: {
|
|
4008
|
-
title: "是否可见",
|
|
4009
|
-
type: "boolean",
|
|
4010
|
-
description: "运行时组件是否可见",
|
|
4011
|
-
editor: this.getPropertyEditorParams(t, o, "visible")
|
|
4012
|
-
}
|
|
4013
|
-
};
|
|
4014
|
-
}
|
|
4015
|
-
/**
|
|
4016
|
-
* 获取行为
|
|
4017
|
-
* @param propertyData
|
|
4018
|
-
* @param viewModelId
|
|
4019
|
-
* @returns
|
|
4020
|
-
*/
|
|
4021
|
-
getBehaviorConfig(t, n = "", o = {}, i) {
|
|
4022
|
-
const a = {
|
|
4023
|
-
title: "行为",
|
|
4024
|
-
description: ""
|
|
4025
|
-
}, r = this.getVisibleProperty(t, n);
|
|
4026
|
-
for (const m in o)
|
|
4027
|
-
r[m] = Object.assign(r[m] || {}, o[m]);
|
|
4028
|
-
const c = this;
|
|
4029
|
-
return {
|
|
4030
|
-
...a,
|
|
4031
|
-
properties: { ...r },
|
|
4032
|
-
setPropertyRelates(m, u) {
|
|
4033
|
-
if (m) {
|
|
4034
|
-
switch (m.propertyID) {
|
|
4035
|
-
case "disabled":
|
|
4036
|
-
case "readonly":
|
|
4037
|
-
case "visible":
|
|
4038
|
-
c.afterMutilEditorChanged(t, m);
|
|
4039
|
-
break;
|
|
4040
|
-
}
|
|
4041
|
-
i && i(m, u);
|
|
4042
|
-
}
|
|
4043
|
-
}
|
|
4044
|
-
};
|
|
4045
|
-
}
|
|
4046
|
-
/**
|
|
4047
|
-
* 当多值编辑器变更时
|
|
4048
|
-
* @param propertyData
|
|
4049
|
-
* @param changeObject
|
|
4050
|
-
*/
|
|
4051
|
-
afterMutilEditorChanged(t, n) {
|
|
4052
|
-
this.addNewVariableToViewModel(n, this.viewModelId), this.updateExpressionValue(n), this.clearExpression(n, t);
|
|
4053
|
-
}
|
|
4054
|
-
/**
|
|
4055
|
-
*
|
|
4056
|
-
* @param propertyId
|
|
4057
|
-
* @param componentInstance
|
|
4058
|
-
* @returns
|
|
4059
|
-
*/
|
|
4060
|
-
updateElementByParentContainer(t, n) {
|
|
4061
|
-
const o = n && n.parent && n.parent.schema;
|
|
4062
|
-
if (!o)
|
|
4063
|
-
return;
|
|
4064
|
-
const i = o.contents.findIndex((r) => r.id === t), a = Ae(o.contents[i]);
|
|
4065
|
-
o.contents.splice(i, 1), o.contents.splice(i, 0, a), rr();
|
|
4066
|
-
}
|
|
4067
|
-
/**
|
|
4068
|
-
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
4069
|
-
* @param changeObject
|
|
4070
|
-
* @param viewModelId
|
|
4071
|
-
* @returns
|
|
4072
|
-
*/
|
|
4073
|
-
addNewVariableToViewModel(t, n) {
|
|
4074
|
-
const o = t.propertyValue;
|
|
4075
|
-
if (!(o && typeof o == "object") || !(o.type === "Variable" && o.isNewVariable))
|
|
4076
|
-
return;
|
|
4077
|
-
const r = {
|
|
4078
|
-
id: o.field,
|
|
4079
|
-
category: "locale",
|
|
4080
|
-
code: o.fullPath,
|
|
4081
|
-
name: o.fullPath,
|
|
4082
|
-
type: o.newVariableType || "String"
|
|
4083
|
-
};
|
|
4084
|
-
delete o.newVariableType, delete o.isNewVariable, this.formSchemaUtils.getVariableByCode(r.code) || this.formSchemaUtils.getViewModelById(n).states.push(r);
|
|
4085
|
-
}
|
|
4086
|
-
/**
|
|
4087
|
-
* 更新表达式到expressions节点
|
|
4088
|
-
* @param changeObject
|
|
4089
|
-
*/
|
|
4090
|
-
updateExpressionValue(t) {
|
|
4091
|
-
const n = t.propertyValue;
|
|
4092
|
-
if (!((n && n.type) === "Expression" && n.expressionInfo))
|
|
4093
|
-
return;
|
|
4094
|
-
const { expressionId: a, expressionInfo: r } = n, { targetId: c, targetType: m, expressionType: u, value: d, message: s } = r, l = this.formSchemaUtils.getModule();
|
|
4095
|
-
l.expressions = l.expressions || [];
|
|
4096
|
-
const { expressions: _ } = l;
|
|
4097
|
-
let f = _.find((C) => C.target === c);
|
|
4098
|
-
f || (f = { target: c, rules: [], targetType: m }, _.push(f));
|
|
4099
|
-
const w = f.rules.find((C) => C.type === u);
|
|
4100
|
-
if (w)
|
|
4101
|
-
w.value = d, w.message = s;
|
|
4102
|
-
else {
|
|
4103
|
-
const C = { id: a, type: u, value: d, message: s };
|
|
4104
|
-
f.rules.push(C);
|
|
4105
|
-
}
|
|
4106
|
-
delete n.expressionInfo;
|
|
4107
|
-
}
|
|
4108
|
-
/**
|
|
4109
|
-
* 属性类型切换为非表达式后,清除原表达式
|
|
4110
|
-
* @param changeObject
|
|
4111
|
-
* @param propertyData
|
|
4112
|
-
* @returns
|
|
4113
|
-
*/
|
|
4114
|
-
clearExpression(t, n) {
|
|
4115
|
-
const o = t.propertyValue;
|
|
4116
|
-
if (o && o.type === "Expression")
|
|
4117
|
-
return;
|
|
4118
|
-
const a = t.propertyID, r = this.formSchemaUtils.getExpressions(), c = n.binding ? n.binding.field : n.id, m = r.find((u) => u.target === c);
|
|
4119
|
-
!m || !m.rules || (m.rules = m.rules.filter((u) => u.type !== a));
|
|
4120
|
-
}
|
|
4121
|
-
getExpressionOptions(t, n, o) {
|
|
4122
|
-
return new sr(this.formSchemaUtils).getExpressionOptions(t, n, o);
|
|
4123
|
-
}
|
|
4124
|
-
getRealTargetType(t) {
|
|
4125
|
-
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
|
|
4126
|
-
}
|
|
4127
|
-
createBaseEventProperty(t) {
|
|
4128
|
-
const n = {};
|
|
4129
|
-
return n[this.viewModelId] = {
|
|
4130
|
-
type: "events-editor",
|
|
4131
|
-
editor: {
|
|
4132
|
-
initialData: t,
|
|
4133
|
-
viewSourceHandle: (o) => {
|
|
4134
|
-
var i;
|
|
4135
|
-
((i = o.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(o);
|
|
4136
|
-
}
|
|
4137
|
-
}
|
|
4138
|
-
}, n;
|
|
4139
|
-
}
|
|
4140
|
-
}
|
|
4141
|
-
class cr extends lr {
|
|
4142
|
-
constructor(t, n) {
|
|
4143
|
-
super(t, n);
|
|
4144
|
-
}
|
|
4145
|
-
getPropertyConfig(t) {
|
|
4146
|
-
return this.getBasicPropConfig(t), this.getAppearanceProperties(t), this.getEventPropConfig(t), this.propertyConfig;
|
|
4147
|
-
}
|
|
4148
|
-
getBasicPropConfig(t) {
|
|
4149
|
-
var r, c, m;
|
|
4150
|
-
const n = (m = (c = (r = this.formSchemaUtils.getFormSchema()) == null ? void 0 : r.module) == null ? void 0 : c.entity[0]) == null ? void 0 : m.entities[0], o = this.assembleSchemaEntityToTree(n, 0), i = this, a = super.getBasicPropConfig(t);
|
|
4151
|
-
this.propertyConfig.categories.basic = {
|
|
4152
|
-
description: "Basic Information",
|
|
4153
|
-
title: "基本信息",
|
|
4154
|
-
properties: {
|
|
4155
|
-
...a.properties,
|
|
4156
|
-
dataSource: {
|
|
4157
|
-
description: "绑定数据源",
|
|
4158
|
-
title: "绑定数据源",
|
|
4159
|
-
editor: {
|
|
4160
|
-
type: "combo-tree",
|
|
4161
|
-
textField: "name",
|
|
4162
|
-
valueField: "label",
|
|
4163
|
-
data: o,
|
|
4164
|
-
editable: !1
|
|
4165
|
-
},
|
|
4166
|
-
readonly: !0
|
|
4167
|
-
}
|
|
4168
|
-
},
|
|
4169
|
-
setPropertyRelates(u, d) {
|
|
4170
|
-
switch (u && u.propertyID) {
|
|
4171
|
-
case "dataSource": {
|
|
4172
|
-
const s = i.formSchemaUtils.getViewModelById(i.viewModelId);
|
|
4173
|
-
if (s) {
|
|
4174
|
-
const l = o.find((_) => _.label === u.propertyValue);
|
|
4175
|
-
s.bindTo = l.bindTo;
|
|
4176
|
-
}
|
|
4177
|
-
i.designViewModelUtils.assembleDesignViewModel();
|
|
4178
|
-
break;
|
|
4179
|
-
}
|
|
4180
|
-
}
|
|
4181
|
-
}
|
|
4182
|
-
};
|
|
4183
|
-
}
|
|
4184
|
-
/**
|
|
4185
|
-
* 将schema实体表组装成树
|
|
4186
|
-
*/
|
|
4187
|
-
assembleSchemaEntityToTree(t, n, o, i = "", a = []) {
|
|
4188
|
-
const r = i ? `${i}/${t.label}` : "/";
|
|
4189
|
-
return a.push({
|
|
4190
|
-
id: t.id,
|
|
4191
|
-
name: t.name,
|
|
4192
|
-
label: t.label,
|
|
4193
|
-
layer: n,
|
|
4194
|
-
parent: o && o.id,
|
|
4195
|
-
bindTo: r.replace("//", "/")
|
|
4196
|
-
}), t.type.entities && t.type.entities.length && t.type.entities.map((c) => this.assembleSchemaEntityToTree(c, n + 1, t, r, a)), a;
|
|
4197
|
-
}
|
|
4198
|
-
getAppearanceProperties(t) {
|
|
4199
|
-
this.propertyConfig.categories.appearance = {
|
|
4200
|
-
title: "外观",
|
|
4201
|
-
properties: {
|
|
4202
|
-
class: {
|
|
4203
|
-
title: "列表class样式",
|
|
4204
|
-
type: "string",
|
|
4205
|
-
description: "组件的CSS样式"
|
|
4206
|
-
},
|
|
4207
|
-
itemClass: {
|
|
4208
|
-
title: "行样式class",
|
|
4209
|
-
type: "string",
|
|
4210
|
-
description: "行样式class",
|
|
4211
|
-
editor: {
|
|
4212
|
-
type: "code-editor",
|
|
4213
|
-
language: "javascript",
|
|
4214
|
-
leftTemplate: () => F(Oe, null, [F("h5", null, [Te("示例代码")]), F("pre", null, [`
|
|
4215
|
-
(dataItem) => {
|
|
4216
|
-
if(dataItem.code === '0001') {
|
|
4217
|
-
return 'bg-danger text-center';
|
|
4218
|
-
}
|
|
4219
|
-
return '';
|
|
4220
|
-
}
|
|
4221
|
-
|
|
4222
|
-
注:dataItem 行数据
|
|
4223
|
-
函数返回值是一个字符串,
|
|
4224
|
-
是由空格分隔的class组成 `])])
|
|
4225
|
-
}
|
|
4226
|
-
},
|
|
4227
|
-
itemStyle: {
|
|
4228
|
-
title: "行样式style",
|
|
4229
|
-
type: "string",
|
|
4230
|
-
description: "行样式style",
|
|
4231
|
-
editor: {
|
|
4232
|
-
type: "code-editor",
|
|
4233
|
-
language: "javascript",
|
|
4234
|
-
leftTemplate: () => F(Oe, null, [F("h5", null, [Te("示例代码")]), F("pre", null, [`
|
|
4235
|
-
(dataItem) => {
|
|
4236
|
-
if(dataItem.code === '0001') {
|
|
4237
|
-
return 'textAlign:center;color:green';
|
|
4238
|
-
}
|
|
4239
|
-
return '';
|
|
4240
|
-
}
|
|
4241
|
-
|
|
4242
|
-
注:dataItem 行数据
|
|
4243
|
-
函数返回值是一个字符串,
|
|
4244
|
-
由分号分隔的css样式组成 `])])
|
|
4245
|
-
}
|
|
4246
|
-
},
|
|
4247
|
-
contentTemplate: {
|
|
4248
|
-
description: "内容模板",
|
|
4249
|
-
title: "内容模板",
|
|
4250
|
-
type: "string",
|
|
4251
|
-
refreshPanelAfterChanged: !0,
|
|
4252
|
-
editor: {
|
|
4253
|
-
type: "code-editor",
|
|
4254
|
-
language: "html"
|
|
4255
|
-
}
|
|
4256
|
-
},
|
|
4257
|
-
footerTemplate: {
|
|
4258
|
-
description: "底部模板",
|
|
4259
|
-
title: "底部模板",
|
|
4260
|
-
type: "string",
|
|
4261
|
-
refreshPanelAfterChanged: !0,
|
|
4262
|
-
editor: {
|
|
4263
|
-
type: "code-editor",
|
|
4264
|
-
language: "html"
|
|
4265
|
-
}
|
|
4266
|
-
},
|
|
4267
|
-
emptyTemplate: {
|
|
4268
|
-
description: "空数据模板",
|
|
4269
|
-
title: "空数据模板",
|
|
4270
|
-
type: "string",
|
|
4271
|
-
refreshPanelAfterChanged: !0,
|
|
4272
|
-
editor: {
|
|
4273
|
-
type: "code-editor",
|
|
4274
|
-
language: "html"
|
|
4275
|
-
}
|
|
4276
|
-
}
|
|
4277
|
-
},
|
|
4278
|
-
setPropertyRelates(n, o) {
|
|
4279
|
-
switch (n && n.propertyID) {
|
|
4280
|
-
case "useBlankWhenDataIsEmpty":
|
|
4281
|
-
t.emptyDataHeight = t.useBlankWhenDataIsEmpty ? 36 : 240;
|
|
4282
|
-
break;
|
|
4283
|
-
case "columns":
|
|
4284
|
-
t.columns = n.propertyValue || [];
|
|
4285
|
-
break;
|
|
4286
|
-
}
|
|
4287
|
-
}
|
|
4288
|
-
};
|
|
4289
|
-
}
|
|
4290
|
-
getEventPropConfig(t) {
|
|
4291
|
-
var r;
|
|
4292
|
-
const n = [{
|
|
4293
|
-
label: "onClickItem",
|
|
4294
|
-
name: "行点击事件"
|
|
4295
|
-
}];
|
|
4296
|
-
(r = t.pagination) == null || r.enable;
|
|
4297
|
-
const o = this, i = o.eventsEditorUtils.formProperties(t, o.viewModelId, n), a = o.createBaseEventProperty(i);
|
|
4298
|
-
this.propertyConfig.categories.eventsEditor = {
|
|
4299
|
-
title: "事件",
|
|
4300
|
-
hideTitle: !0,
|
|
4301
|
-
properties: a,
|
|
4302
|
-
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
4303
|
-
refreshPanelAfterChanged: !0,
|
|
4304
|
-
tabId: "commands",
|
|
4305
|
-
tabName: "交互",
|
|
4306
|
-
setPropertyRelates(c, m) {
|
|
4307
|
-
const u = c.propertyValue;
|
|
4308
|
-
delete t[o.viewModelId], u && (u.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, u.events, u)), t.remoteSort = !!t.columnSorted, t.command && (t.command.onClickEditCommand = t.onClickEditCommand, t.command.onClickDeleteCommand = t.onClickDeleteCommand);
|
|
4309
|
-
}
|
|
4310
|
-
};
|
|
4311
|
-
}
|
|
4312
|
-
isSubGrid() {
|
|
4313
|
-
const t = this.formSchemaUtils.getViewModelById(this.viewModelId);
|
|
4314
|
-
return t && t.bindTo ? t.bindTo.trim() !== "/" : !1;
|
|
4315
|
-
}
|
|
4316
|
-
}
|
|
4317
|
-
function ur(e, t) {
|
|
4318
|
-
const n = e.schema, o = O(!0), i = O(!0);
|
|
4319
|
-
function a(s) {
|
|
4320
|
-
return !1;
|
|
4321
|
-
}
|
|
4322
|
-
function r() {
|
|
4323
|
-
return !1;
|
|
4324
|
-
}
|
|
4325
|
-
function c() {
|
|
4326
|
-
return !1;
|
|
4327
|
-
}
|
|
4328
|
-
function m() {
|
|
4329
|
-
return !0;
|
|
4330
|
-
}
|
|
4331
|
-
function u(s) {
|
|
4332
|
-
return new cr(s, t).getPropertyConfig(n);
|
|
4333
|
-
}
|
|
4334
|
-
function d() {
|
|
4335
|
-
var s, l, _, f;
|
|
4336
|
-
if (e && t) {
|
|
4337
|
-
const w = (s = e == null ? void 0 : e.componentInstance) == null ? void 0 : s.value.belongedComponentId;
|
|
4338
|
-
let C = "", E = "";
|
|
4339
|
-
const { formSchemaUtils: S } = t;
|
|
4340
|
-
if (w) {
|
|
4341
|
-
const p = S.getRootViewModelId(), h = S.getComponentByViewModelId(p), y = S.selectNode(h, (v) => v.contents && v.contents.find((g) => g.component === w));
|
|
4342
|
-
(y == null ? void 0 : y.type) === ((l = xe["tab-page"]) == null ? void 0 : l.type) && ((_ = y == null ? void 0 : y.contents) != null && _.length) && (C = y.title || ""), (y == null ? void 0 : y.type) === ((f = xe.section) == null ? void 0 : f.type) && (y == null ? void 0 : y.showHeader) !== !1 && (C = y.mainTitle || ""), C = C ? `${C} > ` : "", E = C ? y.id : "";
|
|
4343
|
-
}
|
|
4344
|
-
const k = xe["list-view"].name;
|
|
4345
|
-
t == null || t.formSchemaUtils.getControlBasicInfoMap().set(e.schema.id, {
|
|
4346
|
-
componentTitle: k,
|
|
4347
|
-
parentPathName: `${C}${k}`,
|
|
4348
|
-
reliedComponentId: E
|
|
4349
|
-
});
|
|
4350
|
-
}
|
|
4351
|
-
}
|
|
4352
|
-
return {
|
|
4353
|
-
canAccepts: a,
|
|
4354
|
-
checkCanDeleteComponent: r,
|
|
4355
|
-
checkCanMoveComponent: c,
|
|
4356
|
-
hideNestedPaddingInDesginerView: m,
|
|
4357
|
-
triggerBelongedComponentToMoveWhenMoved: o,
|
|
4358
|
-
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
4359
|
-
getPropsConfig: u,
|
|
4360
|
-
setComponentBasicInfoMap: d
|
|
4361
|
-
};
|
|
4362
|
-
}
|
|
4363
|
-
const dr = "https://json-schema.org/draft/2020-12/schema", fr = "https://farris-design.gitee.io/list-view-table.schema.json", mr = "list-view-table", vr = "A Farris Component", pr = "object", gr = {
|
|
4364
|
-
id: {
|
|
4365
|
-
description: "The unique identifier for list-view-table",
|
|
4366
|
-
type: "string"
|
|
4367
|
-
},
|
|
4368
|
-
type: {
|
|
4369
|
-
description: "The type string of list-view-table",
|
|
4370
|
-
type: "string",
|
|
4371
|
-
default: "list-view-table"
|
|
4372
|
-
},
|
|
4373
|
-
appearance: {
|
|
4374
|
-
description: "",
|
|
4375
|
-
type: "object",
|
|
4376
|
-
properties: {
|
|
4377
|
-
class: {
|
|
4378
|
-
type: "string"
|
|
4379
|
-
},
|
|
4380
|
-
style: {
|
|
4381
|
-
type: "string"
|
|
4382
|
-
}
|
|
4383
|
-
},
|
|
4384
|
-
default: {}
|
|
4385
|
-
},
|
|
4386
|
-
binding: {
|
|
4387
|
-
description: "",
|
|
4388
|
-
type: "object",
|
|
4389
|
-
default: {}
|
|
4390
|
-
},
|
|
4391
|
-
disable: {
|
|
4392
|
-
type: "string",
|
|
4393
|
-
default: !1
|
|
4394
|
-
},
|
|
4395
|
-
editable: {
|
|
4396
|
-
description: "",
|
|
4397
|
-
type: "boolean",
|
|
4398
|
-
default: !0
|
|
4399
|
-
},
|
|
4400
|
-
placeholder: {
|
|
4401
|
-
description: "",
|
|
4402
|
-
type: "string",
|
|
4403
|
-
default: ""
|
|
4404
|
-
},
|
|
4405
|
-
readonly: {
|
|
4406
|
-
description: "",
|
|
4407
|
-
type: "boolean",
|
|
4408
|
-
default: !1
|
|
4409
|
-
},
|
|
4410
|
-
require: {
|
|
4411
|
-
description: "",
|
|
4412
|
-
type: "boolean",
|
|
4413
|
-
default: !1
|
|
4414
|
-
},
|
|
4415
|
-
tabindex: {
|
|
4416
|
-
description: "",
|
|
4417
|
-
type: "number",
|
|
4418
|
-
default: -1
|
|
4419
|
-
},
|
|
4420
|
-
visible: {
|
|
4421
|
-
description: "",
|
|
4422
|
-
type: "boolean",
|
|
4423
|
-
default: !0
|
|
4424
|
-
}
|
|
4425
|
-
}, hr = [
|
|
4426
|
-
"id",
|
|
4427
|
-
"type"
|
|
4428
|
-
], _r = {
|
|
4429
|
-
$schema: dr,
|
|
4430
|
-
$id: fr,
|
|
4431
|
-
title: mr,
|
|
4432
|
-
description: vr,
|
|
4433
|
-
type: pr,
|
|
4434
|
-
properties: gr,
|
|
4435
|
-
required: hr
|
|
4436
|
-
}, yr = "list-view-table", br = "A Farris Component", wr = "object", Cr = {
|
|
4437
|
-
basic: {
|
|
4438
|
-
description: "Basic Infomation",
|
|
4439
|
-
title: "基本信息",
|
|
4440
|
-
properties: {
|
|
4441
|
-
id: {
|
|
4442
|
-
description: "组件标识",
|
|
4443
|
-
title: "标识",
|
|
4444
|
-
type: "string",
|
|
4445
|
-
readonly: !0
|
|
4446
|
-
},
|
|
4447
|
-
type: {
|
|
4448
|
-
description: "组件类型",
|
|
4449
|
-
title: "控件类型",
|
|
4450
|
-
type: "select",
|
|
4451
|
-
editor: {
|
|
4452
|
-
type: "waiting for modification",
|
|
4453
|
-
enum: []
|
|
4454
|
-
}
|
|
4455
|
-
}
|
|
4456
|
-
}
|
|
4457
|
-
}
|
|
4458
|
-
}, Sr = {
|
|
4459
|
-
title: yr,
|
|
4460
|
-
description: br,
|
|
4461
|
-
type: wr,
|
|
4462
|
-
categories: Cr
|
|
4463
|
-
}, Tt = {
|
|
4464
|
-
data: { type: Array, default: [] }
|
|
4465
|
-
}, Ft = Go(Tt, _r, Ct, St, Sr), Mt = /* @__PURE__ */ $e({
|
|
4466
|
-
name: "FListViewTableDesign",
|
|
4467
|
-
props: Tt,
|
|
4468
|
-
emits: ["outputValue", "currentEvent", "selectionChanged"],
|
|
4469
|
-
setup(e, t) {
|
|
4470
|
-
const n = [{
|
|
4471
|
-
name: "任芳",
|
|
4472
|
-
code: "1.山东大学",
|
|
4473
|
-
date: "2024-02-19",
|
|
4474
|
-
desc: "山东济南",
|
|
4475
|
-
amount: 63.85,
|
|
4476
|
-
avatar: "./assets/avatar1.png"
|
|
4477
|
-
}, {
|
|
4478
|
-
name: "戴秀兰",
|
|
4479
|
-
code: "2.山东建筑大学",
|
|
4480
|
-
date: "2024-03-17",
|
|
4481
|
-
desc: "山东济南",
|
|
4482
|
-
amount: 60.13,
|
|
4483
|
-
avatar: "./assets/avatar2.png"
|
|
4484
|
-
}, {
|
|
4485
|
-
name: "尹磊",
|
|
4486
|
-
code: "3.山东财经大学",
|
|
4487
|
-
date: "2024-04-09",
|
|
4488
|
-
desc: "山东济南",
|
|
4489
|
-
amount: 36.54,
|
|
4490
|
-
avatar: "./assets/avatar3.png"
|
|
4491
|
-
}, {
|
|
4492
|
-
name: "赵明",
|
|
4493
|
-
code: "4.北京大学",
|
|
4494
|
-
date: "2024-03-27",
|
|
4495
|
-
desc: "北京市",
|
|
4496
|
-
amount: 52.76,
|
|
4497
|
-
avatar: "./assets/avatar4.png"
|
|
4498
|
-
}, {
|
|
4499
|
-
name: "吕洋",
|
|
4500
|
-
code: "5.南京大学",
|
|
4501
|
-
date: "2024-11-17",
|
|
4502
|
-
desc: "江苏南京",
|
|
4503
|
-
amount: 84.13,
|
|
4504
|
-
avatar: "./assets/avatar5.png"
|
|
4505
|
-
}, {
|
|
4506
|
-
name: "吕娥",
|
|
4507
|
-
code: "6.清华大学",
|
|
4508
|
-
date: "2024-03-17",
|
|
4509
|
-
desc: "北京市",
|
|
4510
|
-
amount: 52.76,
|
|
4511
|
-
avatar: "./assets/avatar6.png"
|
|
4512
|
-
}, {
|
|
4513
|
-
name: "赵强",
|
|
4514
|
-
code: "7.浙江大学",
|
|
4515
|
-
date: "2024-08-01",
|
|
4516
|
-
desc: "浙江杭州",
|
|
4517
|
-
amount: 84.13,
|
|
4518
|
-
avatar: "./assets/avatar7.png"
|
|
4519
|
-
}];
|
|
4520
|
-
Y(() => e.data.length > 0 ? e.data : n);
|
|
4521
|
-
const o = O(), i = ze("design-item-context"), a = lt(o, i);
|
|
4522
|
-
return Ye(() => {
|
|
4523
|
-
o.value.componentInstance = a;
|
|
4524
|
-
}), t.expose(a.value), () => F("div", {
|
|
4525
|
-
ref: o
|
|
4526
|
-
}, [F("div", {
|
|
4527
|
-
class: "ide-list-view h-100"
|
|
4528
|
-
}, [F("div", {
|
|
4529
|
-
class: "f-list-view"
|
|
4530
|
-
}, [F("div", {
|
|
4531
|
-
class: "f-list-view-content"
|
|
4532
|
-
}, [F("ul", {
|
|
4533
|
-
class: "f-list-view-group"
|
|
4534
|
-
}, [F("li", {
|
|
4535
|
-
class: "ide-list-view-group-item"
|
|
4536
|
-
}, [F("div", {
|
|
4537
|
-
class: "ide-list-content"
|
|
4538
|
-
}, [F("div", {
|
|
4539
|
-
class: "f-template-common-row d-flex"
|
|
4540
|
-
}, [F("div", {
|
|
4541
|
-
class: "item-action-primary"
|
|
4542
|
-
}, [F("img", {
|
|
4543
|
-
class: "ap-img",
|
|
4544
|
-
src: "./assets/avatar1.png",
|
|
4545
|
-
title: "img1"
|
|
4546
|
-
}, null)]), F("div", {
|
|
4547
|
-
class: "listview-item-content d-flex k-align-items-center"
|
|
4548
|
-
}, [F("div", {
|
|
4549
|
-
class: "listview-item-main"
|
|
4550
|
-
}, [F("h4", {
|
|
4551
|
-
class: "listview-item-title"
|
|
4552
|
-
}, null), F("h5", {
|
|
4553
|
-
class: "listview-item-subtitle"
|
|
4554
|
-
}, null)]), F("div", {
|
|
4555
|
-
class: "listview-item-btns"
|
|
4556
|
-
}, [F("button", {
|
|
4557
|
-
class: "btn btn-link"
|
|
4558
|
-
}, [Te(" "), "编辑"]), F("button", {
|
|
4559
|
-
class: "btn btn-link"
|
|
4560
|
-
}, [Te(" "), "删除"])])])])])]), F("li", {
|
|
4561
|
-
class: "ide-list-view-group-item"
|
|
4562
|
-
}, [F("div", {
|
|
4563
|
-
class: "ide-list-content"
|
|
4564
|
-
}, [F("div", {
|
|
4565
|
-
class: "f-template-common-row d-flex"
|
|
4566
|
-
}, [F("div", {
|
|
4567
|
-
class: "item-action-primary"
|
|
4568
|
-
}, [F("img", {
|
|
4569
|
-
class: "ap-img",
|
|
4570
|
-
src: "./assets/avatar2.png",
|
|
4571
|
-
title: "img2"
|
|
4572
|
-
}, null)]), F("div", {
|
|
4573
|
-
class: "listview-item-content d-flex k-align-items-center"
|
|
4574
|
-
}, [F("div", {
|
|
4575
|
-
class: "listview-item-main"
|
|
4576
|
-
}, [F("h4", {
|
|
4577
|
-
class: "listview-item-title"
|
|
4578
|
-
}, null), F("h5", {
|
|
4579
|
-
class: "listview-item-subtitle"
|
|
4580
|
-
}, null)]), F("div", {
|
|
4581
|
-
class: "listview-item-btns"
|
|
4582
|
-
}, [F("button", {
|
|
4583
|
-
class: "btn btn-link"
|
|
4584
|
-
}, [Te(" "), "编辑"]), F("button", {
|
|
4585
|
-
class: "btn btn-link"
|
|
4586
|
-
}, ["删除"])])])])])]), F("li", {
|
|
4587
|
-
class: "ide-list-view-group-item"
|
|
4588
|
-
}, [F("div", {
|
|
4589
|
-
class: "ide-list-content"
|
|
4590
|
-
}, [F("div", {
|
|
4591
|
-
class: "f-template-common-row d-flex"
|
|
4592
|
-
}, [F("div", {
|
|
4593
|
-
class: "item-action-primary"
|
|
4594
|
-
}, [F("img", {
|
|
4595
|
-
class: "ap-img",
|
|
4596
|
-
src: "./assets/avatar3.png",
|
|
4597
|
-
title: "img3"
|
|
4598
|
-
}, null)]), F("div", {
|
|
4599
|
-
class: "listview-item-content d-flex k-align-items-center"
|
|
4600
|
-
}, [F("div", {
|
|
4601
|
-
class: "listview-item-main"
|
|
4602
|
-
}, [F("h4", {
|
|
4603
|
-
class: "listview-item-title"
|
|
4604
|
-
}, null), F("h5", {
|
|
4605
|
-
class: "listview-item-subtitle"
|
|
4606
|
-
}, null)]), F("div", {
|
|
4607
|
-
class: "listview-item-btns"
|
|
4608
|
-
}, [F("button", {
|
|
4609
|
-
class: "btn btn-link"
|
|
4610
|
-
}, [Te(" "), "编辑"]), F("button", {
|
|
4611
|
-
class: "btn btn-link"
|
|
4612
|
-
}, ["删除"])])])])])])])])])])]);
|
|
4613
|
-
}
|
|
4614
|
-
}), Le = /* @__PURE__ */ $e({
|
|
4615
|
-
name: "FListViewDesign",
|
|
4616
|
-
props: kt,
|
|
4617
|
-
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change"],
|
|
4618
|
-
setup(e, t) {
|
|
4619
|
-
const n = O(), o = O(!0), i = O(!1), a = O([]), r = 0, c = O(e.columns), m = Un(e, t), u = io(e), d = Gn(e), s = ct(e, u), l = Pn(e, /* @__PURE__ */ new Map(), m, d, u), _ = so(e, l, u, a, t), f = Nn(e, n), w = O(), C = ze("designer-host-service"), E = ze("design-item-context"), S = ur(E, C), k = lt(w, E, S), p = Y(() => l.dataView.value.length), h = ao(e, t, _, u), y = ro(e, t, u, h), v = zn(e), g = eo(e, {}, v), b = to(e, l, y, d, u, v, g), x = no(e, u, g, b), W = oo(e, u, g, b), N = qn(e, c, l, p, r, b, x, W), {
|
|
4620
|
-
getVisualData: j
|
|
4621
|
-
} = N;
|
|
4622
|
-
a.value = j(0, p.value + r - 1), Ye(() => {
|
|
4623
|
-
w.value.componentInstance = k;
|
|
4624
|
-
}), t.expose(k.value);
|
|
4625
|
-
const I = Y(() => {
|
|
4626
|
-
const J = {
|
|
4627
|
-
"f-list-view": !0,
|
|
4628
|
-
"f-list-view-multiple": e.multiSelect,
|
|
4629
|
-
"w-100": !0,
|
|
4630
|
-
"h-100": !0
|
|
4631
|
-
};
|
|
4632
|
-
return e.size !== "default" && (J[`${e.size}-item`] = !0), J;
|
|
4633
|
-
}), D = Y(() => !!t.slots.footer || o.value);
|
|
4634
|
-
function T() {
|
|
4635
|
-
return e.header === "SearchBar" ? rt : e.header === "ContentHeader" ? vo : rt;
|
|
4636
|
-
}
|
|
4637
|
-
const B = T(), {
|
|
4638
|
-
renderHeader: L
|
|
4639
|
-
} = B(e, t, f), Q = po(), oe = go(e, t, l, Q), P = ho(e, t, a, oe, Q, _);
|
|
4640
|
-
mo(e, t, a, l, s, Q, _, N, P, oe);
|
|
4641
|
-
function z(J) {
|
|
4642
|
-
e.multiSelect && (J.preventDefault(), J.stopPropagation());
|
|
4643
|
-
}
|
|
4644
|
-
return () => F("div", {
|
|
4645
|
-
ref: w,
|
|
4646
|
-
class: I.value,
|
|
4647
|
-
onClick: z
|
|
4648
|
-
}, [L(), F("div", {
|
|
4649
|
-
ref: n,
|
|
4650
|
-
class: "f-list-view-content",
|
|
4651
|
-
onMouseover: () => {
|
|
4652
|
-
i.value = !0;
|
|
4653
|
-
},
|
|
4654
|
-
onMouseleave: () => {
|
|
4655
|
-
i.value = !1;
|
|
4656
|
-
}
|
|
4657
|
-
}, [F(Mt, null, null)]), D.value && F("div", {
|
|
4658
|
-
class: "f-list-view-footer"
|
|
4659
|
-
}, [t.slots.footer && t.slots.footer()])]);
|
|
4660
|
-
}
|
|
4661
|
-
}), kr = ln();
|
|
4662
|
-
Le.register = (e, t, n, o) => {
|
|
4663
|
-
e["list-view"] = nn, t["list-view"] = Et, e["list-view-table"] = rn, t["list-view-table"] = Ft, o["list-view"] = { bindingResolver: kr };
|
|
4664
|
-
};
|
|
4665
|
-
Le.registerDesigner = (e, t, n) => {
|
|
4666
|
-
e["list-view"] = Le, t["list-view"] = Et, e["list-view-table"] = Mt, t["list-view-table"] = Ft;
|
|
4667
|
-
};
|
|
4668
|
-
const Yr = tn(Le);
|
|
4669
|
-
export {
|
|
4670
|
-
Le as FListViewDesign,
|
|
4671
|
-
kr as bindingResolver,
|
|
4672
|
-
Yr as default,
|
|
4673
|
-
kt as listViewDesignProps,
|
|
4674
|
-
Et as propsResolver
|
|
4675
|
-
};
|