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