@farris/ui-vue 1.8.3 → 1.8.4
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/batch-editor/index.esm.js +7332 -7299
- package/components/batch-editor/index.umd.cjs +22 -22
- package/components/button/index.esm.js +7334 -7301
- package/components/button/index.umd.cjs +22 -22
- package/components/component/index.esm.js +880 -874
- package/components/component/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +841 -835
- package/components/data-grid/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +14551 -14472
- package/components/data-view/index.umd.cjs +27 -27
- package/components/designer-canvas/index.esm.js +820 -814
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +848 -842
- package/components/mapping-editor/index.umd.cjs +2 -2
- package/components/popover/index.esm.js +264 -243
- package/components/popover/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +315 -309
- package/components/tree-grid/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +8304 -8257
- package/designer/data-grid/index.umd.cjs +26 -26
- package/designer/farris-designer.all.esm.js +3235 -3223
- package/designer/farris-designer.all.umd.cjs +14 -14
- package/designer/radio-group/index.esm.js +80 -62
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/tabs/index.esm.js +830 -824
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +348 -342
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +18917 -18820
- package/farris.all.umd.cjs +39 -39
- package/package.json +1 -1
- package/types/data-view/components/column-header/column-header.component.d.ts +2 -2
- package/types/data-view/composition/column/persist-column-widths.d.ts +15 -0
- package/types/data-view/composition/column/use-resize.d.ts +3 -2
- package/types/data-view/index.d.ts +1 -0
- package/types/popover/src/composition/measure-host.d.ts +10 -5
- package/types/popover/src/composition/types.d.ts +2 -2
- package/types/popover/src/composition/use-host.d.ts +1 -2
- package/types/radio-group/src/property-config/radio-group.property-config.d.ts +21 -0
- package/package.zip +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var we = (e, t, n) =>
|
|
4
|
-
import { ref as
|
|
5
|
-
import { debounce as
|
|
6
|
-
import { LocaleService as
|
|
1
|
+
var Wi = Object.defineProperty;
|
|
2
|
+
var Gi = (e, t, n) => t in e ? Wi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var we = (e, t, n) => Gi(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as h, defineComponent as Ae, computed as X, watch as Me, createVNode as v, Fragment as mt, reactive as on, createApp as In, onUnmounted as bt, onMounted as et, Transition as kn, mergeProps as ut, nextTick as Ct, createTextVNode as We, inject as xe, withDirectives as an, resolveDirective as rn, onBeforeMount as Pn, provide as It, triggerRef as Yi, onBeforeUnmount as On, isVNode as Ki, watchEffect as Xi, Teleport as Qi, shallowRef as Ji, render as Zt, h as Zi, cloneVNode as ea, withModifiers as ta } from "vue";
|
|
5
|
+
import { debounce as na, isUndefined as Ze, cloneDeep as Ht, mergeWith as oa, merge as Bt, findIndex as wn } from "lodash-es";
|
|
6
|
+
import { LocaleService as ze } from "../locale/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { getCustomClass as dt, withInstall as
|
|
9
|
-
import { useResizeObserver as
|
|
10
|
-
import { getHierarchyRow as
|
|
11
|
-
import { resolveField as
|
|
12
|
-
import
|
|
8
|
+
import { getCustomClass as dt, withInstall as ia, EVENT_PROPERTY_TAB_IDS as aa, FormSchemaEntityField$Type as Sn, FormSchemaEntityFieldTypeName as Tn, useThirdComponent as Vn, isMobilePhone as ln, getMaxZIndex as Fn } from "../common/index.esm.js";
|
|
9
|
+
import { useResizeObserver as ra } from "@vueuse/core";
|
|
10
|
+
import { getHierarchyRow as la, useIdentify as sa, useGroupData as ca, useFilter as ua, useHierarchy as da, useLoading as fa, useDataView as ma, useSelection as pa, useSelectHierarchyItem as va, usePagination as ga, useDataViewContainerStyle as ha, useCommandColumn as ya, useSettingColumn as Ca, useColumn as ba, useSort as wa, useGroupColumn as Sa, useRow as Ta, useEdit as Fa, useVisualDataBound as Ea, useVisualDataCell as xa, useVisualDataRow as Ma, useVisualData as Ba, useCellPosition as Da, useSidebar as Ia, useVirtualScroll as ka, useFitColumn as Pa, useFilterHistory as Oa, useColumnFilter as Va, useDragColumn as Na, getColumnHeader as La, getSidebar as Ra, getDisableMask as Aa, getHorizontalScrollbar as ja, getVerticalScrollbar as _a, getEmpty as $a, getPagination as za, getSummary as Ua, ColumnSettingSolution as Ha, refreshScrollAfterDataSourceLoad as qa, COMMAND_COLUMN_DATA_TYPE as en, SETTING_COLUMN_DATA_TYPE as tn } from "../data-view/index.esm.js";
|
|
11
|
+
import { resolveField as Wa } from "../common/index.esm.js/utils/resolve-field";
|
|
12
|
+
import Ga from "../input-group/index.esm.js";
|
|
13
13
|
import yt from "../button/index.esm.js";
|
|
14
|
-
import { resolveAppearance as Nn, createPropsResolver as Ot, schemaResolverMap as
|
|
15
|
-
import { DgControl as En, canvasChanged as
|
|
16
|
-
import { loadRegister as
|
|
17
|
-
import
|
|
14
|
+
import { resolveAppearance as Nn, createPropsResolver as Ot, schemaResolverMap as Ya, propertyEffectMap as Ka, propertyConfigSchemaMap as Xa, schemaMap as Qa, schemaResolverMapForDesigner as Ln, propertyEffectMapForDesigner as Rn, propertyConfigSchemaMapForDesigner as An, schemaMapForDesigner as jn, getSchemaByTypeForDesigner as _n } from "../dynamic-resolver/index.esm.js";
|
|
15
|
+
import { DgControl as En, canvasChanged as Ja, refreshCanvas as Za, useDesignerComponent as er } from "../designer-canvas/index.esm.js";
|
|
16
|
+
import { loadRegister as tr, useComponentManager as nr, useEntityState as or, useDynamicViewUtils as ir, componentMap as nn, resolverMap as ar, componentPropsConverter as rr } from "../dynamic-view/index.esm.js";
|
|
17
|
+
import lr from "../section/index.esm.js";
|
|
18
18
|
import $n from "../accordion/index.esm.js";
|
|
19
19
|
import zn from "../../designer/avatar/index.esm.js";
|
|
20
20
|
import Un from "../../designer/approval-logs/index.esm.js";
|
|
@@ -23,9 +23,9 @@ import qn from "../button-group/index.esm.js";
|
|
|
23
23
|
import Wn from "../calendar/index.esm.js";
|
|
24
24
|
import Gn from "../../designer/capsule/index.esm.js";
|
|
25
25
|
import sn from "../../designer/checkbox/index.esm.js";
|
|
26
|
-
import
|
|
26
|
+
import $t from "../../designer/checkbox-group/index.esm.js";
|
|
27
27
|
import Yn from "../combo-list/index.esm.js";
|
|
28
|
-
import
|
|
28
|
+
import sr from "../combo-tree/index.esm.js";
|
|
29
29
|
import Kn from "../component/index.esm.js";
|
|
30
30
|
import Xn from "../color-picker/index.esm.js";
|
|
31
31
|
import Qn from "../content-container/index.esm.js";
|
|
@@ -34,17 +34,17 @@ import Zn from "../../designer/date-picker/index.esm.js";
|
|
|
34
34
|
import eo from "../../designer/data-grid/index.esm.js";
|
|
35
35
|
import to from "../dropdown/index.esm.js";
|
|
36
36
|
import no from "../../designer/dynamic-form/index.esm.js";
|
|
37
|
-
import
|
|
37
|
+
import cr from "../events-editor/index.esm.js";
|
|
38
38
|
import oo from "../filter-bar/index.esm.js";
|
|
39
|
-
import
|
|
40
|
-
import
|
|
39
|
+
import ur from "../field-selector/index.esm.js";
|
|
40
|
+
import dr, { FBindingSelectorContainer as fr } from "../binding-selector/index.esm.js";
|
|
41
41
|
import io from "../image-cropper/index.esm.js";
|
|
42
42
|
import ao from "../../designer/input-group/index.esm.js";
|
|
43
43
|
import ro from "../layout/index.esm.js";
|
|
44
44
|
import lo from "../list-nav/index.esm.js";
|
|
45
45
|
import so from "../../designer/list-view/index.esm.js";
|
|
46
46
|
import co from "../lookup/index.esm.js";
|
|
47
|
-
import
|
|
47
|
+
import mr from "../mapping-editor/index.esm.js";
|
|
48
48
|
import uo from "../../designer/nav/index.esm.js";
|
|
49
49
|
import fo from "../number-range/index.esm.js";
|
|
50
50
|
import mo from "../../designer/number-spinner/index.esm.js";
|
|
@@ -75,35 +75,35 @@ import Ro from "../uploader/index.esm.js";
|
|
|
75
75
|
import Ao from "../verify-detail/index.esm.js";
|
|
76
76
|
import jo from "../video/index.esm.js";
|
|
77
77
|
import _o from "../../designer/textarea/index.esm.js";
|
|
78
|
-
import
|
|
78
|
+
import pr from "../schema-selector/index.esm.js";
|
|
79
79
|
import $o from "../../designer/tree-grid/index.esm.js";
|
|
80
|
-
import
|
|
81
|
-
import
|
|
80
|
+
import vr from "../event-parameter/index.esm.js";
|
|
81
|
+
import gr from "../filter-condition-editor/index.esm.js";
|
|
82
82
|
import zo from "../fieldset/index.esm.js";
|
|
83
|
-
import
|
|
84
|
-
import
|
|
83
|
+
import hr from "../sort-condition-editor/index.esm.js";
|
|
84
|
+
import yr from "../menu-lookup/index.esm.js";
|
|
85
85
|
import Uo from "../../designer/drawer/index.esm.js";
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
86
|
+
import Cr from "../json-editor/index.esm.js";
|
|
87
|
+
import br from "../property-editor/index.esm.js";
|
|
88
|
+
import wr from "../expression-editor/index.esm.js";
|
|
89
|
+
import Sr from "../code-editor/index.esm.js";
|
|
90
90
|
import Ho from "../html-template/index.esm.js";
|
|
91
|
-
import
|
|
92
|
-
import
|
|
91
|
+
import Tr from "../collection-property-editor/index.esm.js";
|
|
92
|
+
import Fr from "../../designer/modal/index.esm.js";
|
|
93
93
|
import qo from "../external-container/index.esm.js";
|
|
94
94
|
import Wo from "../language-textbox/index.esm.js";
|
|
95
95
|
import Go from "../image/index.esm.js";
|
|
96
96
|
import Yo from "../comment/index.esm.js";
|
|
97
97
|
import Ko from "../../designer/wizard/index.esm.js";
|
|
98
|
-
import
|
|
98
|
+
import Er from "../tooltip/index.esm.js";
|
|
99
99
|
import "../property-panel/index.esm.js";
|
|
100
|
-
import { FNotifyService as
|
|
100
|
+
import { FNotifyService as xr } from "../notify/index.esm.js";
|
|
101
101
|
import "../collection-property-editor/index.esm.js/src/use-button-items.designer";
|
|
102
|
-
const at =
|
|
103
|
-
function
|
|
102
|
+
const at = h(0);
|
|
103
|
+
function Mr() {
|
|
104
104
|
at.value++;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Br(e, t) {
|
|
107
107
|
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = o.top >= n.top, a = o.top <= n.bottom;
|
|
108
108
|
return i && a;
|
|
109
109
|
}
|
|
@@ -158,7 +158,7 @@ function fn(e) {
|
|
|
158
158
|
if (n) {
|
|
159
159
|
let o = !0;
|
|
160
160
|
const i = Qo(e);
|
|
161
|
-
if (i && (o =
|
|
161
|
+
if (i && (o = Br(e, i)), !o) {
|
|
162
162
|
n.style.display = "none";
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
@@ -171,14 +171,14 @@ function kt(e) {
|
|
|
171
171
|
let t;
|
|
172
172
|
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && fn(t);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function eu() {
|
|
175
175
|
const e = document.querySelector(".dgComponentSelected");
|
|
176
176
|
if (!e)
|
|
177
177
|
return;
|
|
178
178
|
const t = e.querySelector(".component-btn-group");
|
|
179
179
|
t && t.getBoundingClientRect().top !== 0 && Xo(e);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const Dr = {
|
|
182
182
|
/**
|
|
183
183
|
* 组件值
|
|
184
184
|
*/
|
|
@@ -188,10 +188,10 @@ const Mr = {
|
|
|
188
188
|
canvasMode: { type: String, default: "PC" }
|
|
189
189
|
};
|
|
190
190
|
var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
191
|
-
function
|
|
191
|
+
function Ir(e) {
|
|
192
192
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function At(e) {
|
|
195
195
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
196
196
|
}
|
|
197
197
|
var Jo = { exports: {} };
|
|
@@ -204,7 +204,7 @@ var Jo = { exports: {} };
|
|
|
204
204
|
function r(u, m) {
|
|
205
205
|
if (!i[u]) {
|
|
206
206
|
if (!o[u]) {
|
|
207
|
-
var f = typeof
|
|
207
|
+
var f = typeof At == "function" && At;
|
|
208
208
|
if (!m && f) return f(u, !0);
|
|
209
209
|
if (c) return c(u, !0);
|
|
210
210
|
var b = new Error("Cannot find module '" + u + "'");
|
|
@@ -218,7 +218,7 @@ var Jo = { exports: {} };
|
|
|
218
218
|
}
|
|
219
219
|
return i[u].exports;
|
|
220
220
|
}
|
|
221
|
-
for (var c = typeof
|
|
221
|
+
for (var c = typeof At == "function" && At, s = 0; s < a.length; s++) r(a[s]);
|
|
222
222
|
return r;
|
|
223
223
|
}
|
|
224
224
|
return n;
|
|
@@ -247,8 +247,8 @@ var Jo = { exports: {} };
|
|
|
247
247
|
function f(I, _) {
|
|
248
248
|
var M = arguments.length;
|
|
249
249
|
M === 1 && Array.isArray(I) === !1 && (_ = I, I = []);
|
|
250
|
-
var N, $, L, U, O, z, oe, E, A, ae = null, ie, J,
|
|
251
|
-
Z.moves === void 0 && (Z.moves =
|
|
250
|
+
var N, $, L, U, O, z, oe, E, A, ae = null, ie, J, ge = !1, Se = 0, fe, Z = _ || {};
|
|
251
|
+
Z.moves === void 0 && (Z.moves = y), Z.accepts === void 0 && (Z.accepts = y), Z.invalid === void 0 && (Z.invalid = rt), Z.containers === void 0 && (Z.containers = I || []), Z.isContainer === void 0 && (Z.isContainer = B), Z.copy === void 0 && (Z.copy = !1), Z.copySortSource === void 0 && (Z.copySortSource = !1), Z.revertOnSpill === void 0 && (Z.revertOnSpill = !1), Z.removeOnSpill === void 0 && (Z.removeOnSpill = !1), Z.direction === void 0 && (Z.direction = "vertical"), Z.ignoreInputTextSelection === void 0 && (Z.ignoreInputTextSelection = !0), Z.mirrorContainer === void 0 && (Z.mirrorContainer = u.body);
|
|
252
252
|
var F = r({
|
|
253
253
|
containers: Z.containers,
|
|
254
254
|
start: Pe,
|
|
@@ -259,7 +259,7 @@ var Jo = { exports: {} };
|
|
|
259
259
|
canMove: Ve,
|
|
260
260
|
dragging: !1
|
|
261
261
|
});
|
|
262
|
-
return Z.removeOnSpill === !0 && F.on("over", Ee).on("out",
|
|
262
|
+
return Z.removeOnSpill === !0 && F.on("over", Ee).on("out", He), le(), F;
|
|
263
263
|
function re(P) {
|
|
264
264
|
return F.containers.indexOf(P) !== -1 || Z.isContainer(P);
|
|
265
265
|
}
|
|
@@ -271,7 +271,7 @@ var Jo = { exports: {} };
|
|
|
271
271
|
var K = P ? "remove" : "add";
|
|
272
272
|
d(m, K, "mousemove", Te);
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ye(P) {
|
|
275
275
|
var K = P ? "remove" : "add";
|
|
276
276
|
c[K](m, "selectstart", je), c[K](m, "click", je);
|
|
277
277
|
}
|
|
@@ -301,8 +301,8 @@ var Jo = { exports: {} };
|
|
|
301
301
|
if (C(se))
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
|
-
var
|
|
305
|
-
ce(!0),
|
|
304
|
+
var Ce = ie;
|
|
305
|
+
ce(!0), ye(), pt(), Be(Ce), s.add(E || L, "gu-transit"), st(), wt(), Se = 0, ue(P);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
}
|
|
@@ -342,11 +342,11 @@ var Jo = { exports: {} };
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
function vt() {
|
|
345
|
-
ie = !1, ce(!0),
|
|
345
|
+
ie = !1, ce(!0), ye(!0);
|
|
346
346
|
}
|
|
347
347
|
function Qe(P) {
|
|
348
348
|
if (vt(), !!F.dragging) {
|
|
349
|
-
var K = E || L, Q = x("clientX", P) || 0, se = x("clientY", P) || 0,
|
|
349
|
+
var K = E || L, Q = x("clientX", P) || 0, se = x("clientY", P) || 0, Ce = D(N, Q, se), be = j(Ce, Q, se);
|
|
350
350
|
be && (E && Z.copySortSource || !E || be !== $) ? tt(K, be) : Z.removeOnSpill ? gt() : ot();
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -362,8 +362,8 @@ var Jo = { exports: {} };
|
|
|
362
362
|
}
|
|
363
363
|
function ot(P) {
|
|
364
364
|
if (F.dragging) {
|
|
365
|
-
var K = arguments.length > 0 ? P : Z.revertOnSpill, Q = E || L, se = k(Q),
|
|
366
|
-
|
|
365
|
+
var K = arguments.length > 0 ? P : Z.revertOnSpill, Q = E || L, se = k(Q), Ce = Ie(se);
|
|
366
|
+
Ce === !1 && K && (E ? se && se.removeChild(E) : $.insertBefore(Q, z)), Ce || K ? F.emit("cancel", Q, $, $) : F.emit("drop", Q, se, $, oe), lt();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
function lt() {
|
|
@@ -375,15 +375,15 @@ var Jo = { exports: {} };
|
|
|
375
375
|
return K !== void 0 ? Q = K : N ? Q = oe : Q = p(E || L), P === $ && Q === z;
|
|
376
376
|
}
|
|
377
377
|
function j(P, K, Q) {
|
|
378
|
-
for (var se = P; se && !
|
|
378
|
+
for (var se = P; se && !Ce(); )
|
|
379
379
|
se = k(se);
|
|
380
380
|
return se;
|
|
381
|
-
function
|
|
381
|
+
function Ce() {
|
|
382
382
|
var be = re(se);
|
|
383
383
|
if (be === !1)
|
|
384
384
|
return !1;
|
|
385
|
-
var
|
|
386
|
-
return
|
|
385
|
+
var _e = Nt(se, P), Ue = Rt(se, _e, K, Q), Ge = Ie(se, Ue);
|
|
386
|
+
return Ge ? !0 : Z.accepts(L, se, $, Ue);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
function ue(P) {
|
|
@@ -392,30 +392,30 @@ var Jo = { exports: {} };
|
|
|
392
392
|
P.preventDefault();
|
|
393
393
|
var K = x("clientX", P) || 0, Q = x("clientY", P) || 0;
|
|
394
394
|
N.style.left = K - 2 + "px", N.style.top = Q - 2 + "px";
|
|
395
|
-
var se = E || L,
|
|
396
|
-
(
|
|
397
|
-
var
|
|
395
|
+
var se = E || L, Ce = D(N, K, Q), be = j(Ce, K, Q), _e = be !== null && be !== ae;
|
|
396
|
+
(_e || be === null) && (qe(), ae = be, Ye()), Lt(Ce, Q);
|
|
397
|
+
var Ue = k(se);
|
|
398
398
|
if (be === $ && E && !Z.copySortSource) {
|
|
399
|
-
|
|
399
|
+
Ue && Ue.removeChild(se);
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
404
|
-
|
|
402
|
+
var Ge, Je = Nt(be, Ce);
|
|
403
|
+
if (ge = Wt(Je, be), Je !== null)
|
|
404
|
+
Ge = Rt(be, Je, K, Q);
|
|
405
405
|
else if (Z.revertOnSpill === !0 && !E)
|
|
406
|
-
|
|
406
|
+
Ge = z, be = $;
|
|
407
407
|
else {
|
|
408
|
-
E &&
|
|
408
|
+
E && Ue && Ue.removeChild(se), E && J && (J.style.display = "none");
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
J.style.display = "block", Fe(
|
|
412
|
-
function Re(
|
|
413
|
-
F.emit(
|
|
411
|
+
J.style.display = "block", Fe(Ge, se, _e), Ge ? Yt(Je, Ge) : Kt(be);
|
|
412
|
+
function Re($e) {
|
|
413
|
+
F.emit($e, se, ae, $);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
|
|
415
|
+
function Ye() {
|
|
416
|
+
_e && Re("over");
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function qe() {
|
|
419
419
|
ae && Re("out");
|
|
420
420
|
}
|
|
421
421
|
}
|
|
@@ -425,7 +425,7 @@ var Jo = { exports: {} };
|
|
|
425
425
|
function Ee(P) {
|
|
426
426
|
s.rm(P, "gu-hide");
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function He(P) {
|
|
429
429
|
F.dragging && s.add(P, "gu-hide");
|
|
430
430
|
}
|
|
431
431
|
function wt() {
|
|
@@ -436,7 +436,7 @@ var Jo = { exports: {} };
|
|
|
436
436
|
var P = L.getBoundingClientRect();
|
|
437
437
|
J.style.left = P.left + "px", J.style.top = P.top + "px";
|
|
438
438
|
}
|
|
439
|
-
|
|
439
|
+
ge = !1, Z.mirrorContainer.appendChild(J);
|
|
440
440
|
}
|
|
441
441
|
function ht() {
|
|
442
442
|
N && (s.rm(Z.mirrorContainer, "gu-unselectable"), d(m, "remove", "mousemove", ue), k(N).removeChild(N), N = null);
|
|
@@ -449,96 +449,96 @@ var Jo = { exports: {} };
|
|
|
449
449
|
Q = k(Q);
|
|
450
450
|
return Q === m ? null : Q;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Wt(P, K) {
|
|
453
453
|
if (!K)
|
|
454
|
-
return
|
|
454
|
+
return ge;
|
|
455
455
|
var Q = P || K && K.lastElementChild;
|
|
456
456
|
if (!Q)
|
|
457
457
|
return !0;
|
|
458
|
-
var se = getComputedStyle(P),
|
|
459
|
-
if (
|
|
458
|
+
var se = getComputedStyle(P), Ce = /^inline/.test(se.getPropertyValue("display")) || /^(left|right)$/.test(se.getPropertyValue("float"));
|
|
459
|
+
if (Ce)
|
|
460
460
|
return !0;
|
|
461
461
|
if (K) {
|
|
462
|
-
var be = getComputedStyle(K),
|
|
463
|
-
if (/flex$/.test(
|
|
464
|
-
var
|
|
465
|
-
if (
|
|
466
|
-
return !
|
|
462
|
+
var be = getComputedStyle(K), _e = be.getPropertyValue("display");
|
|
463
|
+
if (/flex$/.test(_e)) {
|
|
464
|
+
var Ue = be.getPropertyValue("flex-direction") || "row";
|
|
465
|
+
if (Ue === "row" || Ue === "row-reverse")
|
|
466
|
+
return !Gt(K);
|
|
467
467
|
}
|
|
468
468
|
return !1;
|
|
469
469
|
}
|
|
470
470
|
return !0;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Gt(P) {
|
|
473
473
|
if (!P.children || !P.children.length)
|
|
474
474
|
return !1;
|
|
475
475
|
for (const K of Array.from(P.children)) {
|
|
476
|
-
const se = (K.className && K.className.split(" ") || []).filter((
|
|
476
|
+
const se = (K.className && K.className.split(" ") || []).filter((Ce) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Ce));
|
|
477
477
|
if (!se.length)
|
|
478
478
|
return !1;
|
|
479
|
-
for (const
|
|
480
|
-
const be =
|
|
479
|
+
for (const Ce of se) {
|
|
480
|
+
const be = Ce.slice(Ce.lastIndexOf("-") + 1);
|
|
481
481
|
if (parseInt(be, 10) !== 12)
|
|
482
482
|
return !1;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
return !0;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Yt(P, K) {
|
|
488
488
|
const Q = K.getBoundingClientRect();
|
|
489
|
-
if (J.style.left = Q.left + "px", J.style.top = Q.top + "px",
|
|
489
|
+
if (J.style.left = Q.left + "px", J.style.top = Q.top + "px", ge) {
|
|
490
490
|
if (J.style.height = Q.height + "px", J.style.width = "4px", P) {
|
|
491
491
|
const se = P.getBoundingClientRect();
|
|
492
492
|
se.top !== Q.top && (J.style.left = se.right + "px", J.style.top = se.top + "px", J.style.height = se.height + "px");
|
|
493
493
|
}
|
|
494
|
-
} else if (J.style.height = "4px", J.style.width = Q.width + "px",
|
|
495
|
-
const se =
|
|
494
|
+
} else if (J.style.height = "4px", J.style.width = Q.width + "px", fe) {
|
|
495
|
+
const se = fe.getBoundingClientRect();
|
|
496
496
|
Q.top < se.top && (J.style.display = "none");
|
|
497
497
|
}
|
|
498
498
|
K === L && L && (J.style.display = "none");
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function Kt(P) {
|
|
501
501
|
oe = null;
|
|
502
502
|
var K = P.lastElementChild;
|
|
503
503
|
if (K) {
|
|
504
504
|
var Q = K.getBoundingClientRect();
|
|
505
|
-
|
|
505
|
+
ge ? (J.style.left = Q.right + "px", J.style.top = Q.top + "px", J.style.height = Q.height + "px", J.style.width = "4px") : (J.style.left = Q.left + "px", J.style.top = Q.bottom + "px", J.style.height = "4px", J.style.width = Q.width + "px"), K === L && L && (J.style.display = "none");
|
|
506
506
|
} else
|
|
507
507
|
J.style.display = "none";
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
if (!Z.mirrorContainer.contains(P) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (
|
|
509
|
+
function Lt(P, K) {
|
|
510
|
+
if (!Z.mirrorContainer.contains(P) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (fe = b(P), !fe || !fe.contains(P)))
|
|
511
511
|
return;
|
|
512
|
-
const Q = document.querySelector(".dgComponentSelected"), se =
|
|
513
|
-
if (K - 30 < se.top &&
|
|
514
|
-
let
|
|
515
|
-
|
|
512
|
+
const Q = document.querySelector(".dgComponentSelected"), se = fe.getBoundingClientRect();
|
|
513
|
+
if (K - 30 < se.top && fe.scrollTop > 0) {
|
|
514
|
+
let Ce = fe.scrollTop < 10 ? fe.scrollTop : 10;
|
|
515
|
+
fe.scrollBy(0, -1 * Ce), Q && fe.contains(Q) && (Se = Se + -1 * Ce);
|
|
516
516
|
}
|
|
517
|
-
if (K + 30 > se.bottom &&
|
|
518
|
-
const
|
|
519
|
-
let be =
|
|
520
|
-
|
|
517
|
+
if (K + 30 > se.bottom && fe.scrollTop < fe.scrollHeight - fe.clientHeight) {
|
|
518
|
+
const Ce = fe.scrollHeight - fe.clientHeight - fe.scrollTop;
|
|
519
|
+
let be = Ce < 10 ? Ce : 10;
|
|
520
|
+
fe.scrollBy(0, be), Q && fe.contains(Q) && (Se = Se + be);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
var
|
|
525
|
-
return
|
|
526
|
-
function
|
|
527
|
-
var Re = P.children.length,
|
|
528
|
-
for (
|
|
529
|
-
if (
|
|
530
|
-
return
|
|
523
|
+
function Rt(P, K, Q, se) {
|
|
524
|
+
var Ce = Z.direction === "horizontal", be = Z.direction === "mixed", _e = K !== P ? Ge() : Ue();
|
|
525
|
+
return _e;
|
|
526
|
+
function Ue() {
|
|
527
|
+
var Re = P.children.length, Ye, qe, $e;
|
|
528
|
+
for (Ye = 0; Ye < Re; Ye++)
|
|
529
|
+
if (qe = P.children[Ye], $e = qe.getBoundingClientRect(), Ce && $e.left + $e.width / 2 > Q || !be && !Ce && $e.top + $e.height / 2 > se || be && $e.left + $e.width > Q && $e.top + $e.height > se)
|
|
530
|
+
return qe;
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ge() {
|
|
534
534
|
var Re = K.getBoundingClientRect();
|
|
535
535
|
if (be) {
|
|
536
|
-
var
|
|
537
|
-
return
|
|
536
|
+
var Ye = se - Re.top, qe = Q - Re.left, $e = Re.bottom - se, St = Re.right - Q, Tt = Math.min(qe, St, Ye, $e), Ft;
|
|
537
|
+
return ge ? Ft = St < qe : Ft = $e === Tt || St === Tt || qe === Tt, Je(Ft);
|
|
538
538
|
}
|
|
539
|
-
return
|
|
539
|
+
return Je(Ce ? Q > Re.left + S(Re) / 2 : se > Re.top + V(Re) / 2);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Je(Re) {
|
|
542
542
|
return Re ? p(K) : K;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
@@ -600,7 +600,7 @@ var Jo = { exports: {} };
|
|
|
600
600
|
function B() {
|
|
601
601
|
return !1;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function y() {
|
|
604
604
|
return !0;
|
|
605
605
|
}
|
|
606
606
|
function S(I) {
|
|
@@ -705,7 +705,7 @@ var Jo = { exports: {} };
|
|
|
705
705
|
return k.addEventListener(C, g, p);
|
|
706
706
|
}
|
|
707
707
|
function l(k, C, g) {
|
|
708
|
-
return k.attachEvent("on" + C,
|
|
708
|
+
return k.attachEvent("on" + C, y(k, C, g));
|
|
709
709
|
}
|
|
710
710
|
function d(k, C, g, p) {
|
|
711
711
|
return k.removeEventListener(C, g, p);
|
|
@@ -736,7 +736,7 @@ var Jo = { exports: {} };
|
|
|
736
736
|
}, x.which = x.which || x.keyCode, g.call(k, x);
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function y(k, C, g) {
|
|
740
740
|
var p = S(k, C, g) || B(k, C, g);
|
|
741
741
|
return f.push({
|
|
742
742
|
wrapper: p,
|
|
@@ -865,12 +865,12 @@ var Jo = { exports: {} };
|
|
|
865
865
|
if (arguments.length > 1)
|
|
866
866
|
for (var C = 1; C < arguments.length; C++)
|
|
867
867
|
k[C - 1] = arguments[C];
|
|
868
|
-
b.push(new
|
|
868
|
+
b.push(new y(V, k)), b.length === 1 && !l && m(B);
|
|
869
869
|
};
|
|
870
|
-
function
|
|
870
|
+
function y(V, k) {
|
|
871
871
|
this.fun = V, this.array = k;
|
|
872
872
|
}
|
|
873
|
-
|
|
873
|
+
y.prototype.run = function() {
|
|
874
874
|
this.fun.apply(null, this.array);
|
|
875
875
|
}, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "", a.versions = {};
|
|
876
876
|
function S() {
|
|
@@ -936,8 +936,8 @@ var Jo = { exports: {} };
|
|
|
936
936
|
}, {}, [2])(2);
|
|
937
937
|
});
|
|
938
938
|
})(Jo);
|
|
939
|
-
var
|
|
940
|
-
const xn = /* @__PURE__ */
|
|
939
|
+
var kr = Jo.exports;
|
|
940
|
+
const xn = /* @__PURE__ */ Ir(kr), Pr = {
|
|
941
941
|
showCloseButton: { type: Boolean, default: !0 },
|
|
942
942
|
position: { type: String, default: "top-center" },
|
|
943
943
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -950,49 +950,49 @@ const xn = /* @__PURE__ */ Br(Dr), Ir = {
|
|
|
950
950
|
animate: { type: String, default: "fadeIn" },
|
|
951
951
|
options: { type: Object },
|
|
952
952
|
safeHtml: { type: Boolean, default: !0 }
|
|
953
|
-
},
|
|
953
|
+
}, Or = {
|
|
954
954
|
showCloseButton: { type: Boolean, default: !0 },
|
|
955
955
|
animate: { type: String, default: "fadeIn" },
|
|
956
956
|
options: { type: Object }
|
|
957
957
|
}, cn = /* @__PURE__ */ Ae({
|
|
958
958
|
name: "Toast",
|
|
959
|
-
props:
|
|
959
|
+
props: Or,
|
|
960
960
|
emits: ["close", "click"],
|
|
961
961
|
setup: (e, t) => {
|
|
962
|
-
const n =
|
|
963
|
-
const
|
|
962
|
+
const n = h(e.animate), o = "fadeOut", i = X(() => e.options), a = h(!1), r = X(() => i.value.title && i.value.message), c = X(() => !i.value.title && i.value.message), s = X(() => {
|
|
963
|
+
const y = {
|
|
964
964
|
animated: a.value,
|
|
965
965
|
toast: !0,
|
|
966
966
|
"toast--only-content": !r.value
|
|
967
967
|
};
|
|
968
|
-
return
|
|
968
|
+
return y[e.animate] = !1, y[o] = a.value, y["toasty-type-" + i.value.type] = !0, i.value.theme && (y[i.value.theme] = !0), y;
|
|
969
969
|
}), u = X(() => {
|
|
970
970
|
const V = `f-icon-${i.value && i.value.type ? i.value.type.replace("toasty-type-", "") : "default"}`, k = {
|
|
971
971
|
"f-icon": !0
|
|
972
972
|
};
|
|
973
973
|
return k[V] = !0, k;
|
|
974
|
-
}), m = X(() => i.value.title || i.value.message), f = X(() => e.showCloseButton), b = X(() => !!i.value.buttons || !!t.slots.default), l = X(() =>
|
|
974
|
+
}), m = X(() => i.value.title || i.value.message), f = X(() => e.showCloseButton), b = X(() => !!i.value.buttons || !!t.slots.default), l = X(() => ze.getLocale() === "en" ? {
|
|
975
975
|
wordBreak: "keep-all",
|
|
976
976
|
overflowWrap: "break-word"
|
|
977
977
|
} : {});
|
|
978
|
-
function d(
|
|
979
|
-
|
|
978
|
+
function d(y) {
|
|
979
|
+
y.stopPropagation(), y.preventDefault(), a.value = !1, setTimeout(() => {
|
|
980
980
|
t.emit("close", i.value);
|
|
981
981
|
}, 200);
|
|
982
982
|
}
|
|
983
|
-
function T(
|
|
983
|
+
function T(y, S) {
|
|
984
984
|
}
|
|
985
|
-
function D(
|
|
986
|
-
return `f-preten-link ${
|
|
985
|
+
function D(y) {
|
|
986
|
+
return `f-preten-link ${y.customClass ? y.customClass : ""}`;
|
|
987
987
|
}
|
|
988
988
|
Me(n, () => {
|
|
989
989
|
n.value;
|
|
990
990
|
});
|
|
991
991
|
const B = () => {
|
|
992
|
-
var
|
|
992
|
+
var y;
|
|
993
993
|
return v(mt, null, [v("div", {
|
|
994
994
|
class: "after-toast-msg text-right"
|
|
995
|
-
}, [!t.slots.default && ((
|
|
995
|
+
}, [!t.slots.default && ((y = i.value.buttons) == null ? void 0 : y.map((S) => v("span", {
|
|
996
996
|
class: D(S),
|
|
997
997
|
onClick: (V) => void 0
|
|
998
998
|
}, [S.text]))), t.slots.default && t.slots.default()])]);
|
|
@@ -1001,7 +1001,7 @@ const xn = /* @__PURE__ */ Br(Dr), Ir = {
|
|
|
1001
1001
|
class: s.value,
|
|
1002
1002
|
style: "min-height:44px"
|
|
1003
1003
|
}, [f.value && v("button", {
|
|
1004
|
-
title:
|
|
1004
|
+
title: ze.getLocaleValue("messageBox.close"),
|
|
1005
1005
|
class: "toast-close f-btn-icon f-bare",
|
|
1006
1006
|
onClick: d
|
|
1007
1007
|
}, [v("span", {
|
|
@@ -1035,8 +1035,8 @@ const xn = /* @__PURE__ */ Br(Dr), Ir = {
|
|
|
1035
1035
|
innerHTML: i.value.message
|
|
1036
1036
|
}, null))])])]);
|
|
1037
1037
|
}
|
|
1038
|
-
}),
|
|
1039
|
-
function
|
|
1038
|
+
}), Vr = ["moz", "ms", "webkit"];
|
|
1039
|
+
function Nr() {
|
|
1040
1040
|
let e = 0;
|
|
1041
1041
|
return (t) => {
|
|
1042
1042
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), i = setTimeout(() => {
|
|
@@ -1045,16 +1045,16 @@ function Or() {
|
|
|
1045
1045
|
return e = n + o, i;
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function Lr() {
|
|
1049
1049
|
if (typeof window > "u")
|
|
1050
1050
|
return () => 0;
|
|
1051
1051
|
if (window.requestAnimationFrame)
|
|
1052
1052
|
return window.requestAnimationFrame.bind(window);
|
|
1053
|
-
const e =
|
|
1054
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
1053
|
+
const e = Vr.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
1054
|
+
return e ? window[`${e}RequestAnimationFrame`] : Nr();
|
|
1055
1055
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
Lr();
|
|
1057
|
+
h("");
|
|
1058
1058
|
function Zo() {
|
|
1059
1059
|
if (typeof window > "u" || typeof navigator > "u")
|
|
1060
1060
|
return !1;
|
|
@@ -1088,14 +1088,14 @@ function Zo() {
|
|
|
1088
1088
|
const o = "ontouchstart" in window || navigator.maxTouchPoints > 0, i = screen.width, a = screen.height, r = Math.min(i, a);
|
|
1089
1089
|
return !!(o && r <= 768);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Rr() {
|
|
1092
1092
|
const e = Zo();
|
|
1093
1093
|
return e && document.body.classList.add("f-mobile"), e;
|
|
1094
1094
|
}
|
|
1095
|
-
typeof document < "u" &&
|
|
1096
|
-
const
|
|
1095
|
+
typeof document < "u" && Rr();
|
|
1096
|
+
const jt = /* @__PURE__ */ Ae({
|
|
1097
1097
|
name: "Notify",
|
|
1098
|
-
props:
|
|
1098
|
+
props: Pr,
|
|
1099
1099
|
emits: ["close", "empty"],
|
|
1100
1100
|
setup(e, t) {
|
|
1101
1101
|
var T;
|
|
@@ -1107,15 +1107,15 @@ const At = /* @__PURE__ */ Ae({
|
|
|
1107
1107
|
right: 12,
|
|
1108
1108
|
top: 20,
|
|
1109
1109
|
bottom: 12
|
|
1110
|
-
}, c =
|
|
1111
|
-
const D = e.bottom ? e.bottom : r.bottom, B = e.top ? e.top : r.top,
|
|
1110
|
+
}, c = h(), s = h(e.options), u = h(e.showCloseButton), m = X(() => e.position || "bottom-right"), f = X(() => e.timeout != null ? e.timeout : 3e3), b = X(() => {
|
|
1111
|
+
const D = e.bottom ? e.bottom : r.bottom, B = e.top ? e.top : r.top, y = {
|
|
1112
1112
|
transition: "all 0.2s ease",
|
|
1113
1113
|
left: m.value.indexOf("left") > -1 ? `${e.left ? e.left : r.left}px` : "",
|
|
1114
1114
|
right: m.value.indexOf("right") > -1 ? `${e.right ? e.right : r.right}px` : "",
|
|
1115
1115
|
top: m.value.indexOf("top") > -1 ? `${B}px` : "",
|
|
1116
1116
|
bottom: m.value.indexOf("bottom") > -1 ? `${D}px` : ""
|
|
1117
1117
|
};
|
|
1118
|
-
return m.value.indexOf("center") > -1 && (
|
|
1118
|
+
return m.value.indexOf("center") > -1 && (y.left = "50%", y.marginLeft = "calc(-24rem / 2)", m.value === "center-center" && (y.top = "50%", y.transform = "translate(-50%, -50%)")), y;
|
|
1119
1119
|
});
|
|
1120
1120
|
function l(D) {
|
|
1121
1121
|
t.emit("close");
|
|
@@ -1172,7 +1172,7 @@ class mn {
|
|
|
1172
1172
|
const r = In({
|
|
1173
1173
|
setup() {
|
|
1174
1174
|
var u;
|
|
1175
|
-
const c =
|
|
1175
|
+
const c = h();
|
|
1176
1176
|
function s() {
|
|
1177
1177
|
c.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
1178
1178
|
n.updateNotifyPositionForClose(i, c), r.unmount();
|
|
@@ -1194,7 +1194,7 @@ class mn {
|
|
|
1194
1194
|
name: "fade",
|
|
1195
1195
|
appear: !0
|
|
1196
1196
|
}, {
|
|
1197
|
-
default: () => [v(
|
|
1197
|
+
default: () => [v(jt, ut({
|
|
1198
1198
|
ref: c
|
|
1199
1199
|
}, i, {
|
|
1200
1200
|
onClose: s
|
|
@@ -1202,7 +1202,7 @@ class mn {
|
|
|
1202
1202
|
});
|
|
1203
1203
|
}
|
|
1204
1204
|
});
|
|
1205
|
-
return r.provide("NotifyService", this), document.body.appendChild(a), r.use(
|
|
1205
|
+
return r.provide("NotifyService", this), document.body.appendChild(a), r.use(ze.i18n), r.mount(a), r;
|
|
1206
1206
|
}
|
|
1207
1207
|
getNotifyInstances(t) {
|
|
1208
1208
|
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
|
|
@@ -1267,13 +1267,13 @@ class mn {
|
|
|
1267
1267
|
}), this.notifyRefs.length = 0;
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
e.component(
|
|
1270
|
+
const Ar = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
1271
|
+
jt.install = (e) => {
|
|
1272
|
+
e.component(jt.name, jt), e.component(cn.name, cn);
|
|
1273
1273
|
const t = new mn();
|
|
1274
|
-
e.provide(
|
|
1274
|
+
e.provide(Ar, t), e.provide("FNotifyService", t);
|
|
1275
1275
|
};
|
|
1276
|
-
const
|
|
1276
|
+
const jr = {
|
|
1277
1277
|
designerHostService: { type: Object, default: {} },
|
|
1278
1278
|
/** 预设的控件类型 */
|
|
1279
1279
|
componentType: { type: String, default: "" },
|
|
@@ -1284,8 +1284,8 @@ const Rr = {
|
|
|
1284
1284
|
/** 目标区域的控件实例 */
|
|
1285
1285
|
targetComponentInstance: { type: Object, default: {} }
|
|
1286
1286
|
};
|
|
1287
|
-
`${
|
|
1288
|
-
const
|
|
1287
|
+
`${ze.getLocaleValue("datagrid.loadingMessage")}`;
|
|
1288
|
+
const _r = {
|
|
1289
1289
|
/**
|
|
1290
1290
|
* 自定义样式
|
|
1291
1291
|
*/
|
|
@@ -1558,12 +1558,12 @@ const Ar = {
|
|
|
1558
1558
|
* 编辑单元格时默认获得焦点
|
|
1559
1559
|
*/
|
|
1560
1560
|
focusOnEditingCell: { type: Boolean, default: !0 }
|
|
1561
|
-
},
|
|
1562
|
-
function
|
|
1561
|
+
}, $r = "enum", zr = "boolean";
|
|
1562
|
+
function Ur(e) {
|
|
1563
1563
|
const { formatter: t } = e;
|
|
1564
1564
|
return !t || typeof t == "function" ? null : t;
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function Hr(e, t) {
|
|
1567
1567
|
const n = t.options || t, { data: o } = n;
|
|
1568
1568
|
if (!o || !o.length)
|
|
1569
1569
|
return "";
|
|
@@ -1578,17 +1578,17 @@ function zr(e, t) {
|
|
|
1578
1578
|
const r = o.find((c) => c[i] === e);
|
|
1579
1579
|
return (r == null ? void 0 : r[a]) ?? (e == null ? "" : String(e));
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function qr(e, t) {
|
|
1582
1582
|
if (e == null)
|
|
1583
1583
|
return "";
|
|
1584
1584
|
const n = t.options || t, o = e ? n == null ? void 0 : n.trueText : n == null ? void 0 : n.falseText;
|
|
1585
1585
|
return o == null ? "" : String(o);
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
const n =
|
|
1589
|
-
return i ===
|
|
1587
|
+
function Wr(e, t) {
|
|
1588
|
+
const n = Wa(t, e.field), o = Ur(e), i = o == null ? void 0 : o.type;
|
|
1589
|
+
return i === $r ? Hr(n, o) : i === zr || e.dataType === "boolean" ? qr(n, o || {}) : n == null ? "" : String(n);
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Gr(e, t, n, o, i, a, r, c, s, u, m, f, b, l, d, T, D, B, y) {
|
|
1592
1592
|
const {
|
|
1593
1593
|
calculateCellPositionInRow: S
|
|
1594
1594
|
} = a, {
|
|
@@ -1601,7 +1601,7 @@ function qr(e, t, n, o, i, a, r, c, s, u, m, f, b, l, d, T, D, B, h) {
|
|
|
1601
1601
|
rightFixedGridDataStyle: w
|
|
1602
1602
|
} = l, {
|
|
1603
1603
|
renderDataRow: x
|
|
1604
|
-
} =
|
|
1604
|
+
} = la(e, t, V, D, c, s, u, m, f, b, l, d, T, B, y), I = [x];
|
|
1605
1605
|
function _(U, O) {
|
|
1606
1606
|
const z = S(U);
|
|
1607
1607
|
return D.value.filter((oe) => oe.visible !== !1).map((oe, E) => I[oe.type](oe, z, O, E));
|
|
@@ -1643,57 +1643,57 @@ function qr(e, t, n, o, i, a, r, c, s, u, m, f, b, l, d, T, D, B, h) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
const un = /* @__PURE__ */ Ae({
|
|
1645
1645
|
name: "FTreeGrid",
|
|
1646
|
-
props:
|
|
1646
|
+
props: _r,
|
|
1647
1647
|
emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode", "doubleClickRow", "selectItem", "filterChanged", "unSelectAll", "selectAll", "sortChanged", "selectionUpdate", "beginEditCell", "endEditCell"],
|
|
1648
1648
|
setup(e, t) {
|
|
1649
1649
|
var Cn, bn;
|
|
1650
|
-
const n =
|
|
1650
|
+
const n = h(!1), o = h(!1), i = 0, a = h(((Cn = e.rowOption) == null ? void 0 : Cn.height) || 28);
|
|
1651
1651
|
let r = [], c = [];
|
|
1652
|
-
const s =
|
|
1652
|
+
const s = h(20), u = h(e.columns), m = sa(e), {
|
|
1653
1653
|
idField: f
|
|
1654
|
-
} = m, b =
|
|
1654
|
+
} = m, b = h(), l = h(), d = h(), T = h(), D = h(), B = h([]), y = h(!1), S = h(((bn = e.rowOption) == null ? void 0 : bn.wrapContent) || !1), V = ca(e, m), k = ua(e, t), C = da(e), {
|
|
1655
1655
|
collapseField: g
|
|
1656
1656
|
} = C, {
|
|
1657
1657
|
showLoading: p,
|
|
1658
1658
|
renderLoading: w
|
|
1659
|
-
} =
|
|
1659
|
+
} = fa(e, b), x = ma(e, /* @__PURE__ */ new Map(), k, C, m), {
|
|
1660
1660
|
dataView: I
|
|
1661
|
-
} = x, _ =
|
|
1661
|
+
} = x, _ = pa(e, x, m, B, t), {
|
|
1662
1662
|
showSelection: M,
|
|
1663
1663
|
selectedValues: N
|
|
1664
|
-
} = _, $ =
|
|
1664
|
+
} = _, $ = va(e, B, x, m, _, t), L = X(() => e.disabled), U = X(() => e.virtualized ? Math.min(x.dataView.value.length, s.value) : x.dataView.value.length), O = ga(e, x), {
|
|
1665
1665
|
shouldRenderPagination: z
|
|
1666
1666
|
} = O, {
|
|
1667
1667
|
containerStyleObject: oe
|
|
1668
|
-
} =
|
|
1668
|
+
} = ha(e, B), E = h(""), A = h([]), ae = X(() => e.searchable || !1), ie = h(0), J = X(() => A.value.length ? `${ie.value + 1}/${A.value.length}` : ""), ge = X(() => ze.getRealPropertyValue(e.searchPlaceholder, "", "datagrid.search.placeholder")), Se = X(() => ze.getLocaleValue("datagrid.search.search")), fe = X(() => ze.getLocaleValue("datagrid.search.prev")), Z = X(() => ze.getLocaleValue("datagrid.search.next")), F = X(() => ze.getLocaleValue("datagrid.search.clear")), re = ya(e), {
|
|
1669
1669
|
applyCommands: le
|
|
1670
1670
|
} = re;
|
|
1671
1671
|
le(u);
|
|
1672
1672
|
const {
|
|
1673
1673
|
applyColumnSetting: ce,
|
|
1674
|
-
removeColumnSetting:
|
|
1675
|
-
} =
|
|
1674
|
+
removeColumnSetting: ye
|
|
1675
|
+
} = Ca(e);
|
|
1676
1676
|
e.showSetting && ce(u);
|
|
1677
|
-
const ke =
|
|
1677
|
+
const ke = ba(e, t), je = wa(e), {
|
|
1678
1678
|
applyColumnSorter: Le,
|
|
1679
1679
|
columnContext: Te,
|
|
1680
1680
|
updateColumnRenderContext: Oe
|
|
1681
1681
|
} = ke;
|
|
1682
1682
|
Le(x, je);
|
|
1683
|
-
const Ve =
|
|
1683
|
+
const Ve = Sa(e, Te), Pe = Ta(e, t, _, m), Be = Fa(e, t, m, Pe, B), rt = Ea(e, x, a), pt = xa(e, Be, rt), vt = Ma(e, x, Be, C, m, rt, pt, a), Qe = Ba(e, u, x, U, i, vt), {
|
|
1684
1684
|
getVisualData: tt
|
|
1685
|
-
} = Qe, gt =
|
|
1685
|
+
} = Qe, gt = Da(e, Te, a, n), ot = Ia(e, _), {
|
|
1686
1686
|
sidebarWidth: lt
|
|
1687
|
-
} = ot, Ie =
|
|
1687
|
+
} = ot, Ie = ka(e, x, B, Te, Qe, U, i, lt, a, n), {
|
|
1688
1688
|
onWheel: j,
|
|
1689
1689
|
dataGridWidth: ue,
|
|
1690
1690
|
viewPortHeight: Fe,
|
|
1691
1691
|
viewPortWidth: Ee,
|
|
1692
|
-
resetScroll:
|
|
1692
|
+
resetScroll: He,
|
|
1693
1693
|
updateVisibleRowsOnLatestVisibleScope: wt
|
|
1694
|
-
} = Ie, st =
|
|
1694
|
+
} = Ie, st = Pa(e, Te, l, Ee, Ve), {
|
|
1695
1695
|
calculateColumnsSize: ht
|
|
1696
|
-
} = st, Vt =
|
|
1696
|
+
} = st, Vt = Oa(), Nt = Va(l, D, x, Vt, Ie), Wt = Na(e, t, ke, x, Ve, V, Ie), Gt = X(() => {
|
|
1697
1697
|
const R = {
|
|
1698
1698
|
"fv-grid": !0,
|
|
1699
1699
|
"fv-grid-bordered": e.showBorder,
|
|
@@ -1701,80 +1701,85 @@ const un = /* @__PURE__ */ Ae({
|
|
|
1701
1701
|
"fv-datagrid-strip": e.showStripe
|
|
1702
1702
|
};
|
|
1703
1703
|
return dt(R, e.customClass);
|
|
1704
|
-
}),
|
|
1704
|
+
}), Yt = X(() => ({
|
|
1705
1705
|
"fv-grid-content": !0,
|
|
1706
|
-
"fv-grid-content-hover":
|
|
1706
|
+
"fv-grid-content-hover": y.value,
|
|
1707
1707
|
"fv-grid-wrap-content": S.value,
|
|
1708
|
-
"fv-grid-scrollbar-visible": Ie.shouldShowVirticalScrollbar.value &&
|
|
1708
|
+
"fv-grid-scrollbar-visible": Ie.shouldShowVirticalScrollbar.value && y.value
|
|
1709
1709
|
})), {
|
|
1710
|
-
renderDataArea:
|
|
1711
|
-
} =
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1710
|
+
renderDataArea: Kt
|
|
1711
|
+
} = Gr(e, t, d, T, D, gt, ke, x, Be, C, Pe, _, $, Ie, Qe, rt, B, a, n), Lt = h(null);
|
|
1712
|
+
function Rt(R, W) {
|
|
1713
|
+
var de, me;
|
|
1714
|
+
e.enableColumnSettingSolution && ((me = (de = Lt.value) == null ? void 0 : de.persistColumnWidths) == null || me.call(de, W));
|
|
1715
|
+
}
|
|
1716
|
+
const {
|
|
1717
|
+
renderGridHeader: Xt,
|
|
1718
|
+
renderGridColumnResizeOverlay: P,
|
|
1719
|
+
shouldShowHeader: K
|
|
1720
|
+
} = La(e, t, l, T, D, ke, x, Wt, Nt, k, Vt, st, Ve, _, ot, je, Ie, Ee, B, o, Rt), {
|
|
1721
|
+
renderDataGridSidebar: Q
|
|
1722
|
+
} = Ra(e, Pe, _, ot, Ie), {
|
|
1723
|
+
renderDisableMask: se
|
|
1724
|
+
} = Aa(), {
|
|
1725
|
+
renderHorizontalScrollbar: Ce
|
|
1726
|
+
} = ja(e, l, Ie), {
|
|
1727
|
+
renderVerticalScrollbar: be
|
|
1728
|
+
} = _a(e, l, Ie);
|
|
1729
|
+
let _e = null;
|
|
1730
|
+
function Ue() {
|
|
1731
|
+
var R, W, de;
|
|
1727
1732
|
if (l.value && l.value.clientHeight > 0 && ((R = l.value) == null ? void 0 : R.clientWidth) > 0) {
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1733
|
+
const me = Math.ceil(l.value.clientHeight / a.value);
|
|
1734
|
+
me > s.value && (s.value = me, wt()), Fe.value = ((W = d.value) == null ? void 0 : W.clientHeight) || 0, ue.value = ((de = l.value) == null ? void 0 : de.clientWidth) || 0, d.value && (Ee.value = d.value.clientWidth);
|
|
1730
1735
|
}
|
|
1731
1736
|
l.value && (l.value.clientHeight > 0 || l.value.clientWidth > 0) && ht();
|
|
1732
1737
|
}
|
|
1733
|
-
function
|
|
1734
|
-
|
|
1735
|
-
|
|
1738
|
+
function Ge() {
|
|
1739
|
+
_e !== null && cancelAnimationFrame(_e), _e = requestAnimationFrame(() => {
|
|
1740
|
+
_e = null, Ue();
|
|
1736
1741
|
});
|
|
1737
1742
|
}
|
|
1738
1743
|
et(() => {
|
|
1739
|
-
l.value && (s.value = Math.max(Math.ceil(l.value.clientHeight / a.value), s.value), B.value = tt(0, U.value + i - 1),
|
|
1744
|
+
l.value && (s.value = Math.max(Math.ceil(l.value.clientHeight / a.value), s.value), B.value = tt(0, U.value + i - 1), ra(l.value, Ge), ht(), Ct(() => {
|
|
1740
1745
|
l.value && (ue.value = l.value.clientWidth), d.value && (Ee.value = d.value.clientWidth, Fe.value = d.value.clientHeight);
|
|
1741
1746
|
})), p.value && w();
|
|
1742
1747
|
}), bt(() => {
|
|
1743
|
-
|
|
1748
|
+
_e !== null && cancelAnimationFrame(_e);
|
|
1744
1749
|
});
|
|
1745
|
-
function
|
|
1746
|
-
x.collapseTo(R), x.reOrderVisibleIndex(),
|
|
1750
|
+
function Je(R) {
|
|
1751
|
+
x.collapseTo(R), x.reOrderVisibleIndex(), He();
|
|
1747
1752
|
}
|
|
1748
|
-
function
|
|
1749
|
-
x.expandTo(R), x.reOrderVisibleIndex(),
|
|
1753
|
+
function Re(R) {
|
|
1754
|
+
x.expandTo(R), x.reOrderVisibleIndex(), He();
|
|
1750
1755
|
}
|
|
1751
|
-
function
|
|
1756
|
+
function Ye() {
|
|
1752
1757
|
const R = _.getSelectionRow();
|
|
1753
1758
|
return R ? R.dataIndex - 1 : -1;
|
|
1754
1759
|
}
|
|
1755
|
-
function
|
|
1756
|
-
const
|
|
1757
|
-
return B.value = tt(0, U.value + i - 1),
|
|
1760
|
+
function qe(R) {
|
|
1761
|
+
const W = R !== void 0 ? R : Ye(), de = x.insertNewDataItem(W === -1 ? 0 : W);
|
|
1762
|
+
return B.value = tt(0, U.value + i - 1), de;
|
|
1758
1763
|
}
|
|
1759
|
-
function
|
|
1760
|
-
const R =
|
|
1764
|
+
function $e() {
|
|
1765
|
+
const R = Ye();
|
|
1761
1766
|
x.insertNewChildDataItem(R), B.value = tt(0, U.value + i - 1);
|
|
1762
1767
|
}
|
|
1763
|
-
function
|
|
1764
|
-
const
|
|
1765
|
-
x.insertNewChildDataItems(R,
|
|
1768
|
+
function St(R, W) {
|
|
1769
|
+
const de = B.value.find((ve) => ve.raw[f.value] === W), me = de ? de.dataIndex - 1 : -1;
|
|
1770
|
+
x.insertNewChildDataItems(R, me);
|
|
1766
1771
|
}
|
|
1767
|
-
function
|
|
1768
|
-
const R =
|
|
1769
|
-
x.removeHierarchyDataItem(R), B.value = tt(0, U.value + i - 1),
|
|
1772
|
+
function Tt() {
|
|
1773
|
+
const R = Ye(), W = $.getNextSelectableHierarchyItemId(R);
|
|
1774
|
+
x.removeHierarchyDataItem(R), B.value = tt(0, U.value + i - 1), W && $.selectItemById(W);
|
|
1770
1775
|
}
|
|
1771
|
-
function
|
|
1776
|
+
function Ft(R) {
|
|
1772
1777
|
Be.onEditingRow(R);
|
|
1773
1778
|
}
|
|
1774
|
-
function
|
|
1779
|
+
function ci(R) {
|
|
1775
1780
|
Be.acceptEditingRow(R);
|
|
1776
1781
|
}
|
|
1777
|
-
function
|
|
1782
|
+
function ui(R) {
|
|
1778
1783
|
Be.cancelEditingRow(R);
|
|
1779
1784
|
}
|
|
1780
1785
|
function Et(R) {
|
|
@@ -1787,13 +1792,13 @@ const un = /* @__PURE__ */ Ae({
|
|
|
1787
1792
|
}
|
|
1788
1793
|
Et(R);
|
|
1789
1794
|
});
|
|
1790
|
-
function
|
|
1795
|
+
function di(R, W) {
|
|
1791
1796
|
if (R) {
|
|
1792
|
-
const
|
|
1793
|
-
x.load(R), x.reOrderVisibleIndex(),
|
|
1794
|
-
keepScroll:
|
|
1795
|
-
savedOffsetY:
|
|
1796
|
-
resetScroll:
|
|
1797
|
+
const de = !!(W != null && W.keepScrollTop || W != null && W.keepScrollPosition), me = de ? Ie.offsetY.value : 0;
|
|
1798
|
+
x.load(R), x.reOrderVisibleIndex(), qa({
|
|
1799
|
+
keepScroll: de,
|
|
1800
|
+
savedOffsetY: me,
|
|
1801
|
+
resetScroll: He,
|
|
1797
1802
|
scrollTo: Ie.scrollTo
|
|
1798
1803
|
});
|
|
1799
1804
|
}
|
|
@@ -1801,190 +1806,190 @@ const un = /* @__PURE__ */ Ae({
|
|
|
1801
1806
|
function Qt(R) {
|
|
1802
1807
|
Pe.activeRowById(R);
|
|
1803
1808
|
}
|
|
1804
|
-
function
|
|
1809
|
+
function fi(R, W = {
|
|
1805
1810
|
isCurrent: !0
|
|
1806
1811
|
}) {
|
|
1807
|
-
|
|
1812
|
+
W != null && W.isCurrent && Qt(R), $.selectItemById(R);
|
|
1808
1813
|
}
|
|
1809
|
-
function
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1814
|
+
function mi(R) {
|
|
1815
|
+
const W = B.value.find((de) => de.raw[m.idField.value] === R);
|
|
1816
|
+
W && Pe.clickRowItem(W);
|
|
1812
1817
|
}
|
|
1813
|
-
function
|
|
1818
|
+
function pi(R) {
|
|
1814
1819
|
$.selectItemByIds(R);
|
|
1815
1820
|
}
|
|
1816
|
-
function
|
|
1821
|
+
function vi() {
|
|
1817
1822
|
return _.getSelectedItems();
|
|
1818
1823
|
}
|
|
1819
1824
|
function vn() {
|
|
1820
1825
|
_.clearSelection();
|
|
1821
1826
|
}
|
|
1822
|
-
function
|
|
1827
|
+
function gi() {
|
|
1823
1828
|
_.emptyCurrentRowId();
|
|
1824
1829
|
}
|
|
1825
|
-
const
|
|
1826
|
-
renderEmpty:
|
|
1827
|
-
} =
|
|
1828
|
-
function
|
|
1830
|
+
const hi = X(() => !B.value || !B.value.length), {
|
|
1831
|
+
renderEmpty: yi
|
|
1832
|
+
} = $a(e, t);
|
|
1833
|
+
function Ci() {
|
|
1829
1834
|
return _.getSelectionRow();
|
|
1830
1835
|
}
|
|
1831
|
-
function
|
|
1836
|
+
function bi(R, W = {
|
|
1832
1837
|
clearCurrent: !0
|
|
1833
1838
|
}) {
|
|
1834
|
-
|
|
1839
|
+
W != null && W.clearCurrent && Qt(""), $.unSelectItemByIds(R);
|
|
1835
1840
|
}
|
|
1836
|
-
function
|
|
1841
|
+
function wi() {
|
|
1837
1842
|
return _.currentSelectedDataId.value;
|
|
1838
1843
|
}
|
|
1839
|
-
function
|
|
1840
|
-
const
|
|
1841
|
-
if (
|
|
1842
|
-
if (Object.keys(
|
|
1843
|
-
Object.prototype.hasOwnProperty.call(
|
|
1844
|
-
}),
|
|
1844
|
+
function Si(R, W, de) {
|
|
1845
|
+
const me = I.value.find((ve) => ve[f.value] === R);
|
|
1846
|
+
if (me) {
|
|
1847
|
+
if (Object.keys(me).forEach((he) => {
|
|
1848
|
+
Object.prototype.hasOwnProperty.call(W, he) && (me[he] = W[he]);
|
|
1849
|
+
}), de) {
|
|
1845
1850
|
const {
|
|
1846
|
-
collapseField:
|
|
1847
|
-
disabledField:
|
|
1851
|
+
collapseField: he,
|
|
1852
|
+
disabledField: Ke,
|
|
1848
1853
|
checkedField: nt,
|
|
1849
1854
|
visibleField: Xe,
|
|
1850
1855
|
hasChildren: Mt
|
|
1851
|
-
} =
|
|
1852
|
-
|
|
1856
|
+
} = de;
|
|
1857
|
+
he && !Ze(W[he]) && (me.__fv_collapse__ = W[he]), nt && !Ze(W[nt]) && (me.__fv_checked__ = W[nt]), Ke && !Ze(W[Ke]) && (me.__fv_disabled__ = W[Ke]), Xe && !Ze(W[Xe]) && (me.__fv_visible__ = W[Xe]), Ze(Mt) || (me.__fv_hasChildren__ = Mt);
|
|
1853
1858
|
}
|
|
1854
|
-
const
|
|
1855
|
-
if (
|
|
1856
|
-
if (
|
|
1857
|
-
|
|
1858
|
-
}),
|
|
1859
|
+
const ve = B.value.find((he) => he.raw[f.value] === R), pe = B.value.findIndex((he) => he.raw[f.value] === R);
|
|
1860
|
+
if (ve) {
|
|
1861
|
+
if (ve.raw = me, Object.keys(ve.data).forEach((he) => {
|
|
1862
|
+
ve.data[he].updateData(me);
|
|
1863
|
+
}), de) {
|
|
1859
1864
|
const {
|
|
1860
|
-
collapseField:
|
|
1861
|
-
disabledField:
|
|
1865
|
+
collapseField: he,
|
|
1866
|
+
disabledField: Ke,
|
|
1862
1867
|
checkedField: nt,
|
|
1863
1868
|
visibleField: Xe,
|
|
1864
1869
|
hasChildren: Mt
|
|
1865
|
-
} =
|
|
1866
|
-
|
|
1870
|
+
} = de;
|
|
1871
|
+
he && !Ze(W[he]) && (ve.collapse = W[he]), nt && !Ze(W[nt]) && (ve.checked = W[nt]), Ke && !Ze(W[Ke]) && (ve.disabled = W[Ke]), Xe && !Ze(W[Xe]) && (ve.visible = W[Xe]), Ze(Mt) || (ve.raw.__fv_hasChildren__ = Mt);
|
|
1867
1872
|
}
|
|
1868
|
-
B.value = [...B.value.slice(0,
|
|
1873
|
+
B.value = [...B.value.slice(0, pe), ve, ...B.value.slice(pe + 1)], x.updateSummary();
|
|
1869
1874
|
}
|
|
1870
1875
|
}
|
|
1871
1876
|
}
|
|
1872
|
-
function
|
|
1877
|
+
function Ti(R) {
|
|
1873
1878
|
return Object.prototype.hasOwnProperty.call(R, "raw") ? x.hasRealChildren(R.raw) : x.hasRealChildren(R);
|
|
1874
1879
|
}
|
|
1875
|
-
function
|
|
1876
|
-
const
|
|
1877
|
-
return
|
|
1880
|
+
function Fi(R) {
|
|
1881
|
+
const W = x.dataView.value.find((de) => de[f.value] === R);
|
|
1882
|
+
return W ? W[g.value] : "";
|
|
1878
1883
|
}
|
|
1879
|
-
function
|
|
1884
|
+
function Ei() {
|
|
1880
1885
|
return g.value;
|
|
1881
1886
|
}
|
|
1882
|
-
Me(() => e.showSetting, (R,
|
|
1883
|
-
R !==
|
|
1887
|
+
Me(() => e.showSetting, (R, W) => {
|
|
1888
|
+
R !== W && (R ? ce(u) : ye(u), Et(u.value));
|
|
1884
1889
|
});
|
|
1885
|
-
function
|
|
1886
|
-
return B.value.filter((
|
|
1890
|
+
function xi(R) {
|
|
1891
|
+
return B.value.filter((W) => R.includes(W.raw[e.idField]));
|
|
1887
1892
|
}
|
|
1888
1893
|
function gn(R) {
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1894
|
+
const W = m.idField.value, de = B.value.find((me) => me.raw[W] === R);
|
|
1895
|
+
de && Pe.changeRow(de);
|
|
1891
1896
|
}
|
|
1892
|
-
function
|
|
1897
|
+
function Mi() {
|
|
1893
1898
|
_.keepSelectingOnPaging.value || vn(), x.updateVisibleDataSummary(B.value);
|
|
1894
1899
|
}
|
|
1895
|
-
function
|
|
1900
|
+
function Bi() {
|
|
1896
1901
|
Be.endEditCell();
|
|
1897
1902
|
}
|
|
1898
|
-
function
|
|
1903
|
+
function Di(R) {
|
|
1899
1904
|
_.updateSelectedValues(R);
|
|
1900
1905
|
}
|
|
1901
|
-
function
|
|
1906
|
+
function Ii(R) {
|
|
1902
1907
|
_.removeSelectedValues(R);
|
|
1903
1908
|
}
|
|
1904
|
-
const
|
|
1905
|
-
function
|
|
1906
|
-
const
|
|
1907
|
-
let
|
|
1908
|
-
for (;
|
|
1909
|
-
|
|
1910
|
-
return
|
|
1911
|
-
}
|
|
1912
|
-
function
|
|
1913
|
-
const
|
|
1914
|
-
if (typeof
|
|
1909
|
+
const ki = 100;
|
|
1910
|
+
function Pi(R, W) {
|
|
1911
|
+
const de = W[R].__fv_layer__ || 0;
|
|
1912
|
+
let me = R + 1;
|
|
1913
|
+
for (; me < W.length && (W[me].__fv_layer__ || 0) > de; )
|
|
1914
|
+
me++;
|
|
1915
|
+
return me - 1;
|
|
1916
|
+
}
|
|
1917
|
+
function Oi(R) {
|
|
1918
|
+
const W = x.dataView.value, de = C.collapseField.value, me = R.__fv_index__, ve = R.__fv_layer__ || 0;
|
|
1919
|
+
if (typeof me != "number" || R.__fv_visible__ === !1 || R[de])
|
|
1915
1920
|
return;
|
|
1916
|
-
let
|
|
1917
|
-
for (;
|
|
1918
|
-
const
|
|
1919
|
-
if ((
|
|
1921
|
+
let pe = me + 1;
|
|
1922
|
+
for (; pe < W.length; ) {
|
|
1923
|
+
const he = W[pe];
|
|
1924
|
+
if ((he.__fv_layer__ || 0) <= ve)
|
|
1920
1925
|
break;
|
|
1921
|
-
if (
|
|
1922
|
-
|
|
1926
|
+
if (he.__fv_visible__ = !0, he[de]) {
|
|
1927
|
+
pe = Pi(pe, W) + 1;
|
|
1923
1928
|
continue;
|
|
1924
1929
|
}
|
|
1925
|
-
|
|
1930
|
+
pe++;
|
|
1926
1931
|
}
|
|
1927
1932
|
}
|
|
1928
|
-
function
|
|
1929
|
-
let
|
|
1930
|
-
const
|
|
1931
|
-
let
|
|
1932
|
-
for (;
|
|
1933
|
-
|
|
1934
|
-
const
|
|
1935
|
-
if (
|
|
1936
|
-
|
|
1933
|
+
function Vi(R) {
|
|
1934
|
+
let W = R;
|
|
1935
|
+
const de = [];
|
|
1936
|
+
let me = 0;
|
|
1937
|
+
for (; W && W[C.parentIdField.value] && me < ki; ) {
|
|
1938
|
+
me++;
|
|
1939
|
+
const ve = x.rawView.value.find((pe) => pe[m.idField.value] === W[C.parentIdField.value]);
|
|
1940
|
+
if (ve)
|
|
1941
|
+
ve[C.collapseField.value] && de.push(ve), W = ve;
|
|
1937
1942
|
else
|
|
1938
1943
|
break;
|
|
1939
1944
|
}
|
|
1940
|
-
|
|
1941
|
-
|
|
1945
|
+
de.reverse().forEach((ve) => {
|
|
1946
|
+
ve[C.collapseField.value] = !1, x.toggleChildrenVisibiltyByCollapseStatus(ve), Oi(ve);
|
|
1942
1947
|
});
|
|
1943
1948
|
}
|
|
1944
|
-
function
|
|
1945
|
-
if (R.length !==
|
|
1949
|
+
function Ni(R, W) {
|
|
1950
|
+
if (R.length !== W.length)
|
|
1946
1951
|
return !1;
|
|
1947
|
-
const
|
|
1948
|
-
return
|
|
1952
|
+
const de = R.map((ve) => ve[m.idField.value]).sort(), me = W.map((ve) => ve[m.idField.value]).sort();
|
|
1953
|
+
return de.every((ve, pe) => ve === me[pe]);
|
|
1949
1954
|
}
|
|
1950
1955
|
function Jt() {
|
|
1951
1956
|
const R = A.value[ie.value];
|
|
1952
|
-
R && (
|
|
1957
|
+
R && (Vi(R), Ct(() => {
|
|
1953
1958
|
x.reOrderVisibleIndex();
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
gn(
|
|
1957
|
-
})) : console.warn("搜索结果的节点不在当前可见范围内,无法定位",
|
|
1959
|
+
const W = R[m.idField.value], de = R.__fv_visible_index__;
|
|
1960
|
+
de !== void 0 && de !== "" && de >= 0 ? (Ie.scrollToRowByIndex(de), Ct(() => {
|
|
1961
|
+
gn(W);
|
|
1962
|
+
})) : console.warn("搜索结果的节点不在当前可见范围内,无法定位", W);
|
|
1958
1963
|
}));
|
|
1959
1964
|
}
|
|
1960
1965
|
function hn() {
|
|
1961
1966
|
!E.value.trim() || !A.value.length || (ie.value = (ie.value + 1) % A.value.length, Jt());
|
|
1962
1967
|
}
|
|
1963
|
-
function
|
|
1968
|
+
function Li() {
|
|
1964
1969
|
if (!E.value.trim()) {
|
|
1965
1970
|
A.value = [], ie.value = 0;
|
|
1966
1971
|
return;
|
|
1967
1972
|
}
|
|
1968
|
-
const R = [],
|
|
1969
|
-
x.rawView.value.forEach((
|
|
1970
|
-
let
|
|
1971
|
-
e.customSearch ?
|
|
1972
|
-
if (!
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1973
|
+
const R = [], W = E.value.toLowerCase().trim();
|
|
1974
|
+
x.rawView.value.forEach((me) => {
|
|
1975
|
+
let ve = !1;
|
|
1976
|
+
e.customSearch ? ve = e.customSearch(W, me, e.columns) : e.columns.forEach((pe) => {
|
|
1977
|
+
if (!ve && pe.field) {
|
|
1978
|
+
const he = Wr(pe, me);
|
|
1979
|
+
he && he.toLowerCase().includes(W) && (ve = !0);
|
|
1975
1980
|
}
|
|
1976
|
-
}),
|
|
1981
|
+
}), ve && R.push(me);
|
|
1977
1982
|
});
|
|
1978
|
-
const
|
|
1979
|
-
R.length > 0 ?
|
|
1983
|
+
const de = !Ni(R, A.value);
|
|
1984
|
+
R.length > 0 ? de ? (A.value = R, ie.value = 0, Jt()) : hn() : (A.value = [], ie.value = 0);
|
|
1980
1985
|
}
|
|
1981
|
-
function
|
|
1986
|
+
function Ri() {
|
|
1982
1987
|
if (!E.value.trim() || !A.value.length)
|
|
1983
1988
|
return;
|
|
1984
1989
|
const R = A.value.length;
|
|
1985
1990
|
ie.value = (ie.value - 1 + R) % R, Jt();
|
|
1986
1991
|
}
|
|
1987
|
-
const xt =
|
|
1992
|
+
const xt = na(Li, 300);
|
|
1988
1993
|
function yn() {
|
|
1989
1994
|
xt.cancel(), E.value = "", A.value = [], ie.value = 0;
|
|
1990
1995
|
}
|
|
@@ -1993,82 +1998,82 @@ const un = /* @__PURE__ */ Ae({
|
|
|
1993
1998
|
}), bt(() => {
|
|
1994
1999
|
xt.cancel();
|
|
1995
2000
|
});
|
|
1996
|
-
function
|
|
2001
|
+
function Ai(R) {
|
|
1997
2002
|
if (R.key === "Enter") {
|
|
1998
2003
|
if (!E.value.trim())
|
|
1999
2004
|
return;
|
|
2000
2005
|
xt();
|
|
2001
2006
|
}
|
|
2002
2007
|
}
|
|
2003
|
-
function
|
|
2008
|
+
function ji() {
|
|
2004
2009
|
E.value.trim() && xt();
|
|
2005
2010
|
}
|
|
2006
2011
|
t.expose({
|
|
2007
2012
|
activeRowById: Qt,
|
|
2008
|
-
addNewDataItem:
|
|
2009
|
-
addNewChildDataItem:
|
|
2010
|
-
addChildrenToNode:
|
|
2011
|
-
collapseTo:
|
|
2012
|
-
expandTo:
|
|
2013
|
-
removeDataItem:
|
|
2014
|
-
editDataItem:
|
|
2015
|
-
acceptDataItem:
|
|
2016
|
-
cancelDataItem:
|
|
2013
|
+
addNewDataItem: qe,
|
|
2014
|
+
addNewChildDataItem: $e,
|
|
2015
|
+
addChildrenToNode: St,
|
|
2016
|
+
collapseTo: Je,
|
|
2017
|
+
expandTo: Re,
|
|
2018
|
+
removeDataItem: Tt,
|
|
2019
|
+
editDataItem: Ft,
|
|
2020
|
+
acceptDataItem: ci,
|
|
2021
|
+
cancelDataItem: ui,
|
|
2017
2022
|
updateColumns: Et,
|
|
2018
|
-
updateDataSource:
|
|
2019
|
-
selectItemById:
|
|
2020
|
-
selectItemByIds:
|
|
2021
|
-
getSelectedItems:
|
|
2023
|
+
updateDataSource: di,
|
|
2024
|
+
selectItemById: fi,
|
|
2025
|
+
selectItemByIds: pi,
|
|
2026
|
+
getSelectedItems: vi,
|
|
2022
2027
|
clearSelection: vn,
|
|
2023
|
-
getSelectionRow:
|
|
2024
|
-
clickRowItemById:
|
|
2025
|
-
unSelectItemByIds:
|
|
2026
|
-
getCurrentRowId:
|
|
2027
|
-
reassignRowData:
|
|
2028
|
-
hasChildren:
|
|
2029
|
-
getCollapseField:
|
|
2030
|
-
getCollapseStatusById:
|
|
2031
|
-
getVisibleDataByIds:
|
|
2028
|
+
getSelectionRow: Ci,
|
|
2029
|
+
clickRowItemById: mi,
|
|
2030
|
+
unSelectItemByIds: bi,
|
|
2031
|
+
getCurrentRowId: wi,
|
|
2032
|
+
reassignRowData: Si,
|
|
2033
|
+
hasChildren: Ti,
|
|
2034
|
+
getCollapseField: Ei,
|
|
2035
|
+
getCollapseStatusById: Fi,
|
|
2036
|
+
getVisibleDataByIds: xi,
|
|
2032
2037
|
selectRowById: gn,
|
|
2033
|
-
updateDerivedData:
|
|
2034
|
-
emptyCurrentRowId:
|
|
2038
|
+
updateDerivedData: Mi,
|
|
2039
|
+
emptyCurrentRowId: gi,
|
|
2035
2040
|
calculateColumnsSize: ht,
|
|
2036
|
-
endEditCell:
|
|
2037
|
-
updateSelectedValues:
|
|
2038
|
-
removeSelectedValues:
|
|
2041
|
+
endEditCell: Bi,
|
|
2042
|
+
updateSelectedValues: Di,
|
|
2043
|
+
removeSelectedValues: Ii
|
|
2039
2044
|
});
|
|
2040
|
-
const
|
|
2045
|
+
const _i = X(() => {
|
|
2041
2046
|
const R = {};
|
|
2042
|
-
return Ie.shouldShowHorizontalScrollbar.value &&
|
|
2043
|
-
}),
|
|
2047
|
+
return Ie.shouldShowHorizontalScrollbar.value && y.value && (R.paddingBottom = "10px"), Ie.shouldShowVirticalScrollbar.value && y.value, R;
|
|
2048
|
+
}), $i = X(() => ({
|
|
2044
2049
|
...oe.value,
|
|
2045
2050
|
borderRadius: "5px"
|
|
2046
2051
|
})), {
|
|
2047
|
-
renderDataGridPagination:
|
|
2048
|
-
} =
|
|
2052
|
+
renderDataGridPagination: ss
|
|
2053
|
+
} = za(e, t, x, Ie, O, _), zi = X(() => ({
|
|
2049
2054
|
"d-flex": !0,
|
|
2050
2055
|
"justify-content-between": z.value && M.value,
|
|
2051
2056
|
"justify-content-end": z.value && !M.value,
|
|
2052
2057
|
"position-relative": !0
|
|
2053
|
-
})),
|
|
2058
|
+
})), Ui = X(() => ({
|
|
2054
2059
|
"d-flex": !0,
|
|
2055
2060
|
"align-items-center": !0
|
|
2056
2061
|
}));
|
|
2057
|
-
function
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2062
|
-
}), c =
|
|
2063
|
-
const
|
|
2064
|
-
r =
|
|
2065
|
-
const
|
|
2066
|
-
return
|
|
2067
|
-
}), Et(
|
|
2062
|
+
function Hi(R) {
|
|
2063
|
+
const W = R.map((pe) => pe.id), de = [...u.value, ...r, ...c];
|
|
2064
|
+
de.filter((pe) => pe.dataType !== en && pe.dataType !== tn).forEach((pe) => {
|
|
2065
|
+
const he = R.find((Ke) => Ke.id === pe.id);
|
|
2066
|
+
he && (pe.width = he.actualWidth || pe.width || 120, he.actualWidth !== void 0 && (pe.actualWidth = he.actualWidth), pe.title = he.title, pe.halign = he.halign, pe.align = he.align, pe.fixed = he.fixed);
|
|
2067
|
+
}), c = de.filter((pe) => pe.dataType === en || pe.dataType === tn);
|
|
2068
|
+
const me = de.filter((pe) => pe.dataType !== en && pe.dataType !== tn), ve = me.filter((pe) => W.includes(pe.id));
|
|
2069
|
+
r = me.filter((pe) => !W.includes(pe.id)), ve.sort((pe, he) => {
|
|
2070
|
+
const Ke = R.findIndex((Xe) => Xe.id === pe.id), nt = R.findIndex((Xe) => Xe.id === he.id);
|
|
2071
|
+
return Ke - nt;
|
|
2072
|
+
}), Et(ve);
|
|
2068
2073
|
}
|
|
2069
2074
|
const {
|
|
2070
|
-
renderDataGridSummary:
|
|
2071
|
-
} =
|
|
2075
|
+
renderDataGridSummary: qi
|
|
2076
|
+
} = Ua(e, x, ke);
|
|
2072
2077
|
return () => e.visible && v(mt, null, [ae.value && v("div", {
|
|
2073
2078
|
class: "fv-grid-search",
|
|
2074
2079
|
style: {
|
|
@@ -2082,13 +2087,13 @@ const un = /* @__PURE__ */ Ae({
|
|
|
2082
2087
|
display: "flex",
|
|
2083
2088
|
alignItems: "center"
|
|
2084
2089
|
}
|
|
2085
|
-
}, [v(
|
|
2090
|
+
}, [v(Ga, {
|
|
2086
2091
|
value: E.value,
|
|
2087
2092
|
onInput: (R) => E.value = R,
|
|
2088
2093
|
"onUpdate:value": (R) => E.value = R || "",
|
|
2089
2094
|
onClear: yn,
|
|
2090
|
-
onKeydown:
|
|
2091
|
-
placeholder:
|
|
2095
|
+
onKeydown: Ai,
|
|
2096
|
+
placeholder: ge.value,
|
|
2092
2097
|
style: {
|
|
2093
2098
|
flex: 1
|
|
2094
2099
|
}
|
|
@@ -2102,9 +2107,9 @@ const un = /* @__PURE__ */ Ae({
|
|
|
2102
2107
|
}
|
|
2103
2108
|
}, [J.value]), v(yt, {
|
|
2104
2109
|
type: "link",
|
|
2105
|
-
title:
|
|
2110
|
+
title: fe.value,
|
|
2106
2111
|
disabled: !A.value.length,
|
|
2107
|
-
onClick:
|
|
2112
|
+
onClick: Ri,
|
|
2108
2113
|
style: {
|
|
2109
2114
|
cursor: "pointer",
|
|
2110
2115
|
marginLeft: "4px"
|
|
@@ -2129,7 +2134,7 @@ const un = /* @__PURE__ */ Ae({
|
|
|
2129
2134
|
}), v(yt, {
|
|
2130
2135
|
type: "link",
|
|
2131
2136
|
title: Se.value,
|
|
2132
|
-
onClick:
|
|
2137
|
+
onClick: ji,
|
|
2133
2138
|
style: {
|
|
2134
2139
|
cursor: "pointer",
|
|
2135
2140
|
marginLeft: "4px"
|
|
@@ -2152,37 +2157,38 @@ const un = /* @__PURE__ */ Ae({
|
|
|
2152
2157
|
}, null)]
|
|
2153
2158
|
})])]), v("div", {
|
|
2154
2159
|
ref: b,
|
|
2155
|
-
class:
|
|
2156
|
-
style:
|
|
2160
|
+
class: Gt.value,
|
|
2161
|
+
style: $i.value,
|
|
2157
2162
|
onWheel: j
|
|
2158
|
-
}, [l.value &&
|
|
2163
|
+
}, [l.value && K.value && Xt(), v("div", {
|
|
2159
2164
|
ref: l,
|
|
2160
|
-
class:
|
|
2161
|
-
onMouseover: () =>
|
|
2162
|
-
onMouseleave: () =>
|
|
2165
|
+
class: Yt.value,
|
|
2166
|
+
onMouseover: () => y.value = !0,
|
|
2167
|
+
onMouseleave: () => y.value = !1,
|
|
2163
2168
|
onTouchstart: (R) => {
|
|
2164
|
-
R.stopPropagation(),
|
|
2169
|
+
R.stopPropagation(), y.value = !0, Ie.onTouchstartScrollThumb(R, l);
|
|
2165
2170
|
},
|
|
2166
2171
|
onTouchend: (R) => {
|
|
2167
|
-
|
|
2172
|
+
y.value = !1;
|
|
2168
2173
|
},
|
|
2169
|
-
style:
|
|
2170
|
-
}, [l.value &&
|
|
2171
|
-
class:
|
|
2174
|
+
style: _i.value
|
|
2175
|
+
}, [l.value && Q(B), l.value && Kt(), l.value && hi.value && yi(), l.value && Ce(), l.value && be()]), l.value && qi(), M.value && v("div", {
|
|
2176
|
+
class: zi.value
|
|
2172
2177
|
}, [M.value && v("div", {
|
|
2173
|
-
class:
|
|
2174
|
-
}, [v("div", null, ["已选:" + N.value.length,
|
|
2178
|
+
class: Ui.value
|
|
2179
|
+
}, [v("div", null, ["已选:" + N.value.length, We(" 条")])])]), P(), L.value && se()]), e.enableColumnSettingSolution && v(Ha, {
|
|
2180
|
+
ref: Lt,
|
|
2175
2181
|
columns: [...u.value, ...r],
|
|
2176
2182
|
componentId: e.id,
|
|
2177
2183
|
modelValue: o.value,
|
|
2178
2184
|
"onUpdate:modelValue": (R) => o.value = R,
|
|
2179
|
-
onChangeColumnSetting:
|
|
2185
|
+
onChangeColumnSetting: Hi
|
|
2180
2186
|
}, null)]);
|
|
2181
2187
|
}
|
|
2182
2188
|
});
|
|
2183
|
-
|
|
2189
|
+
ia(un);
|
|
2184
2190
|
function ei(e) {
|
|
2185
|
-
const { designerHostService: t } = e, n = /* @__PURE__ */ new Map(), o =
|
|
2191
|
+
const { designerHostService: t } = e, n = /* @__PURE__ */ new Map(), o = h(), i = h(), a = h([
|
|
2186
2192
|
{ field: "name", title: "字段名称" },
|
|
2187
2193
|
{ field: "bindingField", title: "绑定字段" },
|
|
2188
2194
|
{ field: "displayedTypeName", title: "字段类型" }
|
|
@@ -2192,13 +2198,13 @@ function ei(e) {
|
|
|
2192
2198
|
multiSelectMode: "OnCheckAndClick",
|
|
2193
2199
|
showCheckbox: !0,
|
|
2194
2200
|
showSelectAll: !0
|
|
2195
|
-
}, c =
|
|
2201
|
+
}, c = h(!1), s = h(e.componentType);
|
|
2196
2202
|
function u(D) {
|
|
2197
2203
|
const B = [];
|
|
2198
|
-
return D.forEach((
|
|
2204
|
+
return D.forEach((y) => {
|
|
2199
2205
|
let S = [];
|
|
2200
|
-
|
|
2201
|
-
const V =
|
|
2206
|
+
y.type && y.type.fields && y.type.fields.length > 0 && (S = u(y.type.fields));
|
|
2207
|
+
const V = Ht(y), k = y.multiLanguage ? "多语言" : y.type.displayName, C = S.length ? !1 : !n.has(y.id);
|
|
2202
2208
|
C && (c.value = !0), B.push({
|
|
2203
2209
|
data: Object.assign({ displayedTypeName: k, selectable: C }, V),
|
|
2204
2210
|
children: S
|
|
@@ -2217,16 +2223,16 @@ function ei(e) {
|
|
|
2217
2223
|
}
|
|
2218
2224
|
}
|
|
2219
2225
|
function f(D) {
|
|
2220
|
-
var B,
|
|
2221
|
-
if (D && (((B = D.schema) == null ? void 0 : B.type) === ((
|
|
2226
|
+
var B, y;
|
|
2227
|
+
if (D && (((B = D.schema) == null ? void 0 : B.type) === ((y = De.drawer) == null ? void 0 : y.type) || D.parent && f(D.parent)))
|
|
2222
2228
|
return !0;
|
|
2223
2229
|
}
|
|
2224
2230
|
function b(D) {
|
|
2225
2231
|
if (n.clear(), !D)
|
|
2226
2232
|
return;
|
|
2227
2233
|
const B = f(e.targetComponentInstance);
|
|
2228
|
-
let
|
|
2229
|
-
["frame", "table", "form"].includes(
|
|
2234
|
+
let y = m(s.value);
|
|
2235
|
+
["frame", "table", "form"].includes(y) && (y = "form");
|
|
2230
2236
|
const { formSchemaUtils: S, schemaService: V } = t;
|
|
2231
2237
|
S.getFormSchema().module.viewmodels.forEach((k) => {
|
|
2232
2238
|
if (!k.fields || k.fields.length === 0)
|
|
@@ -2235,7 +2241,7 @@ function ei(e) {
|
|
|
2235
2241
|
let g = C.componentType;
|
|
2236
2242
|
["frame", "table", "form"].includes(g) && (g = "form");
|
|
2237
2243
|
const p = V.getTableInfoByViewModelId(k.id);
|
|
2238
|
-
if (g !==
|
|
2244
|
+
if (g !== y || !p || p.id !== D.id)
|
|
2239
2245
|
return;
|
|
2240
2246
|
const w = S.checkComponentExistInDrawer(C.id);
|
|
2241
2247
|
B && w && k.fields.forEach((x) => {
|
|
@@ -2269,8 +2275,8 @@ function ei(e) {
|
|
|
2269
2275
|
currentComponentType: s
|
|
2270
2276
|
};
|
|
2271
2277
|
}
|
|
2272
|
-
function
|
|
2273
|
-
const { designerHostService: t } = e, n = /* @__PURE__ */ new Map(), o =
|
|
2278
|
+
function Yr(e) {
|
|
2279
|
+
const { designerHostService: t } = e, n = /* @__PURE__ */ new Map(), o = h(), i = h(), a = h([{ field: "name", title: "实体名称" }]), r = h(), c = h(!1);
|
|
2274
2280
|
function s(d) {
|
|
2275
2281
|
const T = ei(e);
|
|
2276
2282
|
return T.resolveFieldDataSource(d), T.hasSelectableField.value ? (r.value = r.value || d, !0) : !1;
|
|
@@ -2282,10 +2288,10 @@ function Wr(e) {
|
|
|
2282
2288
|
var V;
|
|
2283
2289
|
if (!d)
|
|
2284
2290
|
return;
|
|
2285
|
-
const D =
|
|
2291
|
+
const D = Ht(d), B = T ? `${T}/${D.label}` : "/";
|
|
2286
2292
|
n.set(D.label, B.replace("//", "/"));
|
|
2287
|
-
const
|
|
2288
|
-
data: Object.assign({ selectable:
|
|
2293
|
+
const y = u(D), S = {
|
|
2294
|
+
data: Object.assign({ selectable: y }, D),
|
|
2289
2295
|
children: []
|
|
2290
2296
|
};
|
|
2291
2297
|
if (D.type.entities && D.type.entities.length) {
|
|
@@ -2325,10 +2331,10 @@ function Wr(e) {
|
|
|
2325
2331
|
isMainEntityInitialSelected: c
|
|
2326
2332
|
};
|
|
2327
2333
|
}
|
|
2328
|
-
const
|
|
2334
|
+
const Kr = /* @__PURE__ */ new Map([
|
|
2329
2335
|
["appearance", Nn]
|
|
2330
2336
|
]);
|
|
2331
|
-
function
|
|
2337
|
+
function Xr(e, t) {
|
|
2332
2338
|
const {
|
|
2333
2339
|
formSchemaUtils: n,
|
|
2334
2340
|
designViewModelUtils: o
|
|
@@ -2356,7 +2362,7 @@ function Yr(e, t) {
|
|
|
2356
2362
|
}
|
|
2357
2363
|
return { createComponent: r };
|
|
2358
2364
|
}
|
|
2359
|
-
function
|
|
2365
|
+
function Qr(e, t, n, o) {
|
|
2360
2366
|
var a, r, c, s, u, m;
|
|
2361
2367
|
const i = n.parentComponentInstance;
|
|
2362
2368
|
if (i && o) {
|
|
@@ -2368,12 +2374,12 @@ function Kr(e, t, n, o) {
|
|
|
2368
2374
|
parentComponentInstance: i,
|
|
2369
2375
|
bindTo: ((s = n.bindingSourceContext) == null ? void 0 : s.bindTo) || "",
|
|
2370
2376
|
dataSource: (m = (u = n.bindingSourceContext) == null ? void 0 : u.bindingEntity) == null ? void 0 : m.label
|
|
2371
|
-
}, { createComponent: l } =
|
|
2377
|
+
}, { createComponent: l } = Xr(e, o);
|
|
2372
2378
|
return l(b);
|
|
2373
2379
|
} else
|
|
2374
2380
|
return t;
|
|
2375
2381
|
}
|
|
2376
|
-
const
|
|
2382
|
+
const Jr = "https://json-schema.org/draft/2020-12/schema", Zr = "https://farris-design.gitee.io/step.schema.json", el = "step", tl = "A Farris Component", nl = "object", ol = {
|
|
2377
2383
|
id: {
|
|
2378
2384
|
description: "The unique identifier for step",
|
|
2379
2385
|
type: "string"
|
|
@@ -2451,17 +2457,17 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2451
2457
|
description: "步骤条模板",
|
|
2452
2458
|
type: "string"
|
|
2453
2459
|
}
|
|
2454
|
-
},
|
|
2460
|
+
}, il = [
|
|
2455
2461
|
"id",
|
|
2456
2462
|
"type"
|
|
2457
|
-
],
|
|
2458
|
-
$schema:
|
|
2459
|
-
$id:
|
|
2460
|
-
title:
|
|
2461
|
-
description:
|
|
2462
|
-
type:
|
|
2463
|
-
properties:
|
|
2464
|
-
required:
|
|
2463
|
+
], al = {
|
|
2464
|
+
$schema: Jr,
|
|
2465
|
+
$id: Zr,
|
|
2466
|
+
title: el,
|
|
2467
|
+
description: tl,
|
|
2468
|
+
type: nl,
|
|
2469
|
+
properties: ol,
|
|
2470
|
+
required: il
|
|
2465
2471
|
}, pn = {
|
|
2466
2472
|
/**
|
|
2467
2473
|
* 步骤条方向
|
|
@@ -2515,12 +2521,12 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2515
2521
|
} },
|
|
2516
2522
|
customClass: { type: String, default: "" },
|
|
2517
2523
|
stepTemplate: { type: Object }
|
|
2518
|
-
}, ti = Ot(pn,
|
|
2524
|
+
}, ti = Ot(pn, al, Kr, Qr), ft = /* @__PURE__ */ Ae({
|
|
2519
2525
|
name: "FStep",
|
|
2520
2526
|
props: pn,
|
|
2521
2527
|
emits: ["click"],
|
|
2522
2528
|
setup(e, t) {
|
|
2523
|
-
const n =
|
|
2529
|
+
const n = h(0), o = h(e.activeIndex), i = X(() => ({
|
|
2524
2530
|
"f-progress-step-list": e.direction === "horizontal",
|
|
2525
2531
|
"f-progress-step-list-block": e.direction === "vertical",
|
|
2526
2532
|
"f-progress-step-horizontal-fill": e.direction === "horizontal" && e.fill,
|
|
@@ -2529,35 +2535,35 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2529
2535
|
overflow: "auto"
|
|
2530
2536
|
// height: props.direction === 'vertical' ? `${props.height || 300}px` : ''
|
|
2531
2537
|
}));
|
|
2532
|
-
function r(
|
|
2538
|
+
function r(y, S) {
|
|
2533
2539
|
const V = {
|
|
2534
2540
|
step: !0,
|
|
2535
2541
|
active: S === o.value,
|
|
2536
|
-
clickable: !
|
|
2542
|
+
clickable: !y.disabled,
|
|
2537
2543
|
// 'click-disable': step.disable,
|
|
2538
2544
|
current: S === o.value
|
|
2539
2545
|
};
|
|
2540
2546
|
return S < o.value && (V.finish = !0), V;
|
|
2541
2547
|
}
|
|
2542
|
-
function c(
|
|
2548
|
+
function c(y, S) {
|
|
2543
2549
|
const V = {
|
|
2544
2550
|
steps: e.steps,
|
|
2545
|
-
step:
|
|
2551
|
+
step: y,
|
|
2546
2552
|
index: S,
|
|
2547
2553
|
activeIndex: o.value,
|
|
2548
2554
|
direction: e.direction
|
|
2549
2555
|
};
|
|
2550
2556
|
Promise.resolve().then(() => e.beforeClickStep ? e.beforeClickStep(V) : !0).then((k) => {
|
|
2551
|
-
if (k && !
|
|
2557
|
+
if (k && !y.disabled) {
|
|
2552
2558
|
const C = {
|
|
2553
|
-
step:
|
|
2559
|
+
step: y,
|
|
2554
2560
|
stepIndex: S
|
|
2555
2561
|
};
|
|
2556
2562
|
o.value = S, t.emit("click", C);
|
|
2557
2563
|
}
|
|
2558
2564
|
});
|
|
2559
2565
|
}
|
|
2560
|
-
function s(
|
|
2566
|
+
function s(y, S) {
|
|
2561
2567
|
const V = {
|
|
2562
2568
|
"f-progressstep-row": !0,
|
|
2563
2569
|
"step-active": S === o.value,
|
|
@@ -2565,7 +2571,7 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2565
2571
|
};
|
|
2566
2572
|
return S < o.value && (V["step-finish"] = !0), V;
|
|
2567
2573
|
}
|
|
2568
|
-
function u(
|
|
2574
|
+
function u(y, S) {
|
|
2569
2575
|
return {
|
|
2570
2576
|
"step-icon": !0,
|
|
2571
2577
|
"step-success": S,
|
|
@@ -2573,67 +2579,67 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2573
2579
|
"f-icon-check": S
|
|
2574
2580
|
};
|
|
2575
2581
|
}
|
|
2576
|
-
function m(
|
|
2582
|
+
function m(y, S) {
|
|
2577
2583
|
const V = [];
|
|
2578
2584
|
return S >= o.value || S === n.value ? V.push(v("span", {
|
|
2579
2585
|
class: "step-icon"
|
|
2580
2586
|
}, [S + 1])) : V.push(v("span", {
|
|
2581
|
-
class: u(
|
|
2587
|
+
class: u(y, !0)
|
|
2582
2588
|
}, null)), V;
|
|
2583
2589
|
}
|
|
2584
|
-
function f(
|
|
2590
|
+
function f(y, S) {
|
|
2585
2591
|
return {
|
|
2586
2592
|
"step-name": !0,
|
|
2587
2593
|
"step-name-success": S < o.value
|
|
2588
2594
|
};
|
|
2589
2595
|
}
|
|
2590
|
-
function b(
|
|
2596
|
+
function b(y, S) {
|
|
2591
2597
|
return v("div", {
|
|
2592
2598
|
class: "f-progress-step-title"
|
|
2593
2599
|
}, [v("p", {
|
|
2594
|
-
class: f(
|
|
2595
|
-
}, [
|
|
2600
|
+
class: f(y, S)
|
|
2601
|
+
}, [y.title])]);
|
|
2596
2602
|
}
|
|
2597
|
-
function l(
|
|
2603
|
+
function l(y, S) {
|
|
2598
2604
|
return {
|
|
2599
2605
|
"f-progress-step-line": !0,
|
|
2600
2606
|
"f-progress-step-line-success": S === o.value
|
|
2601
2607
|
};
|
|
2602
2608
|
}
|
|
2603
|
-
function d(
|
|
2609
|
+
function d(y, S) {
|
|
2604
2610
|
return S !== e.steps.length - 1;
|
|
2605
2611
|
}
|
|
2606
2612
|
const T = X(() => ({
|
|
2607
2613
|
triangle: !0
|
|
2608
2614
|
}));
|
|
2609
2615
|
function D() {
|
|
2610
|
-
return e.steps.map((
|
|
2611
|
-
class: r(
|
|
2612
|
-
onClick: (V) => c(
|
|
2616
|
+
return e.steps.map((y, S) => v("li", {
|
|
2617
|
+
class: r(y, S),
|
|
2618
|
+
onClick: (V) => c(y, S)
|
|
2613
2619
|
}, [e.stepTemplate ? e.stepTemplate({
|
|
2614
|
-
step:
|
|
2620
|
+
step: y,
|
|
2615
2621
|
index: S,
|
|
2616
2622
|
length: e.steps.length,
|
|
2617
2623
|
activeIndex: o.value,
|
|
2618
2624
|
direction: e.direction
|
|
2619
2625
|
}) : t.slots.stepTemplate ? t.slots.stepTemplate({
|
|
2620
|
-
step:
|
|
2626
|
+
step: y,
|
|
2621
2627
|
index: S,
|
|
2622
2628
|
length: e.steps.length,
|
|
2623
2629
|
activeIndex: o.value,
|
|
2624
2630
|
direction: e.direction
|
|
2625
2631
|
}) : v("div", {
|
|
2626
|
-
class: s(
|
|
2632
|
+
class: s(y, S)
|
|
2627
2633
|
}, [v("div", {
|
|
2628
2634
|
class: "f-progress-step-content"
|
|
2629
|
-
}, [m(
|
|
2630
|
-
class: l(
|
|
2635
|
+
}, [m(y, S), b(y, S)]), d(y, S) && v("div", {
|
|
2636
|
+
class: l(y, S)
|
|
2631
2637
|
}, [v("span", {
|
|
2632
2638
|
class: T.value
|
|
2633
2639
|
}, null)])])]));
|
|
2634
2640
|
}
|
|
2635
|
-
Me(() => e.activeIndex, (
|
|
2636
|
-
e.activeIndex > -1 && e.activeIndex <= e.steps.length && (o.value =
|
|
2641
|
+
Me(() => e.activeIndex, (y) => {
|
|
2642
|
+
e.activeIndex > -1 && e.activeIndex <= e.steps.length && (o.value = y);
|
|
2637
2643
|
});
|
|
2638
2644
|
const B = X(() => dt({
|
|
2639
2645
|
"f-progress-step": !0
|
|
@@ -2711,7 +2717,7 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-
|
|
|
2711
2717
|
step: { type: "step", name: "步骤条", icon: "step" },
|
|
2712
2718
|
"dynamic-form": { type: "dynamic-form", name: "动态表单" }
|
|
2713
2719
|
};
|
|
2714
|
-
function
|
|
2720
|
+
function rl(e) {
|
|
2715
2721
|
const { formSchemaUtils: t, formStateMachineUtils: n } = e;
|
|
2716
2722
|
function o(s, u = "") {
|
|
2717
2723
|
return {
|
|
@@ -2739,7 +2745,7 @@ function il(e) {
|
|
|
2739
2745
|
}
|
|
2740
2746
|
return { getVariables: a, getControlName: r, getStateMachines: c };
|
|
2741
2747
|
}
|
|
2742
|
-
class
|
|
2748
|
+
class ll {
|
|
2743
2749
|
constructor(t) {
|
|
2744
2750
|
we(this, "sessionVariables", [
|
|
2745
2751
|
{
|
|
@@ -3007,7 +3013,7 @@ class al {
|
|
|
3007
3013
|
};
|
|
3008
3014
|
}
|
|
3009
3015
|
}
|
|
3010
|
-
class
|
|
3016
|
+
class sl {
|
|
3011
3017
|
constructor(t, n) {
|
|
3012
3018
|
we(this, "componentId");
|
|
3013
3019
|
we(this, "viewModelId");
|
|
@@ -3030,7 +3036,7 @@ class rl {
|
|
|
3030
3036
|
});
|
|
3031
3037
|
we(this, "expressionProperty");
|
|
3032
3038
|
var o;
|
|
3033
|
-
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, this.modalService = n.modalService, this.expressionProperty = new
|
|
3039
|
+
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, this.modalService = n.modalService, this.expressionProperty = new ll(this.formSchemaUtils);
|
|
3034
3040
|
}
|
|
3035
3041
|
/**
|
|
3036
3042
|
* 是否在响应式表单中
|
|
@@ -3115,7 +3121,7 @@ class rl {
|
|
|
3115
3121
|
switch (r && r.propertyID) {
|
|
3116
3122
|
case "class":
|
|
3117
3123
|
case "style": {
|
|
3118
|
-
|
|
3124
|
+
Ja.value++;
|
|
3119
3125
|
break;
|
|
3120
3126
|
}
|
|
3121
3127
|
}
|
|
@@ -3135,7 +3141,7 @@ class rl {
|
|
|
3135
3141
|
* @returns
|
|
3136
3142
|
*/
|
|
3137
3143
|
getPropertyEditorParams(t, n = [], o = "visible", i = {}, a = {}, r = "") {
|
|
3138
|
-
const { getVariables: c, getControlName: s, getStateMachines: u } =
|
|
3144
|
+
const { getVariables: c, getControlName: s, getStateMachines: u } = rl(this.designerHostService), m = this.getRealTargetType(t), f = n && n.length > 0 ? n : ["Const", "Variable", "StateMachine", "Expression"], b = {
|
|
3139
3145
|
type: "property-editor",
|
|
3140
3146
|
propertyTypes: f
|
|
3141
3147
|
};
|
|
@@ -3229,8 +3235,8 @@ class rl {
|
|
|
3229
3235
|
const o = n && n.parent && n.parent.schema;
|
|
3230
3236
|
if (!o)
|
|
3231
3237
|
return;
|
|
3232
|
-
const i = o.contents.findIndex((r) => r.id === t), a =
|
|
3233
|
-
o.contents.splice(i, 1), o.contents.splice(i, 0, a),
|
|
3238
|
+
const i = o.contents.findIndex((r) => r.id === t), a = Ht(o.contents[i]);
|
|
3239
|
+
o.contents.splice(i, 1), o.contents.splice(i, 0, a), Za();
|
|
3234
3240
|
}
|
|
3235
3241
|
/**
|
|
3236
3242
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -3309,7 +3315,7 @@ class rl {
|
|
|
3309
3315
|
}, n;
|
|
3310
3316
|
}
|
|
3311
3317
|
}
|
|
3312
|
-
class
|
|
3318
|
+
class cl extends sl {
|
|
3313
3319
|
constructor(t, n) {
|
|
3314
3320
|
super(t, n);
|
|
3315
3321
|
}
|
|
@@ -3462,7 +3468,7 @@ class ll extends rl {
|
|
|
3462
3468
|
properties: a,
|
|
3463
3469
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3464
3470
|
refreshPanelAfterChanged: !0,
|
|
3465
|
-
tabId:
|
|
3471
|
+
tabId: aa,
|
|
3466
3472
|
tabName: "交互",
|
|
3467
3473
|
setPropertyRelates(c, s) {
|
|
3468
3474
|
const u = c.propertyValue;
|
|
@@ -3471,7 +3477,7 @@ class ll extends rl {
|
|
|
3471
3477
|
};
|
|
3472
3478
|
}
|
|
3473
3479
|
}
|
|
3474
|
-
function
|
|
3480
|
+
function ul(e, t) {
|
|
3475
3481
|
const n = e.schema;
|
|
3476
3482
|
function o() {
|
|
3477
3483
|
return "";
|
|
@@ -3489,7 +3495,7 @@ function sl(e, t) {
|
|
|
3489
3495
|
return !0;
|
|
3490
3496
|
}
|
|
3491
3497
|
function s(m) {
|
|
3492
|
-
return new
|
|
3498
|
+
return new cl(m, t).getPropertyConfig(n);
|
|
3493
3499
|
}
|
|
3494
3500
|
function u() {
|
|
3495
3501
|
var m, f, b, l;
|
|
@@ -3501,10 +3507,10 @@ function sl(e, t) {
|
|
|
3501
3507
|
const S = B.getRootViewModelId(), V = B.getComponentByViewModelId(S), k = B.selectNode(V, (C) => C.contents && C.contents.find((g) => g.component === d));
|
|
3502
3508
|
(k == null ? void 0 : k.type) === ((f = De["tab-page"]) == null ? void 0 : f.type) && ((b = k == null ? void 0 : k.contents) != null && b.length) && (T = k.title || ""), (k == null ? void 0 : k.type) === ((l = De.section) == null ? void 0 : l.type) && (k == null ? void 0 : k.showHeader) !== !1 && (T = k.mainTitle || ""), T = T ? `${T} > ` : "", D = T ? k.id : "";
|
|
3503
3509
|
}
|
|
3504
|
-
const
|
|
3510
|
+
const y = De["list-view"].name;
|
|
3505
3511
|
t == null || t.formSchemaUtils.getControlBasicInfoMap().set(e.schema.id, {
|
|
3506
|
-
componentTitle:
|
|
3507
|
-
parentPathName: `${T}${
|
|
3512
|
+
componentTitle: y,
|
|
3513
|
+
parentPathName: `${T}${y}`,
|
|
3508
3514
|
reliedComponentId: D
|
|
3509
3515
|
});
|
|
3510
3516
|
}
|
|
@@ -3521,12 +3527,12 @@ function sl(e, t) {
|
|
|
3521
3527
|
getDesignerClass: o
|
|
3522
3528
|
};
|
|
3523
3529
|
}
|
|
3524
|
-
const
|
|
3530
|
+
const dl = /* @__PURE__ */ Ae({
|
|
3525
3531
|
name: "FStepDesign",
|
|
3526
3532
|
props: pn,
|
|
3527
3533
|
emits: [],
|
|
3528
3534
|
setup(e, t) {
|
|
3529
|
-
const n =
|
|
3535
|
+
const n = h(0), o = h(0), i = h(), a = xe("designer-host-service"), r = xe("design-item-context"), c = ul(r, a), s = er(i, r, c), u = [{
|
|
3530
3536
|
id: "firstStep",
|
|
3531
3537
|
title: "步骤一",
|
|
3532
3538
|
description: "步骤一"
|
|
@@ -3591,7 +3597,7 @@ const cl = /* @__PURE__ */ Ae({
|
|
|
3591
3597
|
"step-name-success": p < n.value
|
|
3592
3598
|
};
|
|
3593
3599
|
}
|
|
3594
|
-
function
|
|
3600
|
+
function y(g, p) {
|
|
3595
3601
|
return v("div", {
|
|
3596
3602
|
class: "f-progress-step-title"
|
|
3597
3603
|
}, [v("p", {
|
|
@@ -3619,7 +3625,7 @@ const cl = /* @__PURE__ */ Ae({
|
|
|
3619
3625
|
class: d(g, p)
|
|
3620
3626
|
}, [v("div", {
|
|
3621
3627
|
class: "f-progress-step-content"
|
|
3622
|
-
}, [D(g, p),
|
|
3628
|
+
}, [D(g, p), y(g, p)]), V(g, p) && v("div", {
|
|
3623
3629
|
class: S(g, p)
|
|
3624
3630
|
}, [v("span", {
|
|
3625
3631
|
class: k.value
|
|
@@ -3630,7 +3636,7 @@ const cl = /* @__PURE__ */ Ae({
|
|
|
3630
3636
|
class: d(g, p)
|
|
3631
3637
|
}, [v("div", {
|
|
3632
3638
|
class: "f-progress-step-content"
|
|
3633
|
-
}, [D(g, p),
|
|
3639
|
+
}, [D(g, p), y(g, p)]), V(g, p) && p !== u.length - 1 && v("div", {
|
|
3634
3640
|
class: S(g, p)
|
|
3635
3641
|
}, [v("span", {
|
|
3636
3642
|
class: k.value
|
|
@@ -3645,7 +3651,7 @@ const cl = /* @__PURE__ */ Ae({
|
|
|
3645
3651
|
}, [C()])]);
|
|
3646
3652
|
}
|
|
3647
3653
|
});
|
|
3648
|
-
function
|
|
3654
|
+
function fl() {
|
|
3649
3655
|
function e(t, n) {
|
|
3650
3656
|
const o = {};
|
|
3651
3657
|
return o.beforeClickStep = (i) => n.call("beforeClickStep", t, [i, t]), o;
|
|
@@ -3654,18 +3660,18 @@ function ul() {
|
|
|
3654
3660
|
resolve: e
|
|
3655
3661
|
};
|
|
3656
3662
|
}
|
|
3657
|
-
const
|
|
3663
|
+
const ml = fl();
|
|
3658
3664
|
ft.install = (e) => {
|
|
3659
3665
|
e.component(ft.name, ft);
|
|
3660
3666
|
};
|
|
3661
3667
|
ft.register = (e, t, n, o) => {
|
|
3662
|
-
e.step = ft, t.step = ti, o.step = { callbackResolver:
|
|
3668
|
+
e.step = ft, t.step = ti, o.step = { callbackResolver: ml };
|
|
3663
3669
|
};
|
|
3664
3670
|
ft.registerDesigner = (e, t, n) => {
|
|
3665
|
-
e.step =
|
|
3671
|
+
e.step = dl, t.step = ti;
|
|
3666
3672
|
};
|
|
3667
|
-
const
|
|
3668
|
-
class
|
|
3673
|
+
const pl = "root-viewmodel";
|
|
3674
|
+
class vl {
|
|
3669
3675
|
constructor(t, n) {
|
|
3670
3676
|
we(this, "formSchemaUtils");
|
|
3671
3677
|
we(this, "controlCreatorUtils");
|
|
@@ -3731,7 +3737,7 @@ class ml {
|
|
|
3731
3737
|
const { selectedFields: a } = t;
|
|
3732
3738
|
a == null || a.forEach((u) => {
|
|
3733
3739
|
if (u.$type === Sn.SimpleField) {
|
|
3734
|
-
const m =
|
|
3740
|
+
const m = Ht(u), f = this.resolveControlClassByFormColumns(t), b = this.controlCreatorUtils.setFormFieldProperty(m, "", f);
|
|
3735
3741
|
b && i.push(b);
|
|
3736
3742
|
}
|
|
3737
3743
|
});
|
|
@@ -3773,7 +3779,7 @@ class ml {
|
|
|
3773
3779
|
code: `${t.componentId}-component-viewmodel`,
|
|
3774
3780
|
name: t.componentName,
|
|
3775
3781
|
bindTo: t.bindTo,
|
|
3776
|
-
parent:
|
|
3782
|
+
parent: pl,
|
|
3777
3783
|
fields: this.assembleViewModelFields(t),
|
|
3778
3784
|
commands: [],
|
|
3779
3785
|
states: [],
|
|
@@ -3816,11 +3822,11 @@ function ni(e, t, n, o) {
|
|
|
3816
3822
|
bindTo: ((u = n.bindingSourceContext) == null ? void 0 : u.bindTo) || "/",
|
|
3817
3823
|
selectedFields: (m = n.bindingSourceContext) == null ? void 0 : m.bindingEntityFields
|
|
3818
3824
|
};
|
|
3819
|
-
return new
|
|
3825
|
+
return new vl(e, o).createComponent(l);
|
|
3820
3826
|
} else
|
|
3821
3827
|
return t;
|
|
3822
3828
|
}
|
|
3823
|
-
const
|
|
3829
|
+
const gl = "https://json-schema.org/draft/2020-12/schema", hl = "https://farris-design.gitee.io/response-form.schema.json", yl = "response-form", Cl = "A Farris Data Collection Component", bl = "object", wl = {
|
|
3824
3830
|
id: {
|
|
3825
3831
|
description: "The unique identifier for a form group",
|
|
3826
3832
|
type: "string"
|
|
@@ -3876,21 +3882,21 @@ const pl = "https://json-schema.org/draft/2020-12/schema", vl = "https://farris-
|
|
|
3876
3882
|
description: "",
|
|
3877
3883
|
type: "object"
|
|
3878
3884
|
}
|
|
3879
|
-
},
|
|
3885
|
+
}, Sl = [
|
|
3880
3886
|
"id",
|
|
3881
3887
|
"type",
|
|
3882
3888
|
"contents"
|
|
3883
|
-
],
|
|
3884
|
-
$schema:
|
|
3885
|
-
$id:
|
|
3886
|
-
title:
|
|
3887
|
-
description:
|
|
3888
|
-
type:
|
|
3889
|
-
properties:
|
|
3890
|
-
required:
|
|
3889
|
+
], Tl = {
|
|
3890
|
+
$schema: gl,
|
|
3891
|
+
$id: hl,
|
|
3892
|
+
title: yl,
|
|
3893
|
+
description: Cl,
|
|
3894
|
+
type: bl,
|
|
3895
|
+
properties: wl,
|
|
3896
|
+
required: Sl
|
|
3891
3897
|
}, oi = /* @__PURE__ */ new Map([
|
|
3892
3898
|
["appearance", Nn]
|
|
3893
|
-
]),
|
|
3899
|
+
]), Fl = "https://json-schema.org/draft/2020-12/schema", El = "https://farris-design.gitee.io/dynamic-form.schema.json", xl = "dynamic-form", Ml = "A Farris Data Collection Component", Bl = "object", Dl = {
|
|
3894
3900
|
id: {
|
|
3895
3901
|
description: "The unique identifier for a form group",
|
|
3896
3902
|
type: "string"
|
|
@@ -3999,27 +4005,27 @@ const pl = "https://json-schema.org/draft/2020-12/schema", vl = "https://farris-
|
|
|
3999
4005
|
description: "",
|
|
4000
4006
|
type: "string"
|
|
4001
4007
|
}
|
|
4002
|
-
},
|
|
4008
|
+
}, Il = [
|
|
4003
4009
|
"id",
|
|
4004
4010
|
"type",
|
|
4005
4011
|
"contents"
|
|
4006
|
-
],
|
|
4012
|
+
], kl = {
|
|
4007
4013
|
onClick: "点击事件",
|
|
4008
4014
|
onChange: "ֵ值变化事件",
|
|
4009
4015
|
event: "内部控件事件",
|
|
4010
4016
|
callback: "内部控件属性回调事件"
|
|
4011
|
-
},
|
|
4012
|
-
$schema:
|
|
4013
|
-
$id:
|
|
4014
|
-
title:
|
|
4015
|
-
description:
|
|
4016
|
-
type:
|
|
4017
|
-
properties:
|
|
4018
|
-
required:
|
|
4019
|
-
events:
|
|
4017
|
+
}, Pl = {
|
|
4018
|
+
$schema: Fl,
|
|
4019
|
+
$id: El,
|
|
4020
|
+
title: xl,
|
|
4021
|
+
description: Ml,
|
|
4022
|
+
type: Bl,
|
|
4023
|
+
properties: Dl,
|
|
4024
|
+
required: Il,
|
|
4025
|
+
events: kl
|
|
4020
4026
|
};
|
|
4021
|
-
var Dt = /* @__PURE__ */ ((e) => (e.Header = "header", e.Footer = "footer", e))(Dt || {}),
|
|
4022
|
-
const
|
|
4027
|
+
var Dt = /* @__PURE__ */ ((e) => (e.Header = "header", e.Footer = "footer", e))(Dt || {}), zt = /* @__PURE__ */ ((e) => (e.QUICK = "quick", e.FULL = "full", e))(zt || {});
|
|
4028
|
+
const qt = {
|
|
4023
4029
|
customClass: { type: String, default: "" },
|
|
4024
4030
|
customStyle: { type: String, defaut: "" },
|
|
4025
4031
|
/** 控制是否可见 */
|
|
@@ -4032,7 +4038,7 @@ const Ht = {
|
|
|
4032
4038
|
formData: { type: Object, default: null },
|
|
4033
4039
|
/** 为动态字段指定样式*/
|
|
4034
4040
|
layout: { type: String, default: "col-12 col-md-6 col-xl-3 col-el-2" }
|
|
4035
|
-
},
|
|
4041
|
+
}, Ol = Object.assign({}, qt, {
|
|
4036
4042
|
// 是否渲染form层级
|
|
4037
4043
|
canRenderForm: { type: Boolean, default: !0 },
|
|
4038
4044
|
/**
|
|
@@ -4061,7 +4067,7 @@ const Ht = {
|
|
|
4061
4067
|
collapseLabel: { type: String, default: "收起" },
|
|
4062
4068
|
enableAccordion: { type: Boolean, default: !0 },
|
|
4063
4069
|
/** 模式 **/
|
|
4064
|
-
mode: { type: String, default:
|
|
4070
|
+
mode: { type: String, default: zt.QUICK },
|
|
4065
4071
|
/** 工具栏 */
|
|
4066
4072
|
toolbar: { type: [Array, Function], default: [] },
|
|
4067
4073
|
/** 设置头部的样式 */
|
|
@@ -4071,9 +4077,9 @@ const Ht = {
|
|
|
4071
4077
|
/** 更多按钮样式 */
|
|
4072
4078
|
moreButtonClass: { type: String, default: "btn-link" }
|
|
4073
4079
|
});
|
|
4074
|
-
Ot(
|
|
4075
|
-
Ot(
|
|
4076
|
-
function
|
|
4080
|
+
Ot(qt, Tl, oi, ni);
|
|
4081
|
+
Ot(qt, Pl, oi, ni);
|
|
4082
|
+
function Vl(e, t) {
|
|
4077
4083
|
function n(r) {
|
|
4078
4084
|
return e.value && e.value[r];
|
|
4079
4085
|
}
|
|
@@ -4093,23 +4099,23 @@ function Pl(e, t) {
|
|
|
4093
4099
|
onValueChange: i
|
|
4094
4100
|
};
|
|
4095
4101
|
}
|
|
4096
|
-
const
|
|
4102
|
+
const _t = /* @__PURE__ */ Ae({
|
|
4097
4103
|
name: "FDynamicForm",
|
|
4098
|
-
props:
|
|
4104
|
+
props: Ol,
|
|
4099
4105
|
emits: ["update:modelValue", "change", "event", "click"],
|
|
4100
4106
|
setup(e, t) {
|
|
4101
|
-
const n =
|
|
4102
|
-
|
|
4103
|
-
const a =
|
|
4104
|
-
|
|
4105
|
-
const u = /* @__PURE__ */ new Map(), m =
|
|
4107
|
+
const n = h(e.fields), o = /* @__PURE__ */ new Map(), i = h(e.callback);
|
|
4108
|
+
tr();
|
|
4109
|
+
const a = nr(), r = h(e.formData || {}), c = Vl(r, t);
|
|
4110
|
+
or(n.value).setup();
|
|
4111
|
+
const u = /* @__PURE__ */ new Map(), m = h(e.canRenderForm);
|
|
4106
4112
|
let f = [], b = [], l = [];
|
|
4107
|
-
const d = e.mode ===
|
|
4113
|
+
const d = e.mode === zt.FULL ? "contents" : "fields", {
|
|
4108
4114
|
mergeArray: T,
|
|
4109
4115
|
resolveCallbacks: D,
|
|
4110
4116
|
resolveEvents: B
|
|
4111
|
-
} =
|
|
4112
|
-
const F =
|
|
4117
|
+
} = ir(), y = X(() => {
|
|
4118
|
+
const F = ze.getLocale(), re = e.fields && e.fields.length > 0;
|
|
4113
4119
|
let le = {
|
|
4114
4120
|
"f-form-layout": re,
|
|
4115
4121
|
"farris-form": re,
|
|
@@ -4122,12 +4128,12 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4122
4128
|
const {
|
|
4123
4129
|
id: ce
|
|
4124
4130
|
} = re || {}, {
|
|
4125
|
-
field:
|
|
4131
|
+
field: ye
|
|
4126
4132
|
} = re.binding || {};
|
|
4127
4133
|
return {
|
|
4128
4134
|
modelValue: le.getValue(ce),
|
|
4129
4135
|
"onUpdate:modelValue": (ke) => {
|
|
4130
|
-
le.setValue(ce,
|
|
4136
|
+
le.setValue(ce, ye || ce, ke);
|
|
4131
4137
|
}
|
|
4132
4138
|
};
|
|
4133
4139
|
}
|
|
@@ -4142,7 +4148,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4142
4148
|
function k(F) {
|
|
4143
4149
|
const re = {};
|
|
4144
4150
|
return F && Object.entries(F).forEach(([le, ce]) => {
|
|
4145
|
-
re[le] = () => Array.isArray(ce) ? ce.map((
|
|
4151
|
+
re[le] = () => Array.isArray(ce) ? ce.map((ye) => x(ye)) : x(ce);
|
|
4146
4152
|
}), re;
|
|
4147
4153
|
}
|
|
4148
4154
|
function C(F) {
|
|
@@ -4150,18 +4156,18 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4150
4156
|
}
|
|
4151
4157
|
function g(F) {
|
|
4152
4158
|
const re = C(F), le = F.customClass || "";
|
|
4153
|
-
return le || (re === "fieldset" ? "col-12 px-0" : f.length === 0 && b.length === 0 || F.id && l.find((ce) => ce[d] ? ce[d].find((
|
|
4159
|
+
return le || (re === "fieldset" ? "col-12 px-0" : f.length === 0 && b.length === 0 || F.id && l.find((ce) => ce[d] ? ce[d].find((ye) => ye.id === F.id) : ce.id === F.id) ? e.layout : "unset-item");
|
|
4154
4160
|
}
|
|
4155
4161
|
function p(F) {
|
|
4156
4162
|
const re = C(F);
|
|
4157
|
-
let le = {}, ce = "",
|
|
4158
|
-
if (e.mode ===
|
|
4159
|
-
|
|
4163
|
+
let le = {}, ce = "", ye = {}, ke = {};
|
|
4164
|
+
if (e.mode === zt.FULL) {
|
|
4165
|
+
ye = {
|
|
4160
4166
|
...B(F, t, re)
|
|
4161
4167
|
}, ke = {
|
|
4162
4168
|
...D(F, i, re)
|
|
4163
4169
|
};
|
|
4164
|
-
const Te =
|
|
4170
|
+
const Te = rr[re];
|
|
4165
4171
|
le = Te ? Te(F) : {}, ce = g(le);
|
|
4166
4172
|
} else {
|
|
4167
4173
|
ce = g(F);
|
|
@@ -4187,7 +4193,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4187
4193
|
token: F.id,
|
|
4188
4194
|
name: "component:ready",
|
|
4189
4195
|
type: C(F),
|
|
4190
|
-
payloads: [
|
|
4196
|
+
payloads: [h(Te)],
|
|
4191
4197
|
schema: F
|
|
4192
4198
|
};
|
|
4193
4199
|
t.emit("event", Oe);
|
|
@@ -4207,7 +4213,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4207
4213
|
}
|
|
4208
4214
|
}
|
|
4209
4215
|
},
|
|
4210
|
-
eventProps:
|
|
4216
|
+
eventProps: ye,
|
|
4211
4217
|
callbackProps: ke
|
|
4212
4218
|
};
|
|
4213
4219
|
}
|
|
@@ -4219,7 +4225,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4219
4225
|
const le = C(F), ce = nn[le];
|
|
4220
4226
|
if (F.id && o.set(F.id, F), !ce)
|
|
4221
4227
|
return null;
|
|
4222
|
-
const
|
|
4228
|
+
const ye = () => F[d] ? F[d].map((Te) => x(Te)) : null, ke = (Te, Oe, Ve) => {
|
|
4223
4229
|
let Pe;
|
|
4224
4230
|
return Ve && Ve.length > 0 ? Pe = v(Te, {
|
|
4225
4231
|
...Oe
|
|
@@ -4227,7 +4233,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4227
4233
|
...Oe
|
|
4228
4234
|
}, null), Pe;
|
|
4229
4235
|
}, je = ((Le = u.get(F.id)) == null ? void 0 : Le.props) || {};
|
|
4230
|
-
return F[d] && F[d].length > 0 ? ke(ce, je, [
|
|
4236
|
+
return F[d] && F[d].length > 0 ? ke(ce, je, [ye()]) : F.slots ? ke(ce, je, [...Object.values(k(F.slots))]) : ke(ce, je);
|
|
4231
4237
|
}
|
|
4232
4238
|
function I(F) {
|
|
4233
4239
|
const re = C(F);
|
|
@@ -4235,12 +4241,12 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4235
4241
|
return;
|
|
4236
4242
|
const {
|
|
4237
4243
|
props: ce,
|
|
4238
|
-
eventProps:
|
|
4244
|
+
eventProps: ye,
|
|
4239
4245
|
callbackProps: ke
|
|
4240
|
-
} = p(F), je =
|
|
4246
|
+
} = p(F), je = ar[re], Le = je ? je.editorResolver : null, {
|
|
4241
4247
|
componentEventProps: Te,
|
|
4242
4248
|
editorEventProps: Oe
|
|
4243
|
-
} =
|
|
4249
|
+
} = ye, {
|
|
4244
4250
|
componentCallbackProps: Ve,
|
|
4245
4251
|
editorCallbackProps: Pe
|
|
4246
4252
|
} = ke;
|
|
@@ -4276,8 +4282,8 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4276
4282
|
const ce = {
|
|
4277
4283
|
...le == null ? void 0 : le.props
|
|
4278
4284
|
};
|
|
4279
|
-
Object.keys(re).forEach((
|
|
4280
|
-
ce[
|
|
4285
|
+
Object.keys(re).forEach((ye) => {
|
|
4286
|
+
ce[ye] = re[ye];
|
|
4281
4287
|
}), Object.assign(le == null ? void 0 : le.props, ce);
|
|
4282
4288
|
}
|
|
4283
4289
|
}
|
|
@@ -4319,7 +4325,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4319
4325
|
}
|
|
4320
4326
|
function E(F, re) {
|
|
4321
4327
|
const le = u.get(F);
|
|
4322
|
-
|
|
4328
|
+
oa(le == null ? void 0 : le.props, re, T);
|
|
4323
4329
|
}
|
|
4324
4330
|
t.expose({
|
|
4325
4331
|
componentManager: a,
|
|
@@ -4335,7 +4341,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4335
4341
|
}
|
|
4336
4342
|
function ae(F) {
|
|
4337
4343
|
return an(v("div", {
|
|
4338
|
-
class:
|
|
4344
|
+
class: y.value,
|
|
4339
4345
|
style: e.customStyle
|
|
4340
4346
|
}, [t.slots.default && t.slots.default(), F.length > 0 && w(F, x)]), [[rn("area-response")]]);
|
|
4341
4347
|
}
|
|
@@ -4343,24 +4349,24 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4343
4349
|
const F = {};
|
|
4344
4350
|
let re = "f-dynamic-form-section--header-content", le = "f-dynamic-form-section--footer";
|
|
4345
4351
|
return e.showHeader && (t.slots.headerTitle && (F.headerTitle = () => {
|
|
4346
|
-
var ce,
|
|
4347
|
-
return (
|
|
4352
|
+
var ce, ye;
|
|
4353
|
+
return (ye = (ce = t.slots).headerTitle) == null ? void 0 : ye.call(ce);
|
|
4348
4354
|
}), re += e.headerContentRenderFunction || t.slots.headerContent ? " f-dynamic-form-section--header-cotnent-tmpl" : "", t.slots.headerContent ? F.headerContent = () => {
|
|
4349
|
-
var ce,
|
|
4350
|
-
return (
|
|
4355
|
+
var ce, ye;
|
|
4356
|
+
return (ye = (ce = t.slots).headerContent) == null ? void 0 : ye.call(ce);
|
|
4351
4357
|
} : !e.headerContentRenderFunction && f.length > 0 && (F.headerContent = () => an(v("div", {
|
|
4352
4358
|
class: "f-form-layout farris-form farris-form-controls-inline f-dynamic-form-section--fields"
|
|
4353
4359
|
}, [A(f)]), [[rn("area-response")]]))), e.showFooter && (le += e.footerRenderFunction || t.slots.footer ? " f-dynamic-form-section--footer-tmpl" : 0, t.slots.footer ? F.footer = () => {
|
|
4354
|
-
var ce,
|
|
4355
|
-
return (
|
|
4360
|
+
var ce, ye;
|
|
4361
|
+
return (ye = (ce = t.slots).footer) == null ? void 0 : ye.call(ce);
|
|
4356
4362
|
} : !e.footerRenderFunction && b.length > 0 && (le += b.length > 0 ? " f-form-layout farris-form farris-form-controls-inline f-dynamic-form-section--fields" : "", F.footer = () => A(b))), {
|
|
4357
4363
|
slots: F,
|
|
4358
4364
|
footerClass: le,
|
|
4359
4365
|
headerContentClass: re
|
|
4360
4366
|
};
|
|
4361
4367
|
}
|
|
4362
|
-
const J = X(() => typeof e.toolbar == "function" ? e.toolbar() : e.toolbar),
|
|
4363
|
-
function
|
|
4368
|
+
const J = X(() => typeof e.toolbar == "function" ? e.toolbar() : e.toolbar), ge = X(() => e.headerStyle ? typeof e.headerStyle == "function" ? e.headerStyle() : e.headerStyle : ""), Se = X(() => e.footerStyle ? typeof e.footerStyle == "function" ? e.footerStyle() : e.footerStyle : "");
|
|
4369
|
+
function fe(F, re) {
|
|
4364
4370
|
t.emit("click", F, re);
|
|
4365
4371
|
}
|
|
4366
4372
|
function Z() {
|
|
@@ -4369,7 +4375,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4369
4375
|
footerClass: re,
|
|
4370
4376
|
headerContentClass: le
|
|
4371
4377
|
} = ie();
|
|
4372
|
-
return v(
|
|
4378
|
+
return v(lr, {
|
|
4373
4379
|
customClass: "f-dynamic-form-section",
|
|
4374
4380
|
showHeader: e.showHeader,
|
|
4375
4381
|
mainTitle: e.mainTitle,
|
|
@@ -4377,13 +4383,13 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4377
4383
|
headerContentClass: le,
|
|
4378
4384
|
footerClass: re,
|
|
4379
4385
|
buttons: J.value,
|
|
4380
|
-
headerStyle:
|
|
4386
|
+
headerStyle: ge.value,
|
|
4381
4387
|
footerStyle: Se.value,
|
|
4382
4388
|
headerTitleRenderFunction: e.showHeader && e.headerTitleRenderFunction ? () => e.headerTitleRenderFunction() : null,
|
|
4383
4389
|
headerContentRenderFunction: e.showHeader && e.headerContentRenderFunction ? () => e.headerContentRenderFunction() : null,
|
|
4384
4390
|
footerRenderFunction: e.showFooter && e.footerRenderFunction ? () => e.footerRenderFunction() : null,
|
|
4385
4391
|
buttonsClass: "col-auto",
|
|
4386
|
-
onClick:
|
|
4392
|
+
onClick: fe,
|
|
4387
4393
|
moreButtonClass: e.moreButtonClass
|
|
4388
4394
|
}, {
|
|
4389
4395
|
default: () => ae(l),
|
|
@@ -4394,12 +4400,12 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4394
4400
|
}
|
|
4395
4401
|
}), Mn = /* @__PURE__ */ Ae({
|
|
4396
4402
|
name: "FResponseForm",
|
|
4397
|
-
props:
|
|
4403
|
+
props: qt,
|
|
4398
4404
|
emits: [],
|
|
4399
4405
|
setup(e, t) {
|
|
4400
4406
|
var f;
|
|
4401
|
-
const n =
|
|
4402
|
-
const b =
|
|
4407
|
+
const n = h(), o = h(), i = X(() => {
|
|
4408
|
+
const b = ze.getLocale(), l = e.fields && e.fields.length > 0;
|
|
4403
4409
|
let d = {
|
|
4404
4410
|
"drag-container": !0,
|
|
4405
4411
|
"f-form-layout": l,
|
|
@@ -4433,7 +4439,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4433
4439
|
ref: n,
|
|
4434
4440
|
class: i.value,
|
|
4435
4441
|
style: e.customStyle
|
|
4436
|
-
}, [t.slots.default && t.slots.default(), e.fields && e.fields.length > 0 && v(
|
|
4442
|
+
}, [t.slots.default && t.slots.default(), e.fields && e.fields.length > 0 && v(_t, {
|
|
4437
4443
|
ref: o,
|
|
4438
4444
|
fields: e.fields,
|
|
4439
4445
|
canRenderForm: !1,
|
|
@@ -4441,7 +4447,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4441
4447
|
layout: e.layout
|
|
4442
4448
|
}, null)]), [[rn("area-response")]]);
|
|
4443
4449
|
}
|
|
4444
|
-
}),
|
|
4450
|
+
}), Nl = {
|
|
4445
4451
|
id: { type: String, default: "" },
|
|
4446
4452
|
customClass: { type: String, default: "" },
|
|
4447
4453
|
customStyle: { type: String, default: "" },
|
|
@@ -4465,7 +4471,7 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4465
4471
|
enableTips: { type: Boolean, default: !1 },
|
|
4466
4472
|
tipsContent: { type: [Object, String], default: "" },
|
|
4467
4473
|
linkLabel: { type: String, default: !1 }
|
|
4468
|
-
},
|
|
4474
|
+
}, Ll = {
|
|
4469
4475
|
id: { type: String },
|
|
4470
4476
|
required: { type: Boolean, default: !1 },
|
|
4471
4477
|
text: { type: String, default: "" },
|
|
@@ -4477,13 +4483,13 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4477
4483
|
*/
|
|
4478
4484
|
showType: { type: String, default: "visible" },
|
|
4479
4485
|
isLink: { type: Boolean, default: !1 }
|
|
4480
|
-
},
|
|
4486
|
+
}, Rl = /* @__PURE__ */ Ae({
|
|
4481
4487
|
name: "FDynamicFormLabel",
|
|
4482
|
-
props:
|
|
4488
|
+
props: Ll,
|
|
4483
4489
|
emits: ["clickLabel"],
|
|
4484
4490
|
setup(e, t) {
|
|
4485
|
-
|
|
4486
|
-
const n =
|
|
4491
|
+
h(e.title || e.text);
|
|
4492
|
+
const n = h(e.required), o = h(e.text), i = h(e.valid), a = h(e.inValidTip);
|
|
4487
4493
|
Me(() => e.text, () => {
|
|
4488
4494
|
o.value = e.text;
|
|
4489
4495
|
}), Me(() => e.required, (b, l) => {
|
|
@@ -4514,26 +4520,26 @@ const jt = /* @__PURE__ */ Ae({
|
|
|
4514
4520
|
onClick: m
|
|
4515
4521
|
}, [n.value && v("span", {
|
|
4516
4522
|
class: "farris-label-info text-danger"
|
|
4517
|
-
}, [
|
|
4523
|
+
}, [We("*")]), e.showType === "visible" && o.value])]);
|
|
4518
4524
|
}
|
|
4519
|
-
}), { globalStorageKey:
|
|
4520
|
-
async function
|
|
4525
|
+
}), { globalStorageKey: Al } = Vn(), H = {}, q = {}, G = {}, Y = {};
|
|
4526
|
+
async function jl() {
|
|
4521
4527
|
{
|
|
4522
4528
|
const e = {
|
|
4523
|
-
schemaMap:
|
|
4524
|
-
propertyConfigSchemaMap:
|
|
4525
|
-
propertyEffectMap:
|
|
4526
|
-
schemaResolverMap:
|
|
4529
|
+
schemaMap: Qa,
|
|
4530
|
+
propertyConfigSchemaMap: Xa,
|
|
4531
|
+
propertyEffectMap: Ka,
|
|
4532
|
+
schemaResolverMap: Ya
|
|
4527
4533
|
};
|
|
4528
|
-
zn.register(H, q,
|
|
4529
|
-
const t = window[
|
|
4534
|
+
zn.register(H, q, G, Y), $n.register(H, q, G, Y), Un.register(H, q, G, Y, e), Hn.register(H, q, G, Y), qn.register(H, q, G, Y), yt.register(H, q, G, Y), Wn.register(H, q, G, Y, e), Gn.register(H, q, G, Y), sn.register(H, q, G, Y, e), $t.register(H, q, G, Y, e), sn.register(H, q, G, Y, e), $t.register(H, q, G, Y, e), Yn.register(H, q, G, Y, e), sr.register(H, q, G, Y, e), Kn.register(H, q, G, Y), Qn.register(H, q, G, Y, e), Jn.register(H, q, G, Y, e), Xn.register(H, q, G, Y, e), Zn.register(H, q, G, Y, e), eo.register(H, q, G, Y, e), to.register(H, q, G, Y), no.register(H, q, G, Y, e), cr.register(H, q, G, Y), wr.register(H, q, G, Y), oo.register(H, q, G, Y, e), ur.register(H, q, G, Y), gr.register(H, q, G, Y), io.register(H, q, G, Y, e), ao.register(H, q, G, Y, e), ro.register(H, q, G, Y, e), so.register(H, q, G, Y, e), lo.register(H, q, G, Y), co.register(H, q, G, Y, e), mr.register(H, q, G, Y), uo.register(H, q, G, Y, e), fo.register(H, q, G, Y, e), mo.register(H, q, G, Y, e), po.register(H, q, G, Y), vo.register(H, q, G, Y, e), go.register(H, q, G, Y), ho.register(H, q, G, Y, e), yo.register(H, q, G, Y, e), Co.register(H, q, G, Y, e), bo.register(H, q, G, Y, e), wo.register(H, q, G, Y, e), To.register(H, q, G, Y, e), Fo.register(H, q, G, Y), So.register(H, q, G, Y, e), pr.register(H, q, G), Eo.register(H, q, G, Y, e), xo.register(H, q, G, Y, e), Mo.register(H, q, G, Y), Bo.register(H, q, G, Y, e), Do.register(H, q, G, Y, e), Io.register(H, q, G, Y, e), hr.register(H, q, G, Y), ko.register(H, q, G, Y, e), Po.register(H, q, G, Y, e), Oo.register(H, q, G, Y), Vo.register(H, q, G, Y, e), No.register(H, q, G, Y, e), Lo.register(H, q, G, Y, e), Ao.register(H, q, G, Y), Ro.register(H, q, G, Y, e), jo.register(H, q, G, Y), _o.register(H, q, G, Y, e), $o.register(H, q, G, Y, e), dr.register(H, q, G, Y, e), vr.register(H, q, G, Y, e), zo.register(H, q, G, Y, e), yr.register(H, q, G, Y, e), Uo.register(H, q, G, Y, e), Cr.register(H, q, G, Y, e), br.register(H, q, G, Y, e), Sr.register(H, q, G, Y), Ho.register(H, q, G, Y, e), Tr.register(H, q, G, Y), Fr.register(H, q, G, Y), qo.register(H, q, G, Y), Wo.register(H, q, G, Y, e), Go.register(H, q, G, Y, e), Yo.register(H, q, G, Y, e), Ko.register(H, q, G, Y, e);
|
|
4535
|
+
const t = window[Al];
|
|
4530
4536
|
if (t)
|
|
4531
4537
|
for (const n in t)
|
|
4532
|
-
t[n].createPropsResolver = Ot, t[n].register(H, q,
|
|
4538
|
+
t[n].createPropsResolver = Ot, t[n].register(H, q, G);
|
|
4533
4539
|
}
|
|
4534
4540
|
}
|
|
4535
4541
|
function ii() {
|
|
4536
|
-
|
|
4542
|
+
jl();
|
|
4537
4543
|
function e(r) {
|
|
4538
4544
|
const c = H[r];
|
|
4539
4545
|
if (!c)
|
|
@@ -4643,7 +4649,7 @@ function ii() {
|
|
|
4643
4649
|
}
|
|
4644
4650
|
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: o, getMousedownFunctionName: i, getMouseupFunctionName: a };
|
|
4645
4651
|
}
|
|
4646
|
-
const
|
|
4652
|
+
const _l = {
|
|
4647
4653
|
/**
|
|
4648
4654
|
* 显示的错误信息
|
|
4649
4655
|
*/
|
|
@@ -4651,16 +4657,16 @@ const Al = {
|
|
|
4651
4657
|
type: Object,
|
|
4652
4658
|
default: null
|
|
4653
4659
|
}
|
|
4654
|
-
},
|
|
4660
|
+
}, $l = /* @__PURE__ */ Ae({
|
|
4655
4661
|
name: "FValidationMessage",
|
|
4656
|
-
props:
|
|
4662
|
+
props: _l,
|
|
4657
4663
|
emits: [],
|
|
4658
4664
|
setup(e, t) {
|
|
4659
|
-
const n =
|
|
4665
|
+
const n = h(e.errors);
|
|
4660
4666
|
Me(() => e.errors, (a) => {
|
|
4661
4667
|
n.value = a;
|
|
4662
4668
|
});
|
|
4663
|
-
const o =
|
|
4669
|
+
const o = h(!0), i = X(() => {
|
|
4664
4670
|
if (n.value) {
|
|
4665
4671
|
const a = Object.keys(n.value).map((r) => {
|
|
4666
4672
|
var c;
|
|
@@ -4679,18 +4685,18 @@ const Al = {
|
|
|
4679
4685
|
class: "f-feedback-message"
|
|
4680
4686
|
}, [i.value])]);
|
|
4681
4687
|
}
|
|
4682
|
-
}),
|
|
4688
|
+
}), Ut = /* @__PURE__ */ Ae({
|
|
4683
4689
|
name: "FDynamicFormGroup",
|
|
4684
|
-
props:
|
|
4690
|
+
props: Nl,
|
|
4685
4691
|
emits: ["change", "update:modelValue", "clickLabel"],
|
|
4686
4692
|
setup(e, t) {
|
|
4687
4693
|
var _;
|
|
4688
|
-
const n =
|
|
4689
|
-
|
|
4690
|
-
const f =
|
|
4694
|
+
const n = h(e.id), o = h(e.customClass), i = h(e.editor), a = h(e.label), r = h(e.modelValue), c = h(e.readonly), s = h(((_ = e.editor) == null ? void 0 : _.required) || e.required), u = h(e.showLabel), m = h(e.visible);
|
|
4695
|
+
h(e.type);
|
|
4696
|
+
const f = h(), b = h(e.errors), l = ln(), d = h(e.editor.type || "input-group"), T = X(() => u.value ? e.showLabelType : "none"), {
|
|
4691
4697
|
resolveEditorProps: D,
|
|
4692
4698
|
resolveEditorType: B,
|
|
4693
|
-
getChangeFunctionName:
|
|
4699
|
+
getChangeFunctionName: y,
|
|
4694
4700
|
getClearFunctionName: S
|
|
4695
4701
|
} = ii(), V = X(() => {
|
|
4696
4702
|
const M = {
|
|
@@ -4726,7 +4732,7 @@ const Al = {
|
|
|
4726
4732
|
};
|
|
4727
4733
|
}
|
|
4728
4734
|
const w = X(() => {
|
|
4729
|
-
const M = i.value.type || "input-group", N = B(M), $ = D(M, i.value), L =
|
|
4735
|
+
const M = i.value.type || "input-group", N = B(M), $ = D(M, i.value), L = y(M), U = S(i.value.type);
|
|
4730
4736
|
return U && ($[U] = g($[U])), L && ($[L] = p($[L])), ($.id == null || $.id === "") && ($.id = n.value), M === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && ($.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && ($.onEndValueChange = i.value.onEndValueChange)) : M === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? ($["onUpdate:idValue"] = i.value["onUpdate:idValue"], $.id = n.value) : M === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? $.onSelectionChange = i.value.onSelectionChange : M === "property-editor" && ($.onBeforeOpenVariables = i.value.onBeforeOpenVariables), (M === "lookup" || M === "combo-list" || M === "date-picker") && ($.title = a.value), () => v(N, ut({
|
|
4731
4737
|
ref: f
|
|
4732
4738
|
}, $, {
|
|
@@ -4735,7 +4741,7 @@ const Al = {
|
|
|
4735
4741
|
}), t.slots);
|
|
4736
4742
|
});
|
|
4737
4743
|
function x() {
|
|
4738
|
-
return v(
|
|
4744
|
+
return v($l, {
|
|
4739
4745
|
id: `${n.value}-validation-message`,
|
|
4740
4746
|
errors: b.value
|
|
4741
4747
|
}, null);
|
|
@@ -4758,7 +4764,7 @@ const Al = {
|
|
|
4758
4764
|
style: k.value
|
|
4759
4765
|
}, [v("div", {
|
|
4760
4766
|
class: V.value
|
|
4761
|
-
}, [t.slots.label ? t.slots.label() : v(
|
|
4767
|
+
}, [t.slots.label ? t.slots.label() : v(Rl, {
|
|
4762
4768
|
id: `${n.value}-lable`,
|
|
4763
4769
|
showType: T.value,
|
|
4764
4770
|
required: s.value,
|
|
@@ -4768,7 +4774,7 @@ const Al = {
|
|
|
4768
4774
|
onClickLabel: I
|
|
4769
4775
|
}, null), v("div", {
|
|
4770
4776
|
class: "farris-input-wrap"
|
|
4771
|
-
}, [t.slots.content ? t.slots.content() : w.value(), x()]), !!e.enableTips && v(
|
|
4777
|
+
}, [t.slots.content ? t.slots.content() : w.value(), x()]), !!e.enableTips && v(Er, null, {
|
|
4772
4778
|
default: () => [v("span", {
|
|
4773
4779
|
class: "farris-label-tips ml-1"
|
|
4774
4780
|
}, [v("i", {
|
|
@@ -4777,7 +4783,7 @@ const Al = {
|
|
|
4777
4783
|
contentTemplate: e.tipsContent
|
|
4778
4784
|
})])])]);
|
|
4779
4785
|
}
|
|
4780
|
-
}),
|
|
4786
|
+
}), zl = {
|
|
4781
4787
|
id: { type: String, default: "" },
|
|
4782
4788
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
4783
4789
|
editor: { type: Object, default: {} },
|
|
@@ -4793,10 +4799,10 @@ const Al = {
|
|
|
4793
4799
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
4794
4800
|
}, Bn = /* @__PURE__ */ Ae({
|
|
4795
4801
|
name: "FDynamicFormInput",
|
|
4796
|
-
props:
|
|
4802
|
+
props: zl,
|
|
4797
4803
|
emits: ["change", "update:modelValue", "mousedown", "mouseup"],
|
|
4798
4804
|
setup(e, t) {
|
|
4799
|
-
const n =
|
|
4805
|
+
const n = h(e.id), o = h(e.editor), i = h(e.modelValue), {
|
|
4800
4806
|
resolveEditorProps: a,
|
|
4801
4807
|
resolveEditorType: r,
|
|
4802
4808
|
getChangeFunctionName: c,
|
|
@@ -4804,59 +4810,59 @@ const Al = {
|
|
|
4804
4810
|
getMouseupFunctionName: u,
|
|
4805
4811
|
getClearFunctionName: m
|
|
4806
4812
|
} = ii();
|
|
4807
|
-
function f(
|
|
4808
|
-
i.value = S !== void 0 ? S :
|
|
4809
|
-
newValue:
|
|
4813
|
+
function f(y, S, V) {
|
|
4814
|
+
i.value = S !== void 0 ? S : y, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
|
|
4815
|
+
newValue: y,
|
|
4810
4816
|
newModelValue: S,
|
|
4811
4817
|
parameters: V
|
|
4812
4818
|
});
|
|
4813
4819
|
}
|
|
4814
|
-
function b(
|
|
4815
|
-
t.emit("mousedown",
|
|
4820
|
+
function b(y) {
|
|
4821
|
+
t.emit("mousedown", y);
|
|
4816
4822
|
}
|
|
4817
|
-
function l(
|
|
4818
|
-
t.emit("mouseup",
|
|
4823
|
+
function l(y) {
|
|
4824
|
+
t.emit("mouseup", y);
|
|
4819
4825
|
}
|
|
4820
4826
|
function d() {
|
|
4821
4827
|
t.emit("update:modelValue", "");
|
|
4822
4828
|
}
|
|
4823
|
-
function T(
|
|
4829
|
+
function T(y) {
|
|
4824
4830
|
return (...S) => {
|
|
4825
|
-
d(), typeof
|
|
4831
|
+
d(), typeof y == "function" && y(...S);
|
|
4826
4832
|
};
|
|
4827
4833
|
}
|
|
4828
|
-
function D(
|
|
4834
|
+
function D(y) {
|
|
4829
4835
|
return (S, V, k) => {
|
|
4830
|
-
f(S, V, k), typeof
|
|
4836
|
+
f(S, V, k), typeof y == "function" && y(S, V, k);
|
|
4831
4837
|
};
|
|
4832
4838
|
}
|
|
4833
4839
|
const B = X(() => {
|
|
4834
|
-
const
|
|
4840
|
+
const y = r(o.value.type), S = a(o.value.type, o.value);
|
|
4835
4841
|
S.focusOnCreated = e.focusOnCreated, S.selectOnCreated = e.selectOnCreated;
|
|
4836
4842
|
const V = c(o.value.type), k = m(o.value.type);
|
|
4837
4843
|
k && (S[k] = T(S[k])), V && (S[V] = D(S[V]));
|
|
4838
4844
|
const C = s(o.value.type);
|
|
4839
4845
|
S[C] = b;
|
|
4840
4846
|
const g = u(o.value.type);
|
|
4841
|
-
return S[g] = l, S.id = n.value, () => v(
|
|
4847
|
+
return S[g] = l, S.id = n.value, () => v(y, ut(S, {
|
|
4842
4848
|
modelValue: i.value,
|
|
4843
4849
|
"onUpdate:modelValue": (p) => i.value = p
|
|
4844
4850
|
}), null);
|
|
4845
4851
|
});
|
|
4846
|
-
return Me([() => e.id, () => e.editor, () => e.modelValue], ([
|
|
4847
|
-
n.value =
|
|
4852
|
+
return Me([() => e.id, () => e.editor, () => e.modelValue], ([y, S, V]) => {
|
|
4853
|
+
n.value = y, o.value = S, i.value = V;
|
|
4848
4854
|
}), () => B.value();
|
|
4849
4855
|
}
|
|
4850
4856
|
});
|
|
4851
|
-
|
|
4852
|
-
e.component(Mn.name, Mn).component(Bn.name, Bn).component(
|
|
4857
|
+
_t.install = (e) => {
|
|
4858
|
+
e.component(Mn.name, Mn).component(Bn.name, Bn).component(_t.name, _t).component(Ut.name, Ut);
|
|
4853
4859
|
};
|
|
4854
|
-
const
|
|
4860
|
+
const Ul = /* @__PURE__ */ Ae({
|
|
4855
4861
|
name: "FEntityBindingSelector",
|
|
4856
|
-
props:
|
|
4862
|
+
props: jr,
|
|
4857
4863
|
emits: ["submit", "cancel"],
|
|
4858
4864
|
setup(e, t) {
|
|
4859
|
-
const n =
|
|
4865
|
+
const n = Yr(e), {
|
|
4860
4866
|
entityColumns: o,
|
|
4861
4867
|
entityTreeGridRef: i,
|
|
4862
4868
|
entityDataSource: a,
|
|
@@ -4872,7 +4878,7 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
4872
4878
|
fieldTreeGridRef: T,
|
|
4873
4879
|
fieldTreeRowOption: D,
|
|
4874
4880
|
fieldSelectionOption: B,
|
|
4875
|
-
checkAndGetSelectedFields:
|
|
4881
|
+
checkAndGetSelectedFields: y,
|
|
4876
4882
|
currentComponentType: S
|
|
4877
4883
|
} = f, V = new mn();
|
|
4878
4884
|
V.globalConfig = {
|
|
@@ -4884,7 +4890,7 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
4884
4890
|
}, {
|
|
4885
4891
|
name: "表格",
|
|
4886
4892
|
value: "data-grid"
|
|
4887
|
-
}], C =
|
|
4893
|
+
}], C = h(), g = h(""), p = h([{
|
|
4888
4894
|
id: "selectComponentType",
|
|
4889
4895
|
title: "选择组件类型"
|
|
4890
4896
|
}, {
|
|
@@ -4893,7 +4899,7 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
4893
4899
|
}, {
|
|
4894
4900
|
id: "selectFields",
|
|
4895
4901
|
title: "选择显示字段"
|
|
4896
|
-
}]), w =
|
|
4902
|
+
}]), w = h(0), x = h(""), I = X(() => (A) => ({
|
|
4897
4903
|
"f-utils-fill": !0,
|
|
4898
4904
|
border: A !== "selectComponentType",
|
|
4899
4905
|
"mx-3": !0,
|
|
@@ -4981,11 +4987,11 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
4981
4987
|
class: "f-title"
|
|
4982
4988
|
}, [v("h4", {
|
|
4983
4989
|
class: "f-title-text"
|
|
4984
|
-
}, [
|
|
4990
|
+
}, [We("组件信息")])])]), v("div", {
|
|
4985
4991
|
class: "f-section-content"
|
|
4986
4992
|
}, [v("div", {
|
|
4987
4993
|
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
4988
|
-
}, [v(
|
|
4994
|
+
}, [v(Ut, {
|
|
4989
4995
|
label: "组件类型",
|
|
4990
4996
|
customClass: "col-12",
|
|
4991
4997
|
modelValue: C.value,
|
|
@@ -4993,7 +4999,7 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
4993
4999
|
required: "true",
|
|
4994
5000
|
editor: A,
|
|
4995
5001
|
onChange: N
|
|
4996
|
-
}, null), v(
|
|
5002
|
+
}, null), v(Ut, {
|
|
4997
5003
|
label: "组件标题",
|
|
4998
5004
|
customClass: "col-12",
|
|
4999
5005
|
modelValue: g.value,
|
|
@@ -5032,7 +5038,7 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
5032
5038
|
}
|
|
5033
5039
|
function E() {
|
|
5034
5040
|
var ie;
|
|
5035
|
-
const A = r(), ae =
|
|
5041
|
+
const A = r(), ae = y();
|
|
5036
5042
|
if (A) {
|
|
5037
5043
|
const J = {
|
|
5038
5044
|
bindingType: "entity"
|
|
@@ -5065,16 +5071,16 @@ const $l = /* @__PURE__ */ Ae({
|
|
|
5065
5071
|
}, [v("button", {
|
|
5066
5072
|
class: "btn btn-secondary",
|
|
5067
5073
|
onClick: oe
|
|
5068
|
-
}, [
|
|
5074
|
+
}, [We("取消")]), w.value !== 0 ? v("button", {
|
|
5069
5075
|
class: "btn btn-secondary",
|
|
5070
5076
|
onClick: O
|
|
5071
|
-
}, [
|
|
5077
|
+
}, [We("上一步")]) : "", w.value !== p.value.length - 1 ? v("button", {
|
|
5072
5078
|
class: "btn btn-primary",
|
|
5073
5079
|
onClick: z
|
|
5074
|
-
}, [
|
|
5080
|
+
}, [We("下一步")]) : "", w.value === p.value.length - 1 ? v("button", {
|
|
5075
5081
|
class: "btn btn-primary",
|
|
5076
5082
|
onClick: E
|
|
5077
|
-
}, [
|
|
5083
|
+
}, [We("确定")]) : ""])]);
|
|
5078
5084
|
};
|
|
5079
5085
|
}
|
|
5080
5086
|
});
|
|
@@ -5116,7 +5122,7 @@ function Dn(e) {
|
|
|
5116
5122
|
parentComponentInstance: p
|
|
5117
5123
|
} = n;
|
|
5118
5124
|
let w = [];
|
|
5119
|
-
return C && (C === "list-view" || C === "calendar" ? w = ["selectEntity"] : w = ["selectEntity", "selectFields"]), g && (w = ["selectComponentType", "selectFields"]), () => v(mt, null, [v(
|
|
5125
|
+
return C && (C === "list-view" || C === "calendar" ? w = ["selectEntity"] : w = ["selectEntity", "selectFields"]), g && (w = ["selectComponentType", "selectFields"]), () => v(mt, null, [v(Ul, {
|
|
5120
5126
|
componentType: C,
|
|
5121
5127
|
bindingEntityId: g,
|
|
5122
5128
|
steps: w,
|
|
@@ -5125,8 +5131,8 @@ function Dn(e) {
|
|
|
5125
5131
|
onSubmit: i,
|
|
5126
5132
|
onCancel: a
|
|
5127
5133
|
}, {
|
|
5128
|
-
default: () => [
|
|
5129
|
-
}),
|
|
5134
|
+
default: () => [We(" ")]
|
|
5135
|
+
}), We(" ")]);
|
|
5130
5136
|
}
|
|
5131
5137
|
function c() {
|
|
5132
5138
|
return new Promise((C, g) => {
|
|
@@ -5209,7 +5215,7 @@ function Dn(e) {
|
|
|
5209
5215
|
}, w = {
|
|
5210
5216
|
enable: !1
|
|
5211
5217
|
};
|
|
5212
|
-
return () => v(mt, null, [v(
|
|
5218
|
+
return () => v(mt, null, [v(fr, {
|
|
5213
5219
|
editorParams: p,
|
|
5214
5220
|
showCustomFooter: !0,
|
|
5215
5221
|
bindingType: w,
|
|
@@ -5217,8 +5223,8 @@ function Dn(e) {
|
|
|
5217
5223
|
onCancel: s,
|
|
5218
5224
|
onSkip: f
|
|
5219
5225
|
}, {
|
|
5220
|
-
default: () => [
|
|
5221
|
-
}),
|
|
5226
|
+
default: () => [We(" ")]
|
|
5227
|
+
}), We(" ")]);
|
|
5222
5228
|
}
|
|
5223
5229
|
function l() {
|
|
5224
5230
|
return new Promise((C, g) => {
|
|
@@ -5273,7 +5279,7 @@ function Dn(e) {
|
|
|
5273
5279
|
return;
|
|
5274
5280
|
}
|
|
5275
5281
|
if (d().has(C)) {
|
|
5276
|
-
const w = new
|
|
5282
|
+
const w = new xr();
|
|
5277
5283
|
w.globalConfig = {
|
|
5278
5284
|
position: "top-center"
|
|
5279
5285
|
}, w.warning("表单已经包含此字段,请勿重复添加"), n.bindingSourceContext = void 0;
|
|
@@ -5303,7 +5309,7 @@ function Dn(e) {
|
|
|
5303
5309
|
if (!(!g || !p))
|
|
5304
5310
|
return p[0].type.fields.find((w) => w.bindingField === g);
|
|
5305
5311
|
}
|
|
5306
|
-
function
|
|
5312
|
+
function y() {
|
|
5307
5313
|
const {
|
|
5308
5314
|
componentType: C
|
|
5309
5315
|
} = n;
|
|
@@ -5338,7 +5344,7 @@ function Dn(e) {
|
|
|
5338
5344
|
break;
|
|
5339
5345
|
}
|
|
5340
5346
|
case "approval": {
|
|
5341
|
-
|
|
5347
|
+
y();
|
|
5342
5348
|
break;
|
|
5343
5349
|
}
|
|
5344
5350
|
}
|
|
@@ -5351,10 +5357,10 @@ function Dn(e) {
|
|
|
5351
5357
|
resolveComponentCreationContextByDrop: k
|
|
5352
5358
|
};
|
|
5353
5359
|
}
|
|
5354
|
-
function
|
|
5360
|
+
function Hl(e, t) {
|
|
5355
5361
|
let n;
|
|
5356
5362
|
function o(l, d, T) {
|
|
5357
|
-
var B,
|
|
5363
|
+
var B, y;
|
|
5358
5364
|
if (l.contains(d) || d.classList.contains("no-drop"))
|
|
5359
5365
|
return !1;
|
|
5360
5366
|
const D = !0;
|
|
@@ -5363,7 +5369,7 @@ function zl(e, t) {
|
|
|
5363
5369
|
if (S && !S.contains(d))
|
|
5364
5370
|
return !1;
|
|
5365
5371
|
}
|
|
5366
|
-
if ((
|
|
5372
|
+
if ((y = (B = d.componentInstance) == null ? void 0 : B.value) != null && y.externalContainerId)
|
|
5367
5373
|
return !1;
|
|
5368
5374
|
if (d.componentInstance && d.componentInstance.value.canAccepts) {
|
|
5369
5375
|
const V = Dn(e).getComponentResolveContext(l, T, d);
|
|
@@ -5372,8 +5378,8 @@ function zl(e, t) {
|
|
|
5372
5378
|
return D;
|
|
5373
5379
|
}
|
|
5374
5380
|
function i(l, d) {
|
|
5375
|
-
const T = d.getBoundingClientRect(), D = l.getBoundingClientRect(), B = D.top >= T.top,
|
|
5376
|
-
return B &&
|
|
5381
|
+
const T = d.getBoundingClientRect(), D = l.getBoundingClientRect(), B = D.top >= T.top, y = D.top < T.bottom;
|
|
5382
|
+
return B && y;
|
|
5377
5383
|
}
|
|
5378
5384
|
function a(l, d) {
|
|
5379
5385
|
const T = l.querySelector(".dgComponentSelected");
|
|
@@ -5382,8 +5388,8 @@ function zl(e, t) {
|
|
|
5382
5388
|
if (D) {
|
|
5383
5389
|
const B = D.querySelector("div");
|
|
5384
5390
|
if (B && B.style.top) {
|
|
5385
|
-
const
|
|
5386
|
-
B.style.top =
|
|
5391
|
+
const y = Number.parseFloat(B.style.top);
|
|
5392
|
+
B.style.top = y - d + "px";
|
|
5387
5393
|
}
|
|
5388
5394
|
}
|
|
5389
5395
|
}
|
|
@@ -5398,8 +5404,8 @@ function zl(e, t) {
|
|
|
5398
5404
|
D = Number(T.getAttribute("data-position"));
|
|
5399
5405
|
else {
|
|
5400
5406
|
const B = T.componentInstance.value.schema;
|
|
5401
|
-
let
|
|
5402
|
-
B.type === "component" && (
|
|
5407
|
+
let y = { id: B.id };
|
|
5408
|
+
B.type === "component" && (y = { component: B.id }), D = wn(l.componentInstance.value.contents, y), D = D === -1 ? 0 : D;
|
|
5403
5409
|
}
|
|
5404
5410
|
D !== -1 && l.componentInstance.value.contents.splice(D, 0, d);
|
|
5405
5411
|
} else
|
|
@@ -5407,22 +5413,22 @@ function zl(e, t) {
|
|
|
5407
5413
|
return D;
|
|
5408
5414
|
}
|
|
5409
5415
|
function c(l, d, T, D) {
|
|
5410
|
-
Dn(e).resolveComponentCreationContextByDrop(l, T, d).then((
|
|
5411
|
-
if (!
|
|
5416
|
+
Dn(e).resolveComponentCreationContextByDrop(l, T, d).then((y) => {
|
|
5417
|
+
if (!y)
|
|
5412
5418
|
return;
|
|
5413
|
-
const S =
|
|
5419
|
+
const S = y.componentSchema;
|
|
5414
5420
|
S && (t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(S), r(d, S, D));
|
|
5415
5421
|
}), d.contains(l) && d.removeChild(l);
|
|
5416
5422
|
}
|
|
5417
5423
|
function s(l, d, T, D) {
|
|
5418
|
-
let B,
|
|
5424
|
+
let B, y = -1;
|
|
5419
5425
|
if (l.componentInstance && l.componentInstance.value.triggerBelongedComponentToMoveWhenMoved) {
|
|
5420
5426
|
const k = l.componentInstance.value.getBelongedComponentInstance(l.componentInstance);
|
|
5421
|
-
k && (l =
|
|
5427
|
+
k && (l = h(k.elementRef).value.parentElement, T = l.parentElement);
|
|
5422
5428
|
}
|
|
5423
5429
|
const S = l.componentInstance && l.componentInstance.value.schema;
|
|
5424
5430
|
let V = { id: S && S.id };
|
|
5425
|
-
(S == null ? void 0 : S.type) === "component" && (V = { component: S && S.id }),
|
|
5431
|
+
(S == null ? void 0 : S.type) === "component" && (V = { component: S && S.id }), y = wn(T.componentInstance.value.contents, V), y !== -1 && T.componentInstance.value.contents && (B = T.componentInstance.value.contents.splice(y, 1), B = B[0]), r(d, B, D), T.componentInstance && T.componentInstance.value.onChildElementMovedOut && T.componentInstance.value.onChildElementMovedOut(l), d.componentInstance && d.componentInstance.value.onAcceptMovedChildElement && d.componentInstance.value.onAcceptMovedChildElement(l, T);
|
|
5426
5432
|
}
|
|
5427
5433
|
function u(l, d, T, D) {
|
|
5428
5434
|
if (!d || l.contains(d))
|
|
@@ -5460,8 +5466,8 @@ function zl(e, t) {
|
|
|
5460
5466
|
},
|
|
5461
5467
|
// 判断目标区域是否可接收拖拽的控件
|
|
5462
5468
|
accepts(d, T, D) {
|
|
5463
|
-
const B = o(d, T, D),
|
|
5464
|
-
return B ?
|
|
5469
|
+
const B = o(d, T, D), y = l.lastElementChild;
|
|
5470
|
+
return B ? y.className = y.className.replace("undroppable", "") : y.className.includes("undroppable") || (y.className += " undroppable"), B;
|
|
5465
5471
|
}
|
|
5466
5472
|
}).on("over", (d, T) => {
|
|
5467
5473
|
T.className += " drag-over";
|
|
@@ -5486,7 +5492,7 @@ function zl(e, t) {
|
|
|
5486
5492
|
}
|
|
5487
5493
|
return { attachComponents: f, initializeDragula: m, getDragulaInstance: b };
|
|
5488
5494
|
}
|
|
5489
|
-
const
|
|
5495
|
+
const ql = {
|
|
5490
5496
|
id: { type: String, default: "" },
|
|
5491
5497
|
componentId: { type: String, default: "" },
|
|
5492
5498
|
type: { type: String, default: "" },
|
|
@@ -5501,8 +5507,8 @@ const Ul = {
|
|
|
5501
5507
|
*/
|
|
5502
5508
|
modelValue: { type: Object },
|
|
5503
5509
|
ignore: { type: Boolean, default: !1 }
|
|
5504
|
-
}, ee = {}, te = {}, ne = {}, { globalStorageKey:
|
|
5505
|
-
function
|
|
5510
|
+
}, ee = {}, te = {}, ne = {}, { globalStorageKey: Wl } = Vn();
|
|
5511
|
+
function Gl() {
|
|
5506
5512
|
{
|
|
5507
5513
|
const e = {
|
|
5508
5514
|
schemaMap: jn,
|
|
@@ -5510,14 +5516,14 @@ function ql() {
|
|
|
5510
5516
|
propertyEffectMap: Rn,
|
|
5511
5517
|
schemaResolverMap: Ln
|
|
5512
5518
|
};
|
|
5513
|
-
zn.registerDesigner(ee, te, ne, e), $n.registerDesigner(ee, te, ne, e), Un.registerDesigner(ee, te, ne, e), Hn.registerDesigner(ee, te, ne, e), qn.registerDesigner(ee, te, ne, e), Wn.registerDesigner(ee, te, ne, e), Gn.registerDesigner(ee, te, ne, e), sn.registerDesigner(ee, te, ne, e),
|
|
5514
|
-
const t = window[
|
|
5519
|
+
zn.registerDesigner(ee, te, ne, e), $n.registerDesigner(ee, te, ne, e), Un.registerDesigner(ee, te, ne, e), Hn.registerDesigner(ee, te, ne, e), qn.registerDesigner(ee, te, ne, e), Wn.registerDesigner(ee, te, ne, e), Gn.registerDesigner(ee, te, ne, e), sn.registerDesigner(ee, te, ne, e), $t.registerDesigner(ee, te, ne, e), $t.registerDesigner(ee, te, ne, e), Xn.registerDesigner(ee, te, ne, e), Yn.registerDesigner(ee, te, ne, e), Qn.registerDesigner(ee, te, ne, e), Jn.registerDesigner(ee, te, ne, e), eo.registerDesigner(ee, te, ne, e), Zn.registerDesigner(ee, te, ne, e), to.registerDesigner(ee, te, ne), no.registerDesigner(ee, te, ne, e), qo.registerDesigner(ee, te, ne), oo.registerDesigner(ee, te, ne, e), io.registerDesigner(ee, te, ne, e), ao.registerDesigner(ee, te, ne, e), ro.registerDesigner(ee, te, ne, e), so.registerDesigner(ee, te, ne, e), lo.registerDesigner(ee, te, ne), uo.registerDesigner(ee, te, ne, e), co.registerDesigner(ee, te, ne, e), Wo.registerDesigner(ee, te, ne, e), fo.registerDesigner(ee, te, ne, e), mo.registerDesigner(ee, te, ne, e), po.registerDesigner(ee, te, ne), vo.registerDesigner(ee, te, ne, e), go.registerDesigner(ee, te, ne), ho.registerDesigner(ee, te, ne, e), yo.registerDesigner(ee, te, ne, e), Co.registerDesigner(ee, te, ne, e), bo.registerDesigner(ee, te, ne, e), To.registerDesigner(ee, te, ne, e), Fo.registerDesigner(ee, te, ne, e), So.registerDesigner(ee, te, ne, e), wo.registerDesigner(ee, te, ne, e), Eo.registerDesigner(ee, te, ne, e), xo.registerDesigner(ee, te, ne, e), Mo.registerDesigner(ee, te, ne), Bo.registerDesigner(ee, te, ne, e), Do.registerDesigner(ee, te, ne, e), Io.registerDesigner(ee, te, ne, e), ko.registerDesigner(ee, te, ne, e), Po.registerDesigner(ee, te, ne, e), Oo.registerDesigner(ee, te, ne), Vo.registerDesigner(ee, te, ne, e), No.registerDesigner(ee, te, ne, e), Lo.registerDesigner(ee, te, ne, e), Ro.registerDesigner(ee, te, ne, e), Ao.registerDesigner(ee, te, ne), Kn.registerDesigner(ee, te), jo.registerDesigner(ee, te, ne), _o.registerDesigner(ee, te, ne, e), $o.registerDesigner(ee, te, ne, e), zo.registerDesigner(ee, te, ne, e), Uo.registerDesigner(ee, te, ne, e), Ho.registerDesigner(ee, te, ne, e), Go.registerDesigner(ee, te, ne, e), Yo.registerDesigner(ee, te, ne, e), yt.registerDesigner(ee, te, ne, e), Ko.registerDesigner(ee, te, ne, e);
|
|
5520
|
+
const t = window[Wl];
|
|
5515
5521
|
if (t)
|
|
5516
5522
|
for (const n in t)
|
|
5517
5523
|
t[n].createPropsResolver = Ot, t[n].registerDesigner(ee, te, ne);
|
|
5518
5524
|
}
|
|
5519
5525
|
}
|
|
5520
|
-
function
|
|
5526
|
+
function Yl(e) {
|
|
5521
5527
|
const t = {
|
|
5522
5528
|
schemaMap: jn,
|
|
5523
5529
|
propertyConfigSchemaMap: An,
|
|
@@ -5528,11 +5534,11 @@ function Wl(e) {
|
|
|
5528
5534
|
n.registerDesigner && n.registerDesigner(ee, te, ne, t);
|
|
5529
5535
|
});
|
|
5530
5536
|
}
|
|
5531
|
-
const
|
|
5537
|
+
const Kl = {
|
|
5532
5538
|
id: { type: String }
|
|
5533
|
-
},
|
|
5539
|
+
}, Xl = /* @__PURE__ */ Ae({
|
|
5534
5540
|
name: "FDesignerPlaceholder",
|
|
5535
|
-
props:
|
|
5541
|
+
props: Kl,
|
|
5536
5542
|
emits: [],
|
|
5537
5543
|
setup(e) {
|
|
5538
5544
|
const t = X(() => ({
|
|
@@ -5558,18 +5564,18 @@ const Gl = {
|
|
|
5558
5564
|
role: "alert",
|
|
5559
5565
|
"data-noattach": "true",
|
|
5560
5566
|
"data-position": "0"
|
|
5561
|
-
}, [
|
|
5567
|
+
}, [We("拖拽组件到这里")]);
|
|
5562
5568
|
}
|
|
5563
5569
|
});
|
|
5564
|
-
function
|
|
5565
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
5570
|
+
function Ql(e) {
|
|
5571
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ki(e);
|
|
5566
5572
|
}
|
|
5567
5573
|
const dn = /* @__PURE__ */ Ae({
|
|
5568
5574
|
name: "FDesignerItem",
|
|
5569
|
-
props:
|
|
5575
|
+
props: ql,
|
|
5570
5576
|
emits: ["selectionChange", "dragEnd"],
|
|
5571
5577
|
setup(e, t) {
|
|
5572
|
-
const n =
|
|
5578
|
+
const n = h(`${e.modelValue.id}-component`), o = h(e.canMove), i = h(e.canDelete), a = h(!1), r = h(e.modelValue), c = h(e.componentId || ""), s = h(""), u = h(""), m = h(e.customClass), f = h(), b = xe("canvas-dragula"), l = h(), d = xe("design-item-context");
|
|
5573
5579
|
function T(E) {
|
|
5574
5580
|
E && Object.assign(r.value, E);
|
|
5575
5581
|
}
|
|
@@ -5582,9 +5588,9 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5582
5588
|
updateContextSchema: T
|
|
5583
5589
|
};
|
|
5584
5590
|
It("design-item-context", D);
|
|
5585
|
-
const B = xe("useFormSchema"),
|
|
5586
|
-
var J,
|
|
5587
|
-
const E = (J = l.value) != null && J.shouldApplyClassToComponent ? (
|
|
5591
|
+
const B = xe("useFormSchema"), y = xe("designer-host-service"), S = xe("external-container-id"), V = X(() => {
|
|
5592
|
+
var J, ge, Se;
|
|
5593
|
+
const E = (J = l.value) != null && J.shouldApplyClassToComponent ? (ge = l.value) == null ? void 0 : ge.shouldApplyClassToComponent() : !0, A = e.modelValue.appearance && e.modelValue.appearance.class || "", ae = ((Se = l.value) == null ? void 0 : Se.getCustomButtons) && l.value.getCustomButtons();
|
|
5588
5594
|
let ie = {
|
|
5589
5595
|
"farris-component": !0,
|
|
5590
5596
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
@@ -5600,31 +5606,31 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5600
5606
|
}), k = X(() => {
|
|
5601
5607
|
var ie, J;
|
|
5602
5608
|
const E = {}, A = (ie = l.value) != null && ie.shouldApplyClassToComponent ? (J = l.value) == null ? void 0 : J.shouldApplyClassToComponent() : !0, ae = e.modelValue.appearance && e.modelValue.appearance.style || "";
|
|
5603
|
-
return ae && A && ae.split(";").reduce((
|
|
5604
|
-
const [
|
|
5605
|
-
return
|
|
5606
|
-
}, E), s.value && s.value.split(";").reduce((
|
|
5607
|
-
const [
|
|
5608
|
-
return
|
|
5609
|
+
return ae && A && ae.split(";").reduce((ge, Se) => {
|
|
5610
|
+
const [fe, Z] = Se.split(":");
|
|
5611
|
+
return ge[fe] = Z, ge;
|
|
5612
|
+
}, E), s.value && s.value.split(";").reduce((ge, Se) => {
|
|
5613
|
+
const [fe, Z] = Se.split(":");
|
|
5614
|
+
return fe && (ge[fe] = Z), ge;
|
|
5609
5615
|
}, E), E;
|
|
5610
5616
|
});
|
|
5611
5617
|
function C(E, A) {
|
|
5612
|
-
var J,
|
|
5613
|
-
if (E && (E.preventDefault(), E.stopPropagation()), (J =
|
|
5618
|
+
var J, ge, Se;
|
|
5619
|
+
if (E && (E.preventDefault(), E.stopPropagation()), (J = y == null ? void 0 : y.designerContext) != null && J.checkCanDeleteControl && !y.designerContext.checkCanDeleteControl(A))
|
|
5614
5620
|
return;
|
|
5615
5621
|
if (l.value.triggerBelongedComponentToDeleteWhenDeleted) {
|
|
5616
|
-
const
|
|
5617
|
-
if (
|
|
5618
|
-
const Z =
|
|
5619
|
-
(Se = (
|
|
5622
|
+
const fe = l.value.getBelongedComponentInstance(l);
|
|
5623
|
+
if (fe && fe.parent) {
|
|
5624
|
+
const Z = h(fe == null ? void 0 : fe.parent), F = Z.value.contents.findIndex((re) => re.id === fe.schema.id);
|
|
5625
|
+
(Se = (ge = Z.value) == null ? void 0 : ge.contents) == null || Se.splice(F, 1), at.value++;
|
|
5620
5626
|
}
|
|
5621
5627
|
return;
|
|
5622
5628
|
}
|
|
5623
|
-
l.value.onRemoveComponent(
|
|
5624
|
-
let ae = d, ie = (
|
|
5625
|
-
if (A.type === "component" && (ae = d == null ? void 0 : d.parent, ie = (
|
|
5626
|
-
const
|
|
5627
|
-
ae.schema.contents.splice(
|
|
5629
|
+
l.value.onRemoveComponent(y);
|
|
5630
|
+
let ae = d, ie = (fe) => fe.id === A.id;
|
|
5631
|
+
if (A.type === "component" && (ae = d == null ? void 0 : d.parent, ie = (fe) => fe.component === A.id), ae && ae.schema.contents) {
|
|
5632
|
+
const fe = ae.schema.contents.findIndex(ie);
|
|
5633
|
+
ae.schema.contents.splice(fe, 1), at.value++, t.emit("selectionChange");
|
|
5628
5634
|
}
|
|
5629
5635
|
}
|
|
5630
5636
|
function g(E) {
|
|
@@ -5682,16 +5688,16 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5682
5688
|
"data-noattach": "true",
|
|
5683
5689
|
"data-position": "0",
|
|
5684
5690
|
style: "height: 60px; display: flex; justify-content: center; align-items: center; margin: 0px; border-radius: 3px; color: #2d2f33; background-color: #d4d6d9;"
|
|
5685
|
-
}, [
|
|
5691
|
+
}, [We("未识别的组件")]);
|
|
5686
5692
|
}
|
|
5687
5693
|
function N(E) {
|
|
5688
5694
|
let A;
|
|
5689
|
-
const ae = E.type, ie = ee[ae], J = te[ae],
|
|
5690
|
-
|
|
5695
|
+
const ae = E.type, ie = ee[ae], J = te[ae], ge = J ? J(E) : {};
|
|
5696
|
+
ge.customClass = e.ignore ? ge.customClass : "", ge.customStyle = e.ignore ? ge.customStyle : "", ge.componentId = c.value, ge.id = E.id;
|
|
5691
5697
|
const Se = E.contents && E.contents.length === 0;
|
|
5692
5698
|
return E.contents && !!E.contents.length && ie ? v(ie, ut({
|
|
5693
5699
|
ref: l
|
|
5694
|
-
},
|
|
5700
|
+
}, ge), Ql(A = E.contents.map((Z) => v(dn, {
|
|
5695
5701
|
key: Z.id,
|
|
5696
5702
|
modelValue: Z,
|
|
5697
5703
|
"onUpdate:modelValue": (F) => Z = F,
|
|
@@ -5702,11 +5708,11 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5702
5708
|
default: () => [A]
|
|
5703
5709
|
}) : ie ? Se ? v(ie, ut({
|
|
5704
5710
|
ref: l
|
|
5705
|
-
},
|
|
5706
|
-
default: () => [v(
|
|
5711
|
+
}, ge), {
|
|
5712
|
+
default: () => [v(Xl, null, null)]
|
|
5707
5713
|
}) : v(ie, ut({
|
|
5708
5714
|
ref: l
|
|
5709
|
-
},
|
|
5715
|
+
}, ge), null) : M();
|
|
5710
5716
|
}
|
|
5711
5717
|
function $() {
|
|
5712
5718
|
const E = B.externalFormSchema.get(S);
|
|
@@ -5715,12 +5721,12 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5715
5721
|
}
|
|
5716
5722
|
function L(E) {
|
|
5717
5723
|
if (E.type === "component-ref") {
|
|
5718
|
-
const ie = (S ? $() : B == null ? void 0 : B.getFormSchema()).module.components.find((
|
|
5724
|
+
const ie = (S ? $() : B == null ? void 0 : B.getFormSchema()).module.components.find((ge) => ge.id === E.component), J = h(ie);
|
|
5719
5725
|
if (ie)
|
|
5720
5726
|
return v(dn, {
|
|
5721
5727
|
key: ie.id,
|
|
5722
5728
|
modelValue: J.value,
|
|
5723
|
-
"onUpdate:modelValue": (
|
|
5729
|
+
"onUpdate:modelValue": (ge) => J.value = ge,
|
|
5724
5730
|
componentId: ie.id,
|
|
5725
5731
|
onSelectionChange: I,
|
|
5726
5732
|
onDragEnd: _
|
|
@@ -5728,7 +5734,7 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5728
5734
|
}
|
|
5729
5735
|
}
|
|
5730
5736
|
Me([() => e.modelValue, () => e.componentId], ([E, A]) => {
|
|
5731
|
-
r.value = E, n.value = `${E.id}-component`, A && (c.value = A),
|
|
5737
|
+
r.value = E, n.value = `${E.id}-component`, A && (c.value = A), Yi(f);
|
|
5732
5738
|
}, {
|
|
5733
5739
|
deep: !0
|
|
5734
5740
|
});
|
|
@@ -5752,7 +5758,7 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5752
5758
|
et(() => {
|
|
5753
5759
|
if (f.value && l.value && l.value.schema) {
|
|
5754
5760
|
const E = f.value.querySelector(`[data-dragref='${l.value.schema.id}-container']`);
|
|
5755
|
-
b && E && b.attachComponents(E, r.value), a.value = l.value.canNested !== void 0 ? l.value.canNested : a.value, i.value = l.value.canDelete !== void 0 ? l.value.canDelete : i.value, o.value = l.value.canMove !== void 0 ? l.value.canMove : o.value, s.value = l.value.styles || "", u.value = l.value.designerClass || "", f.value && (f.value.componentInstance = l, f.value.designItemContext = D), l.value.belongedComponentId = c.value, l.value.setComponentBasicInfoMap(
|
|
5761
|
+
b && E && b.attachComponents(E, r.value), a.value = l.value.canNested !== void 0 ? l.value.canNested : a.value, i.value = l.value.canDelete !== void 0 ? l.value.canDelete : i.value, o.value = l.value.canMove !== void 0 ? l.value.canMove : o.value, s.value = l.value.styles || "", u.value = l.value.designerClass || "", f.value && (f.value.componentInstance = l, f.value.designItemContext = D), l.value.belongedComponentId = c.value, l.value.setComponentBasicInfoMap(y), l.value.externalContainerId = S;
|
|
5756
5762
|
}
|
|
5757
5763
|
z(), at.value++;
|
|
5758
5764
|
}), On(() => {
|
|
@@ -5784,7 +5790,7 @@ const dn = /* @__PURE__ */ Ae({
|
|
|
5784
5790
|
}, [x(r.value), N(r.value)]);
|
|
5785
5791
|
};
|
|
5786
5792
|
}
|
|
5787
|
-
}),
|
|
5793
|
+
}), Jl = {
|
|
5788
5794
|
/**
|
|
5789
5795
|
* 允许点击蒙层关闭对话框
|
|
5790
5796
|
* @default false
|
|
@@ -6002,8 +6008,8 @@ class ct {
|
|
|
6002
6008
|
return this.width = t.width, this.height = t.height, this;
|
|
6003
6009
|
}
|
|
6004
6010
|
}
|
|
6005
|
-
function
|
|
6006
|
-
const n =
|
|
6011
|
+
function Zl(e, t) {
|
|
6012
|
+
const n = h(), o = h(), i = h(), a = h(), r = h(), c = h(), s = h(), u = h(), m = h(), f = h(), b = h(), l = h(e.resizeable), d = h(), T = h(e.draggable), D = h(!1);
|
|
6007
6013
|
function B() {
|
|
6008
6014
|
const O = o.value || document.body, z = window.getComputedStyle(O);
|
|
6009
6015
|
if (!z || !n.value)
|
|
@@ -6013,7 +6019,7 @@ function Ql(e, t) {
|
|
|
6013
6019
|
const A = z.getPropertyValue("position");
|
|
6014
6020
|
E.width = O.clientWidth, E.height = O.clientHeight, E.pr = parseInt(z.getPropertyValue("padding-right"), 10), E.pb = parseInt(z.getPropertyValue("padding-bottom"), 10), E.position = z.getPropertyValue("position"), A === "static" && (O.style.position = "relative"), E.translateX = oe.x, E.translateY = oe.y, f.value = E;
|
|
6015
6021
|
}
|
|
6016
|
-
function
|
|
6022
|
+
function y(O) {
|
|
6017
6023
|
if (n.value) {
|
|
6018
6024
|
a.value = ct.getCurrent(n.value), r.value = Ne.getCurrent(n.value), c.value = a.value ? ct.copy(a.value) : null, s.value = r.value ? Ne.copy(r.value) : null, B();
|
|
6019
6025
|
const z = O.target.getAttribute("type") || "";
|
|
@@ -6090,7 +6096,7 @@ function Ql(e, t) {
|
|
|
6090
6096
|
document.addEventListener("mousemove", g), document.addEventListener("mouseup", w);
|
|
6091
6097
|
}
|
|
6092
6098
|
function I(O) {
|
|
6093
|
-
O instanceof MouseEvent && O.button === 2 || T.value && (document.body.click(), O.stopPropagation(), O.preventDefault(), i.value = Ne.fromEvent(O), m.value = O.target,
|
|
6099
|
+
O instanceof MouseEvent && O.button === 2 || T.value && (document.body.click(), O.stopPropagation(), O.preventDefault(), i.value = Ne.fromEvent(O), m.value = O.target, y(O), x());
|
|
6094
6100
|
}
|
|
6095
6101
|
function _(O) {
|
|
6096
6102
|
return n.value = O, l.value && v(mt, null, [v("div", {
|
|
@@ -6189,8 +6195,8 @@ function Ql(e, t) {
|
|
|
6189
6195
|
moveToCenter: $
|
|
6190
6196
|
};
|
|
6191
6197
|
}
|
|
6192
|
-
function
|
|
6193
|
-
const o =
|
|
6198
|
+
function es(e, t, n) {
|
|
6199
|
+
const o = h(), i = h(e.draggable), a = h(e.lockAxis), r = h(), c = h(), s = h(!1), u = h(new Ne(0, 0)), m = h(new Ne(0, 0)), f = h(new Ne(0, 0)), b = h(new Ne(0, 0));
|
|
6194
6200
|
Me(() => n.value, (g) => {
|
|
6195
6201
|
r.value.style.cursor = g ? "move" : "default";
|
|
6196
6202
|
});
|
|
@@ -6228,18 +6234,18 @@ function Jl(e, t, n) {
|
|
|
6228
6234
|
function B(g) {
|
|
6229
6235
|
s.value && i.value && (g.stopPropagation(), g.preventDefault(), D(Ne.fromEvent(g, r.value)));
|
|
6230
6236
|
}
|
|
6231
|
-
function
|
|
6237
|
+
function y() {
|
|
6232
6238
|
var g;
|
|
6233
6239
|
if (s.value) {
|
|
6234
6240
|
if (s.value = !1, m.value.add(f.value), f.value.reset(), (g = o.value) == null || g.classList.remove("ng-dragging"), !e.useTransform && o.value) {
|
|
6235
6241
|
const { left: p, top: w } = o.value.getBoundingClientRect();
|
|
6236
6242
|
o.value.style.left = Math.ceil(p) + "px", o.value.style.top = Math.ceil(w) + "px", o.value.style.transform = "none";
|
|
6237
6243
|
}
|
|
6238
|
-
t.emit("stopMove"), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup",
|
|
6244
|
+
t.emit("stopMove"), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", y);
|
|
6239
6245
|
}
|
|
6240
6246
|
}
|
|
6241
6247
|
function S() {
|
|
6242
|
-
!s.value && r.value && (s.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", B), document.addEventListener("mouseup",
|
|
6248
|
+
!s.value && r.value && (s.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", B), document.addEventListener("mouseup", y));
|
|
6243
6249
|
}
|
|
6244
6250
|
function V() {
|
|
6245
6251
|
if (o.value) {
|
|
@@ -6285,8 +6291,8 @@ function ai(e, t) {
|
|
|
6285
6291
|
};
|
|
6286
6292
|
}
|
|
6287
6293
|
}
|
|
6288
|
-
function
|
|
6289
|
-
const n =
|
|
6294
|
+
function ts(e, t) {
|
|
6295
|
+
const n = h(e.enableEsc);
|
|
6290
6296
|
let o = null;
|
|
6291
6297
|
return n.value ? (o = ai("Escape", (i) => {
|
|
6292
6298
|
t.emit("esc", { event: i.event, type: "esc" });
|
|
@@ -6294,8 +6300,8 @@ function Zl(e, t) {
|
|
|
6294
6300
|
remove: o
|
|
6295
6301
|
}) : null;
|
|
6296
6302
|
}
|
|
6297
|
-
function
|
|
6298
|
-
const n =
|
|
6303
|
+
function ns(e, t) {
|
|
6304
|
+
const n = h(e.enableEnter);
|
|
6299
6305
|
let o = null;
|
|
6300
6306
|
return n.value ? (o = ai("Enter", (i) => {
|
|
6301
6307
|
t.emit("enter", { event: i.event, type: "enter" });
|
|
@@ -6305,12 +6311,12 @@ function es(e, t) {
|
|
|
6305
6311
|
}
|
|
6306
6312
|
const Pt = /* @__PURE__ */ Ae({
|
|
6307
6313
|
name: "FModal",
|
|
6308
|
-
props:
|
|
6314
|
+
props: Jl,
|
|
6309
6315
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove", "buttonClick"],
|
|
6310
6316
|
setup(e, t) {
|
|
6311
|
-
const n =
|
|
6312
|
-
B.value === "错误提示" && (B.value =
|
|
6313
|
-
const V =
|
|
6317
|
+
const n = h(e.width || 300), o = h(e.height || 200), i = h(e.modelValue), a = h(""), r = h(e.class), c = h(e.fitContent), s = h(e.showHeader), u = h(""), m = h(e.showCloseButton), f = h(e.showMaxButton), b = h(!1), l = h(e.dialogType), d = h(e.src), T = h(""), D = h(e.showButtons), B = h(e.title), y = h(e.containment || null), S = h();
|
|
6318
|
+
B.value === "错误提示" && (B.value = ze.getLocaleValue("messageBox.errorTitle"));
|
|
6319
|
+
const V = h(!1);
|
|
6314
6320
|
function k() {
|
|
6315
6321
|
const j = document.querySelectorAll(".farris-modal").length;
|
|
6316
6322
|
(!j || j - 1 <= 0) && S.value === document.querySelectorAll(".farris-modal")[0] && document.body.classList.remove("modal-open"), S.value && S.value.classList.remove("show");
|
|
@@ -6328,19 +6334,19 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6328
6334
|
}
|
|
6329
6335
|
const g = [{
|
|
6330
6336
|
name: "cancel",
|
|
6331
|
-
text:
|
|
6337
|
+
text: ze.getLocaleValue("messageBox.cancel") || "取消",
|
|
6332
6338
|
class: "btn btn-secondary",
|
|
6333
6339
|
handle: (j) => {
|
|
6334
6340
|
C(j, !1);
|
|
6335
6341
|
}
|
|
6336
6342
|
}, {
|
|
6337
6343
|
name: "accept",
|
|
6338
|
-
text:
|
|
6344
|
+
text: ze.getLocaleValue("messageBox.ok") || "确定",
|
|
6339
6345
|
class: "btn btn-primary",
|
|
6340
6346
|
handle: (j) => {
|
|
6341
6347
|
C(j, !0);
|
|
6342
6348
|
}
|
|
6343
|
-
}], p =
|
|
6349
|
+
}], p = h(e.buttons && e.buttons.length ? e.buttons : g), w = X(() => !!u.value), x = X(() => !!D.value && !!p.value), I = h(), _ = h(), M = h(e.maximized || !1), {
|
|
6344
6350
|
renderResizeBar: N,
|
|
6345
6351
|
maximize: $,
|
|
6346
6352
|
restore: L,
|
|
@@ -6349,9 +6355,9 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6349
6355
|
allowDrag: z,
|
|
6350
6356
|
unWindowResizeHandle: oe,
|
|
6351
6357
|
moveToCenter: E
|
|
6352
|
-
} =
|
|
6358
|
+
} = Zl(e), {
|
|
6353
6359
|
registerDraggle: A
|
|
6354
|
-
} =
|
|
6360
|
+
} = es(e, t, z);
|
|
6355
6361
|
function ae() {
|
|
6356
6362
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
6357
6363
|
}
|
|
@@ -6359,8 +6365,8 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6359
6365
|
j !== ue && (B.value = j);
|
|
6360
6366
|
}), Me(() => e.modelValue, (j, ue) => {
|
|
6361
6367
|
j !== ue && (i.value = j, i.value && e.draggable && Ct(() => {
|
|
6362
|
-
_.value && !
|
|
6363
|
-
}), j || (
|
|
6368
|
+
_.value && !y.value && (y.value = _.value.parentElement, U.value = y.value, A(I.value, _.value, U.value), E());
|
|
6369
|
+
}), j || (y.value && (y.value = null), k())), i.value ? V.value = ae() : (M.value = !1, z.value = e.draggable);
|
|
6364
6370
|
}), Me(() => e.showHeader, (j, ue) => {
|
|
6365
6371
|
j !== ue && (s.value = j);
|
|
6366
6372
|
}), Me(() => e.showButtons, (j, ue) => {
|
|
@@ -6387,14 +6393,14 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6387
6393
|
};
|
|
6388
6394
|
j["f-modal-fitContent"] = !!c.value, j.show = !!ie.value;
|
|
6389
6395
|
const ue = (Fe = e.maskClass) == null ? void 0 : Fe.split(" ");
|
|
6390
|
-
return ue == null || ue.reduce((Ee,
|
|
6391
|
-
}),
|
|
6396
|
+
return ue == null || ue.reduce((Ee, He) => (Ee[He] = !0, Ee), j), j;
|
|
6397
|
+
}), ge = X(() => {
|
|
6392
6398
|
var Fe;
|
|
6393
6399
|
const j = {
|
|
6394
6400
|
"modal-dialog": !0
|
|
6395
6401
|
}, ue = (Fe = r.value) == null ? void 0 : Fe.split(" ");
|
|
6396
|
-
return ue == null || ue.reduce((Ee,
|
|
6397
|
-
}), Se = () => ln() && !e.isMessager || !!e.fullscreen,
|
|
6402
|
+
return ue == null || ue.reduce((Ee, He) => (Ee[He] = !0, Ee), j), j;
|
|
6403
|
+
}), Se = () => ln() && !e.isMessager || !!e.fullscreen, fe = X(() => {
|
|
6398
6404
|
const j = document.documentElement.clientWidth, ue = document.documentElement.clientHeight;
|
|
6399
6405
|
if (M.value)
|
|
6400
6406
|
return {
|
|
@@ -6405,15 +6411,15 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6405
6411
|
height: "100vh",
|
|
6406
6412
|
margin: "0"
|
|
6407
6413
|
};
|
|
6408
|
-
const Fe = Math.min(n.value, j), Ee = e.position === "right" ? "100%" : c.value ? "auto" : `${Math.min(o.value, ue - 10)}px`,
|
|
6414
|
+
const Fe = Math.min(n.value, j), Ee = e.position === "right" ? "100%" : c.value ? "auto" : `${Math.min(o.value, ue - 10)}px`, He = `${(window.innerHeight - (Ee === "100%" || Ee === "auto" ? 0 : parseInt(Ee))) / 2}px`, wt = e.position === "right" ? `${window.innerWidth - Fe}px` : `${(window.innerWidth - Fe) / 2}px`, st = {
|
|
6409
6415
|
position: "absolute",
|
|
6410
|
-
top:
|
|
6416
|
+
top: He,
|
|
6411
6417
|
left: wt,
|
|
6412
6418
|
width: ln() ? "auto" : `${Fe}px`,
|
|
6413
6419
|
height: Ee
|
|
6414
6420
|
};
|
|
6415
6421
|
return e.mask || (st.pointerEvents = "auto"), st;
|
|
6416
|
-
}), Z =
|
|
6422
|
+
}), Z = h(Fn() || 1050), F = X(() => {
|
|
6417
6423
|
const j = {
|
|
6418
6424
|
display: "block",
|
|
6419
6425
|
overflow: "hidden"
|
|
@@ -6432,7 +6438,7 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6432
6438
|
"f-icon": !0,
|
|
6433
6439
|
modal_maximize: !0,
|
|
6434
6440
|
modalrevert: M.value
|
|
6435
|
-
})),
|
|
6441
|
+
})), ye = X(() => ({
|
|
6436
6442
|
"modal-body": !0,
|
|
6437
6443
|
"f-utils-flex-column": l.value === "iframe",
|
|
6438
6444
|
"f-utils-fill": !0
|
|
@@ -6468,7 +6474,7 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6468
6474
|
Pn(() => {
|
|
6469
6475
|
V.value = ae();
|
|
6470
6476
|
}), et(() => {
|
|
6471
|
-
_.value && !
|
|
6477
|
+
_.value && !y.value && (y.value = _.value.parentElement, U.value = y.value, A(I.value, _.value, U.value)), ie.value && document.body.classList.add("modal-open"), Ve = ts(e, t), Pe = ns(e, t);
|
|
6472
6478
|
}), bt(() => {
|
|
6473
6479
|
oe && oe(), Ve && Ve.remove(), Pe && Pe.remove();
|
|
6474
6480
|
}), t.expose({
|
|
@@ -6526,15 +6532,15 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6526
6532
|
onWheel: pt
|
|
6527
6533
|
}, [p.value.map((j) => {
|
|
6528
6534
|
var Ee;
|
|
6529
|
-
const ue =
|
|
6535
|
+
const ue = h(j.disabled), Fe = j.class || ((Ee = j.appearance) == null ? void 0 : Ee.class);
|
|
6530
6536
|
return v("button", {
|
|
6531
6537
|
name: j.name,
|
|
6532
6538
|
style: j.styles,
|
|
6533
6539
|
type: "button",
|
|
6534
6540
|
disabled: ue.value,
|
|
6535
6541
|
class: Fe + (j.iconClass ? " btn-icontext" : "") + (j.visible === !1 ? "d-none" : ""),
|
|
6536
|
-
onClick: (
|
|
6537
|
-
Te(j,
|
|
6542
|
+
onClick: (He) => {
|
|
6543
|
+
Te(j, He);
|
|
6538
6544
|
}
|
|
6539
6545
|
}, [!!j.iconClass && v("i", {
|
|
6540
6546
|
class: j.iconClass
|
|
@@ -6579,13 +6585,13 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6579
6585
|
var j, ue;
|
|
6580
6586
|
return v("div", {
|
|
6581
6587
|
id: a.value,
|
|
6582
|
-
class:
|
|
6583
|
-
style:
|
|
6588
|
+
class: ge.value,
|
|
6589
|
+
style: fe.value,
|
|
6584
6590
|
ref: _
|
|
6585
6591
|
}, [e.showFloatingClose && Be(), v("div", {
|
|
6586
6592
|
class: re.value
|
|
6587
6593
|
}, [s.value && tt(), v("div", {
|
|
6588
|
-
class:
|
|
6594
|
+
class: ye.value
|
|
6589
6595
|
}, [(ue = (j = t.slots).default) == null ? void 0 : ue.call(j), l.value === "iframe" && v("iframe", {
|
|
6590
6596
|
title: a.value,
|
|
6591
6597
|
class: "f-utils-fill",
|
|
@@ -6597,9 +6603,9 @@ const Pt = /* @__PURE__ */ Ae({
|
|
|
6597
6603
|
function Ie(j) {
|
|
6598
6604
|
return j || "body";
|
|
6599
6605
|
}
|
|
6600
|
-
return
|
|
6606
|
+
return Xi(() => {
|
|
6601
6607
|
ie.value && (Z.value = Fn() || 1050);
|
|
6602
|
-
}), () => v(
|
|
6608
|
+
}), () => v(Qi, {
|
|
6603
6609
|
to: Ie(e.host)
|
|
6604
6610
|
}, {
|
|
6605
6611
|
default: () => [ie.value && v(kn, {
|
|
@@ -6622,7 +6628,7 @@ function ri(e) {
|
|
|
6622
6628
|
if (e.render && typeof e.render == "function")
|
|
6623
6629
|
return e.render;
|
|
6624
6630
|
}
|
|
6625
|
-
function
|
|
6631
|
+
function os(e) {
|
|
6626
6632
|
const t = document.createElement("div");
|
|
6627
6633
|
t.style.display = "contents";
|
|
6628
6634
|
const n = In({
|
|
@@ -6630,12 +6636,12 @@ function ts(e) {
|
|
|
6630
6636
|
bt(() => {
|
|
6631
6637
|
document.body.removeChild(t);
|
|
6632
6638
|
});
|
|
6633
|
-
const a =
|
|
6639
|
+
const a = h(), r = h(e.class || ""), c = h(!!e.showButtons), s = h(!!e.showHeader), u = h(e.showCloseButton == null ? !0 : e.showCloseButton), m = h(!!e.showFloatingClose), f = h(!0), b = h(e.title || ""), l = e.acceptCallback || (() => {
|
|
6634
6640
|
}), d = e.rejectCallback || (() => {
|
|
6635
6641
|
}), T = e.closedCallback || ((V) => {
|
|
6636
6642
|
}), D = e.resizeHandle || ((V) => {
|
|
6637
6643
|
}), B = e.stopMoveHandle || ((V) => {
|
|
6638
|
-
}),
|
|
6644
|
+
}), y = ri(e), S = (V) => {
|
|
6639
6645
|
f.value = !1, n.unmount(), T(V);
|
|
6640
6646
|
};
|
|
6641
6647
|
return et(() => {
|
|
@@ -6662,22 +6668,22 @@ function ts(e) {
|
|
|
6662
6668
|
onResize: D,
|
|
6663
6669
|
onStopMove: B
|
|
6664
6670
|
}, {
|
|
6665
|
-
default: () => [
|
|
6671
|
+
default: () => [y && y(n)]
|
|
6666
6672
|
});
|
|
6667
6673
|
}
|
|
6668
6674
|
});
|
|
6669
|
-
return document.body.appendChild(t), n.use(
|
|
6675
|
+
return document.body.appendChild(t), n.use(ze.i18n), n.mount(t), n;
|
|
6670
6676
|
}
|
|
6671
|
-
class
|
|
6677
|
+
class is {
|
|
6672
6678
|
// private activeModalInstance = computed(() => {
|
|
6673
6679
|
// return this.modalRefs[this.activeModalIndex.value];
|
|
6674
6680
|
// });
|
|
6675
6681
|
constructor(t) {
|
|
6676
6682
|
we(this, "appContext", null);
|
|
6677
|
-
we(this, "modalRef",
|
|
6678
|
-
we(this, "activeModalIndex",
|
|
6683
|
+
we(this, "modalRef", h());
|
|
6684
|
+
we(this, "activeModalIndex", h(0));
|
|
6679
6685
|
we(this, "modalRefs", {});
|
|
6680
|
-
we(this, "isUseEscCloseModal",
|
|
6686
|
+
we(this, "isUseEscCloseModal", h(!1));
|
|
6681
6687
|
this.app = t, this.appContext = t ? t._context : null;
|
|
6682
6688
|
}
|
|
6683
6689
|
getCurrentModal() {
|
|
@@ -6702,7 +6708,7 @@ class ns {
|
|
|
6702
6708
|
showButtons: !0,
|
|
6703
6709
|
showHeader: !0
|
|
6704
6710
|
}, t);
|
|
6705
|
-
return
|
|
6711
|
+
return os(n);
|
|
6706
6712
|
}
|
|
6707
6713
|
close(t) {
|
|
6708
6714
|
var n, o;
|
|
@@ -6711,12 +6717,12 @@ class ns {
|
|
|
6711
6717
|
open(t) {
|
|
6712
6718
|
const n = document.createDocumentFragment();
|
|
6713
6719
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
6714
|
-
const o =
|
|
6720
|
+
const o = Ji(Object.assign({
|
|
6715
6721
|
title: "",
|
|
6716
6722
|
showButtons: !0,
|
|
6717
6723
|
showHeader: !0,
|
|
6718
6724
|
maximized: !1
|
|
6719
|
-
}, t)), i =
|
|
6725
|
+
}, t)), i = h(!0), a = o.value.acceptCallback || (() => {
|
|
6720
6726
|
}), r = o.value.rejectCallback || (() => {
|
|
6721
6727
|
}), c = o.value.closedCallback || ((p, w) => {
|
|
6722
6728
|
}), s = o.value.openedCallback || ((p) => {
|
|
@@ -6743,9 +6749,9 @@ class ns {
|
|
|
6743
6749
|
}, {
|
|
6744
6750
|
width: D,
|
|
6745
6751
|
height: B
|
|
6746
|
-
} = o.value,
|
|
6747
|
-
Object.assign(o.value,
|
|
6748
|
-
const S =
|
|
6752
|
+
} = o.value, y = this.adaptToWindow(D || 500, B || 320);
|
|
6753
|
+
Object.assign(o.value, y);
|
|
6754
|
+
const S = h(), V = () => v(Pt, ut({
|
|
6749
6755
|
ref: S,
|
|
6750
6756
|
modelValue: i.value,
|
|
6751
6757
|
"onUpdate:modelValue": (p) => i.value = p
|
|
@@ -6762,7 +6768,7 @@ class ns {
|
|
|
6762
6768
|
default: () => [b && b(this.app)]
|
|
6763
6769
|
});
|
|
6764
6770
|
f = ((p) => {
|
|
6765
|
-
const w =
|
|
6771
|
+
const w = Zi(V, p);
|
|
6766
6772
|
return w.appContext = this.appContext, Zt(w, n), w;
|
|
6767
6773
|
})({
|
|
6768
6774
|
...o.value
|
|
@@ -6774,7 +6780,7 @@ class ns {
|
|
|
6774
6780
|
o.value = {
|
|
6775
6781
|
...o.value,
|
|
6776
6782
|
...p
|
|
6777
|
-
}, f && Zt(
|
|
6783
|
+
}, f && Zt(ea(f, {
|
|
6778
6784
|
...o
|
|
6779
6785
|
}), n);
|
|
6780
6786
|
};
|
|
@@ -6798,19 +6804,19 @@ class ns {
|
|
|
6798
6804
|
const li = Symbol("FModalService");
|
|
6799
6805
|
Pt.install = (e) => {
|
|
6800
6806
|
e.component(Pt.name, Pt);
|
|
6801
|
-
const t = new
|
|
6807
|
+
const t = new is(e);
|
|
6802
6808
|
e.provide(li, t), e.provide("FModalService", t);
|
|
6803
6809
|
};
|
|
6804
|
-
const si =
|
|
6805
|
-
function
|
|
6810
|
+
const si = h(0);
|
|
6811
|
+
function as() {
|
|
6806
6812
|
si.value++;
|
|
6807
6813
|
}
|
|
6808
|
-
const
|
|
6814
|
+
const tu = /* @__PURE__ */ Ae({
|
|
6809
6815
|
name: "FDesignerCanvas",
|
|
6810
|
-
props:
|
|
6816
|
+
props: Dr,
|
|
6811
6817
|
emits: ["init", "selectionChange", "canvasChanged", "dragEnd"],
|
|
6812
6818
|
setup(e, t) {
|
|
6813
|
-
const n =
|
|
6819
|
+
const n = h(), o = h(), i = h(), a = h(), r = h(), c = h(), s = h(e.componentId), u = h(e.canvasMode);
|
|
6814
6820
|
let m, f;
|
|
6815
6821
|
const b = xe("designerContext"), l = {
|
|
6816
6822
|
eventsEditorUtils: xe("eventsEditorUtils"),
|
|
@@ -6829,8 +6835,8 @@ const Zc = /* @__PURE__ */ Ae({
|
|
|
6829
6835
|
dialogCodeView: xe("dialogCodeView")
|
|
6830
6836
|
};
|
|
6831
6837
|
It("designer-host-service", l);
|
|
6832
|
-
const d =
|
|
6833
|
-
e.components &&
|
|
6838
|
+
const d = Hl(l, b);
|
|
6839
|
+
e.components && Yl(e.components), Gl(), It("canvas-dragula", d), It("design-item-context", {
|
|
6834
6840
|
designerItemElementRef: r,
|
|
6835
6841
|
componentInstance: c,
|
|
6836
6842
|
schema: o.value,
|
|
@@ -6861,7 +6867,7 @@ const Zc = /* @__PURE__ */ Ae({
|
|
|
6861
6867
|
});
|
|
6862
6868
|
}), m.observe(a.value);
|
|
6863
6869
|
}
|
|
6864
|
-
function
|
|
6870
|
+
function y(k, C, g, p) {
|
|
6865
6871
|
t.emit("selectionChange", k, C, g, p);
|
|
6866
6872
|
}
|
|
6867
6873
|
function S() {
|
|
@@ -6877,8 +6883,8 @@ const Zc = /* @__PURE__ */ Ae({
|
|
|
6877
6883
|
}), bt(() => {
|
|
6878
6884
|
m && (m.unobserve(i.value), m.disconnect(), m = null);
|
|
6879
6885
|
}), t.expose({
|
|
6880
|
-
refreshCanvas:
|
|
6881
|
-
changeCanvas:
|
|
6886
|
+
refreshCanvas: as,
|
|
6887
|
+
changeCanvas: Mr,
|
|
6882
6888
|
designerCanvasElementRef: i,
|
|
6883
6889
|
designerCanvasContainerElementRef: a,
|
|
6884
6890
|
designerHostService: l
|
|
@@ -6894,12 +6900,12 @@ const Zc = /* @__PURE__ */ Ae({
|
|
|
6894
6900
|
key: si.value,
|
|
6895
6901
|
modelValue: n.value,
|
|
6896
6902
|
"onUpdate:modelValue": (k) => n.value = k,
|
|
6897
|
-
onSelectionChange:
|
|
6903
|
+
onSelectionChange: y,
|
|
6898
6904
|
componentId: s.value,
|
|
6899
6905
|
onDragEnd: S
|
|
6900
6906
|
}, null)])])]);
|
|
6901
6907
|
}
|
|
6902
|
-
}),
|
|
6908
|
+
}), rs = {
|
|
6903
6909
|
id: { type: String, default: "" },
|
|
6904
6910
|
componentId: { type: String, default: "" },
|
|
6905
6911
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -6913,9 +6919,9 @@ const Zc = /* @__PURE__ */ Ae({
|
|
|
6913
6919
|
*/
|
|
6914
6920
|
modelValue: { type: Object }
|
|
6915
6921
|
};
|
|
6916
|
-
function
|
|
6922
|
+
function ls(e, t, n) {
|
|
6917
6923
|
var p;
|
|
6918
|
-
const o = n && n.getStyles && n.getStyles() || "", i =
|
|
6924
|
+
const o = n && n.getStyles && n.getStyles() || "", i = h();
|
|
6919
6925
|
let a;
|
|
6920
6926
|
function r() {
|
|
6921
6927
|
return n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
@@ -6932,7 +6938,7 @@ function as(e, t, n) {
|
|
|
6932
6938
|
function m(w) {
|
|
6933
6939
|
if (!w || !w.value)
|
|
6934
6940
|
return null;
|
|
6935
|
-
const x =
|
|
6941
|
+
const x = h(w == null ? void 0 : w.value.parent), I = m(x);
|
|
6936
6942
|
return I || null;
|
|
6937
6943
|
}
|
|
6938
6944
|
function f(w = t) {
|
|
@@ -6965,7 +6971,7 @@ function as(e, t, n) {
|
|
|
6965
6971
|
const M = x.toLowerCase().replace(/-/g, "_");
|
|
6966
6972
|
return _ && !_.id && _.type === x && (_.id = `${M}_${Math.random().toString().slice(2, 6)}`), _;
|
|
6967
6973
|
}
|
|
6968
|
-
function
|
|
6974
|
+
function y(w) {
|
|
6969
6975
|
}
|
|
6970
6976
|
function S(...w) {
|
|
6971
6977
|
return n && n.getPropsConfig ? n.getPropsConfig(...w) : [];
|
|
@@ -7019,22 +7025,22 @@ function as(e, t, n) {
|
|
|
7019
7025
|
getPropConfig: S,
|
|
7020
7026
|
getDragScopeElement: T,
|
|
7021
7027
|
onAcceptMovedChildElement: D,
|
|
7022
|
-
onChildElementMovedOut:
|
|
7028
|
+
onChildElementMovedOut: y,
|
|
7023
7029
|
addNewChildComponentSchema: B,
|
|
7024
7030
|
onRemoveComponent: V,
|
|
7025
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
7026
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
7031
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || h(!1),
|
|
7032
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || h(!1),
|
|
7027
7033
|
onPropertyChanged: g,
|
|
7028
7034
|
getCustomButtons: b,
|
|
7029
7035
|
setComponentBasicInfoMap: k
|
|
7030
7036
|
}, i;
|
|
7031
7037
|
}
|
|
7032
|
-
const
|
|
7038
|
+
const nu = /* @__PURE__ */ Ae({
|
|
7033
7039
|
name: "FDesignerInnerItem",
|
|
7034
|
-
props:
|
|
7040
|
+
props: rs,
|
|
7035
7041
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
7036
7042
|
setup(e, t) {
|
|
7037
|
-
const n =
|
|
7043
|
+
const n = h(e.canMove), o = h(e.canAdd), i = h(e.canDelete), a = h(!1), r = h(e.contentKey), c = h(e.childType), s = h(e.childLabel), u = h(e.modelValue), m = h(""), f = h(), b = xe("canvas-dragula"), l = h(), d = xe("design-item-context"), T = {
|
|
7038
7044
|
designerItemElementRef: f,
|
|
7039
7045
|
componentInstance: l,
|
|
7040
7046
|
schema: u.value,
|
|
@@ -7042,7 +7048,7 @@ const eu = /* @__PURE__ */ Ae({
|
|
|
7042
7048
|
setupContext: t
|
|
7043
7049
|
};
|
|
7044
7050
|
It("design-item-context", T);
|
|
7045
|
-
const D = xe("designer-host-service"), B = xe("external-container-id"),
|
|
7051
|
+
const D = xe("designer-host-service"), B = xe("external-container-id"), y = X(() => {
|
|
7046
7052
|
var O;
|
|
7047
7053
|
const L = ((O = l.value) == null ? void 0 : O.getCustomButtons) && l.value.getCustomButtons();
|
|
7048
7054
|
return {
|
|
@@ -7100,7 +7106,7 @@ const eu = /* @__PURE__ */ Ae({
|
|
|
7100
7106
|
class: "btn component-settings-button",
|
|
7101
7107
|
title: "删除",
|
|
7102
7108
|
ref: "removeComponent",
|
|
7103
|
-
onClick:
|
|
7109
|
+
onClick: ta((U) => V(U, L), ["stop"])
|
|
7104
7110
|
}, [v("i", {
|
|
7105
7111
|
class: "f-icon f-icon-yxs_delete"
|
|
7106
7112
|
}, null)]);
|
|
@@ -7154,8 +7160,8 @@ const eu = /* @__PURE__ */ Ae({
|
|
|
7154
7160
|
(U = (L = u.value) == null ? void 0 : L.contents) != null && U.length && f.value && f.value.addEventListener("scroll", _);
|
|
7155
7161
|
}
|
|
7156
7162
|
function N() {
|
|
7157
|
-
const L = f.value, U =
|
|
7158
|
-
return
|
|
7163
|
+
const L = f.value, U = h(L.children[1]);
|
|
7164
|
+
return ls(U, T).value;
|
|
7159
7165
|
}
|
|
7160
7166
|
et(() => {
|
|
7161
7167
|
if (f.value) {
|
|
@@ -7183,15 +7189,15 @@ const eu = /* @__PURE__ */ Ae({
|
|
|
7183
7189
|
return () => v("div", {
|
|
7184
7190
|
id: `${e.id}-design-item`,
|
|
7185
7191
|
ref: f,
|
|
7186
|
-
class:
|
|
7192
|
+
class: y.value,
|
|
7187
7193
|
style: S.value,
|
|
7188
7194
|
onClick: $
|
|
7189
7195
|
}, [x(u.value), t.slots.default && t.slots.default()]);
|
|
7190
7196
|
}
|
|
7191
7197
|
});
|
|
7192
|
-
function
|
|
7198
|
+
function ou(e, t, n) {
|
|
7193
7199
|
var _;
|
|
7194
|
-
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", a =
|
|
7200
|
+
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", a = h();
|
|
7195
7201
|
let r;
|
|
7196
7202
|
function c() {
|
|
7197
7203
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
@@ -7210,7 +7216,7 @@ function tu(e, t, n) {
|
|
|
7210
7216
|
return null;
|
|
7211
7217
|
if (M.value.schema && M.value.schema.type === "component")
|
|
7212
7218
|
return M.value;
|
|
7213
|
-
const N =
|
|
7219
|
+
const N = h(M == null ? void 0 : M.value.parent), $ = f(N);
|
|
7214
7220
|
return $ || null;
|
|
7215
7221
|
}
|
|
7216
7222
|
function b(M = t) {
|
|
@@ -7242,7 +7248,7 @@ function tu(e, t, n) {
|
|
|
7242
7248
|
const U = $.toLowerCase().replace(/-/g, "_");
|
|
7243
7249
|
return L && !L.id && L.type === $ && (L.id = `${U}_${Math.random().toString().slice(2, 6)}`), L;
|
|
7244
7250
|
}
|
|
7245
|
-
function
|
|
7251
|
+
function y(M) {
|
|
7246
7252
|
M && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(M);
|
|
7247
7253
|
}
|
|
7248
7254
|
function S(...M) {
|
|
@@ -7338,10 +7344,10 @@ function tu(e, t, n) {
|
|
|
7338
7344
|
getPropConfig: S,
|
|
7339
7345
|
getDragScopeElement: T,
|
|
7340
7346
|
onAcceptMovedChildElement: D,
|
|
7341
|
-
onChildElementMovedOut:
|
|
7347
|
+
onChildElementMovedOut: y,
|
|
7342
7348
|
addNewChildComponentSchema: B,
|
|
7343
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
7344
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
7349
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || h(!1),
|
|
7350
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || h(!1),
|
|
7345
7351
|
onRemoveComponent: C,
|
|
7346
7352
|
getCustomButtons: g,
|
|
7347
7353
|
onPropertyChanged: x,
|
|
@@ -7350,7 +7356,7 @@ function tu(e, t, n) {
|
|
|
7350
7356
|
shouldApplyClassToComponent: I
|
|
7351
7357
|
}, a;
|
|
7352
7358
|
}
|
|
7353
|
-
class
|
|
7359
|
+
class iu {
|
|
7354
7360
|
getTemplateRule(t, n) {
|
|
7355
7361
|
const o = n == null ? void 0 : n.formSchemaUtils, i = o == null ? void 0 : o.getFormTemplateRule(), a = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
7356
7362
|
if (!i)
|
|
@@ -7437,8 +7443,8 @@ class nu {
|
|
|
7437
7443
|
return !i;
|
|
7438
7444
|
}
|
|
7439
7445
|
getComponentContext(t) {
|
|
7440
|
-
var T, D, B,
|
|
7441
|
-
const n = t.schema, o = n.appearance && n.appearance.class || "", i = o.split(" ") || [], a = n.contents || [], r = a.length ? a[0] : null, c = r && r.appearance ? r.appearance.class : "", s = c ? c.split(" ") : [], u = (T = r == null ? void 0 : r.contents) != null && T.length ? r == null ? void 0 : r.contents[0] : null, m = u && u.appearance ? u.appearance.class : "", f = m ? m.split(" ") : [], b = n.type === "component" ? (B = (D = t.parent) == null ? void 0 : D.parent) == null ? void 0 : B.schema : (
|
|
7446
|
+
var T, D, B, y;
|
|
7447
|
+
const n = t.schema, o = n.appearance && n.appearance.class || "", i = o.split(" ") || [], a = n.contents || [], r = a.length ? a[0] : null, c = r && r.appearance ? r.appearance.class : "", s = c ? c.split(" ") : [], u = (T = r == null ? void 0 : r.contents) != null && T.length ? r == null ? void 0 : r.contents[0] : null, m = u && u.appearance ? u.appearance.class : "", f = m ? m.split(" ") : [], b = n.type === "component" ? (B = (D = t.parent) == null ? void 0 : D.parent) == null ? void 0 : B.schema : (y = t.parent) == null ? void 0 : y.schema, l = b && b.appearance && b.appearance.class || "", d = l ? l.split(" ") : [];
|
|
7442
7448
|
return {
|
|
7443
7449
|
componentClass: o,
|
|
7444
7450
|
componentClassList: i,
|
|
@@ -7456,7 +7462,7 @@ class nu {
|
|
|
7456
7462
|
};
|
|
7457
7463
|
}
|
|
7458
7464
|
}
|
|
7459
|
-
function
|
|
7465
|
+
function au() {
|
|
7460
7466
|
function e(t, n) {
|
|
7461
7467
|
var r;
|
|
7462
7468
|
if (!t)
|
|
@@ -7473,19 +7479,19 @@ function ou() {
|
|
|
7473
7479
|
}
|
|
7474
7480
|
export {
|
|
7475
7481
|
De as DgControl,
|
|
7476
|
-
|
|
7477
|
-
|
|
7482
|
+
tu as FDesignerCanvas,
|
|
7483
|
+
nu as FDesignerInnerItem,
|
|
7478
7484
|
dn as FDesignerItem,
|
|
7479
|
-
|
|
7485
|
+
iu as UseTemplateDragAndDropRules,
|
|
7480
7486
|
at as canvasChanged,
|
|
7481
7487
|
ee as componentMap,
|
|
7482
7488
|
te as componentPropsConverter,
|
|
7483
|
-
|
|
7484
|
-
|
|
7489
|
+
Dr as designerCanvasProps,
|
|
7490
|
+
as as refreshCanvas,
|
|
7485
7491
|
Xo as setPositionForSelectedElement,
|
|
7486
7492
|
fn as setPositionOfButtonGroup,
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7493
|
+
eu as setPositionOfSelectedComponentBtnGroup,
|
|
7494
|
+
ou as useDesignerComponent,
|
|
7495
|
+
ls as useDesignerInnerComponent,
|
|
7496
|
+
au as useDragulaCommonRule
|
|
7491
7497
|
};
|