@farris/ui-vue 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,156 +1,157 @@
|
|
|
1
1
|
import { ref as H, defineComponent as Be, computed as ve, createVNode as J, createTextVNode as ht, inject as re, provide as ye, watch as Ge, onMounted as ze, onBeforeUnmount as yt, mergeProps as Ae, isVNode as Ct } from "vue";
|
|
2
2
|
import { findIndex as Me, cloneDeep as Dt } from "lodash-es";
|
|
3
|
-
import bt from "
|
|
4
|
-
import wt from "
|
|
5
|
-
import St from "
|
|
6
|
-
import Tt from "
|
|
7
|
-
import Et from "
|
|
8
|
-
import Ft from "
|
|
9
|
-
import Pt from "
|
|
10
|
-
import It from "
|
|
11
|
-
import At from "
|
|
12
|
-
import Mt from "
|
|
13
|
-
import Nt from "
|
|
14
|
-
import Bt from "
|
|
15
|
-
import xt from "
|
|
16
|
-
import kt from "
|
|
17
|
-
import _t from "
|
|
18
|
-
import Ot from "
|
|
19
|
-
import Lt from "
|
|
20
|
-
import Vt from "
|
|
21
|
-
import jt from "
|
|
22
|
-
import $t from "
|
|
23
|
-
import Ut from "
|
|
24
|
-
import qt from "
|
|
25
|
-
import Ht from "
|
|
26
|
-
import Xt from "
|
|
27
|
-
import Wt from "
|
|
28
|
-
import Yt from "
|
|
29
|
-
import Gt from "
|
|
30
|
-
import zt from "
|
|
31
|
-
import Jt from "
|
|
32
|
-
import Kt from "
|
|
33
|
-
import Qt from "
|
|
34
|
-
import Zt from "
|
|
35
|
-
import Rt from "
|
|
36
|
-
import en from "
|
|
37
|
-
import tn from "
|
|
38
|
-
import nn from "
|
|
39
|
-
import on from "
|
|
40
|
-
import rn from "
|
|
41
|
-
import an from "
|
|
42
|
-
import cn from "
|
|
43
|
-
import ln from "
|
|
44
|
-
import un from "
|
|
45
|
-
import sn from "
|
|
46
|
-
import fn from "
|
|
47
|
-
import pn from "
|
|
48
|
-
import mn from "
|
|
49
|
-
import dn from "
|
|
50
|
-
import vn from "
|
|
51
|
-
import gn from "
|
|
52
|
-
import hn from "
|
|
53
|
-
import yn from "
|
|
54
|
-
import Cn from "
|
|
55
|
-
import Dn from "
|
|
56
|
-
import bn from "
|
|
57
|
-
import wn from "
|
|
3
|
+
import bt from "../accordion/index.esm.js";
|
|
4
|
+
import wt from "../avatar/index.esm.js";
|
|
5
|
+
import St from "../button-edit/index.esm.js";
|
|
6
|
+
import Tt from "../button-group/index.esm.js";
|
|
7
|
+
import Et from "../calendar/index.esm.js";
|
|
8
|
+
import Ft from "../capsule/index.esm.js";
|
|
9
|
+
import Pt from "../checkbox/index.esm.js";
|
|
10
|
+
import It from "../color-picker/index.esm.js";
|
|
11
|
+
import At from "../combo-list/index.esm.js";
|
|
12
|
+
import Mt from "../content-container/index.esm.js";
|
|
13
|
+
import Nt from "../data-grid/index.esm.js";
|
|
14
|
+
import Bt from "../date-picker/index.esm.js";
|
|
15
|
+
import xt from "../dropdown/index.esm.js";
|
|
16
|
+
import kt from "../dynamic-form/index.esm.js";
|
|
17
|
+
import _t from "../external-container/index.esm.js";
|
|
18
|
+
import Ot from "../events-editor/index.esm.js";
|
|
19
|
+
import Lt from "../filter-bar/index.esm.js";
|
|
20
|
+
import Vt from "../image-cropper/index.esm.js";
|
|
21
|
+
import jt from "../input-group/index.esm.js";
|
|
22
|
+
import $t from "../layout/index.esm.js";
|
|
23
|
+
import Ut from "../list-nav/index.esm.js";
|
|
24
|
+
import qt from "../list-view/index.esm.js";
|
|
25
|
+
import Ht from "../lookup/index.esm.js";
|
|
26
|
+
import Xt from "../nav/index.esm.js";
|
|
27
|
+
import Wt from "../number-spinner/index.esm.js";
|
|
28
|
+
import Yt from "../number-range/index.esm.js";
|
|
29
|
+
import Gt from "../order/index.esm.js";
|
|
30
|
+
import zt from "../page-header/index.esm.js";
|
|
31
|
+
import Jt from "../page-footer/index.esm.js";
|
|
32
|
+
import Kt from "../pagination/index.esm.js";
|
|
33
|
+
import Qt from "../progress/index.esm.js";
|
|
34
|
+
import Zt from "../query-solution/index.esm.js";
|
|
35
|
+
import Rt from "../radio-group/index.esm.js";
|
|
36
|
+
import en from "../rate/index.esm.js";
|
|
37
|
+
import tn from "../response-toolbar/index.esm.js";
|
|
38
|
+
import nn from "../response-layout/index.esm.js";
|
|
39
|
+
import on from "../response-layout-editor/index.esm.js";
|
|
40
|
+
import rn from "../search-box/index.esm.js";
|
|
41
|
+
import an from "../section/index.esm.js";
|
|
42
|
+
import cn from "../smoke-detector/index.esm.js";
|
|
43
|
+
import ln from "../splitter/index.esm.js";
|
|
44
|
+
import un from "../step/index.esm.js";
|
|
45
|
+
import sn from "../switch/index.esm.js";
|
|
46
|
+
import fn from "../tabs/index.esm.js";
|
|
47
|
+
import pn from "../tags/index.esm.js";
|
|
48
|
+
import mn from "../text/index.esm.js";
|
|
49
|
+
import dn from "../time-picker/index.esm.js";
|
|
50
|
+
import vn from "../transfer/index.esm.js";
|
|
51
|
+
import gn from "../tree-view/index.esm.js";
|
|
52
|
+
import hn from "../uploader/index.esm.js";
|
|
53
|
+
import yn from "../verify-detail/index.esm.js";
|
|
54
|
+
import Cn from "../weather/index.esm.js";
|
|
55
|
+
import Dn from "../component/index.esm.js";
|
|
56
|
+
import bn from "../video/index.esm.js";
|
|
57
|
+
import wn from "../textarea/index.esm.js";
|
|
58
|
+
import Sn from "../tree-grid/index.esm.js";
|
|
58
59
|
const de = H(0);
|
|
59
|
-
function
|
|
60
|
-
const t = f.getBoundingClientRect(),
|
|
60
|
+
function Tn(S, f) {
|
|
61
|
+
const t = f.getBoundingClientRect(), w = S.getBoundingClientRect(), B = w.top >= t.top, l = w.top <= t.bottom;
|
|
61
62
|
return B && l;
|
|
62
63
|
}
|
|
63
|
-
function Je(
|
|
64
|
-
if (!
|
|
64
|
+
function Je(S) {
|
|
65
|
+
if (!S)
|
|
65
66
|
return;
|
|
66
67
|
let f;
|
|
67
|
-
if (
|
|
68
|
+
if (S.className.includes("dgComponentSelected") ? f = S : f = S.querySelector(".dgComponentSelected"), !f)
|
|
68
69
|
return;
|
|
69
70
|
const t = f.getBoundingClientRect();
|
|
70
71
|
if (t.width === 0 && t.height === 0)
|
|
71
72
|
return;
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
if (!
|
|
75
|
-
|
|
73
|
+
const w = f.querySelector(".component-btn-group");
|
|
74
|
+
if (w) {
|
|
75
|
+
if (!Tn(f, S)) {
|
|
76
|
+
w.style.display = "none";
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
const l =
|
|
79
|
+
w.style.display = "";
|
|
80
|
+
const l = w.getBoundingClientRect(), h = w.querySelector("div");
|
|
80
81
|
if (h) {
|
|
81
|
-
const
|
|
82
|
-
h.style.top = l.top + "px", h.style.left = l.left -
|
|
82
|
+
const E = h.getBoundingClientRect();
|
|
83
|
+
h.style.top = l.top + "px", h.style.left = l.left - E.width + "px";
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
const
|
|
87
|
+
const En = {
|
|
87
88
|
/**
|
|
88
89
|
* 组件值
|
|
89
90
|
*/
|
|
90
91
|
modelValue: { type: Object, default: {} },
|
|
91
92
|
componentId: { type: String, default: "" }
|
|
92
93
|
};
|
|
93
|
-
var
|
|
94
|
-
function
|
|
95
|
-
return
|
|
94
|
+
var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
95
|
+
function Fn(S) {
|
|
96
|
+
return S && S.__esModule && Object.prototype.hasOwnProperty.call(S, "default") ? S.default : S;
|
|
96
97
|
}
|
|
97
|
-
function he(
|
|
98
|
-
throw new Error('Could not dynamically require "' +
|
|
98
|
+
function he(S) {
|
|
99
|
+
throw new Error('Could not dynamically require "' + S + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
99
100
|
}
|
|
100
101
|
var Ke = { exports: {} };
|
|
101
|
-
(function(
|
|
102
|
+
(function(S, f) {
|
|
102
103
|
(function(t) {
|
|
103
|
-
|
|
104
|
+
S.exports = t();
|
|
104
105
|
})(function() {
|
|
105
106
|
return (/* @__PURE__ */ function() {
|
|
106
|
-
function t(
|
|
107
|
-
function h(x,
|
|
107
|
+
function t(w, B, l) {
|
|
108
|
+
function h(x, C) {
|
|
108
109
|
if (!B[x]) {
|
|
109
|
-
if (!
|
|
110
|
-
var
|
|
111
|
-
if (!
|
|
112
|
-
if (
|
|
110
|
+
if (!w[x]) {
|
|
111
|
+
var D = typeof he == "function" && he;
|
|
112
|
+
if (!C && D) return D(x, !0);
|
|
113
|
+
if (E) return E(x, !0);
|
|
113
114
|
var a = new Error("Cannot find module '" + x + "'");
|
|
114
115
|
throw a.code = "MODULE_NOT_FOUND", a;
|
|
115
116
|
}
|
|
116
117
|
var e = B[x] = { exports: {} };
|
|
117
|
-
|
|
118
|
-
var c =
|
|
118
|
+
w[x][0].call(e.exports, function(o) {
|
|
119
|
+
var c = w[x][1][o];
|
|
119
120
|
return h(c || o);
|
|
120
|
-
}, e, e.exports, t,
|
|
121
|
+
}, e, e.exports, t, w, B, l);
|
|
121
122
|
}
|
|
122
123
|
return B[x].exports;
|
|
123
124
|
}
|
|
124
|
-
for (var
|
|
125
|
+
for (var E = typeof he == "function" && he, p = 0; p < l.length; p++) h(l[p]);
|
|
125
126
|
return h;
|
|
126
127
|
}
|
|
127
128
|
return t;
|
|
128
129
|
}())({
|
|
129
|
-
1: [function(t,
|
|
130
|
-
var l = {}, h = "(?:^|\\s)",
|
|
131
|
-
function p(
|
|
132
|
-
var a = l[
|
|
133
|
-
return a ? a.lastIndex = 0 : l[
|
|
130
|
+
1: [function(t, w, B) {
|
|
131
|
+
var l = {}, h = "(?:^|\\s)", E = "(?:\\s|$)";
|
|
132
|
+
function p(D) {
|
|
133
|
+
var a = l[D];
|
|
134
|
+
return a ? a.lastIndex = 0 : l[D] = a = new RegExp(h + D + E, "g"), a;
|
|
134
135
|
}
|
|
135
|
-
function x(
|
|
136
|
-
var e =
|
|
137
|
-
e.length ? p(a).test(e) || (
|
|
136
|
+
function x(D, a) {
|
|
137
|
+
var e = D.className;
|
|
138
|
+
e.length ? p(a).test(e) || (D.className += " " + a) : D.className = a;
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
140
|
+
function C(D, a) {
|
|
141
|
+
D.className = D.className.replace(p(a), " ").trim();
|
|
141
142
|
}
|
|
142
|
-
|
|
143
|
+
w.exports = {
|
|
143
144
|
add: x,
|
|
144
|
-
rm:
|
|
145
|
+
rm: C
|
|
145
146
|
};
|
|
146
147
|
}, {}],
|
|
147
|
-
2: [function(t,
|
|
148
|
+
2: [function(t, w, B) {
|
|
148
149
|
(function(l) {
|
|
149
|
-
var h = t("contra/emitter"),
|
|
150
|
-
function
|
|
150
|
+
var h = t("contra/emitter"), E = t("crossvent"), p = t("./classes"), x = document, C = x.documentElement;
|
|
151
|
+
function D(r, j) {
|
|
151
152
|
var s = arguments.length;
|
|
152
153
|
s === 1 && Array.isArray(r) === !1 && (j = r, r = []);
|
|
153
|
-
var
|
|
154
|
+
var d, b, k, z, Q, ne, Y, $, se, ie = null, me, O, fe = !1, pe = 0, K, M = j || {};
|
|
154
155
|
M.moves === void 0 && (M.moves = V), M.accepts === void 0 && (M.accepts = V), M.invalid === void 0 && (M.invalid = ot), M.containers === void 0 && (M.containers = r || []), M.isContainer === void 0 && (M.isContainer = I), M.copy === void 0 && (M.copy = !1), M.copySortSource === void 0 && (M.copySortSource = !1), M.revertOnSpill === void 0 && (M.revertOnSpill = !1), M.removeOnSpill === void 0 && (M.removeOnSpill = !1), M.direction === void 0 && (M.direction = "vertical"), M.ignoreInputTextSelection === void 0 && (M.ignoreInputTextSelection = !0), M.mirrorContainer === void 0 && (M.mirrorContainer = x.body);
|
|
155
156
|
var G = h({
|
|
156
157
|
containers: M.containers,
|
|
@@ -168,15 +169,15 @@ var Ke = { exports: {} };
|
|
|
168
169
|
}
|
|
169
170
|
function xe(n) {
|
|
170
171
|
var u = n ? "remove" : "add";
|
|
171
|
-
o(
|
|
172
|
+
o(C, u, "mousedown", Re), o(C, u, "mouseup", we);
|
|
172
173
|
}
|
|
173
174
|
function De(n) {
|
|
174
175
|
var u = n ? "remove" : "add";
|
|
175
|
-
o(
|
|
176
|
+
o(C, u, "mousemove", et);
|
|
176
177
|
}
|
|
177
178
|
function ke(n) {
|
|
178
179
|
var u = n ? "remove" : "add";
|
|
179
|
-
|
|
180
|
+
E[u](C, "selectstart", _e), E[u](C, "click", _e);
|
|
180
181
|
}
|
|
181
182
|
function Ze() {
|
|
182
183
|
xe(!0), we({});
|
|
@@ -185,11 +186,11 @@ var Ke = { exports: {} };
|
|
|
185
186
|
me && n.preventDefault();
|
|
186
187
|
}
|
|
187
188
|
function Re(n) {
|
|
188
|
-
z = n.clientX,
|
|
189
|
+
z = n.clientX, Q = n.clientY;
|
|
189
190
|
var u = c(n) !== 1 || n.metaKey || n.ctrlKey;
|
|
190
191
|
if (!u) {
|
|
191
|
-
var
|
|
192
|
-
N && (me = N, De(), n.type === "mousedown" && (i(
|
|
192
|
+
var v = n.target, N = be(v);
|
|
193
|
+
N && (me = N, De(), n.type === "mousedown" && (i(v) ? v.focus() : n.preventDefault()));
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
function et(n) {
|
|
@@ -198,29 +199,29 @@ var Ke = { exports: {} };
|
|
|
198
199
|
we({});
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
|
-
if (!(n.clientX !== void 0 && Math.abs(n.clientX - z) <= (M.slideFactorX || 0) && n.clientY !== void 0 && Math.abs(n.clientY -
|
|
202
|
+
if (!(n.clientX !== void 0 && Math.abs(n.clientX - z) <= (M.slideFactorX || 0) && n.clientY !== void 0 && Math.abs(n.clientY - Q) <= (M.slideFactorY || 0))) {
|
|
202
203
|
if (M.ignoreInputTextSelection) {
|
|
203
|
-
var u = L("clientX", n) || 0,
|
|
204
|
+
var u = L("clientX", n) || 0, v = L("clientY", n) || 0, N = x.elementFromPoint(u, v);
|
|
204
205
|
if (i(N))
|
|
205
206
|
return;
|
|
206
207
|
}
|
|
207
|
-
var
|
|
208
|
-
De(!0), ke(), Le(), Oe(
|
|
208
|
+
var U = me;
|
|
209
|
+
De(!0), ke(), Le(), Oe(U), p.add($ || k, "gu-transit"), lt(), ct(), pe = 0, Ee(n);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
function be(n) {
|
|
213
|
-
if (!(G.dragging &&
|
|
214
|
+
if (!(G.dragging && d) && !Ce(n)) {
|
|
214
215
|
for (var u = n; y(n) && Ce(y(n)) === !1; )
|
|
215
216
|
if (M.invalid(n, u) || (n = y(n), !n))
|
|
216
217
|
return;
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
var N = M.moves(n,
|
|
218
|
+
var v = y(n);
|
|
219
|
+
if (v && !M.invalid(n, u)) {
|
|
220
|
+
var N = M.moves(n, v, u, m(n));
|
|
220
221
|
if (N)
|
|
221
222
|
return {
|
|
222
223
|
item: n,
|
|
223
|
-
source:
|
|
224
|
+
source: v
|
|
224
225
|
};
|
|
225
226
|
}
|
|
226
227
|
}
|
|
@@ -233,14 +234,14 @@ var Ke = { exports: {} };
|
|
|
233
234
|
u && Oe(u);
|
|
234
235
|
}
|
|
235
236
|
function Oe(n) {
|
|
236
|
-
gt(n.item, n.source) && (
|
|
237
|
+
gt(n.item, n.source) && ($ = n.item.cloneNode(!0), G.emit("cloned", $, n.item, "copy")), b = n.source, k = n.item, ne = Y = m(n.item), G.dragging = !0, G.emit("drag", k, b);
|
|
237
238
|
}
|
|
238
239
|
function ot() {
|
|
239
240
|
return !1;
|
|
240
241
|
}
|
|
241
242
|
function Le() {
|
|
242
243
|
if (G.dragging) {
|
|
243
|
-
var n =
|
|
244
|
+
var n = $ || k;
|
|
244
245
|
je(n, y(n));
|
|
245
246
|
}
|
|
246
247
|
}
|
|
@@ -249,81 +250,81 @@ var Ke = { exports: {} };
|
|
|
249
250
|
}
|
|
250
251
|
function we(n) {
|
|
251
252
|
if (Ve(), !!G.dragging) {
|
|
252
|
-
var u =
|
|
253
|
-
|
|
253
|
+
var u = $ || k, v = L("clientX", n) || 0, N = L("clientY", n) || 0, U = g(d, v, N), q = qe(U, v, N);
|
|
254
|
+
q && ($ && M.copySortSource || !$ || q !== b) ? je(u, q) : M.removeOnSpill ? $e() : Ue();
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
257
|
function je(n, u) {
|
|
257
|
-
var
|
|
258
|
-
|
|
258
|
+
var v = y(n);
|
|
259
|
+
$ && M.copySortSource && u === b && v.removeChild(k), Te(u) ? G.emit("cancel", n, b) : G.emit("drop", n, u, b, Y), Se();
|
|
259
260
|
}
|
|
260
261
|
function $e() {
|
|
261
262
|
if (G.dragging) {
|
|
262
|
-
var n =
|
|
263
|
-
u && u.removeChild(n), G.emit(
|
|
263
|
+
var n = $ || k, u = y(n);
|
|
264
|
+
u && u.removeChild(n), G.emit($ ? "cancel" : "remove", n, u, b), Se();
|
|
264
265
|
}
|
|
265
266
|
}
|
|
266
267
|
function Ue(n) {
|
|
267
268
|
if (G.dragging) {
|
|
268
|
-
var u = arguments.length > 0 ? n : M.revertOnSpill,
|
|
269
|
-
|
|
269
|
+
var u = arguments.length > 0 ? n : M.revertOnSpill, v = $ || k, N = y(v), U = Te(N);
|
|
270
|
+
U === !1 && u && ($ ? N && N.removeChild($) : b.insertBefore(v, ne)), U || u ? G.emit("cancel", v, b, b) : G.emit("drop", v, N, b, Y), Se();
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
273
|
function Se() {
|
|
273
|
-
var n =
|
|
274
|
-
Ve(), ut(), st(), n && p.rm(n, "gu-transit"),
|
|
274
|
+
var n = $ || k;
|
|
275
|
+
Ve(), ut(), st(), n && p.rm(n, "gu-transit"), se && clearTimeout(se), G.dragging = !1, ie && G.emit("out", n, ie, b), G.emit("dragend", n, pe), b = k = $ = ne = Y = se = ie = null;
|
|
275
276
|
}
|
|
276
277
|
function Te(n, u) {
|
|
277
|
-
var
|
|
278
|
-
return u !== void 0 ?
|
|
278
|
+
var v;
|
|
279
|
+
return u !== void 0 ? v = u : d ? v = Y : v = m($ || k), n === b && v === ne;
|
|
279
280
|
}
|
|
280
|
-
function qe(n, u,
|
|
281
|
-
for (var N = n; N &&
|
|
281
|
+
function qe(n, u, v) {
|
|
282
|
+
for (var N = n; N && !U(); )
|
|
282
283
|
N = y(N);
|
|
283
284
|
return N;
|
|
284
|
-
function
|
|
285
|
-
var
|
|
286
|
-
if (
|
|
285
|
+
function U() {
|
|
286
|
+
var q = Ce(N);
|
|
287
|
+
if (q === !1)
|
|
287
288
|
return !1;
|
|
288
|
-
var
|
|
289
|
-
return oe ? !0 : M.accepts(k, N,
|
|
289
|
+
var ae = He(N, n), ee = Xe(N, ae, u, v), oe = Te(N, ee);
|
|
290
|
+
return oe ? !0 : M.accepts(k, N, b, ee);
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
293
|
function Ee(n) {
|
|
293
|
-
if (!
|
|
294
|
+
if (!d)
|
|
294
295
|
return;
|
|
295
296
|
n.preventDefault();
|
|
296
|
-
var u = L("clientX", n) || 0,
|
|
297
|
-
|
|
298
|
-
var N =
|
|
299
|
-
(
|
|
297
|
+
var u = L("clientX", n) || 0, v = L("clientY", n) || 0;
|
|
298
|
+
d.style.left = u - 2 + "px", d.style.top = v - 2 + "px";
|
|
299
|
+
var N = $ || k, U = g(d, u, v), q = qe(U, u, v), ae = q !== null && q !== ie;
|
|
300
|
+
(ae || q === null) && (te(), ie = q, le()), vt(U, v);
|
|
300
301
|
var ee = y(N);
|
|
301
|
-
if (
|
|
302
|
+
if (q === b && $ && !M.copySortSource) {
|
|
302
303
|
ee && ee.removeChild(N);
|
|
303
304
|
return;
|
|
304
305
|
}
|
|
305
|
-
var oe,
|
|
306
|
-
if (
|
|
307
|
-
oe = Xe(
|
|
308
|
-
else if (M.revertOnSpill === !0 &&
|
|
309
|
-
oe =
|
|
306
|
+
var oe, ce = He(q, U);
|
|
307
|
+
if (fe = ft(ce, q), ce !== null)
|
|
308
|
+
oe = Xe(q, ce, u, v);
|
|
309
|
+
else if (M.revertOnSpill === !0 && !$)
|
|
310
|
+
oe = ne, q = b;
|
|
310
311
|
else {
|
|
311
|
-
|
|
312
|
+
$ && ee && ee.removeChild(N), $ && O && (O.style.display = "none");
|
|
312
313
|
return;
|
|
313
314
|
}
|
|
314
|
-
O.style.display = "block", rt(oe, N,
|
|
315
|
-
function
|
|
316
|
-
G.emit(
|
|
315
|
+
O.style.display = "block", rt(oe, N, ae), oe ? mt(ce, oe) : dt(q);
|
|
316
|
+
function Z(R) {
|
|
317
|
+
G.emit(R, N, ie, b);
|
|
317
318
|
}
|
|
318
|
-
function
|
|
319
|
-
|
|
319
|
+
function le() {
|
|
320
|
+
ae && Z("over");
|
|
320
321
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
322
|
+
function te() {
|
|
323
|
+
ie && Z("out");
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
|
-
function rt(n, u,
|
|
326
|
-
(n === u || n === m(u)) && (
|
|
326
|
+
function rt(n, u, v) {
|
|
327
|
+
(n === u || n === m(u)) && (Y = m(u)), (n === null && v || n !== u && n !== m(u)) && (Y = n);
|
|
327
328
|
}
|
|
328
329
|
function it(n) {
|
|
329
330
|
p.rm(n, "gu-hide");
|
|
@@ -332,39 +333,39 @@ var Ke = { exports: {} };
|
|
|
332
333
|
G.dragging && p.add(n, "gu-hide");
|
|
333
334
|
}
|
|
334
335
|
function ct() {
|
|
335
|
-
|
|
336
|
+
d || (d = document.createElement("div"), d.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", d.innerHTML = M.getMirrorText && M.getMirrorText(k) || "控件", p.add(d, "gu-mirror"), M.mirrorContainer.appendChild(d), o(C, "add", "mousemove", Ee), p.add(M.mirrorContainer, "gu-unselectable"), G.emit("cloned", d, k, "mirror"));
|
|
336
337
|
}
|
|
337
338
|
function lt() {
|
|
338
339
|
if (O = document.createElement("div"), p.add(O, "gu-insertion"), k) {
|
|
339
340
|
var n = k.getBoundingClientRect();
|
|
340
341
|
O.style.left = n.left + "px", O.style.top = n.top + "px";
|
|
341
342
|
}
|
|
342
|
-
|
|
343
|
+
fe = !1, M.mirrorContainer.appendChild(O);
|
|
343
344
|
}
|
|
344
345
|
function ut() {
|
|
345
|
-
|
|
346
|
+
d && (p.rm(M.mirrorContainer, "gu-unselectable"), o(C, "remove", "mousemove", Ee), y(d).removeChild(d), d = null);
|
|
346
347
|
}
|
|
347
348
|
function st() {
|
|
348
349
|
O && (y(O).removeChild(O), O = null);
|
|
349
350
|
}
|
|
350
351
|
function He(n, u) {
|
|
351
|
-
for (var
|
|
352
|
-
|
|
353
|
-
return
|
|
352
|
+
for (var v = u; v !== n && y(v) !== n; )
|
|
353
|
+
v = y(v);
|
|
354
|
+
return v === C ? null : v;
|
|
354
355
|
}
|
|
355
356
|
function ft(n, u) {
|
|
356
357
|
if (!u)
|
|
357
|
-
return
|
|
358
|
-
var
|
|
359
|
-
if (!
|
|
358
|
+
return fe;
|
|
359
|
+
var v = n || u && u.lastElementChild;
|
|
360
|
+
if (!v)
|
|
360
361
|
return !0;
|
|
361
|
-
var N = getComputedStyle(n),
|
|
362
|
-
if (
|
|
362
|
+
var N = getComputedStyle(n), U = /^inline/.test(N.getPropertyValue("display")) || /^(left|right)$/.test(N.getPropertyValue("float"));
|
|
363
|
+
if (U)
|
|
363
364
|
return !0;
|
|
364
365
|
if (u) {
|
|
365
|
-
var
|
|
366
|
-
if (/flex$/.test(
|
|
367
|
-
var ee =
|
|
366
|
+
var q = getComputedStyle(u), ae = q.getPropertyValue("display");
|
|
367
|
+
if (/flex$/.test(ae)) {
|
|
368
|
+
var ee = q.getPropertyValue("flex-direction") || "row";
|
|
368
369
|
if (ee === "row" || ee === "row-reverse")
|
|
369
370
|
return !pt(u);
|
|
370
371
|
}
|
|
@@ -376,73 +377,73 @@ var Ke = { exports: {} };
|
|
|
376
377
|
if (!n.children || !n.children.length)
|
|
377
378
|
return !1;
|
|
378
379
|
for (const u of Array.from(n.children)) {
|
|
379
|
-
const N = (u.className && u.className.split(" ") || []).filter((
|
|
380
|
+
const N = (u.className && u.className.split(" ") || []).filter((U) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(U));
|
|
380
381
|
if (!N.length)
|
|
381
382
|
return !1;
|
|
382
|
-
for (const
|
|
383
|
-
const
|
|
384
|
-
if (parseInt(
|
|
383
|
+
for (const U of N) {
|
|
384
|
+
const q = U.slice(U.lastIndexOf("-") + 1);
|
|
385
|
+
if (parseInt(q, 10) !== 12)
|
|
385
386
|
return !1;
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
389
|
return !0;
|
|
389
390
|
}
|
|
390
391
|
function mt(n, u) {
|
|
391
|
-
const
|
|
392
|
-
if (O.style.left =
|
|
393
|
-
if (O.style.height =
|
|
392
|
+
const v = u.getBoundingClientRect();
|
|
393
|
+
if (O.style.left = v.left + "px", O.style.top = v.top + "px", fe) {
|
|
394
|
+
if (O.style.height = v.height + "px", O.style.width = "4px", n) {
|
|
394
395
|
const N = n.getBoundingClientRect();
|
|
395
|
-
N.top !==
|
|
396
|
+
N.top !== v.top && (O.style.left = N.right + "px", O.style.top = N.top + "px", O.style.height = N.height + "px");
|
|
396
397
|
}
|
|
397
|
-
} else if (O.style.height = "4px", O.style.width =
|
|
398
|
+
} else if (O.style.height = "4px", O.style.width = v.width + "px", K) {
|
|
398
399
|
const N = K.getBoundingClientRect();
|
|
399
|
-
|
|
400
|
+
v.top < N.top && (O.style.display = "none");
|
|
400
401
|
}
|
|
401
402
|
u === k && k && (O.style.display = "none");
|
|
402
403
|
}
|
|
403
404
|
function dt(n) {
|
|
404
|
-
|
|
405
|
+
Y = null;
|
|
405
406
|
var u = n.lastElementChild;
|
|
406
407
|
if (u) {
|
|
407
|
-
var
|
|
408
|
-
|
|
408
|
+
var v = u.getBoundingClientRect();
|
|
409
|
+
fe ? (O.style.left = v.right + "px", O.style.top = v.top + "px", O.style.height = v.height + "px", O.style.width = "4px") : (O.style.left = v.left + "px", O.style.top = v.bottom + "px", O.style.height = "4px", O.style.width = v.width + "px"), u === k && k && (O.style.display = "none");
|
|
409
410
|
} else
|
|
410
411
|
O.style.display = "none";
|
|
411
412
|
}
|
|
412
413
|
function vt(n, u) {
|
|
413
414
|
if (!M.mirrorContainer.contains(n) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (K = a(n), !K || !K.contains(n)))
|
|
414
415
|
return;
|
|
415
|
-
const
|
|
416
|
+
const v = document.querySelector(".dgComponentSelected"), N = K.getBoundingClientRect();
|
|
416
417
|
if (u - 30 < N.top && K.scrollTop > 0) {
|
|
417
|
-
let
|
|
418
|
-
K.scrollBy(0, -1 *
|
|
418
|
+
let U = K.scrollTop < 10 ? K.scrollTop : 10;
|
|
419
|
+
K.scrollBy(0, -1 * U), v && K.contains(v) && (pe = pe + -1 * U);
|
|
419
420
|
}
|
|
420
421
|
if (u + 30 > N.bottom && K.scrollTop < K.scrollHeight - K.clientHeight) {
|
|
421
|
-
const
|
|
422
|
-
let
|
|
423
|
-
K.scrollBy(0,
|
|
422
|
+
const U = K.scrollHeight - K.clientHeight - K.scrollTop;
|
|
423
|
+
let q = U < 10 ? U : 10;
|
|
424
|
+
K.scrollBy(0, q), v && K.contains(v) && (pe = pe + q);
|
|
424
425
|
}
|
|
425
426
|
}
|
|
426
|
-
function Xe(n, u,
|
|
427
|
-
var
|
|
428
|
-
return
|
|
427
|
+
function Xe(n, u, v, N) {
|
|
428
|
+
var U = M.direction === "horizontal", q = M.direction === "mixed", ae = u !== n ? oe() : ee();
|
|
429
|
+
return ae;
|
|
429
430
|
function ee() {
|
|
430
|
-
var
|
|
431
|
-
for (
|
|
432
|
-
if (
|
|
433
|
-
return
|
|
431
|
+
var Z = n.children.length, le, te, R;
|
|
432
|
+
for (le = 0; le < Z; le++)
|
|
433
|
+
if (te = n.children[le], R = te.getBoundingClientRect(), U && R.left + R.width / 2 > v || !q && !U && R.top + R.height / 2 > N || q && R.left + R.width > v && R.top + R.height > N)
|
|
434
|
+
return te;
|
|
434
435
|
return null;
|
|
435
436
|
}
|
|
436
437
|
function oe() {
|
|
437
|
-
var
|
|
438
|
-
if (
|
|
439
|
-
var
|
|
440
|
-
return
|
|
438
|
+
var Z = u.getBoundingClientRect();
|
|
439
|
+
if (q) {
|
|
440
|
+
var le = N - Z.top, te = v - Z.left, R = Z.bottom - N, Fe = Z.right - v, Pe = Math.min(te, Fe, le, R), Ie;
|
|
441
|
+
return fe ? Ie = Fe < te : Ie = R === Pe || Fe === Pe || te === Pe, ce(Ie);
|
|
441
442
|
}
|
|
442
|
-
return
|
|
443
|
+
return ce(U ? v > Z.left + X(Z) / 2 : N > Z.top + _(Z) / 2);
|
|
443
444
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
445
|
+
function ce(Z) {
|
|
446
|
+
return Z ? m(u) : u;
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
449
|
function gt(n, u) {
|
|
@@ -452,24 +453,24 @@ var Ke = { exports: {} };
|
|
|
452
453
|
function a(r) {
|
|
453
454
|
const j = Array.from(window.scrollContainerList);
|
|
454
455
|
if (j.length === 1) {
|
|
455
|
-
const
|
|
456
|
-
return document.getElementById(
|
|
456
|
+
const d = Array.from(window.scrollContainerList)[0];
|
|
457
|
+
return document.getElementById(d);
|
|
457
458
|
}
|
|
458
459
|
const s = e(j);
|
|
459
|
-
for (const
|
|
460
|
-
if (
|
|
461
|
-
return
|
|
460
|
+
for (const d of s)
|
|
461
|
+
if (d.contains(r))
|
|
462
|
+
return d;
|
|
462
463
|
return null;
|
|
463
464
|
}
|
|
464
465
|
function e(r) {
|
|
465
466
|
const j = [];
|
|
466
467
|
return r.forEach((s) => {
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
}), j.sort((s,
|
|
468
|
+
const d = document.getElementById(s);
|
|
469
|
+
d && j.push(d);
|
|
470
|
+
}), j.sort((s, d) => s.contains(d) ? 1 : d.contains(s) ? -1 : 0), j;
|
|
470
471
|
}
|
|
471
|
-
function o(r, j, s,
|
|
472
|
-
var
|
|
472
|
+
function o(r, j, s, d) {
|
|
473
|
+
var b = {
|
|
473
474
|
mouseup: "touchend",
|
|
474
475
|
mousedown: "touchstart",
|
|
475
476
|
mousemove: "touchmove"
|
|
@@ -482,7 +483,7 @@ var Ke = { exports: {} };
|
|
|
482
483
|
mousedown: "MSPointerDown",
|
|
483
484
|
mousemove: "MSPointerMove"
|
|
484
485
|
};
|
|
485
|
-
l.navigator.pointerEnabled ?
|
|
486
|
+
l.navigator.pointerEnabled ? E[j](r, k[s], d) : l.navigator.msPointerEnabled ? E[j](r, z[s], d) : (E[j](r, b[s], d), E[j](r, s, d));
|
|
486
487
|
}
|
|
487
488
|
function c(r) {
|
|
488
489
|
if (r.touches !== void 0)
|
|
@@ -497,8 +498,8 @@ var Ke = { exports: {} };
|
|
|
497
498
|
}
|
|
498
499
|
function g(r, j, s) {
|
|
499
500
|
r = r || {};
|
|
500
|
-
var
|
|
501
|
-
return r.className += " gu-hide",
|
|
501
|
+
var d = r.className || "", b;
|
|
502
|
+
return r.className += " gu-hide", b = x.elementFromPoint(j, s), r.className = d, b;
|
|
502
503
|
}
|
|
503
504
|
function I() {
|
|
504
505
|
return !1;
|
|
@@ -516,10 +517,10 @@ var Ke = { exports: {} };
|
|
|
516
517
|
return r.parentNode === x ? null : r.parentNode;
|
|
517
518
|
}
|
|
518
519
|
function i(r) {
|
|
519
|
-
return r.tagName === "INPUT" || r.tagName === "TEXTAREA" || r.tagName === "SELECT" ||
|
|
520
|
+
return r.tagName === "INPUT" || r.tagName === "TEXTAREA" || r.tagName === "SELECT" || T(r);
|
|
520
521
|
}
|
|
521
|
-
function
|
|
522
|
-
return !r || r.contentEditable === "false" ? !1 : r.contentEditable === "true" ? !0 :
|
|
522
|
+
function T(r) {
|
|
523
|
+
return !r || r.contentEditable === "false" ? !1 : r.contentEditable === "true" ? !0 : T(y(r));
|
|
523
524
|
}
|
|
524
525
|
function m(r) {
|
|
525
526
|
return r.nextElementSibling || j();
|
|
@@ -535,46 +536,46 @@ var Ke = { exports: {} };
|
|
|
535
536
|
return r.targetTouches && r.targetTouches.length ? r.targetTouches[0] : r.changedTouches && r.changedTouches.length ? r.changedTouches[0] : r;
|
|
536
537
|
}
|
|
537
538
|
function L(r, j) {
|
|
538
|
-
var s = W(j),
|
|
539
|
+
var s = W(j), d = {
|
|
539
540
|
pageX: "clientX",
|
|
540
541
|
// IE8
|
|
541
542
|
pageY: "clientY"
|
|
542
543
|
// IE8
|
|
543
544
|
};
|
|
544
|
-
return r in
|
|
545
|
+
return r in d && !(r in s) && d[r] in s && (r = d[r]), s[r];
|
|
545
546
|
}
|
|
546
|
-
|
|
547
|
-
}).call(this, typeof
|
|
547
|
+
w.exports = D;
|
|
548
|
+
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
548
549
|
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
549
|
-
3: [function(t,
|
|
550
|
-
|
|
551
|
-
return Array.prototype.slice.call(h,
|
|
550
|
+
3: [function(t, w, B) {
|
|
551
|
+
w.exports = function(h, E) {
|
|
552
|
+
return Array.prototype.slice.call(h, E);
|
|
552
553
|
};
|
|
553
554
|
}, {}],
|
|
554
|
-
4: [function(t,
|
|
555
|
+
4: [function(t, w, B) {
|
|
555
556
|
var l = t("ticky");
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
w.exports = function(E, p, x) {
|
|
558
|
+
E && l(function() {
|
|
559
|
+
E.apply(x || null, p || []);
|
|
559
560
|
});
|
|
560
561
|
};
|
|
561
562
|
}, { ticky: 10 }],
|
|
562
|
-
5: [function(t,
|
|
563
|
+
5: [function(t, w, B) {
|
|
563
564
|
var l = t("atoa"), h = t("./debounce");
|
|
564
|
-
|
|
565
|
-
var
|
|
565
|
+
w.exports = function(p, x) {
|
|
566
|
+
var C = x || {}, D = {};
|
|
566
567
|
return p === void 0 && (p = {}), p.on = function(a, e) {
|
|
567
|
-
return
|
|
568
|
+
return D[a] ? D[a].push(e) : D[a] = [e], p;
|
|
568
569
|
}, p.once = function(a, e) {
|
|
569
570
|
return e._once = !0, p.on(a, e), p;
|
|
570
571
|
}, p.off = function(a, e) {
|
|
571
572
|
var o = arguments.length;
|
|
572
573
|
if (o === 1)
|
|
573
|
-
delete
|
|
574
|
+
delete D[a];
|
|
574
575
|
else if (o === 0)
|
|
575
|
-
|
|
576
|
+
D = {};
|
|
576
577
|
else {
|
|
577
|
-
var c =
|
|
578
|
+
var c = D[a];
|
|
578
579
|
if (!c)
|
|
579
580
|
return p;
|
|
580
581
|
c.splice(c.indexOf(e), 1);
|
|
@@ -584,97 +585,97 @@ var Ke = { exports: {} };
|
|
|
584
585
|
var a = l(arguments);
|
|
585
586
|
return p.emitterSnapshot(a.shift()).apply(this, a);
|
|
586
587
|
}, p.emitterSnapshot = function(a) {
|
|
587
|
-
var e = (
|
|
588
|
+
var e = (D[a] || []).slice(0);
|
|
588
589
|
return function() {
|
|
589
590
|
var o = l(arguments), c = this || p;
|
|
590
|
-
if (a === "error" &&
|
|
591
|
+
if (a === "error" && C.throws !== !1 && !e.length)
|
|
591
592
|
throw o.length === 1 ? o[0] : o;
|
|
592
593
|
return e.forEach(function(I) {
|
|
593
|
-
|
|
594
|
+
C.async ? h(I, o, c) : I.apply(c, o), I._once && p.off(a, I);
|
|
594
595
|
}), p;
|
|
595
596
|
};
|
|
596
597
|
}, p;
|
|
597
598
|
};
|
|
598
599
|
}, { "./debounce": 4, atoa: 3 }],
|
|
599
|
-
6: [function(t,
|
|
600
|
+
6: [function(t, w, B) {
|
|
600
601
|
(function(l) {
|
|
601
|
-
var h = t("custom-event"),
|
|
602
|
-
l.addEventListener || (x = e,
|
|
602
|
+
var h = t("custom-event"), E = t("./eventmap"), p = l.document, x = a, C = o, D = [];
|
|
603
|
+
l.addEventListener || (x = e, C = c), w.exports = {
|
|
603
604
|
add: x,
|
|
604
|
-
remove:
|
|
605
|
+
remove: C,
|
|
605
606
|
fabricate: g
|
|
606
607
|
};
|
|
607
|
-
function a(y, i,
|
|
608
|
-
return y.addEventListener(i,
|
|
608
|
+
function a(y, i, T, m) {
|
|
609
|
+
return y.addEventListener(i, T, m);
|
|
609
610
|
}
|
|
610
|
-
function e(y, i,
|
|
611
|
-
return y.attachEvent("on" + i, V(y, i,
|
|
611
|
+
function e(y, i, T) {
|
|
612
|
+
return y.attachEvent("on" + i, V(y, i, T));
|
|
612
613
|
}
|
|
613
|
-
function o(y, i,
|
|
614
|
-
return y.removeEventListener(i,
|
|
614
|
+
function o(y, i, T, m) {
|
|
615
|
+
return y.removeEventListener(i, T, m);
|
|
615
616
|
}
|
|
616
|
-
function c(y, i,
|
|
617
|
-
var m = X(y, i,
|
|
617
|
+
function c(y, i, T) {
|
|
618
|
+
var m = X(y, i, T);
|
|
618
619
|
if (m)
|
|
619
620
|
return y.detachEvent("on" + i, m);
|
|
620
621
|
}
|
|
621
|
-
function g(y, i,
|
|
622
|
-
var m =
|
|
622
|
+
function g(y, i, T) {
|
|
623
|
+
var m = E.indexOf(i) === -1 ? L() : W();
|
|
623
624
|
y.dispatchEvent ? y.dispatchEvent(m) : y.fireEvent("on" + i, m);
|
|
624
625
|
function W() {
|
|
625
626
|
var r;
|
|
626
627
|
return p.createEvent ? (r = p.createEvent("Event"), r.initEvent(i, !0, !0)) : p.createEventObject && (r = p.createEventObject()), r;
|
|
627
628
|
}
|
|
628
629
|
function L() {
|
|
629
|
-
return new h(i, { detail:
|
|
630
|
+
return new h(i, { detail: T });
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
|
-
function I(y, i,
|
|
633
|
+
function I(y, i, T) {
|
|
633
634
|
return function(W) {
|
|
634
635
|
var L = W || l.event;
|
|
635
636
|
L.target = L.target || L.srcElement, L.preventDefault = L.preventDefault || function() {
|
|
636
637
|
L.returnValue = !1;
|
|
637
638
|
}, L.stopPropagation = L.stopPropagation || function() {
|
|
638
639
|
L.cancelBubble = !0;
|
|
639
|
-
}, L.which = L.which || L.keyCode,
|
|
640
|
+
}, L.which = L.which || L.keyCode, T.call(y, L);
|
|
640
641
|
};
|
|
641
642
|
}
|
|
642
|
-
function V(y, i,
|
|
643
|
-
var m = X(y, i,
|
|
644
|
-
return
|
|
643
|
+
function V(y, i, T) {
|
|
644
|
+
var m = X(y, i, T) || I(y, i, T);
|
|
645
|
+
return D.push({
|
|
645
646
|
wrapper: m,
|
|
646
647
|
element: y,
|
|
647
648
|
type: i,
|
|
648
|
-
fn:
|
|
649
|
+
fn: T
|
|
649
650
|
}), m;
|
|
650
651
|
}
|
|
651
|
-
function X(y, i,
|
|
652
|
-
var m = _(y, i,
|
|
652
|
+
function X(y, i, T) {
|
|
653
|
+
var m = _(y, i, T);
|
|
653
654
|
if (m) {
|
|
654
|
-
var W =
|
|
655
|
-
return
|
|
655
|
+
var W = D[m].wrapper;
|
|
656
|
+
return D.splice(m, 1), W;
|
|
656
657
|
}
|
|
657
658
|
}
|
|
658
|
-
function _(y, i,
|
|
659
|
+
function _(y, i, T) {
|
|
659
660
|
var m, W;
|
|
660
|
-
for (m = 0; m <
|
|
661
|
-
if (W =
|
|
661
|
+
for (m = 0; m < D.length; m++)
|
|
662
|
+
if (W = D[m], W.element === y && W.type === i && W.fn === T)
|
|
662
663
|
return m;
|
|
663
664
|
}
|
|
664
|
-
}).call(this, typeof
|
|
665
|
+
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
665
666
|
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
666
|
-
7: [function(t,
|
|
667
|
+
7: [function(t, w, B) {
|
|
667
668
|
(function(l) {
|
|
668
|
-
var h = [],
|
|
669
|
-
for (
|
|
670
|
-
p.test(
|
|
671
|
-
|
|
672
|
-
}).call(this, typeof
|
|
669
|
+
var h = [], E = "", p = /^on/;
|
|
670
|
+
for (E in l)
|
|
671
|
+
p.test(E) && h.push(E.slice(2));
|
|
672
|
+
w.exports = h;
|
|
673
|
+
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
673
674
|
}, {}],
|
|
674
|
-
8: [function(t,
|
|
675
|
+
8: [function(t, w, B) {
|
|
675
676
|
(function(l) {
|
|
676
677
|
var h = l.CustomEvent;
|
|
677
|
-
function
|
|
678
|
+
function E() {
|
|
678
679
|
try {
|
|
679
680
|
var p = new h("cat", { detail: { foo: "bar" } });
|
|
680
681
|
return p.type === "cat" && p.detail.foo === "bar";
|
|
@@ -682,23 +683,23 @@ var Ke = { exports: {} };
|
|
|
682
683
|
}
|
|
683
684
|
return !1;
|
|
684
685
|
}
|
|
685
|
-
|
|
686
|
+
w.exports = E() ? h : (
|
|
686
687
|
// IE >= 9
|
|
687
|
-
typeof document < "u" && typeof document.createEvent == "function" ? function(x,
|
|
688
|
-
var
|
|
689
|
-
return
|
|
688
|
+
typeof document < "u" && typeof document.createEvent == "function" ? function(x, C) {
|
|
689
|
+
var D = document.createEvent("CustomEvent");
|
|
690
|
+
return C ? D.initCustomEvent(x, C.bubbles, C.cancelable, C.detail) : D.initCustomEvent(x, !1, !1, void 0), D;
|
|
690
691
|
} : (
|
|
691
692
|
// IE <= 8
|
|
692
|
-
function(x,
|
|
693
|
-
var
|
|
694
|
-
return
|
|
693
|
+
function(x, C) {
|
|
694
|
+
var D = document.createEventObject();
|
|
695
|
+
return D.type = x, C ? (D.bubbles = !!C.bubbles, D.cancelable = !!C.cancelable, D.detail = C.detail) : (D.bubbles = !1, D.cancelable = !1, D.detail = void 0), D;
|
|
695
696
|
}
|
|
696
697
|
)
|
|
697
698
|
);
|
|
698
|
-
}).call(this, typeof
|
|
699
|
+
}).call(this, typeof ue < "u" ? ue : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
699
700
|
}, {}],
|
|
700
|
-
9: [function(t,
|
|
701
|
-
var l =
|
|
701
|
+
9: [function(t, w, B) {
|
|
702
|
+
var l = w.exports = {}, h, E;
|
|
702
703
|
function p() {
|
|
703
704
|
throw new Error("setTimeout has not been defined");
|
|
704
705
|
}
|
|
@@ -712,12 +713,12 @@ var Ke = { exports: {} };
|
|
|
712
713
|
h = p;
|
|
713
714
|
}
|
|
714
715
|
try {
|
|
715
|
-
typeof clearTimeout == "function" ?
|
|
716
|
+
typeof clearTimeout == "function" ? E = clearTimeout : E = x;
|
|
716
717
|
} catch {
|
|
717
|
-
|
|
718
|
+
E = x;
|
|
718
719
|
}
|
|
719
720
|
})();
|
|
720
|
-
function
|
|
721
|
+
function C(_) {
|
|
721
722
|
if (h === setTimeout)
|
|
722
723
|
return setTimeout(_, 0);
|
|
723
724
|
if ((h === p || !h) && setTimeout)
|
|
@@ -732,18 +733,18 @@ var Ke = { exports: {} };
|
|
|
732
733
|
}
|
|
733
734
|
}
|
|
734
735
|
}
|
|
735
|
-
function
|
|
736
|
-
if (
|
|
736
|
+
function D(_) {
|
|
737
|
+
if (E === clearTimeout)
|
|
737
738
|
return clearTimeout(_);
|
|
738
|
-
if ((
|
|
739
|
-
return
|
|
739
|
+
if ((E === x || !E) && clearTimeout)
|
|
740
|
+
return E = clearTimeout, clearTimeout(_);
|
|
740
741
|
try {
|
|
741
|
-
return
|
|
742
|
+
return E(_);
|
|
742
743
|
} catch {
|
|
743
744
|
try {
|
|
744
|
-
return
|
|
745
|
+
return E.call(null, _);
|
|
745
746
|
} catch {
|
|
746
|
-
return
|
|
747
|
+
return E.call(this, _);
|
|
747
748
|
}
|
|
748
749
|
}
|
|
749
750
|
}
|
|
@@ -753,14 +754,14 @@ var Ke = { exports: {} };
|
|
|
753
754
|
}
|
|
754
755
|
function I() {
|
|
755
756
|
if (!e) {
|
|
756
|
-
var _ =
|
|
757
|
+
var _ = C(g);
|
|
757
758
|
e = !0;
|
|
758
759
|
for (var y = a.length; y; ) {
|
|
759
760
|
for (o = a, a = []; ++c < y; )
|
|
760
761
|
o && o[c].run();
|
|
761
762
|
c = -1, y = a.length;
|
|
762
763
|
}
|
|
763
|
-
o = null, e = !1,
|
|
764
|
+
o = null, e = !1, D(_);
|
|
764
765
|
}
|
|
765
766
|
}
|
|
766
767
|
l.nextTick = function(_) {
|
|
@@ -768,7 +769,7 @@ var Ke = { exports: {} };
|
|
|
768
769
|
if (arguments.length > 1)
|
|
769
770
|
for (var i = 1; i < arguments.length; i++)
|
|
770
771
|
y[i - 1] = arguments[i];
|
|
771
|
-
a.push(new V(_, y)), a.length === 1 && !e &&
|
|
772
|
+
a.push(new V(_, y)), a.length === 1 && !e && C(I);
|
|
772
773
|
};
|
|
773
774
|
function V(_, y) {
|
|
774
775
|
this.fun = _, this.array = y;
|
|
@@ -790,19 +791,19 @@ var Ke = { exports: {} };
|
|
|
790
791
|
return 0;
|
|
791
792
|
};
|
|
792
793
|
}, {}],
|
|
793
|
-
10: [function(t,
|
|
794
|
+
10: [function(t, w, B) {
|
|
794
795
|
(function(l) {
|
|
795
|
-
var h = typeof l == "function",
|
|
796
|
-
h ?
|
|
796
|
+
var h = typeof l == "function", E;
|
|
797
|
+
h ? E = function(p) {
|
|
797
798
|
l(p);
|
|
798
|
-
} :
|
|
799
|
+
} : E = function(p) {
|
|
799
800
|
setTimeout(p, 0);
|
|
800
|
-
},
|
|
801
|
+
}, w.exports = E;
|
|
801
802
|
}).call(this, t("timers").setImmediate);
|
|
802
803
|
}, { timers: 11 }],
|
|
803
|
-
11: [function(t,
|
|
804
|
+
11: [function(t, w, B) {
|
|
804
805
|
(function(l, h) {
|
|
805
|
-
var
|
|
806
|
+
var E = t("process/browser.js").nextTick, p = Function.prototype.apply, x = Array.prototype.slice, C = {}, D = 0;
|
|
806
807
|
B.setTimeout = function() {
|
|
807
808
|
return new a(p.call(setTimeout, window, arguments), clearTimeout);
|
|
808
809
|
}, B.setInterval = function() {
|
|
@@ -827,22 +828,22 @@ var Ke = { exports: {} };
|
|
|
827
828
|
e._onTimeout && e._onTimeout();
|
|
828
829
|
}, o));
|
|
829
830
|
}, B.setImmediate = typeof l == "function" ? l : function(e) {
|
|
830
|
-
var o =
|
|
831
|
-
return
|
|
832
|
-
|
|
831
|
+
var o = D++, c = arguments.length < 2 ? !1 : x.call(arguments, 1);
|
|
832
|
+
return C[o] = !0, E(function() {
|
|
833
|
+
C[o] && (c ? e.apply(null, c) : e.call(null), B.clearImmediate(o));
|
|
833
834
|
}), o;
|
|
834
835
|
}, B.clearImmediate = typeof h == "function" ? h : function(e) {
|
|
835
|
-
delete
|
|
836
|
+
delete C[e];
|
|
836
837
|
};
|
|
837
838
|
}).call(this, t("timers").setImmediate, t("timers").clearImmediate);
|
|
838
839
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
839
840
|
}, {}, [2])(2);
|
|
840
841
|
});
|
|
841
842
|
})(Ke);
|
|
842
|
-
var
|
|
843
|
-
const We = /* @__PURE__ */
|
|
844
|
-
function
|
|
845
|
-
let
|
|
843
|
+
var Pn = Ke.exports;
|
|
844
|
+
const We = /* @__PURE__ */ Fn(Pn);
|
|
845
|
+
function In() {
|
|
846
|
+
let S;
|
|
846
847
|
function f(e, o, c) {
|
|
847
848
|
const g = {};
|
|
848
849
|
return g.sourceElement = e, g.sourceContainer = c, g.targetContainer = o, g.sourceType = e.getAttribute("data-sourceType") || "move", g.controlType = e.getAttribute("data-controlType"), g.controlTypeName = e.getAttribute("data-controlTypeName"), g.controlCategory = e.getAttribute("data-category"), g.controlFeature = e.getAttribute("data-feature"), g.parentComponentInstance = o.componentInstance, g.controlCategory === "input" ? g.bindingType = "field" : g.controlCategory === "dataCollection" && (g.bindingType = "entity"), e.componentInstance && (g.controlType = e.componentInstance.value.schema.type, g.controlCategory = e.componentInstance.value.schema.category), g;
|
|
@@ -862,13 +863,13 @@ function Pn() {
|
|
|
862
863
|
}
|
|
863
864
|
return g;
|
|
864
865
|
}
|
|
865
|
-
function
|
|
866
|
+
function w(e, o) {
|
|
866
867
|
const c = o.getBoundingClientRect(), g = e.getBoundingClientRect(), I = g.top >= c.top, V = g.top < c.bottom;
|
|
867
868
|
return I && V;
|
|
868
869
|
}
|
|
869
870
|
function B(e, o) {
|
|
870
871
|
const c = e.querySelector(".dgComponentSelected");
|
|
871
|
-
if (!(!c || o === 0) &&
|
|
872
|
+
if (!(!c || o === 0) && w(c, e)) {
|
|
872
873
|
const g = c.querySelector(".component-btn-group");
|
|
873
874
|
if (g) {
|
|
874
875
|
const I = g.querySelector("div");
|
|
@@ -915,9 +916,9 @@ function Pn() {
|
|
|
915
916
|
let I = Me(e.componentInstance.value.contents, g);
|
|
916
917
|
return I = I === -1 ? 0 : I, I;
|
|
917
918
|
}
|
|
918
|
-
function
|
|
919
|
+
function E(e, o, c, g) {
|
|
919
920
|
if (o.componentInstance.value.addNewChildComponentSchema) {
|
|
920
|
-
const I = h(o, g), V = String(e.getAttribute("data-controltype")), X = e.getAttribute("data-feature"), _ = String(e.innerText), y = o.componentInstance.value, i = { componentType: V, label: _, parentComponentInstance: y, targetPosition: I },
|
|
921
|
+
const I = h(o, g), V = String(e.getAttribute("data-controltype")), X = e.getAttribute("data-feature"), _ = String(e.innerText), y = o.componentInstance.value, i = { componentType: V, label: _, parentComponentInstance: y, targetPosition: I }, T = X ? JSON.parse(X) : {}, m = Object.assign(i, T), W = o.componentInstance.value.addNewChildComponentSchema(m);
|
|
921
922
|
l(o, W, g);
|
|
922
923
|
}
|
|
923
924
|
o.contains(e) && o.removeChild(e);
|
|
@@ -938,7 +939,7 @@ function Pn() {
|
|
|
938
939
|
case "control":
|
|
939
940
|
case "field":
|
|
940
941
|
case "entity": {
|
|
941
|
-
|
|
942
|
+
E(e, o, c, g);
|
|
942
943
|
break;
|
|
943
944
|
}
|
|
944
945
|
default:
|
|
@@ -946,8 +947,8 @@ function Pn() {
|
|
|
946
947
|
}
|
|
947
948
|
de.value++;
|
|
948
949
|
}
|
|
949
|
-
function
|
|
950
|
-
|
|
950
|
+
function C(e) {
|
|
951
|
+
S && S.destroy(), We && (S = We([], {
|
|
951
952
|
// 镜像容器
|
|
952
953
|
mirrorContainer: e,
|
|
953
954
|
direction: "mixed",
|
|
@@ -980,27 +981,27 @@ function Pn() {
|
|
|
980
981
|
B(o, c);
|
|
981
982
|
}));
|
|
982
983
|
}
|
|
983
|
-
function
|
|
984
|
+
function D(e, o) {
|
|
984
985
|
if (!e)
|
|
985
986
|
return;
|
|
986
987
|
if (o.noDragDrop)
|
|
987
988
|
return e;
|
|
988
989
|
const c = e.querySelector(`[data-dragref='${o.id}-container']`) || e;
|
|
989
|
-
|
|
990
|
+
S && c && S.containers.push(c);
|
|
990
991
|
}
|
|
991
992
|
function a() {
|
|
992
|
-
if (!
|
|
993
|
+
if (!S)
|
|
993
994
|
return;
|
|
994
995
|
const e = document.getElementsByClassName("controlCategory");
|
|
995
|
-
e && (
|
|
996
|
+
e && (S.containers = S.containers.filter(
|
|
996
997
|
(o) => !o.className.includes("controlCategory")
|
|
997
998
|
), Array.from(e).forEach((o) => {
|
|
998
|
-
|
|
999
|
+
S.containers.push(o);
|
|
999
1000
|
}));
|
|
1000
1001
|
}
|
|
1001
|
-
return { attachComponents:
|
|
1002
|
+
return { attachComponents: D, attachToolbox: a, initializeDragula: C };
|
|
1002
1003
|
}
|
|
1003
|
-
const
|
|
1004
|
+
const An = {
|
|
1004
1005
|
id: { type: String, default: "" },
|
|
1005
1006
|
componentId: { type: String, default: "" },
|
|
1006
1007
|
type: { type: String, default: "" },
|
|
@@ -1017,16 +1018,16 @@ const In = {
|
|
|
1017
1018
|
ignore: { type: Boolean, default: !1 }
|
|
1018
1019
|
}, F = {}, P = {}, A = {};
|
|
1019
1020
|
let Ye = !1;
|
|
1020
|
-
function
|
|
1021
|
-
Ye || (Ye = !0, wt.registerDesigner(F, P, A), bt.registerDesigner(F, P, A), St.registerDesigner(F, P, A), Tt.registerDesigner(F, P, A), Et.registerDesigner(F, P, A), Ft.registerDesigner(F, P, A), Pt.registerDesigner(F, P, A), It.registerDesigner(F, P, A), At.registerDesigner(F, P, A), Mt.registerDesigner(F, P, A), Nt.registerDesigner(F, P, A), Bt.registerDesigner(F, P, A), xt.registerDesigner(F, P, A), kt.registerDesigner(F, P, A), Ot.registerDesigner(F, P, A), _t.registerDesigner(F, P), Lt.registerDesigner(F, P, A), Vt.registerDesigner(F, P, A), jt.registerDesigner(F, P, A), $t.registerDesigner(F, P, A), qt.registerDesigner(F, P, A), Ut.registerDesigner(F, P, A), Xt.registerDesigner(F, P, A), Ht.registerDesigner(F, P, A), Yt.registerDesigner(F, P, A), Wt.registerDesigner(F, P, A), Gt.registerDesigner(F, P, A), zt.registerDesigner(F, P, A), Jt.registerDesigner(F, P, A), Kt.registerDesigner(F, P, A), Qt.registerDesigner(F, P, A), Zt.registerDesigner(F, P, A), Rt.registerDesigner(F, P, A), nn.registerDesigner(F, P, A), on.registerDesigner(F, P, A), tn.registerDesigner(F, P, A), en.registerDesigner(F, P, A), rn.registerDesigner(F, P, A), an.registerDesigner(F, P, A), cn.registerDesigner(F, P, A), ln.registerDesigner(F, P, A), un.registerDesigner(F, P, A), sn.registerDesigner(F, P, A), fn.registerDesigner(F, P, A), pn.registerDesigner(F, P, A), mn.registerDesigner(F, P, A), Cn.registerDesigner(F, P, A), dn.registerDesigner(F, P, A), vn.registerDesigner(F, P, A), gn.registerDesigner(F, P, A), hn.registerDesigner(F, P, A), yn.registerDesigner(F, P, A), Dn.registerDesigner(F, P), bn.registerDesigner(F, P, A), wn.registerDesigner(F, P, A));
|
|
1021
|
+
function Mn() {
|
|
1022
|
+
Ye || (Ye = !0, wt.registerDesigner(F, P, A), bt.registerDesigner(F, P, A), St.registerDesigner(F, P, A), Tt.registerDesigner(F, P, A), Et.registerDesigner(F, P, A), Ft.registerDesigner(F, P, A), Pt.registerDesigner(F, P, A), It.registerDesigner(F, P, A), At.registerDesigner(F, P, A), Mt.registerDesigner(F, P, A), Nt.registerDesigner(F, P, A), Bt.registerDesigner(F, P, A), xt.registerDesigner(F, P, A), kt.registerDesigner(F, P, A), Ot.registerDesigner(F, P, A), _t.registerDesigner(F, P), Lt.registerDesigner(F, P, A), Vt.registerDesigner(F, P, A), jt.registerDesigner(F, P, A), $t.registerDesigner(F, P, A), qt.registerDesigner(F, P, A), Ut.registerDesigner(F, P, A), Xt.registerDesigner(F, P, A), Ht.registerDesigner(F, P, A), Yt.registerDesigner(F, P, A), Wt.registerDesigner(F, P, A), Gt.registerDesigner(F, P, A), zt.registerDesigner(F, P, A), Jt.registerDesigner(F, P, A), Kt.registerDesigner(F, P, A), Qt.registerDesigner(F, P, A), Zt.registerDesigner(F, P, A), Rt.registerDesigner(F, P, A), nn.registerDesigner(F, P, A), on.registerDesigner(F, P, A), tn.registerDesigner(F, P, A), en.registerDesigner(F, P, A), rn.registerDesigner(F, P, A), an.registerDesigner(F, P, A), cn.registerDesigner(F, P, A), ln.registerDesigner(F, P, A), un.registerDesigner(F, P, A), sn.registerDesigner(F, P, A), fn.registerDesigner(F, P, A), pn.registerDesigner(F, P, A), mn.registerDesigner(F, P, A), Cn.registerDesigner(F, P, A), dn.registerDesigner(F, P, A), vn.registerDesigner(F, P, A), gn.registerDesigner(F, P, A), hn.registerDesigner(F, P, A), yn.registerDesigner(F, P, A), Dn.registerDesigner(F, P), bn.registerDesigner(F, P, A), wn.registerDesigner(F, P, A), Sn.registerDesigner(F, P, A));
|
|
1022
1023
|
}
|
|
1023
|
-
const
|
|
1024
|
+
const Nn = {
|
|
1024
1025
|
id: { type: String }
|
|
1025
|
-
},
|
|
1026
|
+
}, Bn = /* @__PURE__ */ Be({
|
|
1026
1027
|
name: "FDesignerPlaceholder",
|
|
1027
|
-
props:
|
|
1028
|
+
props: Nn,
|
|
1028
1029
|
emits: [],
|
|
1029
|
-
setup(
|
|
1030
|
+
setup(S) {
|
|
1030
1031
|
const f = ve(() => ({
|
|
1031
1032
|
"drag-and-drop-alert": !0,
|
|
1032
1033
|
alert: !0,
|
|
@@ -1049,16 +1050,16 @@ const Mn = {
|
|
|
1049
1050
|
}, [ht("拖拽组件到这里")]);
|
|
1050
1051
|
}
|
|
1051
1052
|
});
|
|
1052
|
-
function
|
|
1053
|
-
return typeof
|
|
1053
|
+
function xn(S) {
|
|
1054
|
+
return typeof S == "function" || Object.prototype.toString.call(S) === "[object Object]" && !Ct(S);
|
|
1054
1055
|
}
|
|
1055
1056
|
const Ne = /* @__PURE__ */ Be({
|
|
1056
1057
|
name: "FDesignerItem",
|
|
1057
|
-
props:
|
|
1058
|
+
props: An,
|
|
1058
1059
|
emits: ["selectionChange"],
|
|
1059
|
-
setup(
|
|
1060
|
-
const t = H(`${
|
|
1061
|
-
designerItemElementRef:
|
|
1060
|
+
setup(S, f) {
|
|
1061
|
+
const t = H(`${S.modelValue.id}-component`), w = H(S.canMove), B = H(S.canDelete), l = H(!1), h = H(S.modelValue), E = H(S.componentId || ""), p = H(""), x = H(""), C = H(), D = re("canvas-dragula"), a = H(), e = re("design-item-context"), o = {
|
|
1062
|
+
designerItemElementRef: C,
|
|
1062
1063
|
componentInstance: a,
|
|
1063
1064
|
schema: h.value,
|
|
1064
1065
|
parent: e,
|
|
@@ -1066,39 +1067,41 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1066
1067
|
};
|
|
1067
1068
|
ye("design-item-context", o);
|
|
1068
1069
|
const c = re("useFormSchema"), g = ve(() => {
|
|
1069
|
-
const s =
|
|
1070
|
+
const s = S.modelValue.appearance && S.modelValue.appearance.class || "", d = {
|
|
1070
1071
|
"farris-component": !0,
|
|
1071
1072
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
1072
1073
|
"flex-fill": h.value.id == "root-component",
|
|
1073
|
-
"position-relative":
|
|
1074
|
+
"position-relative": w.value && B.value,
|
|
1074
1075
|
"farris-nested": l.value,
|
|
1075
|
-
"can-move":
|
|
1076
|
-
"d-none":
|
|
1076
|
+
"can-move": w.value,
|
|
1077
|
+
"d-none": C.value && C.value.classList.contains("d-none"),
|
|
1078
|
+
dgComponentSelected: C.value && C.value.classList.contains("dgComponentSelected")
|
|
1077
1079
|
};
|
|
1078
|
-
return
|
|
1080
|
+
return d[`farris-component-${h.value.type}`] = !0, s && s.split(" ").reduce((b, k) => (b[k] = !0, b), d), x.value && x.value.split(" ").reduce((b, k) => (b[k] = !0, b), d), d;
|
|
1079
1081
|
}), I = ve(() => {
|
|
1080
|
-
const s = {},
|
|
1081
|
-
return
|
|
1082
|
-
const [z,
|
|
1083
|
-
return
|
|
1084
|
-
}, s), p.value && p.value.split(";").reduce((
|
|
1085
|
-
const [z,
|
|
1086
|
-
return z && (
|
|
1082
|
+
const s = {}, d = S.modelValue.appearance && S.modelValue.appearance.style || "";
|
|
1083
|
+
return d && d.split(";").reduce((b, k) => {
|
|
1084
|
+
const [z, Q] = k.split(":");
|
|
1085
|
+
return b[z] = Q, b;
|
|
1086
|
+
}, s), p.value && p.value.split(";").reduce((b, k) => {
|
|
1087
|
+
const [z, Q] = k.split(":");
|
|
1088
|
+
return z && (b[z] = Q), b;
|
|
1087
1089
|
}, s), s;
|
|
1088
1090
|
});
|
|
1089
|
-
function V(s,
|
|
1090
|
-
var
|
|
1091
|
+
function V(s, d) {
|
|
1092
|
+
var z, Q, ne;
|
|
1091
1093
|
if (s && (s.preventDefault(), s.stopPropagation()), a.value.triggerBelongedComponentToDeleteWhenDeleted) {
|
|
1092
1094
|
const Y = a.value.getBelongedComponentInstance(a);
|
|
1093
1095
|
if (Y && Y.parent) {
|
|
1094
|
-
const
|
|
1095
|
-
(
|
|
1096
|
+
const $ = H(Y == null ? void 0 : Y.parent), se = $.value.contents.findIndex((ie) => ie.id === Y.schema.id);
|
|
1097
|
+
(Q = (z = $.value) == null ? void 0 : z.contents) == null || Q.splice(se, 1), (ne = $.value) == null || ne.updateDragAndDropRules(), de.value++;
|
|
1096
1098
|
}
|
|
1097
1099
|
return;
|
|
1098
1100
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1101
|
+
let b = e, k = (Y) => Y.id === d.id;
|
|
1102
|
+
if (d.type === "component" && (b = e == null ? void 0 : e.parent, k = (Y) => Y.component === d.id), b && b.schema.contents) {
|
|
1103
|
+
const Y = b.schema.contents.findIndex(k);
|
|
1104
|
+
b.schema.contents.splice(Y, 1), b.componentInstance.value.updateDragAndDropRules(), de.value++, f.emit("selectionChange");
|
|
1102
1105
|
}
|
|
1103
1106
|
}
|
|
1104
1107
|
function X(s) {
|
|
@@ -1107,15 +1110,15 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1107
1110
|
class: "btn component-settings-button",
|
|
1108
1111
|
title: "删除",
|
|
1109
1112
|
ref: "removeComponent",
|
|
1110
|
-
onClick: (
|
|
1111
|
-
V(
|
|
1113
|
+
onClick: (d) => {
|
|
1114
|
+
V(d, s);
|
|
1112
1115
|
}
|
|
1113
1116
|
}, [J("i", {
|
|
1114
1117
|
class: "f-icon f-icon-yxs_delete"
|
|
1115
1118
|
}, null)]);
|
|
1116
1119
|
}
|
|
1117
1120
|
function _() {
|
|
1118
|
-
return
|
|
1121
|
+
return w.value && J("div", {
|
|
1119
1122
|
role: "button",
|
|
1120
1123
|
class: "btn component-settings-button",
|
|
1121
1124
|
title: "移动",
|
|
@@ -1126,7 +1129,7 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1126
1129
|
}, null)]);
|
|
1127
1130
|
}
|
|
1128
1131
|
function y() {
|
|
1129
|
-
return
|
|
1132
|
+
return S.customButtons && !!S.customButtons.length && S.customButtons.map((s) => J("div", {
|
|
1130
1133
|
role: "button",
|
|
1131
1134
|
class: `btn component-settings-button ${s.class || ""}`,
|
|
1132
1135
|
title: s.title,
|
|
@@ -1141,71 +1144,71 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1141
1144
|
"data-noattach": "true"
|
|
1142
1145
|
}, [J("div", null, [X(s), _(), y()])]);
|
|
1143
1146
|
}
|
|
1144
|
-
function
|
|
1145
|
-
f.emit("selectionChange", s,
|
|
1147
|
+
function T(s, d, b, k) {
|
|
1148
|
+
f.emit("selectionChange", s, d, b, k);
|
|
1146
1149
|
}
|
|
1147
1150
|
function m(s) {
|
|
1148
|
-
let
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
const
|
|
1151
|
+
let d;
|
|
1152
|
+
const b = s.type, k = F[b], z = P[b], Q = z ? z(s) : {};
|
|
1153
|
+
Q.customClass = S.ignore ? Q.customClass : "", Q.componentId = E.value;
|
|
1154
|
+
const ne = s.contents && s.contents.length === 0;
|
|
1152
1155
|
return s.contents && !!s.contents.length && k ? J(k, Ae({
|
|
1153
1156
|
ref: a
|
|
1154
|
-
},
|
|
1155
|
-
key:
|
|
1156
|
-
modelValue:
|
|
1157
|
-
"onUpdate:modelValue": (
|
|
1158
|
-
componentId:
|
|
1159
|
-
onSelectionChange:
|
|
1160
|
-
}, null))) ?
|
|
1161
|
-
default: () => [
|
|
1162
|
-
}) : k ?
|
|
1157
|
+
}, Q), xn(d = s.contents.map(($) => J(Ne, {
|
|
1158
|
+
key: $.id,
|
|
1159
|
+
modelValue: $,
|
|
1160
|
+
"onUpdate:modelValue": (se) => $ = se,
|
|
1161
|
+
componentId: E.value,
|
|
1162
|
+
onSelectionChange: T
|
|
1163
|
+
}, null))) ? d : {
|
|
1164
|
+
default: () => [d]
|
|
1165
|
+
}) : k ? ne ? J(k, Ae({
|
|
1163
1166
|
ref: a
|
|
1164
|
-
},
|
|
1165
|
-
default: () => [J(
|
|
1167
|
+
}, Q), {
|
|
1168
|
+
default: () => [J(Bn, null, null)]
|
|
1166
1169
|
}) : J(k, Ae({
|
|
1167
1170
|
ref: a
|
|
1168
|
-
},
|
|
1171
|
+
}, Q), null) : J("div", null, null);
|
|
1169
1172
|
}
|
|
1170
1173
|
function W(s) {
|
|
1171
1174
|
if (s.type === "component-ref") {
|
|
1172
|
-
let
|
|
1173
|
-
if (
|
|
1175
|
+
let b = c == null ? void 0 : c.getFormSchema().module.components.find((k) => k.id === s.component);
|
|
1176
|
+
if (b)
|
|
1174
1177
|
return J(Ne, {
|
|
1175
|
-
key:
|
|
1176
|
-
modelValue:
|
|
1177
|
-
"onUpdate:modelValue": (k) =>
|
|
1178
|
-
componentId:
|
|
1179
|
-
onSelectionChange:
|
|
1178
|
+
key: b.id,
|
|
1179
|
+
modelValue: b,
|
|
1180
|
+
"onUpdate:modelValue": (k) => b = k,
|
|
1181
|
+
componentId: b.id,
|
|
1182
|
+
onSelectionChange: T
|
|
1180
1183
|
}, null);
|
|
1181
1184
|
}
|
|
1182
1185
|
}
|
|
1183
|
-
Ge(() =>
|
|
1186
|
+
Ge(() => S.modelValue, (s) => {
|
|
1184
1187
|
h.value = s, t.value = `${s.id}-component`;
|
|
1185
1188
|
});
|
|
1186
1189
|
function L(s) {
|
|
1187
|
-
const
|
|
1188
|
-
Je(
|
|
1190
|
+
const d = s.target;
|
|
1191
|
+
Je(d);
|
|
1189
1192
|
}
|
|
1190
1193
|
function r() {
|
|
1191
|
-
var s,
|
|
1192
|
-
(
|
|
1194
|
+
var s, d;
|
|
1195
|
+
(d = (s = h.value) == null ? void 0 : s.contents) != null && d.length && C.value && C.value.addEventListener("scroll", L);
|
|
1193
1196
|
}
|
|
1194
1197
|
ze(() => {
|
|
1195
|
-
if (
|
|
1196
|
-
const s =
|
|
1197
|
-
|
|
1198
|
+
if (C.value && a.value && a.value.schema) {
|
|
1199
|
+
const s = C.value.querySelector(`[data-dragref='${a.value.schema.id}-container']`);
|
|
1200
|
+
D && s && D.attachComponents(s, h.value), l.value = a.value.canNested !== void 0 ? a.value.canNested : l.value, B.value = a.value.canDelete !== void 0 ? a.value.canDelete : B.value, w.value = a.value.canMove !== void 0 ? a.value.canMove : w.value, p.value = a.value.styles || "", x.value = a.value.designerClass || "", C.value && (C.value.componentInstance = a, C.value.designItemContext = o);
|
|
1198
1201
|
}
|
|
1199
1202
|
r(), de.value++;
|
|
1200
1203
|
}), yt(() => {
|
|
1201
|
-
|
|
1204
|
+
C.value && C.value.removeEventListener("scroll", L);
|
|
1202
1205
|
});
|
|
1203
1206
|
function j(s) {
|
|
1204
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1205
|
-
const
|
|
1206
|
-
if (
|
|
1207
|
-
const
|
|
1208
|
-
if (!(
|
|
1207
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((b) => b.classList.remove("dgComponentFocused")), s && (s.preventDefault(), s.stopPropagation());
|
|
1208
|
+
const d = C.value;
|
|
1209
|
+
if (d) {
|
|
1210
|
+
const b = document.getElementsByClassName("dgComponentSelected");
|
|
1211
|
+
if (!(b && b.length === 1 && b[0] === C.value) && (Array.from(b).forEach((z) => z.classList.remove("dgComponentSelected")), d.classList.add("dgComponentFocused"), f.emit("selectionChange", h.value.type, h.value, E.value, a.value), a.value.getDraggableDesignItemElement)) {
|
|
1209
1212
|
const z = a.value.getDraggableDesignItemElement(o);
|
|
1210
1213
|
z && z.value && z.value.classList.add("dgComponentSelected");
|
|
1211
1214
|
}
|
|
@@ -1214,22 +1217,22 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1214
1217
|
}
|
|
1215
1218
|
return () => h.value.type === "component-ref" ? W(h.value) : J("div", {
|
|
1216
1219
|
id: `${h.value.id}-design-item`,
|
|
1217
|
-
ref:
|
|
1220
|
+
ref: C,
|
|
1218
1221
|
class: g.value,
|
|
1219
1222
|
style: I.value,
|
|
1220
1223
|
onClick: j
|
|
1221
1224
|
}, [i(h.value), m(h.value)]);
|
|
1222
1225
|
}
|
|
1223
|
-
}),
|
|
1226
|
+
}), Uo = /* @__PURE__ */ Be({
|
|
1224
1227
|
name: "FDesignerCanvas",
|
|
1225
|
-
props:
|
|
1228
|
+
props: En,
|
|
1226
1229
|
emits: ["init", "selectionChange", "canvasChanged"],
|
|
1227
|
-
setup(
|
|
1228
|
-
const t = H(),
|
|
1229
|
-
|
|
1230
|
+
setup(S, f) {
|
|
1231
|
+
const t = H(), w = H(), B = H(), l = H(), h = H(), E = In(), p = H(S.componentId);
|
|
1232
|
+
Mn(), ye("canvas-dragula", E), ye("design-item-context", {
|
|
1230
1233
|
designerItemElementRef: l,
|
|
1231
1234
|
componentInstance: h,
|
|
1232
|
-
schema:
|
|
1235
|
+
schema: w.value,
|
|
1233
1236
|
parent: void 0
|
|
1234
1237
|
}), ye("designer-host-service", {
|
|
1235
1238
|
eventsEditorUtils: re("eventsEditorUtils"),
|
|
@@ -1246,14 +1249,14 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1246
1249
|
"flex-column": !0
|
|
1247
1250
|
}));
|
|
1248
1251
|
ze(() => {
|
|
1249
|
-
B.value &&
|
|
1252
|
+
B.value && E.initializeDragula(B.value), t.value = S.modelValue, f.emit("init", E);
|
|
1250
1253
|
}), Ge(de, () => {
|
|
1251
1254
|
Je(B.value), f.emit("canvasChanged");
|
|
1252
1255
|
}, {
|
|
1253
1256
|
flush: "post"
|
|
1254
1257
|
});
|
|
1255
|
-
function
|
|
1256
|
-
f.emit("selectionChange",
|
|
1258
|
+
function C(D, a, e, o) {
|
|
1259
|
+
f.emit("selectionChange", D, a, e, o);
|
|
1257
1260
|
}
|
|
1258
1261
|
return () => J("div", {
|
|
1259
1262
|
class: "editorDiv flex-fill h-100"
|
|
@@ -1264,33 +1267,33 @@ const Ne = /* @__PURE__ */ Be({
|
|
|
1264
1267
|
class: x.value
|
|
1265
1268
|
}, [t.value && J(Ne, {
|
|
1266
1269
|
modelValue: t.value,
|
|
1267
|
-
"onUpdate:modelValue": (
|
|
1268
|
-
onSelectionChange:
|
|
1270
|
+
"onUpdate:modelValue": (D) => t.value = D,
|
|
1271
|
+
onSelectionChange: C,
|
|
1269
1272
|
componentId: p.value
|
|
1270
1273
|
}, null)])])]);
|
|
1271
1274
|
}
|
|
1272
|
-
}),
|
|
1273
|
-
function Qe(
|
|
1274
|
-
const { properties: f, title: t } =
|
|
1275
|
-
return
|
|
1275
|
+
}), kn = {}, _n = {};
|
|
1276
|
+
function Qe(S) {
|
|
1277
|
+
const { properties: f, title: t } = S, w = Object.keys(f).reduce((B, l) => (B[l] = f[l].type === "object" && f[l].properties ? Qe(f[l]) : Dt(f[l].default), B), {});
|
|
1278
|
+
return w.id = `${t}-${Date.now()}`, w;
|
|
1276
1279
|
}
|
|
1277
|
-
function ge(
|
|
1278
|
-
const t =
|
|
1280
|
+
function ge(S, f = {}) {
|
|
1281
|
+
const t = kn[S];
|
|
1279
1282
|
if (t) {
|
|
1280
|
-
let
|
|
1281
|
-
const B =
|
|
1282
|
-
return
|
|
1283
|
+
let w = Qe(t);
|
|
1284
|
+
const B = _n[S];
|
|
1285
|
+
return w = B ? B({ getSchemaByType: ge }, w, f) : w, w;
|
|
1283
1286
|
}
|
|
1284
1287
|
return null;
|
|
1285
1288
|
}
|
|
1286
|
-
function
|
|
1289
|
+
function qo(S, f, t) {
|
|
1287
1290
|
var y;
|
|
1288
|
-
function
|
|
1291
|
+
function w() {
|
|
1289
1292
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
1290
1293
|
}
|
|
1291
|
-
|
|
1294
|
+
w();
|
|
1292
1295
|
const B = t && t.getStyles && t.getStyles() || "", l = t && t.getDesignerClass && t.getDesignerClass() || "", h = H();
|
|
1293
|
-
function
|
|
1296
|
+
function E() {
|
|
1294
1297
|
return (f == null ? void 0 : f.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
1295
1298
|
}
|
|
1296
1299
|
function p() {
|
|
@@ -1299,20 +1302,20 @@ function $o(w, f, t) {
|
|
|
1299
1302
|
function x() {
|
|
1300
1303
|
return (f == null ? void 0 : f.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
1301
1304
|
}
|
|
1302
|
-
function
|
|
1305
|
+
function C() {
|
|
1303
1306
|
return (f == null ? void 0 : f.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
1304
1307
|
}
|
|
1305
|
-
function
|
|
1308
|
+
function D(i) {
|
|
1306
1309
|
if (!i || !i.value)
|
|
1307
1310
|
return null;
|
|
1308
1311
|
if (i.value.schema && i.value.schema.type === "component")
|
|
1309
1312
|
return i.value;
|
|
1310
|
-
const
|
|
1313
|
+
const T = H(i == null ? void 0 : i.value.parent), m = D(T);
|
|
1311
1314
|
return m || null;
|
|
1312
1315
|
}
|
|
1313
1316
|
function a(i = f) {
|
|
1314
|
-
const { componentInstance:
|
|
1315
|
-
return !
|
|
1317
|
+
const { componentInstance: T, designerItemElementRef: m } = i;
|
|
1318
|
+
return !T || !T.value ? null : T.value.canMove ? m : a(i.parent);
|
|
1316
1319
|
}
|
|
1317
1320
|
function e(i) {
|
|
1318
1321
|
return !!t && t.canAccepts(i);
|
|
@@ -1322,21 +1325,21 @@ function $o(w, f, t) {
|
|
|
1322
1325
|
}
|
|
1323
1326
|
function c() {
|
|
1324
1327
|
}
|
|
1325
|
-
function g(i,
|
|
1326
|
-
|
|
1328
|
+
function g(i, T) {
|
|
1329
|
+
T && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(T);
|
|
1327
1330
|
}
|
|
1328
1331
|
function I(i) {
|
|
1329
|
-
const { componentType:
|
|
1330
|
-
let m = ge(
|
|
1332
|
+
const { componentType: T } = i;
|
|
1333
|
+
let m = ge(T, i);
|
|
1331
1334
|
t && t.onResolveNewComponentSchema && (m = t.onResolveNewComponentSchema(i, m));
|
|
1332
|
-
const W =
|
|
1333
|
-
return m && !m.id && m.type ===
|
|
1335
|
+
const W = T.toLowerCase().replace("-", "_");
|
|
1336
|
+
return m && !m.id && m.type === T && (m.id = `${W}_${Math.random().toString().slice(2, 6)}`), m;
|
|
1334
1337
|
}
|
|
1335
|
-
function V(i,
|
|
1338
|
+
function V(i, T) {
|
|
1336
1339
|
const m = String(i.getAttribute("data-controltype")), W = i.getAttribute("data-feature"), L = W ? JSON.parse(W) : {};
|
|
1337
1340
|
L.parentComponentInstance = h.value;
|
|
1338
1341
|
let r = ge(m, L);
|
|
1339
|
-
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(i,
|
|
1342
|
+
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(i, T, r));
|
|
1340
1343
|
const j = m.toLowerCase().replace("-", "_");
|
|
1341
1344
|
return r && !r.id && r.type === m && (r.id = `${j}_${Math.random().toString().slice(2, 6)}`), r;
|
|
1342
1345
|
}
|
|
@@ -1347,18 +1350,18 @@ function $o(w, f, t) {
|
|
|
1347
1350
|
return t.getPropsConfig(...i);
|
|
1348
1351
|
}
|
|
1349
1352
|
return h.value = {
|
|
1350
|
-
canMove:
|
|
1353
|
+
canMove: E(),
|
|
1351
1354
|
canSelectParent: p(),
|
|
1352
1355
|
canDelete: x(),
|
|
1353
|
-
canNested: !
|
|
1356
|
+
canNested: !C(),
|
|
1354
1357
|
contents: f == null ? void 0 : f.schema.contents,
|
|
1355
|
-
elementRef:
|
|
1358
|
+
elementRef: S,
|
|
1356
1359
|
parent: (y = f == null ? void 0 : f.parent) == null ? void 0 : y.componentInstance,
|
|
1357
1360
|
schema: f == null ? void 0 : f.schema,
|
|
1358
1361
|
styles: B,
|
|
1359
1362
|
designerClass: l,
|
|
1360
1363
|
canAccepts: e,
|
|
1361
|
-
getBelongedComponentInstance:
|
|
1364
|
+
getBelongedComponentInstance: D,
|
|
1362
1365
|
getDraggableDesignItemElement: a,
|
|
1363
1366
|
getDraggingDisplayText: o,
|
|
1364
1367
|
getPropConfig: _,
|
|
@@ -1367,22 +1370,22 @@ function $o(w, f, t) {
|
|
|
1367
1370
|
onAcceptNewChildElement: V,
|
|
1368
1371
|
onChildElementMovedOut: X,
|
|
1369
1372
|
addNewChildComponentSchema: I,
|
|
1370
|
-
updateDragAndDropRules:
|
|
1373
|
+
updateDragAndDropRules: w,
|
|
1371
1374
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || H(!1),
|
|
1372
1375
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || H(!1)
|
|
1373
1376
|
}, h;
|
|
1374
1377
|
}
|
|
1375
|
-
function
|
|
1378
|
+
function Ho(S, f, t) {
|
|
1376
1379
|
var y;
|
|
1377
|
-
function
|
|
1380
|
+
function w() {
|
|
1378
1381
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
1379
1382
|
}
|
|
1380
|
-
|
|
1383
|
+
w();
|
|
1381
1384
|
const B = t && t.getStyles && t.getStyles() || "", l = H();
|
|
1382
1385
|
function h() {
|
|
1383
1386
|
return t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
1384
1387
|
}
|
|
1385
|
-
function
|
|
1388
|
+
function E() {
|
|
1386
1389
|
return !1;
|
|
1387
1390
|
}
|
|
1388
1391
|
function p() {
|
|
@@ -1391,18 +1394,18 @@ function Uo(w, f, t) {
|
|
|
1391
1394
|
function x() {
|
|
1392
1395
|
return t && t.checkCanAddComponent ? t.checkCanAddComponent() : !0;
|
|
1393
1396
|
}
|
|
1394
|
-
function
|
|
1397
|
+
function C() {
|
|
1395
1398
|
return !0;
|
|
1396
1399
|
}
|
|
1397
|
-
function
|
|
1400
|
+
function D(i) {
|
|
1398
1401
|
if (!i || !i.value)
|
|
1399
1402
|
return null;
|
|
1400
|
-
const
|
|
1403
|
+
const T = H(i == null ? void 0 : i.value.parent), m = D(T);
|
|
1401
1404
|
return m || null;
|
|
1402
1405
|
}
|
|
1403
1406
|
function a(i = f) {
|
|
1404
|
-
const { componentInstance:
|
|
1405
|
-
return !
|
|
1407
|
+
const { componentInstance: T, designerItemElementRef: m } = i;
|
|
1408
|
+
return !T || !T.value ? null : T.value.canMove || T.value.canAdd || T.value.canDelete ? m : a(i.parent);
|
|
1406
1409
|
}
|
|
1407
1410
|
function e(i) {
|
|
1408
1411
|
return !!t && t.canAccepts(i);
|
|
@@ -1412,21 +1415,21 @@ function Uo(w, f, t) {
|
|
|
1412
1415
|
}
|
|
1413
1416
|
function c() {
|
|
1414
1417
|
}
|
|
1415
|
-
function g(i,
|
|
1416
|
-
|
|
1418
|
+
function g(i, T) {
|
|
1419
|
+
T && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(T);
|
|
1417
1420
|
}
|
|
1418
1421
|
function I(i) {
|
|
1419
|
-
const { componentType:
|
|
1420
|
-
let m = ge(
|
|
1422
|
+
const { componentType: T } = i;
|
|
1423
|
+
let m = ge(T, i);
|
|
1421
1424
|
t && t.onResolveNewComponentSchema && (m = t.onResolveNewComponentSchema(i, m));
|
|
1422
|
-
const W =
|
|
1423
|
-
return m && !m.id && m.type ===
|
|
1425
|
+
const W = T.toLowerCase().replace("-", "_");
|
|
1426
|
+
return m && !m.id && m.type === T && (m.id = `${W}_${Math.random().toString().slice(2, 6)}`), m;
|
|
1424
1427
|
}
|
|
1425
|
-
function V(i,
|
|
1428
|
+
function V(i, T) {
|
|
1426
1429
|
const m = String(i.getAttribute("data-controltype")), W = i.getAttribute("data-feature"), L = W ? JSON.parse(W) : {};
|
|
1427
1430
|
L.parentComponentInstance = l.value;
|
|
1428
1431
|
let r = ge(m, L);
|
|
1429
|
-
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(i,
|
|
1432
|
+
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(i, T, r));
|
|
1430
1433
|
const j = m.toLowerCase().replace("-", "_");
|
|
1431
1434
|
return r && !r.id && r.type === m && (r.id = `${j}_${Math.random().toString().slice(2, 6)}`), r;
|
|
1432
1435
|
}
|
|
@@ -1437,17 +1440,17 @@ function Uo(w, f, t) {
|
|
|
1437
1440
|
}
|
|
1438
1441
|
return l.value = {
|
|
1439
1442
|
canMove: h(),
|
|
1440
|
-
canSelectParent:
|
|
1443
|
+
canSelectParent: E(),
|
|
1441
1444
|
canAdd: x(),
|
|
1442
1445
|
canDelete: p(),
|
|
1443
|
-
canNested: !
|
|
1446
|
+
canNested: !C(),
|
|
1444
1447
|
contents: [],
|
|
1445
|
-
elementRef:
|
|
1448
|
+
elementRef: S,
|
|
1446
1449
|
parent: (y = f.parent) == null ? void 0 : y.componentInstance,
|
|
1447
1450
|
schema: f.schema,
|
|
1448
1451
|
styles: B,
|
|
1449
1452
|
canAccepts: e,
|
|
1450
|
-
getBelongedComponentInstance:
|
|
1453
|
+
getBelongedComponentInstance: D,
|
|
1451
1454
|
getDraggableDesignItemElement: a,
|
|
1452
1455
|
getDraggingDisplayText: o,
|
|
1453
1456
|
getPropConfig: _,
|
|
@@ -1456,15 +1459,15 @@ function Uo(w, f, t) {
|
|
|
1456
1459
|
onAcceptNewChildElement: V,
|
|
1457
1460
|
onChildElementMovedOut: X,
|
|
1458
1461
|
addNewChildComponentSchema: I,
|
|
1459
|
-
updateDragAndDropRules:
|
|
1462
|
+
updateDragAndDropRules: w,
|
|
1460
1463
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || H(!1),
|
|
1461
1464
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || H(!1)
|
|
1462
1465
|
}, l;
|
|
1463
1466
|
}
|
|
1464
1467
|
export {
|
|
1465
|
-
|
|
1468
|
+
Uo as FDesignerCanvas,
|
|
1466
1469
|
Ne as FDesignerItem,
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
+
En as designerCanvasProps,
|
|
1471
|
+
qo as useDesignerComponent,
|
|
1472
|
+
Ho as useDesignerInnerComponent
|
|
1470
1473
|
};
|