@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,68 +1,69 @@
|
|
|
1
|
-
import { ref as q, defineComponent as Fe, computed as Te, createVNode as
|
|
1
|
+
import { ref as q, defineComponent as Fe, computed as Te, createVNode as Z, createTextVNode as vt, inject as me, provide as Ee, watch as ze, onMounted as Ue, onBeforeUnmount as gt, mergeProps as $e, isVNode as yt } from "vue";
|
|
2
2
|
import { findIndex as Ye } from "lodash-es";
|
|
3
|
-
import ht from "
|
|
4
|
-
import Ct from "
|
|
5
|
-
import xt from "
|
|
6
|
-
import wt from "
|
|
7
|
-
import bt from "
|
|
8
|
-
import Pt from "
|
|
9
|
-
import It from "
|
|
10
|
-
import St from "
|
|
11
|
-
import Tt from "
|
|
12
|
-
import Et from "
|
|
13
|
-
import Ot from "
|
|
14
|
-
import Ft from "
|
|
15
|
-
import At from "
|
|
16
|
-
import Nt from "
|
|
17
|
-
import Dt from "
|
|
18
|
-
import Bt from "
|
|
19
|
-
import Mt from "
|
|
20
|
-
import _t from "
|
|
21
|
-
import Lt from "
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import Vt from "
|
|
25
|
-
import Xt from "
|
|
26
|
-
import $t from "
|
|
27
|
-
import Yt from "
|
|
28
|
-
import jt from "
|
|
29
|
-
import zt from "
|
|
30
|
-
import Ut from "
|
|
31
|
-
import Ht from "
|
|
32
|
-
import Wt from "
|
|
33
|
-
import qt from "
|
|
34
|
-
import Gt from "
|
|
35
|
-
import Kt from "
|
|
36
|
-
import Qt from "
|
|
37
|
-
import Jt from "
|
|
38
|
-
import Zt from "
|
|
39
|
-
import en from "
|
|
40
|
-
import tn from "
|
|
41
|
-
import nn from "
|
|
42
|
-
import on from "
|
|
43
|
-
import rn from "
|
|
44
|
-
import sn from "
|
|
45
|
-
import an from "
|
|
46
|
-
import cn from "
|
|
47
|
-
import ln from "
|
|
48
|
-
import un from "
|
|
49
|
-
import fn from "
|
|
50
|
-
import dn from "
|
|
51
|
-
import pn from "
|
|
52
|
-
import mn from "
|
|
53
|
-
import vn from "
|
|
54
|
-
import gn from "
|
|
55
|
-
import yn from "
|
|
56
|
-
import hn from "
|
|
57
|
-
import Cn from "
|
|
58
|
-
|
|
3
|
+
import ht from "../accordion/index.esm.js";
|
|
4
|
+
import Ct from "../avatar/index.esm.js";
|
|
5
|
+
import xt from "../button-edit/index.esm.js";
|
|
6
|
+
import wt from "../button-group/index.esm.js";
|
|
7
|
+
import bt from "../calendar/index.esm.js";
|
|
8
|
+
import Pt from "../capsule/index.esm.js";
|
|
9
|
+
import It from "../checkbox/index.esm.js";
|
|
10
|
+
import St from "../color-picker/index.esm.js";
|
|
11
|
+
import Tt from "../combo-list/index.esm.js";
|
|
12
|
+
import Et from "../content-container/index.esm.js";
|
|
13
|
+
import Ot from "../data-grid/index.esm.js";
|
|
14
|
+
import Ft from "../date-picker/index.esm.js";
|
|
15
|
+
import At from "../dropdown/index.esm.js";
|
|
16
|
+
import Nt from "../dynamic-form/index.esm.js";
|
|
17
|
+
import Dt from "../external-container/index.esm.js";
|
|
18
|
+
import Bt from "../events-editor/index.esm.js";
|
|
19
|
+
import Mt from "../filter-bar/index.esm.js";
|
|
20
|
+
import _t from "../image-cropper/index.esm.js";
|
|
21
|
+
import Lt from "../input-group/index.esm.js";
|
|
22
|
+
import kt from "../layout/index.esm.js";
|
|
23
|
+
import Rt from "../list-nav/index.esm.js";
|
|
24
|
+
import Vt from "../list-view/index.esm.js";
|
|
25
|
+
import Xt from "../lookup/index.esm.js";
|
|
26
|
+
import $t from "../nav/index.esm.js";
|
|
27
|
+
import Yt from "../number-spinner/index.esm.js";
|
|
28
|
+
import jt from "../number-range/index.esm.js";
|
|
29
|
+
import zt from "../order/index.esm.js";
|
|
30
|
+
import Ut from "../page-header/index.esm.js";
|
|
31
|
+
import Ht from "../page-footer/index.esm.js";
|
|
32
|
+
import Wt from "../pagination/index.esm.js";
|
|
33
|
+
import qt from "../progress/index.esm.js";
|
|
34
|
+
import Gt from "../query-solution/index.esm.js";
|
|
35
|
+
import Kt from "../radio-group/index.esm.js";
|
|
36
|
+
import Qt from "../rate/index.esm.js";
|
|
37
|
+
import Jt from "../response-toolbar/index.esm.js";
|
|
38
|
+
import Zt from "../response-layout/index.esm.js";
|
|
39
|
+
import en from "../response-layout-editor/index.esm.js";
|
|
40
|
+
import tn from "../search-box/index.esm.js";
|
|
41
|
+
import nn from "../section/index.esm.js";
|
|
42
|
+
import on from "../smoke-detector/index.esm.js";
|
|
43
|
+
import rn from "../splitter/index.esm.js";
|
|
44
|
+
import sn from "../step/index.esm.js";
|
|
45
|
+
import an from "../switch/index.esm.js";
|
|
46
|
+
import cn from "../tabs/index.esm.js";
|
|
47
|
+
import ln from "../tags/index.esm.js";
|
|
48
|
+
import un from "../text/index.esm.js";
|
|
49
|
+
import fn from "../time-picker/index.esm.js";
|
|
50
|
+
import dn from "../transfer/index.esm.js";
|
|
51
|
+
import pn from "../tree-view/index.esm.js";
|
|
52
|
+
import mn from "../uploader/index.esm.js";
|
|
53
|
+
import vn from "../verify-detail/index.esm.js";
|
|
54
|
+
import gn from "../weather/index.esm.js";
|
|
55
|
+
import yn from "../component/index.esm.js";
|
|
56
|
+
import hn from "../video/index.esm.js";
|
|
57
|
+
import Cn from "../textarea/index.esm.js";
|
|
58
|
+
import xn from "../tree-grid/index.esm.js";
|
|
59
|
+
const wn = {
|
|
59
60
|
/**
|
|
60
61
|
* 组件值
|
|
61
62
|
*/
|
|
62
63
|
modelValue: { type: Object, default: {} }
|
|
63
64
|
};
|
|
64
|
-
function
|
|
65
|
-
const
|
|
65
|
+
function bn() {
|
|
66
|
+
const I = { aroundDirection: "none", left: 2, right: 2, top: 2, bottom: 2, x: 0, y: 0 };
|
|
66
67
|
function B() {
|
|
67
68
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
68
69
|
return e.setAttribute("fill", "none"), e.setAttribute("stroke", "#4d53e8"), e.setAttribute("stroke-width", "2"), e.setAttribute("class", ""), e;
|
|
@@ -75,74 +76,74 @@ function wn() {
|
|
|
75
76
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
76
77
|
return e.setAttribute("fill", "none"), e.setAttribute("stroke", "#4d53e8"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e;
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
i.key === "Delete" && (e.indexOf("^"), document.removeEventListener("keydown",
|
|
79
|
+
function C(e, t, l, P) {
|
|
80
|
+
const s = (i) => {
|
|
81
|
+
i.key === "Delete" && (e.indexOf("^"), document.removeEventListener("keydown", s), t.remove());
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}),
|
|
85
|
-
|
|
83
|
+
l.addEventListener("mouseenter", () => {
|
|
84
|
+
l.setAttribute("stroke", "#37d0ff"), P.setAttribute("stroke", "#37d0ff"), l.setAttribute("stroke-width", "3"), document.addEventListener("keydown", s);
|
|
85
|
+
}), l.addEventListener("mouseleave", () => {
|
|
86
|
+
l.setAttribute("stroke", "#4d53e8"), l.setAttribute("stroke-width", "2"), P.setAttribute("stroke", "#4d53e8"), document.removeEventListener("keydown", s);
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
function f(e) {
|
|
89
90
|
let t = document.getElementById(e);
|
|
90
91
|
if (t == null) {
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
92
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "svg"), P = B();
|
|
93
|
+
l.appendChild(P);
|
|
94
|
+
const s = p();
|
|
95
|
+
l.appendChild(s);
|
|
95
96
|
const i = w();
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
return
|
|
97
|
+
l.appendChild(i);
|
|
98
|
+
const j = w();
|
|
99
|
+
l.appendChild(j), t = document.createElement("div"), t.id = e, t.style.position = "absolute", t.appendChild(l), C(e, t, P, s);
|
|
100
|
+
const k = document.getElementById("svg-container");
|
|
101
|
+
return k && k.appendChild(t), t;
|
|
101
102
|
}
|
|
102
103
|
return t;
|
|
103
104
|
}
|
|
104
|
-
function F(e, t,
|
|
105
|
+
function F(e, t, l, P, s) {
|
|
105
106
|
const i = { x: 0, y: 0 };
|
|
106
|
-
return e === "west" && (t === "north_west" && (
|
|
107
|
+
return e === "west" && (t === "north_west" && (l === "north" && (i.x = 0, i.y = 0 - s / 2), l === "west" && (i.x = 0 - P / 2, i.y = 0)), t === "north_east" && (l === "north" && (i.x = -100, i.y = 0 - s / 2), l === "east" && (i.x = -100, i.y = 0 - s / 2)), t === "south_east" && (l === "south" && (i.x = -100, i.y = 0 + s / 2), l === "east" && (i.x = -100, i.y = 0 + s / 2)), t === "south_west" && (l === "south" && (i.x = 0, i.y = 0 + s / 2), l === "west" && (i.x = 0 - P / 2, i.y = 0))), e === "east" && (t === "north_west" && (l === "north" && (i.x = -100, i.y = 0 - s / 2), l === "west" && (i.x = 100, i.y = 0 - s / 2)), t === "north_east" && (l === "north" && (i.x = 0, i.y = 0 - s / 2), l === "east" && (i.x = 0 + P / 2, i.y = 0)), t === "south_east" && (l === "south" && (i.x = 0, i.y = 0 + s / 2), l === "east" && (i.x = 0 + P / 2, i.y = 0)), t === "south_west" && (l === "south" && (i.x = 100, i.y = 0 + s / 2), l === "west" && (i.x = 100, i.y = 0 + s / 2))), e === "north" && (t === "north_west" && (l === "north" && (i.x = 0, i.y = 0 - s / 2), l === "west" && (i.x = 0 - P / 2, i.y = 0)), t === "north_east" && (l === "north" && (i.x = 0, i.y = 0 - s / 2), l === "east" && (i.x = 0 + P / 2, i.y = 0)), t === "south_east" && (l === "south" && (i.x = 0 + P / 2, i.y = -100), l === "east" && (i.x = 0 + P / 2, i.y = -100)), t === "south_west" && (l === "south" && (i.x = 0 - P / 2, i.y = -100), l === "west" && (i.x = 0 - P / 2, i.y = -100))), e === "south" && (t === "north_west" && (l === "north" && (i.x = 0 - P / 2, i.y = 100), l === "west" && (i.x = 0 - P / 2, i.y = 100)), t === "north_east" && (l === "north" && (i.x = 0 + P / 2, i.y = 100), l === "east" && (i.x = 0 + P / 2, i.y = 100)), t === "south_east" && (l === "south" && (i.x = 0, i.y = 0 + s / 2), l === "east" && (i.x = 0 + P / 2, i.y = 0)), t === "south_west" && (l === "south" && (i.x = 0, i.y = s / 2), l === "west" && (i.x = 0 - P / 2, i.y = 0))), i;
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
return e === "south" && (t === "west" && (
|
|
109
|
+
function v(e, t, l, P) {
|
|
110
|
+
const s = { x: 0, y: 0 };
|
|
111
|
+
return e === "south" && (t === "west" && (s.x = -100, s.y = 0 - P / 2), t === "east" && (s.x = 100, s.y = -100), t === "south" && (s.x = 0 - l / 2, s.y = 100), (t === "north" || t === "center") && (s.x = 0, s.y = 0 - P / 2)), e === "north" && (t === "west" && (s.x = -100, s.y = 100), t === "east" && (s.x = 100, s.y = 100), t === "north" && (s.x = 0 - l / 2, s.y = -100), (t === "south" || t === "center") && (s.x = 0, s.y = P / 2)), e === "east" && (t === "north" && (s.y = -100, s.x = -100), t === "south" && (s.y = 100, s.x = -100), t === "east" && (s.x = 100, s.y = 100), (t === "west" || t === "center") && (s.x = 0 - l / 2, s.y = 0)), e === "west" && (t === "north" && (s.y = -100, s.x = 100), t === "south" && (s.y = 100, s.x = 100), t === "west" && (s.x = -100, s.y = P / 2), (t === "east" || t === "center") && (s.x = l / 2, s.y = 0)), s;
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
-
const
|
|
113
|
+
function S(e, t, l, P, s, i, j) {
|
|
114
|
+
const k = j === "south" || j === "east" ? "portrait" : "landscape", ne = s, R = k === "landscape" ? "east" : "north", ie = j === "center" ? k === "landscape" ? "west" : "south" : j, se = F(ne, i, R, e, t), { x: D, y: h } = se, H = v(R, ie, e, t), { x: W, y: K } = H;
|
|
114
115
|
K < 0 && (t += Math.abs(K));
|
|
115
|
-
const de = /* @__PURE__ */ new Map([["default", 0 + D], ["portrait", 0 + D], ["landscape", 0 + D]]), oe = /* @__PURE__ */ new Map([["default", t +
|
|
116
|
+
const de = /* @__PURE__ */ new Map([["default", 0 + D], ["portrait", 0 + D], ["landscape", 0 + D]]), oe = /* @__PURE__ */ new Map([["default", t + h], ["portrait", t + h], ["landscape", t + h]]);
|
|
116
117
|
D < 0 && (e += Math.abs(D)), W > 0 && (e += W);
|
|
117
|
-
const ye = /* @__PURE__ */ new Map([["default", e + W], ["portrait", e + W], ["landscape", e + W]]), ce = /* @__PURE__ */ new Map([["default", 0 + K], ["portrait", 0 + K], ["landscape", 0 + K]]), le =
|
|
118
|
+
const ye = /* @__PURE__ */ new Map([["default", e + W], ["portrait", e + W], ["landscape", e + W]]), ce = /* @__PURE__ */ new Map([["default", 0 + K], ["portrait", 0 + K], ["landscape", 0 + K]]), le = P.left > I.left, ae = P.bottom > I.bottom, pe = le ? 0 : ae ? e / 2 : de.get(k), he = ae ? t + P.bottom : le ? t / 2 : oe.get(k), Ce = ye.get(k), ve = ce.get(k);
|
|
118
119
|
return [{ x: pe, y: he }, { x: Ce, y: ve }, { x: W, y: K }];
|
|
119
120
|
}
|
|
120
|
-
function u(e, t,
|
|
121
|
-
const
|
|
121
|
+
function u(e, t, l, P, s, i, j) {
|
|
122
|
+
const k = j === "south" || j === "west" ? "portrait" : "landscape", ne = s, R = k === "landscape" ? "west" : "north", ie = j, se = F(ne, i, R, e, t), { x: D, y: h } = se, H = v(R, ie, e, t), { x: W, y: K } = H;
|
|
122
123
|
K < 0 && (t += Math.abs(K)), D > 0 && (e += D), W < 0 && (e += Math.abs(W));
|
|
123
|
-
const de = /* @__PURE__ */ new Map([["default", e + D], ["portrait", e + D], ["landscape", e + D]]), oe = /* @__PURE__ */ new Map([["default", t +
|
|
124
|
+
const de = /* @__PURE__ */ new Map([["default", e + D], ["portrait", e + D], ["landscape", e + D]]), oe = /* @__PURE__ */ new Map([["default", t + h], ["portrait", t + h], ["landscape", t + h]]), ye = /* @__PURE__ */ new Map([["default", 0 + W], ["portrait", 0 + W], ["landscape", 0 + W]]), ce = /* @__PURE__ */ new Map([["default", 0 + K], ["portrait", 0 + K], ["landscape", 0 + K]]), le = P.right > I.right, ae = P.bottom > I.bottom, pe = le ? e + P.right : ae ? e / 2 : de.get(k), he = ae ? t + P.bottom : le ? t / 2 : oe.get(k), Ce = ye.get(k), ve = ce.get(k);
|
|
124
125
|
return [{ x: pe, y: he }, { x: Ce, y: ve }, { x: W, y: K }];
|
|
125
126
|
}
|
|
126
|
-
function n(e, t,
|
|
127
|
-
const
|
|
128
|
-
D < 0 && (e += Math.abs(D)),
|
|
129
|
-
const ye = /* @__PURE__ */ new Map([["default", e + W], ["portrait", e + W], ["landscape", e + W]]), ce = /* @__PURE__ */ new Map([["default", t + K], ["portrait", t + K], ["landscape", t + K]]), le =
|
|
127
|
+
function n(e, t, l, P, s, i, j) {
|
|
128
|
+
const k = j === "north" || j === "east" ? "portrait" : "landscape", ne = s, R = k === "landscape" ? "east" : "south", ie = j, se = F(ne, i, R, e, t), { x: D, y: h } = se, H = v(R, ie, e, t), { x: W, y: K } = H, de = /* @__PURE__ */ new Map([["default", 0 + D], ["portrait", 0 + D], ["landscape", 0 + D]]), oe = /* @__PURE__ */ new Map([["default", 0 + h], ["portrait", 0 + h], ["landscape", 0 + h]]);
|
|
129
|
+
D < 0 && (e += Math.abs(D)), h < 0 && (t += Math.abs(h)), W > 0 && (e += W), K > 0 && (t += K);
|
|
130
|
+
const ye = /* @__PURE__ */ new Map([["default", e + W], ["portrait", e + W], ["landscape", e + W]]), ce = /* @__PURE__ */ new Map([["default", t + K], ["portrait", t + K], ["landscape", t + K]]), le = P.left > I.left, ae = P.top > I.top, pe = le ? 0 : ae ? e / 2 : de.get(k), he = ae ? 0 : le ? t / 2 : oe.get(k), Ce = ye.get(k), ve = ce.get(k);
|
|
130
131
|
return [{ x: pe, y: he }, { x: Ce, y: ve }, { x: W, y: K }];
|
|
131
132
|
}
|
|
132
|
-
function o(e, t,
|
|
133
|
-
const
|
|
133
|
+
function o(e, t, l, P, s, i, j) {
|
|
134
|
+
const k = j === "north" || j === "west" ? "portrait" : "landscape", ne = s, R = k === "landscape" ? "west" : "south", ie = j, se = F(ne, i, R, e, t), { x: D, y: h } = se, H = v(R, ie, e, t), { x: W, y: K } = H;
|
|
134
135
|
W < 0 && (e += Math.abs(W));
|
|
135
|
-
const de = /* @__PURE__ */ new Map([["default", e + D], ["portrait", e + D], ["landscape", e + D]]), oe = /* @__PURE__ */ new Map([["default", 0 +
|
|
136
|
-
|
|
137
|
-
const ye = /* @__PURE__ */ new Map([["default", 0 + W], ["portrait", 0 + W], ["landscape", 0 + W]]), ce = /* @__PURE__ */ new Map([["default", t + K], ["portrait", t + K], ["landscape", t + K]]), le =
|
|
136
|
+
const de = /* @__PURE__ */ new Map([["default", e + D], ["portrait", e + D], ["landscape", e + D]]), oe = /* @__PURE__ */ new Map([["default", 0 + h], ["portrait", 0 + h], ["landscape", 0 + h]]);
|
|
137
|
+
h < 0 && (t += Math.abs(h)), K > 0 && (t += K);
|
|
138
|
+
const ye = /* @__PURE__ */ new Map([["default", 0 + W], ["portrait", 0 + W], ["landscape", 0 + W]]), ce = /* @__PURE__ */ new Map([["default", t + K], ["portrait", t + K], ["landscape", t + K]]), le = P.right > I.right, ae = P.top > I.top, pe = le ? e + P.right : ae ? e / 2 : de.get(k), he = ae ? 0 : le ? t / 2 : oe.get(k), Ce = ye.get(k), ve = ce.get(k);
|
|
138
139
|
return [{ x: pe, y: he }, { x: Ce, y: ve }, { x: W, y: K }];
|
|
139
140
|
}
|
|
140
|
-
const
|
|
141
|
-
["north_east",
|
|
141
|
+
const a = /* @__PURE__ */ new Map([
|
|
142
|
+
["north_east", S],
|
|
142
143
|
["north_west", u],
|
|
143
144
|
["south_east", n],
|
|
144
145
|
["south_west", o]
|
|
145
|
-
]),
|
|
146
|
+
]), g = /* @__PURE__ */ new Map([
|
|
146
147
|
["east", ["north_west", "south_west"]],
|
|
147
148
|
["west", ["north_east", "south_east"]],
|
|
148
149
|
["north", ["south_west", "south_east"]],
|
|
@@ -177,7 +178,7 @@ function wn() {
|
|
|
177
178
|
bottom: t.bottom
|
|
178
179
|
} : t;
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function z(e, t) {
|
|
181
182
|
return e === "south_west" ? {
|
|
182
183
|
left: t.left,
|
|
183
184
|
right: t.right,
|
|
@@ -203,80 +204,80 @@ function wn() {
|
|
|
203
204
|
bottom: 100
|
|
204
205
|
} : t;
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function c(e, t) {
|
|
207
208
|
return t;
|
|
208
209
|
}
|
|
209
|
-
const
|
|
210
|
+
const N = /* @__PURE__ */ new Map([
|
|
210
211
|
["east", m],
|
|
211
212
|
["west", Y],
|
|
212
|
-
["north",
|
|
213
|
+
["north", z],
|
|
213
214
|
["south", X],
|
|
214
|
-
["center",
|
|
215
|
+
["center", c]
|
|
215
216
|
]);
|
|
216
|
-
function U(e, t,
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
function U(e, t, l, P) {
|
|
218
|
+
const s = t.x - e.x, i = t.y - e.y, j = s >= 0 ? "east" : "west", k = i >= 0 ? "south" : "north", ne = `${k}_${j}`, ie = (g.get(l) || []).includes(ne), se = N.get(l), D = ie ? se(ne, I) : I, h = Math.abs(s), H = Math.abs(i), W = a.get(`${k}_${j}`), [K, de, oe] = W(
|
|
219
|
+
h,
|
|
219
220
|
H,
|
|
220
221
|
ie,
|
|
221
222
|
D,
|
|
222
|
-
|
|
223
|
+
l,
|
|
223
224
|
ne,
|
|
224
|
-
|
|
225
|
-
), ye =
|
|
225
|
+
P
|
|
226
|
+
), ye = j === "west" ? oe.x < 0 ? Math.abs(oe.x) : 0 : oe.x > 0 ? oe.x : 0, ce = D.left + D.right + h + ye, le = k === "north" ? oe.y < 0 ? Math.abs(oe.y) : 0 : oe.y > 0 ? oe.y : 0, ae = D.top + D.bottom + H + le, pe = j === "east" ? e.x - D.left : e.x + D.right - ce, he = k === "south" ? e.y - D.top : e.y + D.bottom - ae, Ce = j === "east" ? D.left : ce - D.right, ve = k === "north" ? ae - D.bottom : D.top, Be = j === "west" ? oe.x < 0 ? Math.abs(oe.x) : 0 : oe.x < 0 ? ce : ce - oe.x, Ae = k === "north" ? oe.y < 0 ? Math.abs(oe.y) : 0 : oe.y < 0 ? ae : ae - oe.y;
|
|
226
227
|
return { width: ce, height: ae, left: pe, top: he, startPoinInBoundray: { x: Ce, y: ve }, firstControlPoint: K, secondControlPoint: de, endPoinInBoundray: { x: Be, y: Ae } };
|
|
227
228
|
}
|
|
228
|
-
function $(e, t,
|
|
229
|
-
e.style.position = "absolute", e.style.alignItems = "center", e.style.left = `${t}px`, e.style.top = `${
|
|
229
|
+
function $(e, t, l, P, s) {
|
|
230
|
+
e.style.position = "absolute", e.style.alignItems = "center", e.style.left = `${t}px`, e.style.top = `${l}px`, e.style.width = P + "px", e.style.height = s + "px";
|
|
230
231
|
}
|
|
231
|
-
function re(e, t,
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
const ne =
|
|
235
|
-
ne.setAttribute("d",
|
|
232
|
+
function re(e, t, l, P, s, i, j) {
|
|
233
|
+
const k = e.childNodes[0];
|
|
234
|
+
k.setAttribute("width", String(t)), k.setAttribute("height", String(l)), e.appendChild(k);
|
|
235
|
+
const ne = k.childNodes[0], R = `${P.x} ${P.y}`, ie = `${s.x} ${s.y}`, se = `${i.x} ${i.y}`, D = `${j.x} ${j.y}`, h = "M ".concat(R).concat(" C ").concat(ie).concat("," + se + ",").concat(D);
|
|
236
|
+
ne.setAttribute("d", h), ne.setAttribute("fill", "none"), ne.setAttribute("stroke", "#4d53e8"), ne.setAttribute("stroke-width", "2"), ne.setAttribute("class", "");
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function J(e, t, l, P, s) {
|
|
238
239
|
const {
|
|
239
240
|
width: i,
|
|
240
|
-
height:
|
|
241
|
-
left:
|
|
241
|
+
height: j,
|
|
242
|
+
left: k,
|
|
242
243
|
top: ne,
|
|
243
244
|
startPoinInBoundray: R,
|
|
244
245
|
firstControlPoint: ie,
|
|
245
246
|
secondControlPoint: se,
|
|
246
247
|
endPoinInBoundray: D
|
|
247
|
-
} = U(t,
|
|
248
|
-
$(e,
|
|
248
|
+
} = U(t, l, P, s);
|
|
249
|
+
$(e, k, ne, i, j), re(e, i, j, R, ie, se, D);
|
|
249
250
|
}
|
|
250
|
-
function d(e, t,
|
|
251
|
+
function d(e, t, l, P, s) {
|
|
251
252
|
const i = f(e);
|
|
252
|
-
|
|
253
|
+
J(i, t, l, P, s);
|
|
253
254
|
}
|
|
254
255
|
function G(e) {
|
|
255
256
|
return Number(e.replace("px", ""));
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
+
function y(e) {
|
|
258
259
|
if (e !== null) {
|
|
259
|
-
const t = e.parentNode,
|
|
260
|
+
const t = e.parentNode, l = G(t.style.left), P = G(t.style.top);
|
|
260
261
|
return {
|
|
261
|
-
x:
|
|
262
|
-
y:
|
|
262
|
+
x: l + e.offsetLeft + e.offsetWidth / 2,
|
|
263
|
+
y: P + e.offsetTop + e.offsetHeight / 2
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
266
|
return { x: 0, y: 0 };
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
-
const
|
|
269
|
-
return { startPoint: { x:
|
|
268
|
+
function b(e, t) {
|
|
269
|
+
const l = document.getElementById(e), P = document.getElementById(t), s = y(l), i = y(P), j = s.x + 2, k = s.y, ne = i.x - 2, R = i.y;
|
|
270
|
+
return { startPoint: { x: j, y: k }, endPoint: { x: ne, y: R } };
|
|
270
271
|
}
|
|
271
|
-
function
|
|
272
|
-
const { startPoint:
|
|
273
|
-
d(`${e}_${t}`,
|
|
272
|
+
function A(e, t, l, P) {
|
|
273
|
+
const { startPoint: s, endPoint: i } = b(e, t);
|
|
274
|
+
d(`${e}_${t}`, s, i, l, P);
|
|
274
275
|
}
|
|
275
|
-
return { connect:
|
|
276
|
+
return { connect: A, drawing: d };
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
-
const
|
|
279
|
-
function
|
|
278
|
+
function Pn(O) {
|
|
279
|
+
const Q = q(), E = q(0), I = q(0), B = q({ x: 0, y: 0 }), p = q(), { drawing: w } = O;
|
|
280
|
+
function C(m) {
|
|
280
281
|
return Number(m.replace("px", ""));
|
|
281
282
|
}
|
|
282
283
|
function f(m) {
|
|
@@ -296,18 +297,18 @@ function bn(O) {
|
|
|
296
297
|
return "center";
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
-
const X =
|
|
301
|
-
E.value = X.left,
|
|
300
|
+
function v(m, Y, z) {
|
|
301
|
+
const X = z.getBoundingClientRect();
|
|
302
|
+
E.value = X.left, I.value = X.top, B.value = { x: m, y: Y }, Q.value = F(z);
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function S(m) {
|
|
304
305
|
var $;
|
|
305
|
-
const Y = m.clientX - E.value,
|
|
306
|
+
const Y = m.clientX - E.value, z = m.clientY - I.value, X = B.value.x + Y, c = B.value.y + z, N = m.target, U = N && typeof N.className == "string" && f(N) ? F(N) : "center";
|
|
306
307
|
w(
|
|
307
308
|
`${($ = p.value) == null ? void 0 : $.id}_curve_to`,
|
|
308
309
|
{ x: B.value.x, y: B.value.y },
|
|
309
|
-
{ x: X, y:
|
|
310
|
-
|
|
310
|
+
{ x: X, y: c },
|
|
311
|
+
Q.value,
|
|
311
312
|
U
|
|
312
313
|
);
|
|
313
314
|
}
|
|
@@ -316,22 +317,22 @@ function bn(O) {
|
|
|
316
317
|
Y && Y.remove();
|
|
317
318
|
}
|
|
318
319
|
function n() {
|
|
319
|
-
document.addEventListener("mousemove",
|
|
320
|
+
document.addEventListener("mousemove", S);
|
|
320
321
|
}
|
|
321
322
|
function o() {
|
|
322
|
-
document.removeEventListener("mousemove",
|
|
323
|
+
document.removeEventListener("mousemove", S);
|
|
323
324
|
}
|
|
324
|
-
function
|
|
325
|
+
function a(m) {
|
|
325
326
|
p.value = void 0, o();
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function g(m, Y) {
|
|
328
329
|
p.value = document.getElementById(m);
|
|
329
|
-
const
|
|
330
|
-
|
|
330
|
+
const z = p.value.offsetParent, X = p.value.getBoundingClientRect(), c = z.getBoundingClientRect(), N = C(z.style.left) + (X.left - c.left), U = C(z.style.top) + (X.top - c.top), $ = N + X.width / 2, re = U + X.height / 2;
|
|
331
|
+
v($, re, p.value), n();
|
|
331
332
|
}
|
|
332
|
-
return { drawFrom:
|
|
333
|
+
return { drawFrom: g, eraseDrawingLine: u, finishToDraw: a, getAncherPointPosition: F, isAncherPoint: f };
|
|
333
334
|
}
|
|
334
|
-
const
|
|
335
|
+
const In = {
|
|
335
336
|
id: { type: String, default: "" },
|
|
336
337
|
type: { type: String, default: "" },
|
|
337
338
|
/**
|
|
@@ -342,34 +343,34 @@ const Pn = {
|
|
|
342
343
|
y: { type: Number, default: 0 },
|
|
343
344
|
connection: { type: Array, default: [] }
|
|
344
345
|
}, Oe = q(0);
|
|
345
|
-
function
|
|
346
|
-
const E =
|
|
346
|
+
function Sn(O, Q) {
|
|
347
|
+
const E = Q.getBoundingClientRect(), I = O.getBoundingClientRect(), B = I.top >= E.top, p = I.top <= E.bottom;
|
|
347
348
|
return B && p;
|
|
348
349
|
}
|
|
349
350
|
function et(O) {
|
|
350
351
|
if (!O)
|
|
351
352
|
return;
|
|
352
|
-
let
|
|
353
|
-
if (O.className.includes("dgComponentSelected") ?
|
|
353
|
+
let Q;
|
|
354
|
+
if (O.className.includes("dgComponentSelected") ? Q = O : Q = O.querySelector(".dgComponentSelected"), !Q)
|
|
354
355
|
return;
|
|
355
|
-
const E =
|
|
356
|
+
const E = Q.getBoundingClientRect();
|
|
356
357
|
if (E.width === 0 && E.height === 0)
|
|
357
358
|
return;
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
360
|
-
if (!
|
|
361
|
-
|
|
359
|
+
const I = Q.querySelector(".component-btn-group");
|
|
360
|
+
if (I) {
|
|
361
|
+
if (!Sn(Q, O)) {
|
|
362
|
+
I.style.display = "none";
|
|
362
363
|
return;
|
|
363
364
|
}
|
|
364
|
-
|
|
365
|
-
const p =
|
|
365
|
+
I.style.display = "";
|
|
366
|
+
const p = I.getBoundingClientRect(), w = I.querySelector("div");
|
|
366
367
|
if (w) {
|
|
367
|
-
const
|
|
368
|
-
w.style.top = p.top + "px", w.style.left = p.left -
|
|
368
|
+
const C = w.getBoundingClientRect();
|
|
369
|
+
w.style.top = p.top + "px", w.style.left = p.left - C.width + "px";
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
|
-
const
|
|
373
|
+
const Tn = {
|
|
373
374
|
/**
|
|
374
375
|
* 组件值
|
|
375
376
|
*/
|
|
@@ -377,69 +378,69 @@ const Sn = {
|
|
|
377
378
|
componentId: { type: String, default: "" }
|
|
378
379
|
};
|
|
379
380
|
var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
380
|
-
function
|
|
381
|
+
function En(O) {
|
|
381
382
|
return O && O.__esModule && Object.prototype.hasOwnProperty.call(O, "default") ? O.default : O;
|
|
382
383
|
}
|
|
383
384
|
function De(O) {
|
|
384
385
|
throw new Error('Could not dynamically require "' + O + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
385
386
|
}
|
|
386
387
|
var tt = { exports: {} };
|
|
387
|
-
(function(O,
|
|
388
|
+
(function(O, Q) {
|
|
388
389
|
(function(E) {
|
|
389
390
|
O.exports = E();
|
|
390
391
|
})(function() {
|
|
391
392
|
return (/* @__PURE__ */ function() {
|
|
392
|
-
function E(
|
|
393
|
-
function w(F,
|
|
393
|
+
function E(I, B, p) {
|
|
394
|
+
function w(F, v) {
|
|
394
395
|
if (!B[F]) {
|
|
395
|
-
if (!
|
|
396
|
-
var
|
|
397
|
-
if (!
|
|
398
|
-
if (
|
|
396
|
+
if (!I[F]) {
|
|
397
|
+
var S = typeof De == "function" && De;
|
|
398
|
+
if (!v && S) return S(F, !0);
|
|
399
|
+
if (C) return C(F, !0);
|
|
399
400
|
var u = new Error("Cannot find module '" + F + "'");
|
|
400
401
|
throw u.code = "MODULE_NOT_FOUND", u;
|
|
401
402
|
}
|
|
402
403
|
var n = B[F] = { exports: {} };
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
return w(
|
|
406
|
-
}, n, n.exports, E,
|
|
404
|
+
I[F][0].call(n.exports, function(o) {
|
|
405
|
+
var a = I[F][1][o];
|
|
406
|
+
return w(a || o);
|
|
407
|
+
}, n, n.exports, E, I, B, p);
|
|
407
408
|
}
|
|
408
409
|
return B[F].exports;
|
|
409
410
|
}
|
|
410
|
-
for (var
|
|
411
|
+
for (var C = typeof De == "function" && De, f = 0; f < p.length; f++) w(p[f]);
|
|
411
412
|
return w;
|
|
412
413
|
}
|
|
413
414
|
return E;
|
|
414
415
|
}())({
|
|
415
|
-
1: [function(E,
|
|
416
|
-
var p = {}, w = "(?:^|\\s)",
|
|
417
|
-
function f(
|
|
418
|
-
var u = p[
|
|
419
|
-
return u ? u.lastIndex = 0 : p[
|
|
416
|
+
1: [function(E, I, B) {
|
|
417
|
+
var p = {}, w = "(?:^|\\s)", C = "(?:\\s|$)";
|
|
418
|
+
function f(S) {
|
|
419
|
+
var u = p[S];
|
|
420
|
+
return u ? u.lastIndex = 0 : p[S] = u = new RegExp(w + S + C, "g"), u;
|
|
420
421
|
}
|
|
421
|
-
function F(
|
|
422
|
-
var n =
|
|
423
|
-
n.length ? f(u).test(n) || (
|
|
422
|
+
function F(S, u) {
|
|
423
|
+
var n = S.className;
|
|
424
|
+
n.length ? f(u).test(n) || (S.className += " " + u) : S.className = u;
|
|
424
425
|
}
|
|
425
|
-
function
|
|
426
|
-
|
|
426
|
+
function v(S, u) {
|
|
427
|
+
S.className = S.className.replace(f(u), " ").trim();
|
|
427
428
|
}
|
|
428
|
-
|
|
429
|
+
I.exports = {
|
|
429
430
|
add: F,
|
|
430
|
-
rm:
|
|
431
|
+
rm: v
|
|
431
432
|
};
|
|
432
433
|
}, {}],
|
|
433
|
-
2: [function(E,
|
|
434
|
+
2: [function(E, I, B) {
|
|
434
435
|
(function(p) {
|
|
435
|
-
var w = E("contra/emitter"),
|
|
436
|
-
function
|
|
437
|
-
var
|
|
438
|
-
|
|
439
|
-
var
|
|
440
|
-
|
|
436
|
+
var w = E("contra/emitter"), C = E("crossvent"), f = E("./classes"), F = document, v = F.documentElement;
|
|
437
|
+
function S(d, G) {
|
|
438
|
+
var y = arguments.length;
|
|
439
|
+
y === 1 && Array.isArray(d) === !1 && (G = d, d = []);
|
|
440
|
+
var b, A, e, t, l, P, s, i, j, k = null, ne, R, ie = !1, se = 0, D, h = G || {};
|
|
441
|
+
h.moves === void 0 && (h.moves = Y), h.accepts === void 0 && (h.accepts = Y), h.invalid === void 0 && (h.invalid = Be), h.containers === void 0 && (h.containers = d || []), h.isContainer === void 0 && (h.isContainer = m), h.copy === void 0 && (h.copy = !1), h.copySortSource === void 0 && (h.copySortSource = !1), h.revertOnSpill === void 0 && (h.revertOnSpill = !1), h.removeOnSpill === void 0 && (h.removeOnSpill = !1), h.direction === void 0 && (h.direction = "vertical"), h.ignoreInputTextSelection === void 0 && (h.ignoreInputTextSelection = !0), h.mirrorContainer === void 0 && (h.mirrorContainer = F.body);
|
|
441
442
|
var H = w({
|
|
442
|
-
containers:
|
|
443
|
+
containers: h.containers,
|
|
443
444
|
start: Ce,
|
|
444
445
|
end: Ae,
|
|
445
446
|
cancel: qe,
|
|
@@ -448,21 +449,21 @@ var tt = { exports: {} };
|
|
|
448
449
|
canMove: he,
|
|
449
450
|
dragging: !1
|
|
450
451
|
});
|
|
451
|
-
return
|
|
452
|
+
return h.removeOnSpill === !0 && H.on("over", ot).on("out", rt), K(), H;
|
|
452
453
|
function W(r) {
|
|
453
|
-
return H.containers.indexOf(r) !== -1 ||
|
|
454
|
+
return H.containers.indexOf(r) !== -1 || h.isContainer(r);
|
|
454
455
|
}
|
|
455
456
|
function K(r) {
|
|
456
457
|
var x = r ? "remove" : "add";
|
|
457
|
-
o(
|
|
458
|
+
o(v, x, "mousedown", le), o(v, x, "mouseup", Ne);
|
|
458
459
|
}
|
|
459
460
|
function de(r) {
|
|
460
461
|
var x = r ? "remove" : "add";
|
|
461
|
-
o(
|
|
462
|
+
o(v, x, "mousemove", ae);
|
|
462
463
|
}
|
|
463
464
|
function oe(r) {
|
|
464
465
|
var x = r ? "remove" : "add";
|
|
465
|
-
|
|
466
|
+
C[x](v, "selectstart", ce), C[x](v, "click", ce);
|
|
466
467
|
}
|
|
467
468
|
function ye() {
|
|
468
469
|
K(!0), Ne({});
|
|
@@ -471,39 +472,39 @@ var tt = { exports: {} };
|
|
|
471
472
|
ne && r.preventDefault();
|
|
472
473
|
}
|
|
473
474
|
function le(r) {
|
|
474
|
-
t = r.clientX,
|
|
475
|
-
var x =
|
|
475
|
+
t = r.clientX, l = r.clientY;
|
|
476
|
+
var x = a(r) !== 1 || r.metaKey || r.ctrlKey;
|
|
476
477
|
if (!x) {
|
|
477
|
-
var T = r.target,
|
|
478
|
-
|
|
478
|
+
var T = r.target, V = pe(T);
|
|
479
|
+
V && (ne = V, de(), r.type === "mousedown" && (N(T) ? T.focus() : r.preventDefault()));
|
|
479
480
|
}
|
|
480
481
|
}
|
|
481
482
|
function ae(r) {
|
|
482
483
|
if (ne) {
|
|
483
|
-
if (
|
|
484
|
+
if (a(r) === 0) {
|
|
484
485
|
Ne({});
|
|
485
486
|
return;
|
|
486
487
|
}
|
|
487
|
-
if (!(r.clientX !== void 0 && Math.abs(r.clientX - t) <= (
|
|
488
|
-
if (
|
|
489
|
-
var x =
|
|
490
|
-
if (
|
|
488
|
+
if (!(r.clientX !== void 0 && Math.abs(r.clientX - t) <= (h.slideFactorX || 0) && r.clientY !== void 0 && Math.abs(r.clientY - l) <= (h.slideFactorY || 0))) {
|
|
489
|
+
if (h.ignoreInputTextSelection) {
|
|
490
|
+
var x = J("clientX", r) || 0, T = J("clientY", r) || 0, V = F.elementFromPoint(x, T);
|
|
491
|
+
if (N(V))
|
|
491
492
|
return;
|
|
492
493
|
}
|
|
493
494
|
var ee = ne;
|
|
494
|
-
de(!0), oe(), Ae(), ve(ee), f.add(i || e, "gu-transit"), st(), it(), se = 0,
|
|
495
|
+
de(!0), oe(), Ae(), ve(ee), f.add(i || e, "gu-transit"), st(), it(), se = 0, ke(r);
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
499
|
function pe(r) {
|
|
499
|
-
if (!(H.dragging &&
|
|
500
|
-
for (var x = r;
|
|
501
|
-
if (
|
|
500
|
+
if (!(H.dragging && b) && !W(r)) {
|
|
501
|
+
for (var x = r; c(r) && W(c(r)) === !1; )
|
|
502
|
+
if (h.invalid(r, x) || (r = c(r), !r))
|
|
502
503
|
return;
|
|
503
|
-
var T =
|
|
504
|
-
if (T && !
|
|
505
|
-
var
|
|
506
|
-
if (
|
|
504
|
+
var T = c(r);
|
|
505
|
+
if (T && !h.invalid(r, x)) {
|
|
506
|
+
var V = h.moves(r, T, x, $(r));
|
|
507
|
+
if (V)
|
|
507
508
|
return {
|
|
508
509
|
item: r,
|
|
509
510
|
source: T
|
|
@@ -519,7 +520,7 @@ var tt = { exports: {} };
|
|
|
519
520
|
x && ve(x);
|
|
520
521
|
}
|
|
521
522
|
function ve(r) {
|
|
522
|
-
mt(r.item, r.source) && (i = r.item.cloneNode(!0), H.emit("cloned", i, r.item, "copy")),
|
|
523
|
+
mt(r.item, r.source) && (i = r.item.cloneNode(!0), H.emit("cloned", i, r.item, "copy")), A = r.source, e = r.item, P = s = $(r.item), H.dragging = !0, H.emit("drag", e, A);
|
|
523
524
|
}
|
|
524
525
|
function Be() {
|
|
525
526
|
return !1;
|
|
@@ -527,7 +528,7 @@ var tt = { exports: {} };
|
|
|
527
528
|
function Ae() {
|
|
528
529
|
if (H.dragging) {
|
|
529
530
|
var r = i || e;
|
|
530
|
-
He(r,
|
|
531
|
+
He(r, c(r));
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
function Me() {
|
|
@@ -535,81 +536,81 @@ var tt = { exports: {} };
|
|
|
535
536
|
}
|
|
536
537
|
function Ne(r) {
|
|
537
538
|
if (Me(), !!H.dragging) {
|
|
538
|
-
var x = i || e, T =
|
|
539
|
-
te && (i &&
|
|
539
|
+
var x = i || e, T = J("clientX", r) || 0, V = J("clientY", r) || 0, ee = g(b, T, V), te = Ge(ee, T, V);
|
|
540
|
+
te && (i && h.copySortSource || !i || te !== A) ? He(x, te) : h.removeOnSpill ? We() : qe();
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
543
|
function He(r, x) {
|
|
543
|
-
var T =
|
|
544
|
-
i &&
|
|
544
|
+
var T = c(r);
|
|
545
|
+
i && h.copySortSource && x === A && T.removeChild(e), Le(x) ? H.emit("cancel", r, A) : H.emit("drop", r, x, A, s), _e();
|
|
545
546
|
}
|
|
546
547
|
function We() {
|
|
547
548
|
if (H.dragging) {
|
|
548
|
-
var r = i || e, x =
|
|
549
|
-
x && x.removeChild(r), H.emit(i ? "cancel" : "remove", r, x,
|
|
549
|
+
var r = i || e, x = c(r);
|
|
550
|
+
x && x.removeChild(r), H.emit(i ? "cancel" : "remove", r, x, A), _e();
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
553
|
function qe(r) {
|
|
553
554
|
if (H.dragging) {
|
|
554
|
-
var x = arguments.length > 0 ? r :
|
|
555
|
-
ee === !1 && x && (i ?
|
|
555
|
+
var x = arguments.length > 0 ? r : h.revertOnSpill, T = i || e, V = c(T), ee = Le(V);
|
|
556
|
+
ee === !1 && x && (i ? V && V.removeChild(i) : A.insertBefore(T, P)), ee || x ? H.emit("cancel", T, A, A) : H.emit("drop", T, V, A, s), _e();
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
function _e() {
|
|
559
560
|
var r = i || e;
|
|
560
|
-
Me(), at(), ct(), r && f.rm(r, "gu-transit"),
|
|
561
|
+
Me(), at(), ct(), r && f.rm(r, "gu-transit"), j && clearTimeout(j), H.dragging = !1, k && H.emit("out", r, k, A), H.emit("dragend", r, se), A = e = i = P = s = j = k = null;
|
|
561
562
|
}
|
|
562
563
|
function Le(r, x) {
|
|
563
564
|
var T;
|
|
564
|
-
return x !== void 0 ? T = x :
|
|
565
|
+
return x !== void 0 ? T = x : b ? T = s : T = $(i || e), r === A && T === P;
|
|
565
566
|
}
|
|
566
567
|
function Ge(r, x, T) {
|
|
567
|
-
for (var
|
|
568
|
-
|
|
569
|
-
return
|
|
568
|
+
for (var V = r; V && !ee(); )
|
|
569
|
+
V = c(V);
|
|
570
|
+
return V;
|
|
570
571
|
function ee() {
|
|
571
|
-
var te = W(
|
|
572
|
+
var te = W(V);
|
|
572
573
|
if (te === !1)
|
|
573
574
|
return !1;
|
|
574
|
-
var be = Ke(
|
|
575
|
-
return we ? !0 :
|
|
575
|
+
var be = Ke(V, r), ge = Qe(V, be, x, T), we = Le(V, ge);
|
|
576
|
+
return we ? !0 : h.accepts(e, V, A, ge);
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
|
-
function
|
|
579
|
-
if (!
|
|
579
|
+
function ke(r) {
|
|
580
|
+
if (!b)
|
|
580
581
|
return;
|
|
581
582
|
r.preventDefault();
|
|
582
|
-
var x =
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
(be || te === null) && (xe(),
|
|
586
|
-
var ge =
|
|
587
|
-
if (te ===
|
|
588
|
-
ge && ge.removeChild(
|
|
583
|
+
var x = J("clientX", r) || 0, T = J("clientY", r) || 0;
|
|
584
|
+
b.style.left = x - 2 + "px", b.style.top = T - 2 + "px";
|
|
585
|
+
var V = i || e, ee = g(b, x, T), te = Ge(ee, x, T), be = te !== null && te !== k;
|
|
586
|
+
(be || te === null) && (xe(), k = te, Ie()), pt(ee, T);
|
|
587
|
+
var ge = c(V);
|
|
588
|
+
if (te === A && i && !h.copySortSource) {
|
|
589
|
+
ge && ge.removeChild(V);
|
|
589
590
|
return;
|
|
590
591
|
}
|
|
591
592
|
var we, Pe = Ke(te, ee);
|
|
592
593
|
if (ie = lt(Pe, te), Pe !== null)
|
|
593
594
|
we = Qe(te, Pe, x, T);
|
|
594
|
-
else if (
|
|
595
|
-
we =
|
|
595
|
+
else if (h.revertOnSpill === !0 && !i)
|
|
596
|
+
we = P, te = A;
|
|
596
597
|
else {
|
|
597
|
-
i && ge && ge.removeChild(
|
|
598
|
+
i && ge && ge.removeChild(V), i && R && (R.style.display = "none");
|
|
598
599
|
return;
|
|
599
600
|
}
|
|
600
|
-
R.style.display = "block", nt(we,
|
|
601
|
+
R.style.display = "block", nt(we, V, be), we ? ft(Pe, we) : dt(te);
|
|
601
602
|
function ue(fe) {
|
|
602
|
-
H.emit(fe,
|
|
603
|
+
H.emit(fe, V, k, A);
|
|
603
604
|
}
|
|
604
605
|
function Ie() {
|
|
605
606
|
be && ue("over");
|
|
606
607
|
}
|
|
607
608
|
function xe() {
|
|
608
|
-
|
|
609
|
+
k && ue("out");
|
|
609
610
|
}
|
|
610
611
|
}
|
|
611
612
|
function nt(r, x, T) {
|
|
612
|
-
(r === x || r === $(x)) && (
|
|
613
|
+
(r === x || r === $(x)) && (s = $(x)), (r === null && T || r !== x && r !== $(x)) && (s = r);
|
|
613
614
|
}
|
|
614
615
|
function ot(r) {
|
|
615
616
|
f.rm(r, "gu-hide");
|
|
@@ -618,25 +619,25 @@ var tt = { exports: {} };
|
|
|
618
619
|
H.dragging && f.add(r, "gu-hide");
|
|
619
620
|
}
|
|
620
621
|
function it() {
|
|
621
|
-
|
|
622
|
+
b || (b = document.createElement("div"), b.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;", b.innerHTML = h.getMirrorText && h.getMirrorText(e) || "控件", f.add(b, "gu-mirror"), h.mirrorContainer.appendChild(b), o(v, "add", "mousemove", ke), f.add(h.mirrorContainer, "gu-unselectable"), H.emit("cloned", b, e, "mirror"));
|
|
622
623
|
}
|
|
623
624
|
function st() {
|
|
624
625
|
if (R = document.createElement("div"), f.add(R, "gu-insertion"), e) {
|
|
625
626
|
var r = e.getBoundingClientRect();
|
|
626
627
|
R.style.left = r.left + "px", R.style.top = r.top + "px";
|
|
627
628
|
}
|
|
628
|
-
ie = !1,
|
|
629
|
+
ie = !1, h.mirrorContainer.appendChild(R);
|
|
629
630
|
}
|
|
630
631
|
function at() {
|
|
631
|
-
|
|
632
|
+
b && (f.rm(h.mirrorContainer, "gu-unselectable"), o(v, "remove", "mousemove", ke), c(b).removeChild(b), b = null);
|
|
632
633
|
}
|
|
633
634
|
function ct() {
|
|
634
|
-
R && (
|
|
635
|
+
R && (c(R).removeChild(R), R = null);
|
|
635
636
|
}
|
|
636
637
|
function Ke(r, x) {
|
|
637
|
-
for (var T = x; T !== r &&
|
|
638
|
-
T =
|
|
639
|
-
return T ===
|
|
638
|
+
for (var T = x; T !== r && c(T) !== r; )
|
|
639
|
+
T = c(T);
|
|
640
|
+
return T === v ? null : T;
|
|
640
641
|
}
|
|
641
642
|
function lt(r, x) {
|
|
642
643
|
if (!x)
|
|
@@ -644,7 +645,7 @@ var tt = { exports: {} };
|
|
|
644
645
|
var T = r || x && x.lastElementChild;
|
|
645
646
|
if (!T)
|
|
646
647
|
return !0;
|
|
647
|
-
var
|
|
648
|
+
var V = getComputedStyle(r), ee = /^inline/.test(V.getPropertyValue("display")) || /^(left|right)$/.test(V.getPropertyValue("float"));
|
|
648
649
|
if (ee)
|
|
649
650
|
return !0;
|
|
650
651
|
if (x) {
|
|
@@ -662,10 +663,10 @@ var tt = { exports: {} };
|
|
|
662
663
|
if (!r.children || !r.children.length)
|
|
663
664
|
return !1;
|
|
664
665
|
for (const x of Array.from(r.children)) {
|
|
665
|
-
const
|
|
666
|
-
if (!
|
|
666
|
+
const V = (x.className && x.className.split(" ") || []).filter((ee) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ee));
|
|
667
|
+
if (!V.length)
|
|
667
668
|
return !1;
|
|
668
|
-
for (const ee of
|
|
669
|
+
for (const ee of V) {
|
|
669
670
|
const te = ee.slice(ee.lastIndexOf("-") + 1);
|
|
670
671
|
if (parseInt(te, 10) !== 12)
|
|
671
672
|
return !1;
|
|
@@ -677,17 +678,17 @@ var tt = { exports: {} };
|
|
|
677
678
|
const T = x.getBoundingClientRect();
|
|
678
679
|
if (R.style.left = T.left + "px", R.style.top = T.top + "px", ie) {
|
|
679
680
|
if (R.style.height = T.height + "px", R.style.width = "4px", r) {
|
|
680
|
-
const
|
|
681
|
-
|
|
681
|
+
const V = r.getBoundingClientRect();
|
|
682
|
+
V.top !== T.top && (R.style.left = V.right + "px", R.style.top = V.top + "px", R.style.height = V.height + "px");
|
|
682
683
|
}
|
|
683
684
|
} else if (R.style.height = "4px", R.style.width = T.width + "px", D) {
|
|
684
|
-
const
|
|
685
|
-
T.top <
|
|
685
|
+
const V = D.getBoundingClientRect();
|
|
686
|
+
T.top < V.top && (R.style.display = "none");
|
|
686
687
|
}
|
|
687
688
|
x === e && e && (R.style.display = "none");
|
|
688
689
|
}
|
|
689
690
|
function dt(r) {
|
|
690
|
-
|
|
691
|
+
s = null;
|
|
691
692
|
var x = r.lastElementChild;
|
|
692
693
|
if (x) {
|
|
693
694
|
var T = x.getBoundingClientRect();
|
|
@@ -696,66 +697,66 @@ var tt = { exports: {} };
|
|
|
696
697
|
R.style.display = "none";
|
|
697
698
|
}
|
|
698
699
|
function pt(r, x) {
|
|
699
|
-
if (!
|
|
700
|
+
if (!h.mirrorContainer.contains(r) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (D = u(r), !D || !D.contains(r)))
|
|
700
701
|
return;
|
|
701
|
-
const T = document.querySelector(".dgComponentSelected"),
|
|
702
|
-
if (x - 30 <
|
|
702
|
+
const T = document.querySelector(".dgComponentSelected"), V = D.getBoundingClientRect();
|
|
703
|
+
if (x - 30 < V.top && D.scrollTop > 0) {
|
|
703
704
|
let ee = D.scrollTop < 10 ? D.scrollTop : 10;
|
|
704
705
|
D.scrollBy(0, -1 * ee), T && D.contains(T) && (se = se + -1 * ee);
|
|
705
706
|
}
|
|
706
|
-
if (x + 30 >
|
|
707
|
+
if (x + 30 > V.bottom && D.scrollTop < D.scrollHeight - D.clientHeight) {
|
|
707
708
|
const ee = D.scrollHeight - D.clientHeight - D.scrollTop;
|
|
708
709
|
let te = ee < 10 ? ee : 10;
|
|
709
710
|
D.scrollBy(0, te), T && D.contains(T) && (se = se + te);
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
function Qe(r, x, T,
|
|
713
|
-
var ee =
|
|
713
|
+
function Qe(r, x, T, V) {
|
|
714
|
+
var ee = h.direction === "horizontal", te = h.direction === "mixed", be = x !== r ? we() : ge();
|
|
714
715
|
return be;
|
|
715
716
|
function ge() {
|
|
716
717
|
var ue = r.children.length, Ie, xe, fe;
|
|
717
718
|
for (Ie = 0; Ie < ue; Ie++)
|
|
718
|
-
if (xe = r.children[Ie], fe = xe.getBoundingClientRect(), ee && fe.left + fe.width / 2 > T || !te && !ee && fe.top + fe.height / 2 >
|
|
719
|
+
if (xe = r.children[Ie], fe = xe.getBoundingClientRect(), ee && fe.left + fe.width / 2 > T || !te && !ee && fe.top + fe.height / 2 > V || te && fe.left + fe.width > T && fe.top + fe.height > V)
|
|
719
720
|
return xe;
|
|
720
721
|
return null;
|
|
721
722
|
}
|
|
722
723
|
function we() {
|
|
723
724
|
var ue = x.getBoundingClientRect();
|
|
724
725
|
if (te) {
|
|
725
|
-
var Ie =
|
|
726
|
-
return ie ? Xe =
|
|
726
|
+
var Ie = V - ue.top, xe = T - ue.left, fe = ue.bottom - V, Re = ue.right - T, Ve = Math.min(xe, Re, Ie, fe), Xe;
|
|
727
|
+
return ie ? Xe = Re < xe : Xe = fe === Ve || Re === Ve || xe === Ve, Pe(Xe);
|
|
727
728
|
}
|
|
728
|
-
return Pe(ee ? T > ue.left +
|
|
729
|
+
return Pe(ee ? T > ue.left + z(ue) / 2 : V > ue.top + X(ue) / 2);
|
|
729
730
|
}
|
|
730
731
|
function Pe(ue) {
|
|
731
732
|
return ue ? $(x) : x;
|
|
732
733
|
}
|
|
733
734
|
}
|
|
734
735
|
function mt(r, x) {
|
|
735
|
-
return typeof
|
|
736
|
+
return typeof h.copy == "boolean" ? h.copy : h.copy(r, x);
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
739
|
function u(d) {
|
|
739
740
|
const G = Array.from(window.scrollContainerList);
|
|
740
741
|
if (G.length === 1) {
|
|
741
|
-
const
|
|
742
|
-
return document.getElementById(
|
|
742
|
+
const b = Array.from(window.scrollContainerList)[0];
|
|
743
|
+
return document.getElementById(b);
|
|
743
744
|
}
|
|
744
|
-
const
|
|
745
|
-
for (const
|
|
746
|
-
if (
|
|
747
|
-
return
|
|
745
|
+
const y = n(G);
|
|
746
|
+
for (const b of y)
|
|
747
|
+
if (b.contains(d))
|
|
748
|
+
return b;
|
|
748
749
|
return null;
|
|
749
750
|
}
|
|
750
751
|
function n(d) {
|
|
751
752
|
const G = [];
|
|
752
|
-
return d.forEach((
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
}), G.sort((
|
|
753
|
+
return d.forEach((y) => {
|
|
754
|
+
const b = document.getElementById(y);
|
|
755
|
+
b && G.push(b);
|
|
756
|
+
}), G.sort((y, b) => y.contains(b) ? 1 : b.contains(y) ? -1 : 0), G;
|
|
756
757
|
}
|
|
757
|
-
function o(d, G,
|
|
758
|
-
var
|
|
758
|
+
function o(d, G, y, b) {
|
|
759
|
+
var A = {
|
|
759
760
|
mouseup: "touchend",
|
|
760
761
|
mousedown: "touchstart",
|
|
761
762
|
mousemove: "touchmove"
|
|
@@ -768,9 +769,9 @@ var tt = { exports: {} };
|
|
|
768
769
|
mousedown: "MSPointerDown",
|
|
769
770
|
mousemove: "MSPointerMove"
|
|
770
771
|
};
|
|
771
|
-
p.navigator.pointerEnabled ?
|
|
772
|
+
p.navigator.pointerEnabled ? C[G](d, e[y], b) : p.navigator.msPointerEnabled ? C[G](d, t[y], b) : (C[G](d, A[y], b), C[G](d, y, b));
|
|
772
773
|
}
|
|
773
|
-
function
|
|
774
|
+
function a(d) {
|
|
774
775
|
if (d.touches !== void 0)
|
|
775
776
|
return d.touches.length;
|
|
776
777
|
if (d.which !== void 0 && d.which !== 0)
|
|
@@ -781,10 +782,10 @@ var tt = { exports: {} };
|
|
|
781
782
|
if (G !== void 0)
|
|
782
783
|
return G & 1 ? 1 : G & 2 ? 3 : G & 4 ? 2 : 0;
|
|
783
784
|
}
|
|
784
|
-
function
|
|
785
|
+
function g(d, G, y) {
|
|
785
786
|
d = d || {};
|
|
786
|
-
var
|
|
787
|
-
return d.className += " gu-hide",
|
|
787
|
+
var b = d.className || "", A;
|
|
788
|
+
return d.className += " gu-hide", A = F.elementFromPoint(G, y), d.className = b, A;
|
|
788
789
|
}
|
|
789
790
|
function m() {
|
|
790
791
|
return !1;
|
|
@@ -792,175 +793,175 @@ var tt = { exports: {} };
|
|
|
792
793
|
function Y() {
|
|
793
794
|
return !0;
|
|
794
795
|
}
|
|
795
|
-
function
|
|
796
|
+
function z(d) {
|
|
796
797
|
return d.width || d.right - d.left;
|
|
797
798
|
}
|
|
798
799
|
function X(d) {
|
|
799
800
|
return d.height || d.bottom - d.top;
|
|
800
801
|
}
|
|
801
|
-
function
|
|
802
|
+
function c(d) {
|
|
802
803
|
return d.parentNode === F ? null : d.parentNode;
|
|
803
804
|
}
|
|
804
|
-
function
|
|
805
|
+
function N(d) {
|
|
805
806
|
return d.tagName === "INPUT" || d.tagName === "TEXTAREA" || d.tagName === "SELECT" || U(d);
|
|
806
807
|
}
|
|
807
808
|
function U(d) {
|
|
808
|
-
return !d || d.contentEditable === "false" ? !1 : d.contentEditable === "true" ? !0 : U(
|
|
809
|
+
return !d || d.contentEditable === "false" ? !1 : d.contentEditable === "true" ? !0 : U(c(d));
|
|
809
810
|
}
|
|
810
811
|
function $(d) {
|
|
811
812
|
return d.nextElementSibling || G();
|
|
812
813
|
function G() {
|
|
813
|
-
var
|
|
814
|
+
var y = d;
|
|
814
815
|
do
|
|
815
|
-
|
|
816
|
-
while (
|
|
817
|
-
return
|
|
816
|
+
y = y.nextSibling;
|
|
817
|
+
while (y && y.nodeType !== 1);
|
|
818
|
+
return y;
|
|
818
819
|
}
|
|
819
820
|
}
|
|
820
821
|
function re(d) {
|
|
821
822
|
return d.targetTouches && d.targetTouches.length ? d.targetTouches[0] : d.changedTouches && d.changedTouches.length ? d.changedTouches[0] : d;
|
|
822
823
|
}
|
|
823
|
-
function
|
|
824
|
-
var
|
|
824
|
+
function J(d, G) {
|
|
825
|
+
var y = re(G), b = {
|
|
825
826
|
pageX: "clientX",
|
|
826
827
|
// IE8
|
|
827
828
|
pageY: "clientY"
|
|
828
829
|
// IE8
|
|
829
830
|
};
|
|
830
|
-
return d in
|
|
831
|
+
return d in b && !(d in y) && b[d] in y && (d = b[d]), y[d];
|
|
831
832
|
}
|
|
832
|
-
|
|
833
|
+
I.exports = S;
|
|
833
834
|
}).call(this, typeof Se < "u" ? Se : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
834
835
|
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
835
|
-
3: [function(E,
|
|
836
|
-
|
|
837
|
-
return Array.prototype.slice.call(w,
|
|
836
|
+
3: [function(E, I, B) {
|
|
837
|
+
I.exports = function(w, C) {
|
|
838
|
+
return Array.prototype.slice.call(w, C);
|
|
838
839
|
};
|
|
839
840
|
}, {}],
|
|
840
|
-
4: [function(E,
|
|
841
|
+
4: [function(E, I, B) {
|
|
841
842
|
var p = E("ticky");
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
843
|
+
I.exports = function(C, f, F) {
|
|
844
|
+
C && p(function() {
|
|
845
|
+
C.apply(F || null, f || []);
|
|
845
846
|
});
|
|
846
847
|
};
|
|
847
848
|
}, { ticky: 10 }],
|
|
848
|
-
5: [function(E,
|
|
849
|
+
5: [function(E, I, B) {
|
|
849
850
|
var p = E("atoa"), w = E("./debounce");
|
|
850
|
-
|
|
851
|
-
var
|
|
851
|
+
I.exports = function(f, F) {
|
|
852
|
+
var v = F || {}, S = {};
|
|
852
853
|
return f === void 0 && (f = {}), f.on = function(u, n) {
|
|
853
|
-
return
|
|
854
|
+
return S[u] ? S[u].push(n) : S[u] = [n], f;
|
|
854
855
|
}, f.once = function(u, n) {
|
|
855
856
|
return n._once = !0, f.on(u, n), f;
|
|
856
857
|
}, f.off = function(u, n) {
|
|
857
858
|
var o = arguments.length;
|
|
858
859
|
if (o === 1)
|
|
859
|
-
delete
|
|
860
|
+
delete S[u];
|
|
860
861
|
else if (o === 0)
|
|
861
|
-
|
|
862
|
+
S = {};
|
|
862
863
|
else {
|
|
863
|
-
var
|
|
864
|
-
if (!
|
|
864
|
+
var a = S[u];
|
|
865
|
+
if (!a)
|
|
865
866
|
return f;
|
|
866
|
-
|
|
867
|
+
a.splice(a.indexOf(n), 1);
|
|
867
868
|
}
|
|
868
869
|
return f;
|
|
869
870
|
}, f.emit = function() {
|
|
870
871
|
var u = p(arguments);
|
|
871
872
|
return f.emitterSnapshot(u.shift()).apply(this, u);
|
|
872
873
|
}, f.emitterSnapshot = function(u) {
|
|
873
|
-
var n = (
|
|
874
|
+
var n = (S[u] || []).slice(0);
|
|
874
875
|
return function() {
|
|
875
|
-
var o = p(arguments),
|
|
876
|
-
if (u === "error" &&
|
|
876
|
+
var o = p(arguments), a = this || f;
|
|
877
|
+
if (u === "error" && v.throws !== !1 && !n.length)
|
|
877
878
|
throw o.length === 1 ? o[0] : o;
|
|
878
879
|
return n.forEach(function(m) {
|
|
879
|
-
|
|
880
|
+
v.async ? w(m, o, a) : m.apply(a, o), m._once && f.off(u, m);
|
|
880
881
|
}), f;
|
|
881
882
|
};
|
|
882
883
|
}, f;
|
|
883
884
|
};
|
|
884
885
|
}, { "./debounce": 4, atoa: 3 }],
|
|
885
|
-
6: [function(E,
|
|
886
|
+
6: [function(E, I, B) {
|
|
886
887
|
(function(p) {
|
|
887
|
-
var w = E("custom-event"),
|
|
888
|
-
p.addEventListener || (F = n,
|
|
888
|
+
var w = E("custom-event"), C = E("./eventmap"), f = p.document, F = u, v = o, S = [];
|
|
889
|
+
p.addEventListener || (F = n, v = a), I.exports = {
|
|
889
890
|
add: F,
|
|
890
|
-
remove:
|
|
891
|
-
fabricate:
|
|
891
|
+
remove: v,
|
|
892
|
+
fabricate: g
|
|
892
893
|
};
|
|
893
|
-
function u(
|
|
894
|
-
return
|
|
894
|
+
function u(c, N, U, $) {
|
|
895
|
+
return c.addEventListener(N, U, $);
|
|
895
896
|
}
|
|
896
|
-
function n(
|
|
897
|
-
return
|
|
897
|
+
function n(c, N, U) {
|
|
898
|
+
return c.attachEvent("on" + N, Y(c, N, U));
|
|
898
899
|
}
|
|
899
|
-
function o(
|
|
900
|
-
return
|
|
900
|
+
function o(c, N, U, $) {
|
|
901
|
+
return c.removeEventListener(N, U, $);
|
|
901
902
|
}
|
|
902
|
-
function
|
|
903
|
-
var $ =
|
|
903
|
+
function a(c, N, U) {
|
|
904
|
+
var $ = z(c, N, U);
|
|
904
905
|
if ($)
|
|
905
|
-
return
|
|
906
|
+
return c.detachEvent("on" + N, $);
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
-
var $ =
|
|
909
|
-
|
|
908
|
+
function g(c, N, U) {
|
|
909
|
+
var $ = C.indexOf(N) === -1 ? J() : re();
|
|
910
|
+
c.dispatchEvent ? c.dispatchEvent($) : c.fireEvent("on" + N, $);
|
|
910
911
|
function re() {
|
|
911
912
|
var d;
|
|
912
|
-
return f.createEvent ? (d = f.createEvent("Event"), d.initEvent(
|
|
913
|
+
return f.createEvent ? (d = f.createEvent("Event"), d.initEvent(N, !0, !0)) : f.createEventObject && (d = f.createEventObject()), d;
|
|
913
914
|
}
|
|
914
|
-
function
|
|
915
|
-
return new w(
|
|
915
|
+
function J() {
|
|
916
|
+
return new w(N, { detail: U });
|
|
916
917
|
}
|
|
917
918
|
}
|
|
918
|
-
function m(
|
|
919
|
+
function m(c, N, U) {
|
|
919
920
|
return function(re) {
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
},
|
|
924
|
-
|
|
925
|
-
},
|
|
921
|
+
var J = re || p.event;
|
|
922
|
+
J.target = J.target || J.srcElement, J.preventDefault = J.preventDefault || function() {
|
|
923
|
+
J.returnValue = !1;
|
|
924
|
+
}, J.stopPropagation = J.stopPropagation || function() {
|
|
925
|
+
J.cancelBubble = !0;
|
|
926
|
+
}, J.which = J.which || J.keyCode, U.call(c, J);
|
|
926
927
|
};
|
|
927
928
|
}
|
|
928
|
-
function Y(
|
|
929
|
-
var $ =
|
|
930
|
-
return
|
|
929
|
+
function Y(c, N, U) {
|
|
930
|
+
var $ = z(c, N, U) || m(c, N, U);
|
|
931
|
+
return S.push({
|
|
931
932
|
wrapper: $,
|
|
932
|
-
element:
|
|
933
|
-
type:
|
|
933
|
+
element: c,
|
|
934
|
+
type: N,
|
|
934
935
|
fn: U
|
|
935
936
|
}), $;
|
|
936
937
|
}
|
|
937
|
-
function
|
|
938
|
-
var $ = X(
|
|
938
|
+
function z(c, N, U) {
|
|
939
|
+
var $ = X(c, N, U);
|
|
939
940
|
if ($) {
|
|
940
|
-
var re =
|
|
941
|
-
return
|
|
941
|
+
var re = S[$].wrapper;
|
|
942
|
+
return S.splice($, 1), re;
|
|
942
943
|
}
|
|
943
944
|
}
|
|
944
|
-
function X(
|
|
945
|
+
function X(c, N, U) {
|
|
945
946
|
var $, re;
|
|
946
|
-
for ($ = 0; $ <
|
|
947
|
-
if (re =
|
|
947
|
+
for ($ = 0; $ < S.length; $++)
|
|
948
|
+
if (re = S[$], re.element === c && re.type === N && re.fn === U)
|
|
948
949
|
return $;
|
|
949
950
|
}
|
|
950
951
|
}).call(this, typeof Se < "u" ? Se : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
951
952
|
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
952
|
-
7: [function(E,
|
|
953
|
+
7: [function(E, I, B) {
|
|
953
954
|
(function(p) {
|
|
954
|
-
var w = [],
|
|
955
|
-
for (
|
|
956
|
-
f.test(
|
|
957
|
-
|
|
955
|
+
var w = [], C = "", f = /^on/;
|
|
956
|
+
for (C in p)
|
|
957
|
+
f.test(C) && w.push(C.slice(2));
|
|
958
|
+
I.exports = w;
|
|
958
959
|
}).call(this, typeof Se < "u" ? Se : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
959
960
|
}, {}],
|
|
960
|
-
8: [function(E,
|
|
961
|
+
8: [function(E, I, B) {
|
|
961
962
|
(function(p) {
|
|
962
963
|
var w = p.CustomEvent;
|
|
963
|
-
function
|
|
964
|
+
function C() {
|
|
964
965
|
try {
|
|
965
966
|
var f = new w("cat", { detail: { foo: "bar" } });
|
|
966
967
|
return f.type === "cat" && f.detail.foo === "bar";
|
|
@@ -968,23 +969,23 @@ var tt = { exports: {} };
|
|
|
968
969
|
}
|
|
969
970
|
return !1;
|
|
970
971
|
}
|
|
971
|
-
|
|
972
|
+
I.exports = C() ? w : (
|
|
972
973
|
// IE >= 9
|
|
973
|
-
typeof document < "u" && typeof document.createEvent == "function" ? function(F,
|
|
974
|
-
var
|
|
975
|
-
return
|
|
974
|
+
typeof document < "u" && typeof document.createEvent == "function" ? function(F, v) {
|
|
975
|
+
var S = document.createEvent("CustomEvent");
|
|
976
|
+
return v ? S.initCustomEvent(F, v.bubbles, v.cancelable, v.detail) : S.initCustomEvent(F, !1, !1, void 0), S;
|
|
976
977
|
} : (
|
|
977
978
|
// IE <= 8
|
|
978
|
-
function(F,
|
|
979
|
-
var
|
|
980
|
-
return
|
|
979
|
+
function(F, v) {
|
|
980
|
+
var S = document.createEventObject();
|
|
981
|
+
return S.type = F, v ? (S.bubbles = !!v.bubbles, S.cancelable = !!v.cancelable, S.detail = v.detail) : (S.bubbles = !1, S.cancelable = !1, S.detail = void 0), S;
|
|
981
982
|
}
|
|
982
983
|
)
|
|
983
984
|
);
|
|
984
985
|
}).call(this, typeof Se < "u" ? Se : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
985
986
|
}, {}],
|
|
986
|
-
9: [function(E,
|
|
987
|
-
var p =
|
|
987
|
+
9: [function(E, I, B) {
|
|
988
|
+
var p = I.exports = {}, w, C;
|
|
988
989
|
function f() {
|
|
989
990
|
throw new Error("setTimeout has not been defined");
|
|
990
991
|
}
|
|
@@ -998,12 +999,12 @@ var tt = { exports: {} };
|
|
|
998
999
|
w = f;
|
|
999
1000
|
}
|
|
1000
1001
|
try {
|
|
1001
|
-
typeof clearTimeout == "function" ?
|
|
1002
|
+
typeof clearTimeout == "function" ? C = clearTimeout : C = F;
|
|
1002
1003
|
} catch {
|
|
1003
|
-
|
|
1004
|
+
C = F;
|
|
1004
1005
|
}
|
|
1005
1006
|
})();
|
|
1006
|
-
function
|
|
1007
|
+
function v(X) {
|
|
1007
1008
|
if (w === setTimeout)
|
|
1008
1009
|
return setTimeout(X, 0);
|
|
1009
1010
|
if ((w === f || !w) && setTimeout)
|
|
@@ -1018,53 +1019,53 @@ var tt = { exports: {} };
|
|
|
1018
1019
|
}
|
|
1019
1020
|
}
|
|
1020
1021
|
}
|
|
1021
|
-
function
|
|
1022
|
-
if (
|
|
1022
|
+
function S(X) {
|
|
1023
|
+
if (C === clearTimeout)
|
|
1023
1024
|
return clearTimeout(X);
|
|
1024
|
-
if ((
|
|
1025
|
-
return
|
|
1025
|
+
if ((C === F || !C) && clearTimeout)
|
|
1026
|
+
return C = clearTimeout, clearTimeout(X);
|
|
1026
1027
|
try {
|
|
1027
|
-
return
|
|
1028
|
+
return C(X);
|
|
1028
1029
|
} catch {
|
|
1029
1030
|
try {
|
|
1030
|
-
return
|
|
1031
|
+
return C.call(null, X);
|
|
1031
1032
|
} catch {
|
|
1032
|
-
return
|
|
1033
|
+
return C.call(this, X);
|
|
1033
1034
|
}
|
|
1034
1035
|
}
|
|
1035
1036
|
}
|
|
1036
|
-
var u = [], n = !1, o,
|
|
1037
|
-
function
|
|
1038
|
-
!n || !o || (n = !1, o.length ? u = o.concat(u) :
|
|
1037
|
+
var u = [], n = !1, o, a = -1;
|
|
1038
|
+
function g() {
|
|
1039
|
+
!n || !o || (n = !1, o.length ? u = o.concat(u) : a = -1, u.length && m());
|
|
1039
1040
|
}
|
|
1040
1041
|
function m() {
|
|
1041
1042
|
if (!n) {
|
|
1042
|
-
var X =
|
|
1043
|
+
var X = v(g);
|
|
1043
1044
|
n = !0;
|
|
1044
|
-
for (var
|
|
1045
|
-
for (o = u, u = []; ++
|
|
1046
|
-
o && o[
|
|
1047
|
-
|
|
1045
|
+
for (var c = u.length; c; ) {
|
|
1046
|
+
for (o = u, u = []; ++a < c; )
|
|
1047
|
+
o && o[a].run();
|
|
1048
|
+
a = -1, c = u.length;
|
|
1048
1049
|
}
|
|
1049
|
-
o = null, n = !1,
|
|
1050
|
+
o = null, n = !1, S(X);
|
|
1050
1051
|
}
|
|
1051
1052
|
}
|
|
1052
1053
|
p.nextTick = function(X) {
|
|
1053
|
-
var
|
|
1054
|
+
var c = new Array(arguments.length - 1);
|
|
1054
1055
|
if (arguments.length > 1)
|
|
1055
|
-
for (var
|
|
1056
|
-
|
|
1057
|
-
u.push(new Y(X,
|
|
1056
|
+
for (var N = 1; N < arguments.length; N++)
|
|
1057
|
+
c[N - 1] = arguments[N];
|
|
1058
|
+
u.push(new Y(X, c)), u.length === 1 && !n && v(m);
|
|
1058
1059
|
};
|
|
1059
|
-
function Y(X,
|
|
1060
|
-
this.fun = X, this.array =
|
|
1060
|
+
function Y(X, c) {
|
|
1061
|
+
this.fun = X, this.array = c;
|
|
1061
1062
|
}
|
|
1062
1063
|
Y.prototype.run = function() {
|
|
1063
1064
|
this.fun.apply(null, this.array);
|
|
1064
1065
|
}, p.title = "browser", p.browser = !0, p.env = {}, p.argv = [], p.version = "", p.versions = {};
|
|
1065
|
-
function
|
|
1066
|
+
function z() {
|
|
1066
1067
|
}
|
|
1067
|
-
p.on =
|
|
1068
|
+
p.on = z, p.addListener = z, p.once = z, p.off = z, p.removeListener = z, p.removeAllListeners = z, p.emit = z, p.prependListener = z, p.prependOnceListener = z, p.listeners = function(X) {
|
|
1068
1069
|
return [];
|
|
1069
1070
|
}, p.binding = function(X) {
|
|
1070
1071
|
throw new Error("process.binding is not supported");
|
|
@@ -1076,19 +1077,19 @@ var tt = { exports: {} };
|
|
|
1076
1077
|
return 0;
|
|
1077
1078
|
};
|
|
1078
1079
|
}, {}],
|
|
1079
|
-
10: [function(E,
|
|
1080
|
+
10: [function(E, I, B) {
|
|
1080
1081
|
(function(p) {
|
|
1081
|
-
var w = typeof p == "function",
|
|
1082
|
-
w ?
|
|
1082
|
+
var w = typeof p == "function", C;
|
|
1083
|
+
w ? C = function(f) {
|
|
1083
1084
|
p(f);
|
|
1084
|
-
} :
|
|
1085
|
+
} : C = function(f) {
|
|
1085
1086
|
setTimeout(f, 0);
|
|
1086
|
-
},
|
|
1087
|
+
}, I.exports = C;
|
|
1087
1088
|
}).call(this, E("timers").setImmediate);
|
|
1088
1089
|
}, { timers: 11 }],
|
|
1089
|
-
11: [function(E,
|
|
1090
|
+
11: [function(E, I, B) {
|
|
1090
1091
|
(function(p, w) {
|
|
1091
|
-
var
|
|
1092
|
+
var C = E("process/browser.js").nextTick, f = Function.prototype.apply, F = Array.prototype.slice, v = {}, S = 0;
|
|
1092
1093
|
B.setTimeout = function() {
|
|
1093
1094
|
return new u(f.call(setTimeout, window, arguments), clearTimeout);
|
|
1094
1095
|
}, B.setInterval = function() {
|
|
@@ -1113,51 +1114,51 @@ var tt = { exports: {} };
|
|
|
1113
1114
|
n._onTimeout && n._onTimeout();
|
|
1114
1115
|
}, o));
|
|
1115
1116
|
}, B.setImmediate = typeof p == "function" ? p : function(n) {
|
|
1116
|
-
var o =
|
|
1117
|
-
return
|
|
1118
|
-
|
|
1117
|
+
var o = S++, a = arguments.length < 2 ? !1 : F.call(arguments, 1);
|
|
1118
|
+
return v[o] = !0, C(function() {
|
|
1119
|
+
v[o] && (a ? n.apply(null, a) : n.call(null), B.clearImmediate(o));
|
|
1119
1120
|
}), o;
|
|
1120
1121
|
}, B.clearImmediate = typeof w == "function" ? w : function(n) {
|
|
1121
|
-
delete
|
|
1122
|
+
delete v[n];
|
|
1122
1123
|
};
|
|
1123
1124
|
}).call(this, E("timers").setImmediate, E("timers").clearImmediate);
|
|
1124
1125
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
1125
1126
|
}, {}, [2])(2);
|
|
1126
1127
|
});
|
|
1127
1128
|
})(tt);
|
|
1128
|
-
var
|
|
1129
|
-
const Je = /* @__PURE__ */
|
|
1130
|
-
function
|
|
1129
|
+
var On = tt.exports;
|
|
1130
|
+
const Je = /* @__PURE__ */ En(On);
|
|
1131
|
+
function Fn() {
|
|
1131
1132
|
let O;
|
|
1132
|
-
function
|
|
1133
|
-
const
|
|
1134
|
-
return
|
|
1133
|
+
function Q(n, o, a) {
|
|
1134
|
+
const g = {};
|
|
1135
|
+
return g.sourceElement = n, g.sourceContainer = a, g.targetContainer = o, g.sourceType = n.getAttribute("data-sourceType") || "move", g.controlType = n.getAttribute("data-controlType"), g.controlTypeName = n.getAttribute("data-controlTypeName"), g.controlCategory = n.getAttribute("data-category"), g.controlFeature = n.getAttribute("data-feature"), g.parentComponentInstance = o.componentInstance, g.controlCategory === "input" ? g.bindingType = "field" : g.controlCategory === "dataCollection" && (g.bindingType = "entity"), n.componentInstance && (g.controlType = n.componentInstance.value.schema.type, g.controlCategory = n.componentInstance.value.schema.category), g;
|
|
1135
1136
|
}
|
|
1136
|
-
function E(n, o,
|
|
1137
|
+
function E(n, o, a) {
|
|
1137
1138
|
if (n.contains(o) || o.classList.contains("no-drop"))
|
|
1138
1139
|
return !1;
|
|
1139
|
-
const
|
|
1140
|
+
const g = !0;
|
|
1140
1141
|
if (n.componentInstance && n.componentInstance.value.getDragScopeElement) {
|
|
1141
1142
|
const m = n.componentInstance.value.getDragScopeElement();
|
|
1142
1143
|
if (m && !m.contains(o))
|
|
1143
1144
|
return !1;
|
|
1144
1145
|
}
|
|
1145
1146
|
if (o.componentInstance && o.componentInstance.value.canAccepts) {
|
|
1146
|
-
const m =
|
|
1147
|
+
const m = Q(n, o, a);
|
|
1147
1148
|
return o.componentInstance.value.canAccepts(m);
|
|
1148
1149
|
}
|
|
1149
|
-
return
|
|
1150
|
+
return g;
|
|
1150
1151
|
}
|
|
1151
|
-
function
|
|
1152
|
-
const
|
|
1152
|
+
function I(n, o) {
|
|
1153
|
+
const a = o.getBoundingClientRect(), g = n.getBoundingClientRect(), m = g.top >= a.top, Y = g.top < a.bottom;
|
|
1153
1154
|
return m && Y;
|
|
1154
1155
|
}
|
|
1155
1156
|
function B(n, o) {
|
|
1156
|
-
const
|
|
1157
|
-
if (!(!
|
|
1158
|
-
const
|
|
1159
|
-
if (
|
|
1160
|
-
const m =
|
|
1157
|
+
const a = n.querySelector(".dgComponentSelected");
|
|
1158
|
+
if (!(!a || o === 0) && I(a, n)) {
|
|
1159
|
+
const g = a.querySelector(".component-btn-group");
|
|
1160
|
+
if (g) {
|
|
1161
|
+
const m = g.querySelector("div");
|
|
1161
1162
|
if (m && m.style.top) {
|
|
1162
1163
|
const Y = Number.parseFloat(m.style.top);
|
|
1163
1164
|
m.style.top = Y - o + "px";
|
|
@@ -1165,26 +1166,26 @@ function On() {
|
|
|
1165
1166
|
}
|
|
1166
1167
|
}
|
|
1167
1168
|
}
|
|
1168
|
-
function p(n, o,
|
|
1169
|
+
function p(n, o, a) {
|
|
1169
1170
|
n.componentInstance;
|
|
1170
|
-
let
|
|
1171
|
+
let g = -1;
|
|
1171
1172
|
if (!o)
|
|
1172
1173
|
return -1;
|
|
1173
1174
|
if (n.componentInstance.value.contents) {
|
|
1174
|
-
if (
|
|
1175
|
-
if (
|
|
1176
|
-
|
|
1175
|
+
if (a && a.componentInstance) {
|
|
1176
|
+
if (a.getAttribute("data-noattach"))
|
|
1177
|
+
g = Number(a.getAttribute("data-position"));
|
|
1177
1178
|
else {
|
|
1178
|
-
const m =
|
|
1179
|
+
const m = a.componentInstance.value.schema;
|
|
1179
1180
|
let Y = { id: m.id };
|
|
1180
|
-
m.type === "Component" && (Y = { component: m.id }),
|
|
1181
|
+
m.type === "Component" && (Y = { component: m.id }), g = Ye(n.componentInstance.value.contents, Y), g = g === -1 ? 0 : g;
|
|
1181
1182
|
}
|
|
1182
|
-
|
|
1183
|
+
g !== -1 && n.componentInstance.value.contents.splice(g, 0, o);
|
|
1183
1184
|
} else
|
|
1184
1185
|
n.componentInstance.value.contents.push(o);
|
|
1185
1186
|
n.componentInstance.value.updateDragAndDropRules();
|
|
1186
1187
|
}
|
|
1187
|
-
return
|
|
1188
|
+
return g;
|
|
1188
1189
|
}
|
|
1189
1190
|
function w(n, o) {
|
|
1190
1191
|
if (!n.componentInstance.value.contents)
|
|
@@ -1195,53 +1196,53 @@ function On() {
|
|
|
1195
1196
|
return n.componentInstance.value.contents.length;
|
|
1196
1197
|
if (o.getAttribute("data-noattach"))
|
|
1197
1198
|
return Number(o.getAttribute("data-position"));
|
|
1198
|
-
const
|
|
1199
|
-
let
|
|
1200
|
-
|
|
1201
|
-
let m = Ye(n.componentInstance.value.contents,
|
|
1199
|
+
const a = o.componentInstance.value.schema;
|
|
1200
|
+
let g;
|
|
1201
|
+
a.type === "Component" ? g = { component: a.id } : g = { id: a.id };
|
|
1202
|
+
let m = Ye(n.componentInstance.value.contents, g);
|
|
1202
1203
|
return m = m === -1 ? 0 : m, m;
|
|
1203
1204
|
}
|
|
1204
|
-
function
|
|
1205
|
+
function C(n, o, a, g) {
|
|
1205
1206
|
if (o.componentInstance.value.addNewChildComponentSchema) {
|
|
1206
|
-
const m = w(o,
|
|
1207
|
-
p(o, re,
|
|
1207
|
+
const m = w(o, g), Y = String(n.getAttribute("data-controltype")), z = n.getAttribute("data-feature"), X = String(n.innerText), c = o.componentInstance.value, N = { componentType: Y, label: X, parentComponentInstance: c, targetPosition: m }, U = z ? JSON.parse(z) : {}, $ = Object.assign(N, U), re = o.componentInstance.value.addNewChildComponentSchema($);
|
|
1208
|
+
p(o, re, g);
|
|
1208
1209
|
}
|
|
1209
1210
|
o.contains(n) && o.removeChild(n);
|
|
1210
1211
|
}
|
|
1211
|
-
function f(n, o,
|
|
1212
|
+
function f(n, o, a, g) {
|
|
1212
1213
|
let m, Y = -1;
|
|
1213
1214
|
if (n.componentInstance && n.componentInstance.value.triggerBelongedComponentToMoveWhenMoved) {
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1215
|
+
const c = n.componentInstance.value.getBelongedComponentInstance(n.componentInstance);
|
|
1216
|
+
c && (n = q(c.elementRef).value.parentElement, a = n.parentElement);
|
|
1216
1217
|
}
|
|
1217
|
-
const
|
|
1218
|
-
Y = Ye(
|
|
1218
|
+
const z = n.componentInstance && n.componentInstance.value.schema, X = { id: z && z.id };
|
|
1219
|
+
Y = Ye(a.componentInstance.value.contents, X), Y !== -1 && a.componentInstance.value.contents && (m = a.componentInstance.value.contents.splice(Y, 1), m = m[0]), p(o, m, g), a.componentInstance && a.componentInstance.value.onChildElementMovedOut && a.componentInstance.value.onChildElementMovedOut(n), o.componentInstance && o.componentInstance.value.onAcceptMovedChildElement && o.componentInstance.value.onAcceptMovedChildElement(n, a);
|
|
1219
1220
|
}
|
|
1220
|
-
function F(n, o,
|
|
1221
|
+
function F(n, o, a, g) {
|
|
1221
1222
|
if (!o || n.contains(o))
|
|
1222
1223
|
return;
|
|
1223
1224
|
switch (n.getAttribute("data-sourceType")) {
|
|
1224
1225
|
case "control":
|
|
1225
1226
|
case "field":
|
|
1226
1227
|
case "entity": {
|
|
1227
|
-
|
|
1228
|
+
C(n, o, a, g);
|
|
1228
1229
|
break;
|
|
1229
1230
|
}
|
|
1230
1231
|
default:
|
|
1231
|
-
|
|
1232
|
+
a.componentInstance.value.contents ? f(n, o, a, g) : o.contains(n) && o.removeChild(n);
|
|
1232
1233
|
}
|
|
1233
1234
|
Oe.value++;
|
|
1234
1235
|
}
|
|
1235
|
-
function
|
|
1236
|
+
function v(n) {
|
|
1236
1237
|
O && O.destroy(), Je && (O = Je([], {
|
|
1237
1238
|
// 镜像容器
|
|
1238
1239
|
mirrorContainer: n,
|
|
1239
1240
|
direction: "mixed",
|
|
1240
1241
|
revertOnSpill: !0,
|
|
1241
1242
|
// 判断是否可移动
|
|
1242
|
-
moves(o,
|
|
1243
|
+
moves(o, a, g) {
|
|
1243
1244
|
let m = !0;
|
|
1244
|
-
return o.classList.contains("no-drag") && (m = !1), o.componentInstance && (m = !!
|
|
1245
|
+
return o.classList.contains("no-drag") && (m = !1), o.componentInstance && (m = !!g.getAttribute("data-dragging-icon")), m;
|
|
1245
1246
|
},
|
|
1246
1247
|
// 判断是否可拷贝
|
|
1247
1248
|
copy(o) {
|
|
@@ -1252,27 +1253,27 @@ function On() {
|
|
|
1252
1253
|
return o.componentInstance && o.componentInstance.value.getDraggingDisplayText ? o.componentInstance.value.getDraggingDisplayText() : o.innerText || "控件";
|
|
1253
1254
|
},
|
|
1254
1255
|
// 判断目标区域是否可接收拖拽的控件
|
|
1255
|
-
accepts(o,
|
|
1256
|
-
const m = E(o,
|
|
1256
|
+
accepts(o, a, g) {
|
|
1257
|
+
const m = E(o, a, g), Y = n.lastElementChild;
|
|
1257
1258
|
return m ? Y.className = Y.className.replace("undroppable", "") : Y.className.includes("undroppable") || (Y.className += " undroppable"), m;
|
|
1258
1259
|
}
|
|
1259
|
-
}).on("over", (o,
|
|
1260
|
-
|
|
1261
|
-
}).on("out", (o,
|
|
1262
|
-
|
|
1263
|
-
}).on("drop", (o,
|
|
1264
|
-
F(o,
|
|
1265
|
-
}).on("dragend", (o,
|
|
1266
|
-
B(o,
|
|
1260
|
+
}).on("over", (o, a) => {
|
|
1261
|
+
a.className += " drag-over";
|
|
1262
|
+
}).on("out", (o, a) => {
|
|
1263
|
+
a.className = a.className.replace("drag-over", "").replace(" ", "");
|
|
1264
|
+
}).on("drop", (o, a, g, m) => {
|
|
1265
|
+
F(o, a, g, m);
|
|
1266
|
+
}).on("dragend", (o, a) => {
|
|
1267
|
+
B(o, a);
|
|
1267
1268
|
}));
|
|
1268
1269
|
}
|
|
1269
|
-
function
|
|
1270
|
+
function S(n, o) {
|
|
1270
1271
|
if (!n)
|
|
1271
1272
|
return;
|
|
1272
1273
|
if (o.noDragDrop)
|
|
1273
1274
|
return n;
|
|
1274
|
-
const
|
|
1275
|
-
O &&
|
|
1275
|
+
const a = n.querySelector(`[data-dragref='${o.id}-container']`) || n;
|
|
1276
|
+
O && a && O.containers.push(a);
|
|
1276
1277
|
}
|
|
1277
1278
|
function u() {
|
|
1278
1279
|
if (!O)
|
|
@@ -1284,9 +1285,9 @@ function On() {
|
|
|
1284
1285
|
O.containers.push(o);
|
|
1285
1286
|
}));
|
|
1286
1287
|
}
|
|
1287
|
-
return { attachComponents:
|
|
1288
|
+
return { attachComponents: S, attachToolbox: u, initializeDragula: v };
|
|
1288
1289
|
}
|
|
1289
|
-
const
|
|
1290
|
+
const An = {
|
|
1290
1291
|
id: { type: String, default: "" },
|
|
1291
1292
|
componentId: { type: String, default: "" },
|
|
1292
1293
|
type: { type: String, default: "" },
|
|
@@ -1303,17 +1304,17 @@ const Fn = {
|
|
|
1303
1304
|
ignore: { type: Boolean, default: !1 }
|
|
1304
1305
|
}, M = {}, _ = {}, L = {};
|
|
1305
1306
|
let Ze = !1;
|
|
1306
|
-
function
|
|
1307
|
-
Ze || (Ze = !0, Ct.registerDesigner(M, _, L), ht.registerDesigner(M, _, L), xt.registerDesigner(M, _, L), wt.registerDesigner(M, _, L), bt.registerDesigner(M, _, L), Pt.registerDesigner(M, _, L), It.registerDesigner(M, _, L), St.registerDesigner(M, _, L), Tt.registerDesigner(M, _, L), Et.registerDesigner(M, _, L), Ot.registerDesigner(M, _, L), Ft.registerDesigner(M, _, L), At.registerDesigner(M, _, L), Nt.registerDesigner(M, _, L), Bt.registerDesigner(M, _, L), Dt.registerDesigner(M, _), Mt.registerDesigner(M, _, L), _t.registerDesigner(M, _, L), Lt.registerDesigner(M, _, L),
|
|
1307
|
+
function Nn() {
|
|
1308
|
+
Ze || (Ze = !0, Ct.registerDesigner(M, _, L), ht.registerDesigner(M, _, L), xt.registerDesigner(M, _, L), wt.registerDesigner(M, _, L), bt.registerDesigner(M, _, L), Pt.registerDesigner(M, _, L), It.registerDesigner(M, _, L), St.registerDesigner(M, _, L), Tt.registerDesigner(M, _, L), Et.registerDesigner(M, _, L), Ot.registerDesigner(M, _, L), Ft.registerDesigner(M, _, L), At.registerDesigner(M, _, L), Nt.registerDesigner(M, _, L), Bt.registerDesigner(M, _, L), Dt.registerDesigner(M, _), Mt.registerDesigner(M, _, L), _t.registerDesigner(M, _, L), Lt.registerDesigner(M, _, L), kt.registerDesigner(M, _, L), Vt.registerDesigner(M, _, L), Rt.registerDesigner(M, _, L), $t.registerDesigner(M, _, L), Xt.registerDesigner(M, _, L), jt.registerDesigner(M, _, L), Yt.registerDesigner(M, _, L), zt.registerDesigner(M, _, L), Ut.registerDesigner(M, _, L), Ht.registerDesigner(M, _, L), Wt.registerDesigner(M, _, L), qt.registerDesigner(M, _, L), Gt.registerDesigner(M, _, L), Kt.registerDesigner(M, _, L), Zt.registerDesigner(M, _, L), en.registerDesigner(M, _, L), Jt.registerDesigner(M, _, L), Qt.registerDesigner(M, _, L), tn.registerDesigner(M, _, L), nn.registerDesigner(M, _, L), on.registerDesigner(M, _, L), rn.registerDesigner(M, _, L), sn.registerDesigner(M, _, L), an.registerDesigner(M, _, L), cn.registerDesigner(M, _, L), ln.registerDesigner(M, _, L), un.registerDesigner(M, _, L), gn.registerDesigner(M, _, L), fn.registerDesigner(M, _, L), dn.registerDesigner(M, _, L), pn.registerDesigner(M, _, L), mn.registerDesigner(M, _, L), vn.registerDesigner(M, _, L), yn.registerDesigner(M, _), hn.registerDesigner(M, _, L), Cn.registerDesigner(M, _, L), xn.registerDesigner(M, _, L));
|
|
1308
1309
|
}
|
|
1309
|
-
const
|
|
1310
|
+
const Dn = {
|
|
1310
1311
|
id: { type: String }
|
|
1311
|
-
},
|
|
1312
|
+
}, Bn = /* @__PURE__ */ Fe({
|
|
1312
1313
|
name: "FDesignerPlaceholder",
|
|
1313
|
-
props:
|
|
1314
|
+
props: Dn,
|
|
1314
1315
|
emits: [],
|
|
1315
1316
|
setup(O) {
|
|
1316
|
-
const
|
|
1317
|
+
const Q = Te(() => ({
|
|
1317
1318
|
"drag-and-drop-alert": !0,
|
|
1318
1319
|
alert: !0,
|
|
1319
1320
|
"alert-info": !0,
|
|
@@ -1326,8 +1327,8 @@ const Nn = {
|
|
|
1326
1327
|
"align-items": "center",
|
|
1327
1328
|
margin: 0
|
|
1328
1329
|
}));
|
|
1329
|
-
return () =>
|
|
1330
|
-
class:
|
|
1330
|
+
return () => Z("div", {
|
|
1331
|
+
class: Q.value,
|
|
1331
1332
|
style: E.value,
|
|
1332
1333
|
role: "alert",
|
|
1333
1334
|
"data-noattach": "true",
|
|
@@ -1335,187 +1336,189 @@ const Nn = {
|
|
|
1335
1336
|
}, [vt("拖拽组件到这里")]);
|
|
1336
1337
|
}
|
|
1337
1338
|
});
|
|
1338
|
-
function
|
|
1339
|
+
function Mn(O) {
|
|
1339
1340
|
return typeof O == "function" || Object.prototype.toString.call(O) === "[object Object]" && !yt(O);
|
|
1340
1341
|
}
|
|
1341
1342
|
const je = /* @__PURE__ */ Fe({
|
|
1342
1343
|
name: "FDesignerItem",
|
|
1343
|
-
props:
|
|
1344
|
+
props: An,
|
|
1344
1345
|
emits: ["selectionChange"],
|
|
1345
|
-
setup(O,
|
|
1346
|
-
const E = q(`${O.modelValue.id}-component`),
|
|
1347
|
-
designerItemElementRef:
|
|
1346
|
+
setup(O, Q) {
|
|
1347
|
+
const E = q(`${O.modelValue.id}-component`), I = q(O.canMove), B = q(O.canDelete), p = q(!1), w = q(O.modelValue), C = q(O.componentId || ""), f = q(""), F = q(""), v = q(), S = me("canvas-dragula"), u = q(), n = me("design-item-context"), o = {
|
|
1348
|
+
designerItemElementRef: v,
|
|
1348
1349
|
componentInstance: u,
|
|
1349
1350
|
schema: w.value,
|
|
1350
1351
|
parent: n,
|
|
1351
|
-
setupContext:
|
|
1352
|
+
setupContext: Q
|
|
1352
1353
|
};
|
|
1353
1354
|
Ee("design-item-context", o);
|
|
1354
|
-
const
|
|
1355
|
-
const
|
|
1355
|
+
const a = me("useFormSchema"), g = Te(() => {
|
|
1356
|
+
const y = O.modelValue.appearance && O.modelValue.appearance.class || "", b = {
|
|
1356
1357
|
"farris-component": !0,
|
|
1357
1358
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
1358
1359
|
"flex-fill": w.value.id == "root-component",
|
|
1359
|
-
"position-relative":
|
|
1360
|
+
"position-relative": I.value && B.value,
|
|
1360
1361
|
"farris-nested": p.value,
|
|
1361
|
-
"can-move":
|
|
1362
|
-
"d-none":
|
|
1362
|
+
"can-move": I.value,
|
|
1363
|
+
"d-none": v.value && v.value.classList.contains("d-none"),
|
|
1364
|
+
dgComponentSelected: v.value && v.value.classList.contains("dgComponentSelected")
|
|
1363
1365
|
};
|
|
1364
|
-
return
|
|
1366
|
+
return b[`farris-component-${w.value.type}`] = !0, y && y.split(" ").reduce((A, e) => (A[e] = !0, A), b), F.value && F.value.split(" ").reduce((A, e) => (A[e] = !0, A), b), b;
|
|
1365
1367
|
}), m = Te(() => {
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
const [t,
|
|
1369
|
-
return
|
|
1370
|
-
},
|
|
1371
|
-
const [t,
|
|
1372
|
-
return t && (
|
|
1373
|
-
},
|
|
1368
|
+
const y = {}, b = O.modelValue.appearance && O.modelValue.appearance.style || "";
|
|
1369
|
+
return b && b.split(";").reduce((A, e) => {
|
|
1370
|
+
const [t, l] = e.split(":");
|
|
1371
|
+
return A[t] = l, A;
|
|
1372
|
+
}, y), f.value && f.value.split(";").reduce((A, e) => {
|
|
1373
|
+
const [t, l] = e.split(":");
|
|
1374
|
+
return t && (A[t] = l), A;
|
|
1375
|
+
}, y), y;
|
|
1374
1376
|
});
|
|
1375
|
-
function Y(
|
|
1376
|
-
var
|
|
1377
|
-
if (
|
|
1378
|
-
const
|
|
1379
|
-
if (
|
|
1380
|
-
const
|
|
1381
|
-
(
|
|
1377
|
+
function Y(y, b) {
|
|
1378
|
+
var t, l, P;
|
|
1379
|
+
if (y && (y.preventDefault(), y.stopPropagation()), u.value.triggerBelongedComponentToDeleteWhenDeleted) {
|
|
1380
|
+
const s = u.value.getBelongedComponentInstance(u);
|
|
1381
|
+
if (s && s.parent) {
|
|
1382
|
+
const i = q(s == null ? void 0 : s.parent), j = i.value.contents.findIndex((k) => k.id === s.schema.id);
|
|
1383
|
+
(l = (t = i.value) == null ? void 0 : t.contents) == null || l.splice(j, 1), (P = i.value) == null || P.updateDragAndDropRules(), Oe.value++;
|
|
1382
1384
|
}
|
|
1383
1385
|
return;
|
|
1384
1386
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1387
|
+
let A = n, e = (s) => s.id === b.id;
|
|
1388
|
+
if (b.type === "component" && (A = n == null ? void 0 : n.parent, e = (s) => s.component === b.id), A && A.schema.contents) {
|
|
1389
|
+
const s = A.schema.contents.findIndex(e);
|
|
1390
|
+
A.schema.contents.splice(s, 1), A.componentInstance.value.updateDragAndDropRules(), Oe.value++, Q.emit("selectionChange");
|
|
1388
1391
|
}
|
|
1389
1392
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return B.value &&
|
|
1393
|
+
function z(y) {
|
|
1394
|
+
return B.value && Z("div", {
|
|
1392
1395
|
role: "button",
|
|
1393
1396
|
class: "btn component-settings-button",
|
|
1394
1397
|
title: "删除",
|
|
1395
1398
|
ref: "removeComponent",
|
|
1396
|
-
onClick: (
|
|
1397
|
-
Y(
|
|
1399
|
+
onClick: (b) => {
|
|
1400
|
+
Y(b, y);
|
|
1398
1401
|
}
|
|
1399
|
-
}, [
|
|
1402
|
+
}, [Z("i", {
|
|
1400
1403
|
class: "f-icon f-icon-yxs_delete"
|
|
1401
1404
|
}, null)]);
|
|
1402
1405
|
}
|
|
1403
1406
|
function X() {
|
|
1404
|
-
return
|
|
1407
|
+
return I.value && Z("div", {
|
|
1405
1408
|
role: "button",
|
|
1406
1409
|
class: "btn component-settings-button",
|
|
1407
1410
|
title: "移动",
|
|
1408
1411
|
ref: "moveComponent"
|
|
1409
|
-
}, [
|
|
1412
|
+
}, [Z("i", {
|
|
1410
1413
|
"data-dragging-icon": "true",
|
|
1411
1414
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
1412
1415
|
}, null)]);
|
|
1413
1416
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return O.customButtons && !!O.customButtons.length && O.customButtons.map((
|
|
1417
|
+
function c() {
|
|
1418
|
+
return O.customButtons && !!O.customButtons.length && O.customButtons.map((y) => Z("div", {
|
|
1416
1419
|
role: "button",
|
|
1417
|
-
class: `btn component-settings-button ${
|
|
1418
|
-
title:
|
|
1419
|
-
ref:
|
|
1420
|
-
}, [
|
|
1421
|
-
class:
|
|
1420
|
+
class: `btn component-settings-button ${y.class || ""}`,
|
|
1421
|
+
title: y.title,
|
|
1422
|
+
ref: y.id
|
|
1423
|
+
}, [Z("i", {
|
|
1424
|
+
class: y.icon
|
|
1422
1425
|
}, null)]));
|
|
1423
1426
|
}
|
|
1424
|
-
function
|
|
1425
|
-
return
|
|
1427
|
+
function N(y) {
|
|
1428
|
+
return Z("div", {
|
|
1426
1429
|
class: "component-btn-group",
|
|
1427
1430
|
"data-noattach": "true"
|
|
1428
|
-
}, [
|
|
1431
|
+
}, [Z("div", null, [z(y), X(), c()])]);
|
|
1429
1432
|
}
|
|
1430
|
-
function U(
|
|
1431
|
-
|
|
1433
|
+
function U(y, b, A, e) {
|
|
1434
|
+
Q.emit("selectionChange", y, b, A, e);
|
|
1432
1435
|
}
|
|
1433
|
-
function $(
|
|
1434
|
-
let
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1436
|
+
function $(y) {
|
|
1437
|
+
let b;
|
|
1438
|
+
const A = y.type, e = M[A], t = _[A], l = t ? t(y) : {};
|
|
1439
|
+
l.customClass = O.ignore ? l.customClass : "", l.componentId = C.value;
|
|
1440
|
+
const P = y.contents && y.contents.length === 0;
|
|
1441
|
+
return y.contents && !!y.contents.length && e ? Z(e, $e({
|
|
1439
1442
|
ref: u
|
|
1440
|
-
},
|
|
1443
|
+
}, l), Mn(b = y.contents.map((i) => Z(je, {
|
|
1441
1444
|
key: i.id,
|
|
1442
1445
|
modelValue: i,
|
|
1443
|
-
"onUpdate:modelValue": (
|
|
1444
|
-
componentId:
|
|
1446
|
+
"onUpdate:modelValue": (j) => i = j,
|
|
1447
|
+
componentId: C.value,
|
|
1445
1448
|
onSelectionChange: U
|
|
1446
|
-
}, null))) ?
|
|
1447
|
-
default: () => [
|
|
1448
|
-
}) : e ?
|
|
1449
|
+
}, null))) ? b : {
|
|
1450
|
+
default: () => [b]
|
|
1451
|
+
}) : e ? P ? Z(e, $e({
|
|
1449
1452
|
ref: u
|
|
1450
|
-
},
|
|
1451
|
-
default: () => [
|
|
1452
|
-
}) :
|
|
1453
|
+
}, l), {
|
|
1454
|
+
default: () => [Z(Bn, null, null)]
|
|
1455
|
+
}) : Z(e, $e({
|
|
1453
1456
|
ref: u
|
|
1454
|
-
},
|
|
1457
|
+
}, l), null) : Z("div", null, null);
|
|
1455
1458
|
}
|
|
1456
|
-
function re(
|
|
1457
|
-
if (
|
|
1458
|
-
let
|
|
1459
|
-
if (
|
|
1460
|
-
return
|
|
1461
|
-
key:
|
|
1462
|
-
modelValue:
|
|
1463
|
-
"onUpdate:modelValue": (e) =>
|
|
1464
|
-
componentId:
|
|
1459
|
+
function re(y) {
|
|
1460
|
+
if (y.type === "component-ref") {
|
|
1461
|
+
let A = a == null ? void 0 : a.getFormSchema().module.components.find((e) => e.id === y.component);
|
|
1462
|
+
if (A)
|
|
1463
|
+
return Z(je, {
|
|
1464
|
+
key: A.id,
|
|
1465
|
+
modelValue: A,
|
|
1466
|
+
"onUpdate:modelValue": (e) => A = e,
|
|
1467
|
+
componentId: A.id,
|
|
1465
1468
|
onSelectionChange: U
|
|
1466
1469
|
}, null);
|
|
1467
1470
|
}
|
|
1468
1471
|
}
|
|
1469
|
-
ze(() => O.modelValue, (
|
|
1470
|
-
w.value =
|
|
1472
|
+
ze(() => O.modelValue, (y) => {
|
|
1473
|
+
w.value = y, E.value = `${y.id}-component`;
|
|
1471
1474
|
});
|
|
1472
|
-
function
|
|
1473
|
-
const
|
|
1474
|
-
et(
|
|
1475
|
+
function J(y) {
|
|
1476
|
+
const b = y.target;
|
|
1477
|
+
et(b);
|
|
1475
1478
|
}
|
|
1476
1479
|
function d() {
|
|
1477
|
-
var
|
|
1478
|
-
(
|
|
1480
|
+
var y, b;
|
|
1481
|
+
(b = (y = w.value) == null ? void 0 : y.contents) != null && b.length && v.value && v.value.addEventListener("scroll", J);
|
|
1479
1482
|
}
|
|
1480
1483
|
Ue(() => {
|
|
1481
|
-
if (
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
+
if (v.value && u.value && u.value.schema) {
|
|
1485
|
+
const y = v.value.querySelector(`[data-dragref='${u.value.schema.id}-container']`);
|
|
1486
|
+
S && y && S.attachComponents(y, w.value), p.value = u.value.canNested !== void 0 ? u.value.canNested : p.value, B.value = u.value.canDelete !== void 0 ? u.value.canDelete : B.value, I.value = u.value.canMove !== void 0 ? u.value.canMove : I.value, f.value = u.value.styles || "", F.value = u.value.designerClass || "", v.value && (v.value.componentInstance = u, v.value.designItemContext = o);
|
|
1484
1487
|
}
|
|
1485
1488
|
d(), Oe.value++;
|
|
1486
1489
|
}), gt(() => {
|
|
1487
|
-
|
|
1490
|
+
v.value && v.value.removeEventListener("scroll", J);
|
|
1488
1491
|
});
|
|
1489
|
-
function G(
|
|
1490
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
const
|
|
1494
|
-
if (!(
|
|
1492
|
+
function G(y) {
|
|
1493
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((A) => A.classList.remove("dgComponentFocused")), y && (y.preventDefault(), y.stopPropagation());
|
|
1494
|
+
const b = v.value;
|
|
1495
|
+
if (b) {
|
|
1496
|
+
const A = document.getElementsByClassName("dgComponentSelected");
|
|
1497
|
+
if (!(A && A.length === 1 && A[0] === v.value) && (Array.from(A).forEach((t) => t.classList.remove("dgComponentSelected")), b.classList.add("dgComponentFocused"), Q.emit("selectionChange", w.value.type, w.value, C.value, u.value), u.value.getDraggableDesignItemElement)) {
|
|
1495
1498
|
const t = u.value.getDraggableDesignItemElement(o);
|
|
1496
1499
|
t && t.value && t.value.classList.add("dgComponentSelected");
|
|
1497
1500
|
}
|
|
1498
1501
|
}
|
|
1499
|
-
|
|
1502
|
+
J(y);
|
|
1500
1503
|
}
|
|
1501
|
-
return () => w.value.type === "component-ref" ? re(w.value) :
|
|
1504
|
+
return () => w.value.type === "component-ref" ? re(w.value) : Z("div", {
|
|
1502
1505
|
id: `${w.value.id}-design-item`,
|
|
1503
|
-
ref:
|
|
1504
|
-
class:
|
|
1506
|
+
ref: v,
|
|
1507
|
+
class: g.value,
|
|
1505
1508
|
style: m.value,
|
|
1506
1509
|
onClick: G
|
|
1507
|
-
}, [
|
|
1510
|
+
}, [N(w.value), $(w.value)]);
|
|
1508
1511
|
}
|
|
1509
|
-
}),
|
|
1512
|
+
}), _n = /* @__PURE__ */ Fe({
|
|
1510
1513
|
name: "FDesignerCanvas",
|
|
1511
|
-
props:
|
|
1514
|
+
props: Tn,
|
|
1512
1515
|
emits: ["init", "selectionChange", "canvasChanged"],
|
|
1513
|
-
setup(O,
|
|
1514
|
-
const E = q(),
|
|
1515
|
-
|
|
1516
|
+
setup(O, Q) {
|
|
1517
|
+
const E = q(), I = q(), B = q(), p = q(), w = q(), C = Fn(), f = q(O.componentId);
|
|
1518
|
+
Nn(), Ee("canvas-dragula", C), Ee("design-item-context", {
|
|
1516
1519
|
designerItemElementRef: p,
|
|
1517
1520
|
componentInstance: w,
|
|
1518
|
-
schema:
|
|
1521
|
+
schema: I.value,
|
|
1519
1522
|
parent: void 0
|
|
1520
1523
|
}), Ee("designer-host-service", {
|
|
1521
1524
|
eventsEditorUtils: me("eventsEditorUtils"),
|
|
@@ -1532,132 +1535,132 @@ const je = /* @__PURE__ */ Fe({
|
|
|
1532
1535
|
"flex-column": !0
|
|
1533
1536
|
}));
|
|
1534
1537
|
Ue(() => {
|
|
1535
|
-
B.value &&
|
|
1538
|
+
B.value && C.initializeDragula(B.value), E.value = O.modelValue, Q.emit("init", C);
|
|
1536
1539
|
}), ze(Oe, () => {
|
|
1537
|
-
et(B.value),
|
|
1540
|
+
et(B.value), Q.emit("canvasChanged");
|
|
1538
1541
|
}, {
|
|
1539
1542
|
flush: "post"
|
|
1540
1543
|
});
|
|
1541
|
-
function
|
|
1542
|
-
|
|
1544
|
+
function v(S, u, n, o) {
|
|
1545
|
+
Q.emit("selectionChange", S, u, n, o);
|
|
1543
1546
|
}
|
|
1544
|
-
return () =>
|
|
1547
|
+
return () => Z("div", {
|
|
1545
1548
|
class: "editorDiv flex-fill h-100"
|
|
1546
|
-
}, [
|
|
1549
|
+
}, [Z("div", {
|
|
1547
1550
|
class: "editorPanel d-flex flex-fill flex-column PC"
|
|
1548
|
-
}, [
|
|
1551
|
+
}, [Z("div", {
|
|
1549
1552
|
ref: B,
|
|
1550
1553
|
class: F.value
|
|
1551
|
-
}, [E.value &&
|
|
1554
|
+
}, [E.value && Z(je, {
|
|
1552
1555
|
modelValue: E.value,
|
|
1553
|
-
"onUpdate:modelValue": (
|
|
1554
|
-
onSelectionChange:
|
|
1556
|
+
"onUpdate:modelValue": (S) => E.value = S,
|
|
1557
|
+
onSelectionChange: v,
|
|
1555
1558
|
componentId: f.value
|
|
1556
1559
|
}, null)])])]);
|
|
1557
1560
|
}
|
|
1558
|
-
}),
|
|
1561
|
+
}), Ln = /* @__PURE__ */ Fe({
|
|
1559
1562
|
name: "FFlowNodeItem",
|
|
1560
|
-
props:
|
|
1563
|
+
props: In,
|
|
1561
1564
|
emits: [],
|
|
1562
|
-
setup(O,
|
|
1563
|
-
const E = q(O.id),
|
|
1565
|
+
setup(O, Q) {
|
|
1566
|
+
const E = q(O.id), I = q(O.modelValue), B = q(), p = me("use-drawing-bezier-composition"), {
|
|
1564
1567
|
drawFrom: w,
|
|
1565
|
-
eraseDrawingLine:
|
|
1568
|
+
eraseDrawingLine: C,
|
|
1566
1569
|
finishToDraw: f,
|
|
1567
1570
|
getAncherPointPosition: F,
|
|
1568
|
-
isAncherPoint:
|
|
1569
|
-
} = p,
|
|
1571
|
+
isAncherPoint: v
|
|
1572
|
+
} = p, S = me("use-bezier-curve-composition"), {
|
|
1570
1573
|
connect: u
|
|
1571
|
-
} =
|
|
1574
|
+
} = S, n = me("use-connections-composition"), {
|
|
1572
1575
|
addConnection: o,
|
|
1573
|
-
getConnectionsOfNode:
|
|
1576
|
+
getConnectionsOfNode: a
|
|
1574
1577
|
} = n;
|
|
1575
1578
|
new Map(O.connection);
|
|
1576
|
-
const
|
|
1579
|
+
const g = Te(() => ({
|
|
1577
1580
|
left: `${O.x}px`,
|
|
1578
1581
|
top: `${O.y}px`
|
|
1579
1582
|
}));
|
|
1580
|
-
function m(
|
|
1581
|
-
if (
|
|
1582
|
-
const U = F(
|
|
1583
|
-
u(
|
|
1584
|
-
const re =
|
|
1585
|
-
o(d, re, G,
|
|
1583
|
+
function m(c, N) {
|
|
1584
|
+
if (v(c) && v(N)) {
|
|
1585
|
+
const U = F(c), $ = F(N);
|
|
1586
|
+
u(c.id, N.id, U, $);
|
|
1587
|
+
const re = c.id, J = N.id, d = re.split(/(-left-point|-right-point|-top-point|-bottom-point)/, 1)[0], G = J.split(/(-left-point|-right-point|-top-point|-bottom-point)/, 1)[0];
|
|
1588
|
+
o(d, re, G, J);
|
|
1586
1589
|
}
|
|
1587
1590
|
}
|
|
1588
|
-
function Y(
|
|
1589
|
-
var
|
|
1590
|
-
document.removeEventListener("mouseup", Y), f(
|
|
1591
|
+
function Y(c) {
|
|
1592
|
+
var N;
|
|
1593
|
+
document.removeEventListener("mouseup", Y), f(c), C(`${(N = B.value) == null ? void 0 : N.id}_curve_to`), m(B.value, c.target);
|
|
1591
1594
|
}
|
|
1592
|
-
function
|
|
1593
|
-
B.value = document.getElementById(
|
|
1595
|
+
function z(c, N) {
|
|
1596
|
+
B.value = document.getElementById(c), w(c, N), document.addEventListener("mouseup", Y), N.stopPropagation();
|
|
1594
1597
|
}
|
|
1595
1598
|
ze([() => O.x, () => O.y], () => {
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1598
|
-
const U = document.getElementById(
|
|
1599
|
+
const c = a(E.value);
|
|
1600
|
+
c.length && c.forEach((N) => {
|
|
1601
|
+
const U = document.getElementById(N.from), $ = document.getElementById(N.to);
|
|
1599
1602
|
U && $ && m(U, $);
|
|
1600
1603
|
});
|
|
1601
1604
|
});
|
|
1602
1605
|
const X = Te(() => ({
|
|
1603
1606
|
"node-content": !0
|
|
1604
1607
|
}));
|
|
1605
|
-
return () =>
|
|
1608
|
+
return () => Z("div", {
|
|
1606
1609
|
id: E.value,
|
|
1607
1610
|
class: "br-node",
|
|
1608
|
-
style:
|
|
1609
|
-
}, [
|
|
1611
|
+
style: g.value
|
|
1612
|
+
}, [Z("div", {
|
|
1610
1613
|
id: `${E.value}-left-point`,
|
|
1611
1614
|
class: "f-flow-ancher circle-left",
|
|
1612
|
-
onMousedown: (
|
|
1613
|
-
}, null),
|
|
1615
|
+
onMousedown: (c) => z(`${E.value}-left-point`, c)
|
|
1616
|
+
}, null), Z("div", {
|
|
1614
1617
|
id: `${E.value}-top-point`,
|
|
1615
1618
|
class: "f-flow-ancher circle-top",
|
|
1616
|
-
onMousedown: (
|
|
1617
|
-
}, null),
|
|
1619
|
+
onMousedown: (c) => z(`${E.value}-top-point`, c)
|
|
1620
|
+
}, null), Z("div", {
|
|
1618
1621
|
id: `${E.value}-content`,
|
|
1619
1622
|
class: X.value,
|
|
1620
1623
|
style: "min-width:200px;min-height:200px;"
|
|
1621
|
-
}, [
|
|
1622
|
-
modelValue:
|
|
1623
|
-
"onUpdate:modelValue": (
|
|
1624
|
-
}, null)]),
|
|
1624
|
+
}, [I.value && Z(_n, {
|
|
1625
|
+
modelValue: I.value,
|
|
1626
|
+
"onUpdate:modelValue": (c) => I.value = c
|
|
1627
|
+
}, null)]), Z("div", {
|
|
1625
1628
|
id: `${E.value}-right-point`,
|
|
1626
1629
|
class: "f-flow-ancher circle-right",
|
|
1627
|
-
onMousedown: (
|
|
1628
|
-
}, null),
|
|
1630
|
+
onMousedown: (c) => z(`${E.value}-right-point`, c)
|
|
1631
|
+
}, null), Z("div", {
|
|
1629
1632
|
id: `${E.value}-bottom-point`,
|
|
1630
1633
|
class: "f-flow-ancher circle-bottom",
|
|
1631
|
-
onMousedown: (
|
|
1634
|
+
onMousedown: (c) => z(`${E.value}-bottom-point`, c)
|
|
1632
1635
|
}, null)]);
|
|
1633
1636
|
}
|
|
1634
1637
|
});
|
|
1635
|
-
function
|
|
1636
|
-
const
|
|
1637
|
-
function
|
|
1638
|
+
function kn(O) {
|
|
1639
|
+
const Q = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
1640
|
+
function I(w, C) {
|
|
1638
1641
|
const f = E.get(w) || [];
|
|
1639
1642
|
f.filter(
|
|
1640
|
-
(
|
|
1641
|
-
).length > 0 || (f.push(
|
|
1643
|
+
(v) => C.from === v.from && C.to === v.to
|
|
1644
|
+
).length > 0 || (f.push(C), E.set(w, f));
|
|
1642
1645
|
}
|
|
1643
|
-
function B(w,
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1646
|
+
function B(w, C, f, F) {
|
|
1647
|
+
const v = new Set(Q.get(C) || []);
|
|
1648
|
+
v.add(F), Q.set(C, [...v]);
|
|
1649
|
+
const S = { from: C, to: F, type: "Curve" };
|
|
1650
|
+
I(w, S), I(f, S);
|
|
1648
1651
|
}
|
|
1649
1652
|
function p(w) {
|
|
1650
1653
|
return E.get(w) || [];
|
|
1651
1654
|
}
|
|
1652
1655
|
return { addConnection: B, getConnectionsOfNode: p };
|
|
1653
1656
|
}
|
|
1654
|
-
const
|
|
1657
|
+
const jo = /* @__PURE__ */ Fe({
|
|
1655
1658
|
name: "FFlowCanvas",
|
|
1656
|
-
props:
|
|
1659
|
+
props: wn,
|
|
1657
1660
|
emits: [],
|
|
1658
|
-
setup(O,
|
|
1659
|
-
const E = q(),
|
|
1660
|
-
Ee("use-bezier-curve-composition",
|
|
1661
|
+
setup(O, Q) {
|
|
1662
|
+
const E = q(), I = bn(), B = Pn(I), p = kn();
|
|
1663
|
+
Ee("use-bezier-curve-composition", I), Ee("use-connections-composition", p), Ee("use-drawing-bezier-composition", B);
|
|
1661
1664
|
const w = Te(() => ({
|
|
1662
1665
|
transition: "transform 0.2s",
|
|
1663
1666
|
"background-color": "#F2F3F5",
|
|
@@ -1668,34 +1671,34 @@ const $o = /* @__PURE__ */ Fe({
|
|
|
1668
1671
|
Ue(() => {
|
|
1669
1672
|
E.value = O.modelValue;
|
|
1670
1673
|
});
|
|
1671
|
-
const
|
|
1672
|
-
function u(
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1674
|
+
const C = q(), f = q(), F = q(), v = q(), S = q();
|
|
1675
|
+
function u(a) {
|
|
1676
|
+
const g = a.clientX - v.value, m = a.clientY - S.value;
|
|
1677
|
+
C.value && C.value.position && (C.value.position.x = f.value + g, C.value.position.y = F.value + m);
|
|
1675
1678
|
}
|
|
1676
1679
|
function n() {
|
|
1677
|
-
document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", n),
|
|
1680
|
+
document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", n), C.value = void 0, v.value = void 0, S.value = void 0;
|
|
1678
1681
|
}
|
|
1679
|
-
function o(
|
|
1680
|
-
|
|
1682
|
+
function o(a, g) {
|
|
1683
|
+
C.value = a, f.value = a.position.x, F.value = a.position.y, v.value = g.clientX, S.value = g.clientY, document.addEventListener("mousemove", u), document.addEventListener("mouseup", n);
|
|
1681
1684
|
}
|
|
1682
|
-
return () =>
|
|
1685
|
+
return () => Z("div", {
|
|
1683
1686
|
class: "f-flow-canvas editorDiv flex-fill h-100"
|
|
1684
|
-
}, [
|
|
1687
|
+
}, [Z("div", {
|
|
1685
1688
|
id: "svg-container",
|
|
1686
1689
|
class: "f-struct-wrapper flex-fill",
|
|
1687
1690
|
style: w.value
|
|
1688
|
-
}, [E.value && E.value.contents.map((
|
|
1689
|
-
modelValue:
|
|
1690
|
-
"onUpdate:modelValue": (
|
|
1691
|
-
id:
|
|
1692
|
-
x:
|
|
1693
|
-
y:
|
|
1694
|
-
onMousedown: (
|
|
1691
|
+
}, [E.value && E.value.contents.map((a) => Z(Ln, {
|
|
1692
|
+
modelValue: a.content[0],
|
|
1693
|
+
"onUpdate:modelValue": (g) => a.content[0] = g,
|
|
1694
|
+
id: a.id,
|
|
1695
|
+
x: a.position.x,
|
|
1696
|
+
y: a.position.y,
|
|
1697
|
+
onMousedown: (g) => o(a, g)
|
|
1695
1698
|
}, null))])]);
|
|
1696
1699
|
}
|
|
1697
1700
|
});
|
|
1698
1701
|
export {
|
|
1699
|
-
|
|
1700
|
-
|
|
1702
|
+
jo as FFlowCanvas,
|
|
1703
|
+
wn as flowCanvasProps
|
|
1701
1704
|
};
|