@farris/ui-vue 1.5.7 → 1.5.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/avatar/index.esm.js +5 -5
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +5 -5
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +5 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +5 -5
- package/components/content-container/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1082 -1421
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +908 -897
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +5 -5
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +5 -5
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +5 -5
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +13 -12
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +5 -5
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +5 -5
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +5 -5
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +862 -3625
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +5 -5
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +77 -76
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/response-layout/index.esm.js +5 -5
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +500 -3662
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +3008 -7347
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/section/index.esm.js +117 -7544
- package/components/section/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +545 -4943
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +100 -5841
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +5 -5
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +5 -5
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +1556 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +207 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +377 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +14332 -0
- package/designer/data-grid/index.umd.cjs +20 -0
- package/designer/data-view/index.esm.js +271 -0
- package/designer/data-view/index.umd.cjs +1 -0
- package/designer/date-picker/index.esm.js +1879 -0
- package/designer/date-picker/index.umd.cjs +1 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +463 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +16827 -0
- package/designer/farris-designer.all.umd.cjs +32 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +647 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +6959 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/response-toolbar/index.esm.js +3015 -0
- package/designer/response-toolbar/index.umd.cjs +1 -0
- package/designer/section/index.esm.js +744 -0
- package/designer/section/index.umd.cjs +1 -0
- package/designer/tabs/index.esm.js +2200 -0
- package/designer/tabs/index.umd.cjs +1 -0
- package/designer/textarea/index.esm.js +249 -0
- package/designer/textarea/index.umd.cjs +1 -0
- package/designer/tree-grid/index.css +1 -0
- package/designer/tree-grid/index.esm.js +1673 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +30447 -30444
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/date-picker/designer.d.ts +29 -0
- package/types/date-picker/index.d.ts +2 -1
- package/types/date-picker/src/date-picker.props.d.ts +0 -5
- package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
- package/types/designer-canvas/index.d.ts +2 -2
- package/types/response-toolbar/designer.d.ts +37 -0
- package/types/response-toolbar/index.d.ts +6 -5
- package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
- package/types/response-toolbar/src/composition/types.d.ts +1 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
- package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
- package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
- package/types/section/designer.d.ts +26 -0
- package/types/section/index.d.ts +1 -0
- package/types/section/src/designer/section-header.design.component.d.ts +2 -2
- package/types/section/src/designer/section-toolbar-item.design.props.d.ts +16 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +0 -1
- package/types/section/src/designer/section-toolbar.design.component.d.ts +2 -2
- package/types/section/src/designer/section.design.props.d.ts +11 -0
- package/types/section/src/designer/use-designer-rules.d.ts +1 -2
- package/types/section/src/property-config/section.property-config.d.ts +1 -1
- package/types/section/src/schema/schema-resolver.d.ts +1 -1
- package/types/section/src/section.props.d.ts +0 -10
- package/types/tabs/designer.d.ts +28 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/src/components/tab-page.props.d.ts +0 -1
- package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
- package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
- package/types/tabs/src/tabs.props.d.ts +0 -11
- package/types/textarea/designer.d.ts +28 -0
- package/types/textarea/index.d.ts +0 -15
- package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
- package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
- package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
- package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
- package/types/textarea/src/textarea.props.d.ts +0 -5
- package/components/textarea/index.css +0 -1
- /package/{components/section → designer/radio-group}/index.css +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Ie = (n,
|
|
4
|
-
import { ref as m, defineComponent as Te, computed as
|
|
1
|
+
var Oo = Object.defineProperty;
|
|
2
|
+
var No = (n, e, t) => e in n ? Oo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Ie = (n, e, t) => No(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ref as m, defineComponent as Te, computed as U, watch as ve, createVNode as v, Fragment as et, reactive as qe, createApp as ln, onUnmounted as vt, onMounted as Ue, Transition as sn, mergeProps as Ze, nextTick as qt, createTextVNode as Oe, onBeforeMount as cn, Teleport as jo, shallowRef as Po, render as At, h as Lo, cloneVNode as Ro, inject as me, provide as dt, triggerRef as Vo, onBeforeUnmount as un, isVNode as Ao, withModifiers as $o } from "vue";
|
|
5
5
|
import { isUndefined as ze, cloneDeep as gt, isPlainObject as Zt, merge as St, findIndex as Kt } from "lodash-es";
|
|
6
|
-
import { withInstall as
|
|
7
|
-
import { useResizeObserver as
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import { getHierarchyRow as
|
|
6
|
+
import { withInstall as Ho, getCustomClass as ft, FormSchemaEntityFieldTypeName as en } from "../common/index.esm.js";
|
|
7
|
+
import { useResizeObserver as zo } from "@vueuse/core";
|
|
8
|
+
import { resolveAppearance as _o, createPropsResolver as yt, createTreeGridSelectionItemResolver as qo, createTreeGridBindingResolver as Go, createDataViewUpdateColumnsResolver as Uo, createFormGroupEditorResolver as Wo } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import { getHierarchyRow as Yo, useIdentify as Xo, useGroupData as Jo, useFilter as Qo, useHierarchy as Zo, useLoading as Ko, useDataView as ea, useSelection as ta, useSelectHierarchyItem as na, useDataViewContainerStyle as oa, useCommandColumn as aa, useColumn as ra, useSort as ia, useGroupColumn as la, useRow as sa, useEdit as ca, useVisualDataBound as ua, useVisualDataCell as da, useVisualDataRow as fa, useVisualData as pa, useCellPosition as ma, useSidebar as va, useVirtualScroll as ga, useFitColumn as ya, useFilterHistory as ha, useColumnFilter as ba, useDragColumn as Ca, getColumnHeader as wa, getSidebar as Sa, getDisableMask as Ta, getHorizontalScrollbar as Fa, getVerticalScrollbar as xa, getEmpty as Da } from "../data-view/index.esm.js";
|
|
10
10
|
import "../designer-canvas/index.esm.js";
|
|
11
11
|
import "../property-panel/index.esm.js";
|
|
12
12
|
import dn from "../accordion/index.esm.js";
|
|
@@ -18,46 +18,46 @@ import gn from "../capsule/index.esm.js";
|
|
|
18
18
|
import $t from "../../designer/checkbox/index.esm.js";
|
|
19
19
|
import Dt from "../../designer/checkbox-group/index.esm.js";
|
|
20
20
|
import yn from "../combo-list/index.esm.js";
|
|
21
|
-
import
|
|
21
|
+
import Ea from "../combo-tree/index.esm.js";
|
|
22
22
|
import hn from "../component/index.esm.js";
|
|
23
23
|
import bn from "../color-picker/index.esm.js";
|
|
24
24
|
import Cn from "../content-container/index.esm.js";
|
|
25
|
-
import wn from "
|
|
25
|
+
import wn from "../../designer/date-picker/index.esm.js";
|
|
26
26
|
import Sn from "../../designer/data-grid/index.esm.js";
|
|
27
27
|
import Tn from "../dropdown/index.esm.js";
|
|
28
28
|
import Fn from "../dynamic-form/index.esm.js";
|
|
29
|
-
import
|
|
29
|
+
import Ba from "../events-editor/index.esm.js";
|
|
30
30
|
import xn from "../filter-bar/index.esm.js";
|
|
31
|
-
import
|
|
32
|
-
import
|
|
31
|
+
import Ia from "../field-selector/index.esm.js";
|
|
32
|
+
import Ma, { FBindingSelectorContainer as ka } from "../binding-selector/index.esm.js";
|
|
33
33
|
import Dn from "../image-cropper/index.esm.js";
|
|
34
34
|
import En from "../../designer/input-group/index.esm.js";
|
|
35
35
|
import Bn from "../layout/index.esm.js";
|
|
36
36
|
import In from "../list-nav/index.esm.js";
|
|
37
37
|
import Mn from "../list-view/index.esm.js";
|
|
38
38
|
import kn from "../lookup/index.esm.js";
|
|
39
|
-
import
|
|
39
|
+
import Oa from "../mapping-editor/index.esm.js";
|
|
40
40
|
import On from "../nav/index.esm.js";
|
|
41
41
|
import Nn from "../number-range/index.esm.js";
|
|
42
42
|
import jn from "../number-spinner/index.esm.js";
|
|
43
43
|
import Pn from "../order/index.esm.js";
|
|
44
44
|
import Ln from "../page-header/index.esm.js";
|
|
45
|
-
import
|
|
46
|
-
import
|
|
45
|
+
import Rn from "../page-footer/index.esm.js";
|
|
46
|
+
import Vn from "../pagination/index.esm.js";
|
|
47
47
|
import An from "../progress/index.esm.js";
|
|
48
48
|
import $n from "../query-solution/index.esm.js";
|
|
49
49
|
import Hn from "../../designer/radio-group/index.esm.js";
|
|
50
50
|
import zn from "../rate/index.esm.js";
|
|
51
|
-
import _n from "
|
|
51
|
+
import _n from "../../designer/response-toolbar/index.esm.js";
|
|
52
52
|
import qn from "../response-layout/index.esm.js";
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import Wn from "
|
|
53
|
+
import Gn from "../response-layout-editor/index.esm.js";
|
|
54
|
+
import Un from "../search-box/index.esm.js";
|
|
55
|
+
import Wn from "../../designer/section/index.esm.js";
|
|
56
56
|
import Yn from "../smoke-detector/index.esm.js";
|
|
57
57
|
import Xn from "../splitter/index.esm.js";
|
|
58
58
|
import Jn from "../step/index.esm.js";
|
|
59
59
|
import Qn from "../switch/index.esm.js";
|
|
60
|
-
import Zn from "
|
|
60
|
+
import Zn from "../../designer/tabs/index.esm.js";
|
|
61
61
|
import Kn from "../tags/index.esm.js";
|
|
62
62
|
import eo from "../text/index.esm.js";
|
|
63
63
|
import to from "../time-picker/index.esm.js";
|
|
@@ -66,39 +66,39 @@ import oo from "../tree-view/index.esm.js";
|
|
|
66
66
|
import ao from "../uploader/index.esm.js";
|
|
67
67
|
import ro from "../verify-detail/index.esm.js";
|
|
68
68
|
import io from "../video/index.esm.js";
|
|
69
|
-
import lo from "
|
|
70
|
-
import
|
|
69
|
+
import lo from "../../designer/textarea/index.esm.js";
|
|
70
|
+
import Na from "../schema-selector/index.esm.js";
|
|
71
71
|
import so from "../../designer/tree-grid/index.esm.js";
|
|
72
|
-
import
|
|
73
|
-
import
|
|
72
|
+
import ja from "../event-parameter/index.esm.js";
|
|
73
|
+
import Pa from "../filter-condition-editor/index.esm.js";
|
|
74
74
|
import co from "../fieldset/index.esm.js";
|
|
75
|
-
import
|
|
76
|
-
import
|
|
75
|
+
import La from "../sort-condition-editor/index.esm.js";
|
|
76
|
+
import Ra from "../menu-lookup/index.esm.js";
|
|
77
77
|
import uo from "../../designer/drawer/index.esm.js";
|
|
78
78
|
import Va from "../json-editor/index.esm.js";
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
79
|
+
import Aa from "../property-editor/index.esm.js";
|
|
80
|
+
import $a from "../expression-editor/index.esm.js";
|
|
81
|
+
import Ha from "../code-editor/index.esm.js";
|
|
82
82
|
import fo from "../html-template/index.esm.js";
|
|
83
|
-
import
|
|
84
|
-
import { FNotifyService as
|
|
83
|
+
import za from "../external-container/index.esm.js";
|
|
84
|
+
import { FNotifyService as _a } from "../notify/index.esm.js";
|
|
85
85
|
const Ke = m(0);
|
|
86
|
-
function
|
|
87
|
-
const
|
|
86
|
+
function qa(n, e) {
|
|
87
|
+
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), o = a.top >= t.top, i = a.top <= t.bottom;
|
|
88
88
|
return o && i;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
90
|
+
function po(n) {
|
|
91
|
+
const e = n.querySelector(".component-btn-group");
|
|
92
|
+
if (!e)
|
|
93
93
|
return;
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
if (!(
|
|
97
|
-
const a =
|
|
94
|
+
e.style.display = "";
|
|
95
|
+
const t = e.getBoundingClientRect();
|
|
96
|
+
if (!(t.top === 0 && t.left === 0)) {
|
|
97
|
+
const a = e.querySelector("div");
|
|
98
98
|
if (a) {
|
|
99
99
|
const o = a.getBoundingClientRect();
|
|
100
|
-
a.style.top =
|
|
101
|
-
let i =
|
|
100
|
+
a.style.top = t.top + "px";
|
|
101
|
+
let i = t.left - o.width;
|
|
102
102
|
const r = document.querySelector(".editorDiv");
|
|
103
103
|
if (r) {
|
|
104
104
|
const c = r.getBoundingClientRect();
|
|
@@ -108,40 +108,50 @@ function qa(n) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ga(n) {
|
|
112
112
|
if (!window.scrollContainerList)
|
|
113
113
|
return;
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
114
|
+
const e = Array.from(window.scrollContainerList);
|
|
115
|
+
if (e.length && e.length === 1) {
|
|
116
|
+
const t = e[0], a = document.querySelector(`[id=${t}]`);
|
|
117
117
|
if (a && a.contains(n))
|
|
118
118
|
return a;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Gt(n) {
|
|
122
122
|
if (!n)
|
|
123
123
|
return;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
124
|
+
const e = n.getBoundingClientRect();
|
|
125
|
+
if (e.width === 0 && e.height === 0)
|
|
126
126
|
return;
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
127
|
+
const t = n.querySelector(".component-btn-group");
|
|
128
|
+
if (t) {
|
|
129
129
|
let a = !0;
|
|
130
|
-
const o =
|
|
131
|
-
if (o && (a =
|
|
132
|
-
|
|
130
|
+
const o = Ga(n);
|
|
131
|
+
if (o && (a = qa(n, o)), !a) {
|
|
132
|
+
t.style.display = "none";
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
po(n);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
function pt(n) {
|
|
139
139
|
if (!n)
|
|
140
140
|
return;
|
|
141
|
-
let
|
|
142
|
-
n.className.includes("dgComponentSelected") ?
|
|
141
|
+
let e;
|
|
142
|
+
n.className.includes("dgComponentSelected") ? e = n : e = n.querySelector(".dgComponentSelected"), e && Gt(e);
|
|
143
|
+
}
|
|
144
|
+
function Ss(n) {
|
|
145
|
+
const e = document.querySelector(".dgComponentSelected");
|
|
146
|
+
if (!e)
|
|
147
|
+
return;
|
|
148
|
+
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), o = e.querySelector(".component-btn-group");
|
|
149
|
+
if (o) {
|
|
150
|
+
const i = o.getBoundingClientRect(), r = a.top < t.top;
|
|
151
|
+
i.top !== 0 && r && po(e);
|
|
152
|
+
}
|
|
143
153
|
}
|
|
144
|
-
const
|
|
154
|
+
const Ua = {
|
|
145
155
|
/**
|
|
146
156
|
* 组件值
|
|
147
157
|
*/
|
|
@@ -155,13 +165,13 @@ function Wa(n) {
|
|
|
155
165
|
function Tt(n) {
|
|
156
166
|
throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
157
167
|
}
|
|
158
|
-
var
|
|
159
|
-
(function(n,
|
|
160
|
-
(function(
|
|
161
|
-
n.exports =
|
|
168
|
+
var mo = { exports: {} };
|
|
169
|
+
(function(n, e) {
|
|
170
|
+
(function(t) {
|
|
171
|
+
n.exports = t();
|
|
162
172
|
})(function() {
|
|
163
173
|
return (/* @__PURE__ */ function() {
|
|
164
|
-
function
|
|
174
|
+
function t(a, o, i) {
|
|
165
175
|
function r(s, h) {
|
|
166
176
|
if (!o[s]) {
|
|
167
177
|
if (!a[s]) {
|
|
@@ -175,16 +185,16 @@ var po = { exports: {} };
|
|
|
175
185
|
a[s][0].call(l.exports, function(p) {
|
|
176
186
|
var b = a[s][1][p];
|
|
177
187
|
return r(b || p);
|
|
178
|
-
}, l, l.exports,
|
|
188
|
+
}, l, l.exports, t, a, o, i);
|
|
179
189
|
}
|
|
180
190
|
return o[s].exports;
|
|
181
191
|
}
|
|
182
192
|
for (var c = typeof Tt == "function" && Tt, d = 0; d < i.length; d++) r(i[d]);
|
|
183
193
|
return r;
|
|
184
194
|
}
|
|
185
|
-
return
|
|
195
|
+
return t;
|
|
186
196
|
}())({
|
|
187
|
-
1: [function(
|
|
197
|
+
1: [function(t, a, o) {
|
|
188
198
|
var i = {}, r = "(?:^|\\s)", c = "(?:\\s|$)";
|
|
189
199
|
function d(f) {
|
|
190
200
|
var u = i[f];
|
|
@@ -202,13 +212,13 @@ var po = { exports: {} };
|
|
|
202
212
|
rm: h
|
|
203
213
|
};
|
|
204
214
|
}, {}],
|
|
205
|
-
2: [function(
|
|
215
|
+
2: [function(t, a, o) {
|
|
206
216
|
(function(i) {
|
|
207
|
-
var r =
|
|
217
|
+
var r = t("contra/emitter"), c = t("crossvent"), d = t("./classes"), s = document, h = s.documentElement;
|
|
208
218
|
function f(C, Y) {
|
|
209
219
|
var te = arguments.length;
|
|
210
220
|
te === 1 && Array.isArray(C) === !1 && (Y = C, C = []);
|
|
211
|
-
var O, P, W, L, E, I, A,
|
|
221
|
+
var O, P, W, L, E, I, A, V, $, oe = null, ue, ne, be = !1, Fe = 0, ce, Q = Y || {};
|
|
212
222
|
Q.moves === void 0 && (Q.moves = j), Q.accepts === void 0 && (Q.accepts = j), Q.invalid === void 0 && (Q.invalid = lt), Q.containers === void 0 && (Q.containers = C || []), Q.isContainer === void 0 && (Q.isContainer = B), Q.copy === void 0 && (Q.copy = !1), Q.copySortSource === void 0 && (Q.copySortSource = !1), Q.revertOnSpill === void 0 && (Q.revertOnSpill = !1), Q.removeOnSpill === void 0 && (Q.removeOnSpill = !1), Q.direction === void 0 && (Q.direction = "vertical"), Q.ignoreInputTextSelection === void 0 && (Q.ignoreInputTextSelection = !0), Q.mirrorContainer === void 0 && (Q.mirrorContainer = s.body);
|
|
213
223
|
var se = r({
|
|
214
224
|
containers: Q.containers,
|
|
@@ -225,16 +235,16 @@ var po = { exports: {} };
|
|
|
225
235
|
return se.containers.indexOf(x) !== -1 || Q.isContainer(x);
|
|
226
236
|
}
|
|
227
237
|
function tt(x) {
|
|
228
|
-
var
|
|
229
|
-
p(h,
|
|
230
|
-
}
|
|
231
|
-
function Ve(x) {
|
|
232
|
-
var V = x ? "remove" : "add";
|
|
233
|
-
p(h, V, "mousemove", He);
|
|
238
|
+
var R = x ? "remove" : "add";
|
|
239
|
+
p(h, R, "mousedown", We), p(h, R, "mouseup", N);
|
|
234
240
|
}
|
|
235
241
|
function Re(x) {
|
|
236
|
-
var
|
|
237
|
-
|
|
242
|
+
var R = x ? "remove" : "add";
|
|
243
|
+
p(h, R, "mousemove", He);
|
|
244
|
+
}
|
|
245
|
+
function Ve(x) {
|
|
246
|
+
var R = x ? "remove" : "add";
|
|
247
|
+
c[R](h, "selectstart", $e), c[R](h, "click", $e);
|
|
238
248
|
}
|
|
239
249
|
function Ae() {
|
|
240
250
|
tt(!0), N({});
|
|
@@ -244,10 +254,10 @@ var po = { exports: {} };
|
|
|
244
254
|
}
|
|
245
255
|
function We(x) {
|
|
246
256
|
L = x.clientX, E = x.clientY;
|
|
247
|
-
var
|
|
248
|
-
if (!
|
|
249
|
-
var
|
|
250
|
-
ee && (ue = ee,
|
|
257
|
+
var R = b(x) !== 1 || x.metaKey || x.ctrlKey;
|
|
258
|
+
if (!R) {
|
|
259
|
+
var G = x.target, ee = Ne(G);
|
|
260
|
+
ee && (ue = ee, Re(), x.type === "mousedown" && (S(G) ? G.focus() : x.preventDefault()));
|
|
251
261
|
}
|
|
252
262
|
}
|
|
253
263
|
function He(x) {
|
|
@@ -258,27 +268,27 @@ var po = { exports: {} };
|
|
|
258
268
|
}
|
|
259
269
|
if (!(x.clientX !== void 0 && Math.abs(x.clientX - L) <= (Q.slideFactorX || 0) && x.clientY !== void 0 && Math.abs(x.clientY - E) <= (Q.slideFactorY || 0))) {
|
|
260
270
|
if (Q.ignoreInputTextSelection) {
|
|
261
|
-
var
|
|
271
|
+
var R = k("clientX", x) || 0, G = k("clientY", x) || 0, ee = s.elementFromPoint(R, G);
|
|
262
272
|
if (S(ee))
|
|
263
273
|
return;
|
|
264
274
|
}
|
|
265
275
|
var ie = ue;
|
|
266
|
-
|
|
276
|
+
Re(!0), Ve(), at(), ot(ie), d.add(V || W, "gu-transit"), kt(), Mt(), Fe = 0, ct(x);
|
|
267
277
|
}
|
|
268
278
|
}
|
|
269
279
|
}
|
|
270
280
|
function Ne(x) {
|
|
271
281
|
if (!(se.dragging && O) && !pe(x)) {
|
|
272
|
-
for (var
|
|
273
|
-
if (Q.invalid(x,
|
|
282
|
+
for (var R = x; y(x) && pe(y(x)) === !1; )
|
|
283
|
+
if (Q.invalid(x, R) || (x = y(x), !x))
|
|
274
284
|
return;
|
|
275
|
-
var
|
|
276
|
-
if (
|
|
277
|
-
var ee = Q.moves(x,
|
|
285
|
+
var G = y(x);
|
|
286
|
+
if (G && !Q.invalid(x, R)) {
|
|
287
|
+
var ee = Q.moves(x, G, R, g(x));
|
|
278
288
|
if (ee)
|
|
279
289
|
return {
|
|
280
290
|
item: x,
|
|
281
|
-
source:
|
|
291
|
+
source: G
|
|
282
292
|
};
|
|
283
293
|
}
|
|
284
294
|
}
|
|
@@ -287,55 +297,55 @@ var po = { exports: {} };
|
|
|
287
297
|
return !!Ne(x);
|
|
288
298
|
}
|
|
289
299
|
function it(x) {
|
|
290
|
-
var
|
|
291
|
-
|
|
300
|
+
var R = Ne(x);
|
|
301
|
+
R && ot(R);
|
|
292
302
|
}
|
|
293
303
|
function ot(x) {
|
|
294
|
-
|
|
304
|
+
Vt(x.item, x.source) && (V = x.item.cloneNode(!0), se.emit("cloned", V, x.item, "copy")), P = x.source, W = x.item, I = A = g(x.item), se.dragging = !0, se.emit("drag", W, P);
|
|
295
305
|
}
|
|
296
306
|
function lt() {
|
|
297
307
|
return !1;
|
|
298
308
|
}
|
|
299
309
|
function at() {
|
|
300
310
|
if (se.dragging) {
|
|
301
|
-
var x =
|
|
311
|
+
var x = V || W;
|
|
302
312
|
re(x, y(x));
|
|
303
313
|
}
|
|
304
314
|
}
|
|
305
315
|
function rt() {
|
|
306
|
-
ue = !1,
|
|
316
|
+
ue = !1, Re(!0), Ve(!0);
|
|
307
317
|
}
|
|
308
318
|
function N(x) {
|
|
309
319
|
if (rt(), !!se.dragging) {
|
|
310
|
-
var
|
|
311
|
-
le && (
|
|
320
|
+
var R = V || W, G = k("clientX", x) || 0, ee = k("clientY", x) || 0, ie = D(O, G, ee), le = ht(ie, G, ee);
|
|
321
|
+
le && (V && Q.copySortSource || !V || le !== P) ? re(R, le) : Q.removeOnSpill ? de() : De();
|
|
312
322
|
}
|
|
313
323
|
}
|
|
314
|
-
function re(x,
|
|
315
|
-
var
|
|
316
|
-
|
|
324
|
+
function re(x, R) {
|
|
325
|
+
var G = y(x);
|
|
326
|
+
V && Q.copySortSource && R === P && G.removeChild(W), st(R) ? se.emit("cancel", x, P) : se.emit("drop", x, R, P, A), Le();
|
|
317
327
|
}
|
|
318
328
|
function de() {
|
|
319
329
|
if (se.dragging) {
|
|
320
|
-
var x =
|
|
321
|
-
|
|
330
|
+
var x = V || W, R = y(x);
|
|
331
|
+
R && R.removeChild(x), se.emit(V ? "cancel" : "remove", x, R, P), Le();
|
|
322
332
|
}
|
|
323
333
|
}
|
|
324
334
|
function De(x) {
|
|
325
335
|
if (se.dragging) {
|
|
326
|
-
var
|
|
327
|
-
ie === !1 &&
|
|
336
|
+
var R = arguments.length > 0 ? x : Q.revertOnSpill, G = V || W, ee = y(G), ie = st(ee);
|
|
337
|
+
ie === !1 && R && (V ? ee && ee.removeChild(V) : P.insertBefore(G, I)), ie || R ? se.emit("cancel", G, P, P) : se.emit("drop", G, ee, P, A), Le();
|
|
328
338
|
}
|
|
329
339
|
}
|
|
330
340
|
function Le() {
|
|
331
|
-
var x =
|
|
332
|
-
rt(), Ot(), Nt(), x && d.rm(x, "gu-transit"), $ && clearTimeout($), se.dragging = !1, oe && se.emit("out", x, oe, P), se.emit("dragend", x, Fe), P = W =
|
|
341
|
+
var x = V || W;
|
|
342
|
+
rt(), Ot(), Nt(), x && d.rm(x, "gu-transit"), $ && clearTimeout($), se.dragging = !1, oe && se.emit("out", x, oe, P), se.emit("dragend", x, Fe), P = W = V = I = A = $ = oe = null;
|
|
333
343
|
}
|
|
334
|
-
function st(x,
|
|
335
|
-
var
|
|
336
|
-
return
|
|
344
|
+
function st(x, R) {
|
|
345
|
+
var G;
|
|
346
|
+
return R !== void 0 ? G = R : O ? G = A : G = g(V || W), x === P && G === I;
|
|
337
347
|
}
|
|
338
|
-
function ht(x,
|
|
348
|
+
function ht(x, R, G) {
|
|
339
349
|
for (var ee = x; ee && !ie(); )
|
|
340
350
|
ee = y(ee);
|
|
341
351
|
return ee;
|
|
@@ -343,7 +353,7 @@ var po = { exports: {} };
|
|
|
343
353
|
var le = pe(ee);
|
|
344
354
|
if (le === !1)
|
|
345
355
|
return !1;
|
|
346
|
-
var Me = bt(ee, x), we = wt(ee, Me,
|
|
356
|
+
var Me = bt(ee, x), we = wt(ee, Me, R, G), Ee = st(ee, we);
|
|
347
357
|
return Ee ? !0 : Q.accepts(W, ee, P, we);
|
|
348
358
|
}
|
|
349
359
|
}
|
|
@@ -351,22 +361,22 @@ var po = { exports: {} };
|
|
|
351
361
|
if (!O)
|
|
352
362
|
return;
|
|
353
363
|
x.preventDefault();
|
|
354
|
-
var
|
|
355
|
-
O.style.left =
|
|
356
|
-
var ee =
|
|
357
|
-
(Me || le === null) && (Se(), oe = le, Pe()),
|
|
364
|
+
var R = k("clientX", x) || 0, G = k("clientY", x) || 0;
|
|
365
|
+
O.style.left = R - 2 + "px", O.style.top = G - 2 + "px";
|
|
366
|
+
var ee = V || W, ie = D(O, R, G), le = ht(ie, R, G), Me = le !== null && le !== oe;
|
|
367
|
+
(Me || le === null) && (Se(), oe = le, Pe()), Rt(ie, G);
|
|
358
368
|
var we = y(ee);
|
|
359
|
-
if (le === P &&
|
|
369
|
+
if (le === P && V && !Q.copySortSource) {
|
|
360
370
|
we && we.removeChild(ee);
|
|
361
371
|
return;
|
|
362
372
|
}
|
|
363
373
|
var Ee, je = bt(le, ie);
|
|
364
374
|
if (be = jt(je, le), je !== null)
|
|
365
|
-
Ee = wt(le, je,
|
|
366
|
-
else if (Q.revertOnSpill === !0 && !
|
|
375
|
+
Ee = wt(le, je, R, G);
|
|
376
|
+
else if (Q.revertOnSpill === !0 && !V)
|
|
367
377
|
Ee = I, le = P;
|
|
368
378
|
else {
|
|
369
|
-
|
|
379
|
+
V && we && we.removeChild(ee), V && ne && (ne.style.display = "none");
|
|
370
380
|
return;
|
|
371
381
|
}
|
|
372
382
|
ne.style.display = "block", Bt(Ee, ee, Me), Ee ? Pt(je, Ee) : Lt(le);
|
|
@@ -380,8 +390,8 @@ var po = { exports: {} };
|
|
|
380
390
|
oe && ge("out");
|
|
381
391
|
}
|
|
382
392
|
}
|
|
383
|
-
function Bt(x,
|
|
384
|
-
(x ===
|
|
393
|
+
function Bt(x, R, G) {
|
|
394
|
+
(x === R || x === g(R)) && (A = g(R)), (x === null && G || x !== R && x !== g(R)) && (A = x);
|
|
385
395
|
}
|
|
386
396
|
function It(x) {
|
|
387
397
|
d.rm(x, "gu-hide");
|
|
@@ -405,26 +415,26 @@ var po = { exports: {} };
|
|
|
405
415
|
function Nt() {
|
|
406
416
|
ne && (y(ne).removeChild(ne), ne = null);
|
|
407
417
|
}
|
|
408
|
-
function bt(x,
|
|
409
|
-
for (var
|
|
410
|
-
|
|
411
|
-
return
|
|
418
|
+
function bt(x, R) {
|
|
419
|
+
for (var G = R; G !== x && y(G) !== x; )
|
|
420
|
+
G = y(G);
|
|
421
|
+
return G === h ? null : G;
|
|
412
422
|
}
|
|
413
|
-
function jt(x,
|
|
414
|
-
if (!
|
|
423
|
+
function jt(x, R) {
|
|
424
|
+
if (!R)
|
|
415
425
|
return be;
|
|
416
|
-
var
|
|
417
|
-
if (!
|
|
426
|
+
var G = x || R && R.lastElementChild;
|
|
427
|
+
if (!G)
|
|
418
428
|
return !0;
|
|
419
429
|
var ee = getComputedStyle(x), ie = /^inline/.test(ee.getPropertyValue("display")) || /^(left|right)$/.test(ee.getPropertyValue("float"));
|
|
420
430
|
if (ie)
|
|
421
431
|
return !0;
|
|
422
|
-
if (
|
|
423
|
-
var le = getComputedStyle(
|
|
432
|
+
if (R) {
|
|
433
|
+
var le = getComputedStyle(R), Me = le.getPropertyValue("display");
|
|
424
434
|
if (/flex$/.test(Me)) {
|
|
425
435
|
var we = le.getPropertyValue("flex-direction") || "row";
|
|
426
436
|
if (we === "row" || we === "row-reverse")
|
|
427
|
-
return !Ct(
|
|
437
|
+
return !Ct(R);
|
|
428
438
|
}
|
|
429
439
|
return !1;
|
|
430
440
|
}
|
|
@@ -433,8 +443,8 @@ var po = { exports: {} };
|
|
|
433
443
|
function Ct(x) {
|
|
434
444
|
if (!x.children || !x.children.length)
|
|
435
445
|
return !1;
|
|
436
|
-
for (const
|
|
437
|
-
const ee = (
|
|
446
|
+
for (const R of Array.from(x.children)) {
|
|
447
|
+
const ee = (R.className && R.className.split(" ") || []).filter((ie) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ie));
|
|
438
448
|
if (!ee.length)
|
|
439
449
|
return !1;
|
|
440
450
|
for (const ie of ee) {
|
|
@@ -445,66 +455,66 @@ var po = { exports: {} };
|
|
|
445
455
|
}
|
|
446
456
|
return !0;
|
|
447
457
|
}
|
|
448
|
-
function Pt(x,
|
|
449
|
-
const
|
|
450
|
-
if (ne.style.left =
|
|
451
|
-
if (ne.style.height =
|
|
458
|
+
function Pt(x, R) {
|
|
459
|
+
const G = R.getBoundingClientRect();
|
|
460
|
+
if (ne.style.left = G.left + "px", ne.style.top = G.top + "px", be) {
|
|
461
|
+
if (ne.style.height = G.height + "px", ne.style.width = "4px", x) {
|
|
452
462
|
const ee = x.getBoundingClientRect();
|
|
453
|
-
ee.top !==
|
|
463
|
+
ee.top !== G.top && (ne.style.left = ee.right + "px", ne.style.top = ee.top + "px", ne.style.height = ee.height + "px");
|
|
454
464
|
}
|
|
455
|
-
} else if (ne.style.height = "4px", ne.style.width =
|
|
465
|
+
} else if (ne.style.height = "4px", ne.style.width = G.width + "px", ce) {
|
|
456
466
|
const ee = ce.getBoundingClientRect();
|
|
457
|
-
|
|
467
|
+
G.top < ee.top && (ne.style.display = "none");
|
|
458
468
|
}
|
|
459
|
-
|
|
469
|
+
R === W && W && (ne.style.display = "none");
|
|
460
470
|
}
|
|
461
471
|
function Lt(x) {
|
|
462
472
|
A = null;
|
|
463
|
-
var
|
|
464
|
-
if (
|
|
465
|
-
var
|
|
466
|
-
be ? (ne.style.left =
|
|
473
|
+
var R = x.lastElementChild;
|
|
474
|
+
if (R) {
|
|
475
|
+
var G = R.getBoundingClientRect();
|
|
476
|
+
be ? (ne.style.left = G.right + "px", ne.style.top = G.top + "px", ne.style.height = G.height + "px", ne.style.width = "4px") : (ne.style.left = G.left + "px", ne.style.top = G.bottom + "px", ne.style.height = "4px", ne.style.width = G.width + "px"), R === W && W && (ne.style.display = "none");
|
|
467
477
|
} else
|
|
468
478
|
ne.style.display = "none";
|
|
469
479
|
}
|
|
470
|
-
function
|
|
480
|
+
function Rt(x, R) {
|
|
471
481
|
if (!Q.mirrorContainer.contains(x) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (ce = u(x), !ce || !ce.contains(x)))
|
|
472
482
|
return;
|
|
473
|
-
const
|
|
474
|
-
if (
|
|
483
|
+
const G = document.querySelector(".dgComponentSelected"), ee = ce.getBoundingClientRect();
|
|
484
|
+
if (R - 30 < ee.top && ce.scrollTop > 0) {
|
|
475
485
|
let ie = ce.scrollTop < 10 ? ce.scrollTop : 10;
|
|
476
|
-
ce.scrollBy(0, -1 * ie),
|
|
486
|
+
ce.scrollBy(0, -1 * ie), G && ce.contains(G) && (Fe = Fe + -1 * ie);
|
|
477
487
|
}
|
|
478
|
-
if (
|
|
488
|
+
if (R + 30 > ee.bottom && ce.scrollTop < ce.scrollHeight - ce.clientHeight) {
|
|
479
489
|
const ie = ce.scrollHeight - ce.clientHeight - ce.scrollTop;
|
|
480
490
|
let le = ie < 10 ? ie : 10;
|
|
481
|
-
ce.scrollBy(0, le),
|
|
491
|
+
ce.scrollBy(0, le), G && ce.contains(G) && (Fe = Fe + le);
|
|
482
492
|
}
|
|
483
493
|
}
|
|
484
|
-
function wt(x,
|
|
485
|
-
var ie = Q.direction === "horizontal", le = Q.direction === "mixed", Me =
|
|
494
|
+
function wt(x, R, G, ee) {
|
|
495
|
+
var ie = Q.direction === "horizontal", le = Q.direction === "mixed", Me = R !== x ? Ee() : we();
|
|
486
496
|
return Me;
|
|
487
497
|
function we() {
|
|
488
498
|
var ge = x.children.length, Pe, Se, ye;
|
|
489
499
|
for (Pe = 0; Pe < ge; Pe++)
|
|
490
|
-
if (Se = x.children[Pe], ye = Se.getBoundingClientRect(), ie && ye.left + ye.width / 2 >
|
|
500
|
+
if (Se = x.children[Pe], ye = Se.getBoundingClientRect(), ie && ye.left + ye.width / 2 > G || !le && !ie && ye.top + ye.height / 2 > ee || le && ye.left + ye.width > G && ye.top + ye.height > ee)
|
|
491
501
|
return Se;
|
|
492
502
|
return null;
|
|
493
503
|
}
|
|
494
504
|
function Ee() {
|
|
495
|
-
var ge =
|
|
505
|
+
var ge = R.getBoundingClientRect();
|
|
496
506
|
if (le) {
|
|
497
|
-
var Pe = ee - ge.top, Se =
|
|
507
|
+
var Pe = ee - ge.top, Se = G - ge.left, ye = ge.bottom - ee, K = ge.right - G, ae = Math.min(Se, K, Pe, ye), Ce;
|
|
498
508
|
return be ? Ce = K < Se : Ce = ye === ae || K === ae || Se === ae, je(Ce);
|
|
499
509
|
}
|
|
500
|
-
return je(ie ?
|
|
510
|
+
return je(ie ? G > ge.left + T(ge) / 2 : ee > ge.top + F(ge) / 2);
|
|
501
511
|
}
|
|
502
512
|
function je(ge) {
|
|
503
|
-
return ge ? g(
|
|
513
|
+
return ge ? g(R) : R;
|
|
504
514
|
}
|
|
505
515
|
}
|
|
506
|
-
function
|
|
507
|
-
return typeof Q.copy == "boolean" ? Q.copy : Q.copy(x,
|
|
516
|
+
function Vt(x, R) {
|
|
517
|
+
return typeof Q.copy == "boolean" ? Q.copy : Q.copy(x, R);
|
|
508
518
|
}
|
|
509
519
|
}
|
|
510
520
|
function u(C) {
|
|
@@ -604,21 +614,21 @@ var po = { exports: {} };
|
|
|
604
614
|
a.exports = f;
|
|
605
615
|
}).call(this, typeof _e < "u" ? _e : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
606
616
|
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
|
|
607
|
-
3: [function(
|
|
617
|
+
3: [function(t, a, o) {
|
|
608
618
|
a.exports = function(r, c) {
|
|
609
619
|
return Array.prototype.slice.call(r, c);
|
|
610
620
|
};
|
|
611
621
|
}, {}],
|
|
612
|
-
4: [function(
|
|
613
|
-
var i =
|
|
622
|
+
4: [function(t, a, o) {
|
|
623
|
+
var i = t("ticky");
|
|
614
624
|
a.exports = function(c, d, s) {
|
|
615
625
|
c && i(function() {
|
|
616
626
|
c.apply(s || null, d || []);
|
|
617
627
|
});
|
|
618
628
|
};
|
|
619
629
|
}, { ticky: 10 }],
|
|
620
|
-
5: [function(
|
|
621
|
-
var i =
|
|
630
|
+
5: [function(t, a, o) {
|
|
631
|
+
var i = t("atoa"), r = t("./debounce");
|
|
622
632
|
a.exports = function(d, s) {
|
|
623
633
|
var h = s || {}, f = {};
|
|
624
634
|
return d === void 0 && (d = {}), d.on = function(u, l) {
|
|
@@ -654,9 +664,9 @@ var po = { exports: {} };
|
|
|
654
664
|
}, d;
|
|
655
665
|
};
|
|
656
666
|
}, { "./debounce": 4, atoa: 3 }],
|
|
657
|
-
6: [function(
|
|
667
|
+
6: [function(t, a, o) {
|
|
658
668
|
(function(i) {
|
|
659
|
-
var r =
|
|
669
|
+
var r = t("custom-event"), c = t("./eventmap"), d = i.document, s = u, h = p, f = [];
|
|
660
670
|
i.addEventListener || (s = l, h = b), a.exports = {
|
|
661
671
|
add: s,
|
|
662
672
|
remove: h,
|
|
@@ -721,7 +731,7 @@ var po = { exports: {} };
|
|
|
721
731
|
}
|
|
722
732
|
}).call(this, typeof _e < "u" ? _e : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
723
733
|
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
724
|
-
7: [function(
|
|
734
|
+
7: [function(t, a, o) {
|
|
725
735
|
(function(i) {
|
|
726
736
|
var r = [], c = "", d = /^on/;
|
|
727
737
|
for (c in i)
|
|
@@ -729,7 +739,7 @@ var po = { exports: {} };
|
|
|
729
739
|
a.exports = r;
|
|
730
740
|
}).call(this, typeof _e < "u" ? _e : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
731
741
|
}, {}],
|
|
732
|
-
8: [function(
|
|
742
|
+
8: [function(t, a, o) {
|
|
733
743
|
(function(i) {
|
|
734
744
|
var r = i.CustomEvent;
|
|
735
745
|
function c() {
|
|
@@ -755,7 +765,7 @@ var po = { exports: {} };
|
|
|
755
765
|
);
|
|
756
766
|
}).call(this, typeof _e < "u" ? _e : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
757
767
|
}, {}],
|
|
758
|
-
9: [function(
|
|
768
|
+
9: [function(t, a, o) {
|
|
759
769
|
var i = a.exports = {}, r, c;
|
|
760
770
|
function d() {
|
|
761
771
|
throw new Error("setTimeout has not been defined");
|
|
@@ -848,7 +858,7 @@ var po = { exports: {} };
|
|
|
848
858
|
return 0;
|
|
849
859
|
};
|
|
850
860
|
}, {}],
|
|
851
|
-
10: [function(
|
|
861
|
+
10: [function(t, a, o) {
|
|
852
862
|
(function(i) {
|
|
853
863
|
var r = typeof i == "function", c;
|
|
854
864
|
r ? c = function(d) {
|
|
@@ -856,11 +866,11 @@ var po = { exports: {} };
|
|
|
856
866
|
} : c = function(d) {
|
|
857
867
|
setTimeout(d, 0);
|
|
858
868
|
}, a.exports = c;
|
|
859
|
-
}).call(this,
|
|
869
|
+
}).call(this, t("timers").setImmediate);
|
|
860
870
|
}, { timers: 11 }],
|
|
861
|
-
11: [function(
|
|
871
|
+
11: [function(t, a, o) {
|
|
862
872
|
(function(i, r) {
|
|
863
|
-
var c =
|
|
873
|
+
var c = t("process/browser.js").nextTick, d = Function.prototype.apply, s = Array.prototype.slice, h = {}, f = 0;
|
|
864
874
|
o.setTimeout = function() {
|
|
865
875
|
return new u(d.call(setTimeout, window, arguments), clearTimeout);
|
|
866
876
|
}, o.setInterval = function() {
|
|
@@ -892,12 +902,12 @@ var po = { exports: {} };
|
|
|
892
902
|
}, o.clearImmediate = typeof r == "function" ? r : function(l) {
|
|
893
903
|
delete h[l];
|
|
894
904
|
};
|
|
895
|
-
}).call(this,
|
|
905
|
+
}).call(this, t("timers").setImmediate, t("timers").clearImmediate);
|
|
896
906
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
897
907
|
}, {}, [2])(2);
|
|
898
908
|
});
|
|
899
|
-
})(
|
|
900
|
-
var Ya =
|
|
909
|
+
})(mo);
|
|
910
|
+
var Ya = mo.exports;
|
|
901
911
|
const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
902
912
|
showCloseButton: { type: Boolean, default: !0 },
|
|
903
913
|
position: { type: String, default: "top-center" },
|
|
@@ -919,22 +929,22 @@ const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
|
919
929
|
name: "Toast",
|
|
920
930
|
props: Ja,
|
|
921
931
|
emits: ["close", "click"],
|
|
922
|
-
setup: (n,
|
|
923
|
-
const
|
|
932
|
+
setup: (n, e) => {
|
|
933
|
+
const t = m(n.animate), a = "fadeOut", o = U(() => n.options), i = m(!1), r = U(() => {
|
|
924
934
|
const B = {
|
|
925
935
|
animated: i.value,
|
|
926
936
|
toast: !0
|
|
927
937
|
};
|
|
928
938
|
return B[n.animate] = !1, B[a] = i.value, B[o.value.type] = !0, o.value.theme && (B[o.value.theme] = !0), B;
|
|
929
|
-
}), c =
|
|
939
|
+
}), c = U(() => {
|
|
930
940
|
const T = `f-icon-${o.value && o.value.type ? o.value.type.replace("toasty-type-", "") : "default"}`, F = {
|
|
931
941
|
"f-icon": !0
|
|
932
942
|
};
|
|
933
943
|
return F[T] = !0, F;
|
|
934
|
-
}), d =
|
|
944
|
+
}), d = U(() => o.value.title || o.value.message), s = U(() => o.value.title && o.value.message), h = U(() => !o.value.title && o.value.message), f = U(() => n.showCloseButton), u = U(() => !!o.value.buttons || !!e.slots.default);
|
|
935
945
|
function l(B) {
|
|
936
946
|
B.stopPropagation(), B.preventDefault(), i.value = !1, setTimeout(() => {
|
|
937
|
-
|
|
947
|
+
e.emit("close", o.value);
|
|
938
948
|
}, 200);
|
|
939
949
|
}
|
|
940
950
|
function p(B, j) {
|
|
@@ -942,17 +952,17 @@ const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
|
942
952
|
function b(B) {
|
|
943
953
|
return `f-preten-link ${B.customClass ? B.customClass : ""}`;
|
|
944
954
|
}
|
|
945
|
-
ve(
|
|
946
|
-
|
|
955
|
+
ve(t, () => {
|
|
956
|
+
t.value;
|
|
947
957
|
});
|
|
948
958
|
const D = () => {
|
|
949
959
|
var B;
|
|
950
960
|
return v(et, null, [v("div", {
|
|
951
961
|
class: "after-toast-msg text-right"
|
|
952
|
-
}, [!
|
|
962
|
+
}, [!e.slots.default && ((B = o.value.buttons) == null ? void 0 : B.map((j) => v("span", {
|
|
953
963
|
class: b(j),
|
|
954
964
|
onClick: (T) => void 0
|
|
955
|
-
}, [j.text]))),
|
|
965
|
+
}, [j.text]))), e.slots.default && e.slots.default()])]);
|
|
956
966
|
};
|
|
957
967
|
return () => v("div", {
|
|
958
968
|
class: r.value,
|
|
@@ -993,15 +1003,15 @@ const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
|
993
1003
|
name: "Notify",
|
|
994
1004
|
props: Xa,
|
|
995
1005
|
emits: ["close", "empty"],
|
|
996
|
-
setup(n,
|
|
997
|
-
const
|
|
1006
|
+
setup(n, e) {
|
|
1007
|
+
const t = U(() => ({
|
|
998
1008
|
"farris-notify": !0
|
|
999
1009
|
})), a = {
|
|
1000
1010
|
left: 12,
|
|
1001
1011
|
right: 12,
|
|
1002
1012
|
top: 20,
|
|
1003
1013
|
bottom: 12
|
|
1004
|
-
}, o = m(), i = m(n.options), r = m(n.showCloseButton), c =
|
|
1014
|
+
}, o = m(), i = m(n.options), r = m(n.showCloseButton), c = U(() => n.position || "bottom-right"), d = U(() => n.timeout != null ? n.timeout : 3e3), s = U(() => {
|
|
1005
1015
|
const u = n.bottom ? n.bottom : a.bottom, l = n.top ? n.top : a.top, p = {
|
|
1006
1016
|
transition: "all 0.2s ease",
|
|
1007
1017
|
left: c.value.indexOf("left") > -1 ? `${n.left ? n.left : a.left}px` : "",
|
|
@@ -1012,11 +1022,11 @@ const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
|
1012
1022
|
return c.value.indexOf("center") > -1 && (p.left = "50%", p.marginLeft = "calc(-24rem / 2)", c.value === "center-center" && (p.top = "50%", p.transform = "translate(-50%, -50%)")), p;
|
|
1013
1023
|
});
|
|
1014
1024
|
function h(u) {
|
|
1015
|
-
|
|
1025
|
+
e.emit("close");
|
|
1016
1026
|
}
|
|
1017
1027
|
d.value && setTimeout(() => {
|
|
1018
1028
|
h();
|
|
1019
|
-
}, d.value),
|
|
1029
|
+
}, d.value), e.expose({
|
|
1020
1030
|
closeToast: h,
|
|
1021
1031
|
container: o,
|
|
1022
1032
|
notifyPosition: c
|
|
@@ -1025,7 +1035,7 @@ const tn = /* @__PURE__ */ Wa(Ya), Xa = {
|
|
|
1025
1035
|
h();
|
|
1026
1036
|
}
|
|
1027
1037
|
return () => v("div", {
|
|
1028
|
-
class:
|
|
1038
|
+
class: t.value,
|
|
1029
1039
|
style: s.value,
|
|
1030
1040
|
ref: o
|
|
1031
1041
|
}, [v(Ht, {
|
|
@@ -1041,20 +1051,20 @@ class Et {
|
|
|
1041
1051
|
Ie(this, "notifyRefs", []);
|
|
1042
1052
|
Ie(this, "globalConfig", qe({}));
|
|
1043
1053
|
}
|
|
1044
|
-
escapeAllHtml(
|
|
1045
|
-
if (typeof
|
|
1054
|
+
escapeAllHtml(e) {
|
|
1055
|
+
if (typeof e != "string" || !e)
|
|
1046
1056
|
return "";
|
|
1047
|
-
const
|
|
1048
|
-
return
|
|
1057
|
+
const t = document.createElement("div");
|
|
1058
|
+
return t.textContent = e || "", t.innerHTML.replace(/ /g, " ").replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
|
|
1049
1059
|
}
|
|
1050
|
-
createNotifyInstance(
|
|
1051
|
-
const
|
|
1060
|
+
createNotifyInstance(e) {
|
|
1061
|
+
const t = this, o = Object.assign({
|
|
1052
1062
|
timeout: 3e3,
|
|
1053
1063
|
position: "bottom-right",
|
|
1054
1064
|
showCloseButton: !0,
|
|
1055
1065
|
safeHtml: !0
|
|
1056
1066
|
}, this.globalConfig, {
|
|
1057
|
-
...
|
|
1067
|
+
...e
|
|
1058
1068
|
}), i = document.createElement("div");
|
|
1059
1069
|
i.style.display = "contents";
|
|
1060
1070
|
const r = ln({
|
|
@@ -1063,20 +1073,20 @@ class Et {
|
|
|
1063
1073
|
const c = m();
|
|
1064
1074
|
function d() {
|
|
1065
1075
|
c.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
1066
|
-
|
|
1076
|
+
t.updateNotifyPositionForClose(o, c), r.unmount();
|
|
1067
1077
|
}, 220);
|
|
1068
1078
|
}
|
|
1069
1079
|
if (o.position.indexOf("top") > -1) {
|
|
1070
|
-
const h =
|
|
1080
|
+
const h = t.getNotifyInstances(o.position), f = h[h.length - 1];
|
|
1071
1081
|
if (f) {
|
|
1072
1082
|
const u = f.value.container.getBoundingClientRect();
|
|
1073
1083
|
o.top = u.bottom;
|
|
1074
1084
|
}
|
|
1075
1085
|
}
|
|
1076
|
-
return o.safeHtml && ((s = o.options) != null && s.message) && (o.options.message =
|
|
1086
|
+
return o.safeHtml && ((s = o.options) != null && s.message) && (o.options.message = t.escapeAllHtml(o.options.message)), vt(() => {
|
|
1077
1087
|
document.body.removeChild(i);
|
|
1078
|
-
}),
|
|
1079
|
-
|
|
1088
|
+
}), Ue(() => {
|
|
1089
|
+
t.updateNotifyPositionForCreate(o, c);
|
|
1080
1090
|
}), () => v(sn, {
|
|
1081
1091
|
mode: "out-in",
|
|
1082
1092
|
name: "fade",
|
|
@@ -1092,74 +1102,74 @@ class Et {
|
|
|
1092
1102
|
});
|
|
1093
1103
|
return r.provide("NotifyService", this), document.body.appendChild(i), r.mount(i), r;
|
|
1094
1104
|
}
|
|
1095
|
-
getNotifyInstances(
|
|
1096
|
-
return this.notifyRefs.filter((
|
|
1105
|
+
getNotifyInstances(e) {
|
|
1106
|
+
return this.notifyRefs.filter((t) => t.value.notifyPosition === e);
|
|
1097
1107
|
}
|
|
1098
|
-
updateNotifyPositionForCreate(
|
|
1108
|
+
updateNotifyPositionForCreate(e, t) {
|
|
1099
1109
|
if (this.notifyRefs && this.notifyRefs.length) {
|
|
1100
1110
|
const a = window.innerHeight;
|
|
1101
|
-
|
|
1111
|
+
e.position.indexOf("bottom") > -1 && this.getNotifyInstances(e.position).forEach((o) => {
|
|
1102
1112
|
const i = o.value.container.getBoundingClientRect();
|
|
1103
1113
|
o.value.container.style.bottom = i.height + a - i.bottom + "px";
|
|
1104
1114
|
});
|
|
1105
1115
|
}
|
|
1106
|
-
this.notifyRefs = [...this.notifyRefs,
|
|
1116
|
+
this.notifyRefs = [...this.notifyRefs, t];
|
|
1107
1117
|
}
|
|
1108
|
-
updateNotifyPositionForClose(
|
|
1109
|
-
const a = this.notifyRefs.indexOf(
|
|
1110
|
-
if (
|
|
1111
|
-
const o = this.getNotifyInstances(
|
|
1118
|
+
updateNotifyPositionForClose(e, t) {
|
|
1119
|
+
const a = this.notifyRefs.indexOf(t);
|
|
1120
|
+
if (e.position.indexOf("top") > -1) {
|
|
1121
|
+
const o = this.getNotifyInstances(e.position), i = o.indexOf(t);
|
|
1112
1122
|
o.slice(i + 1).forEach((r) => {
|
|
1113
1123
|
r.value.container.style.top = r.value.container.offsetTop - r.value.container.offsetHeight + "px";
|
|
1114
1124
|
});
|
|
1115
1125
|
}
|
|
1116
1126
|
a > -1 && this.notifyRefs.splice(a, 1);
|
|
1117
1127
|
}
|
|
1118
|
-
show(
|
|
1119
|
-
return this.createNotifyInstance(
|
|
1128
|
+
show(e) {
|
|
1129
|
+
return this.createNotifyInstance(e);
|
|
1120
1130
|
}
|
|
1121
|
-
buildNotifyProps(
|
|
1131
|
+
buildNotifyProps(e, t) {
|
|
1122
1132
|
let a = "", o = "", i, r, c;
|
|
1123
|
-
typeof
|
|
1133
|
+
typeof t == "string" ? a = t : t && (a = t.message || "", o = t.title || "", r = t.position || null, c = t.showCloseButton != null ? t.showCloseButton : null, i = t.timeout != null ? t.timeout : null);
|
|
1124
1134
|
const s = {
|
|
1125
1135
|
options: {
|
|
1126
|
-
type:
|
|
1136
|
+
type: e,
|
|
1127
1137
|
message: a,
|
|
1128
1138
|
title: o
|
|
1129
1139
|
}
|
|
1130
1140
|
};
|
|
1131
1141
|
return r != null && (s.position = r), c != null && (s.showCloseButton = c), i != null && (s.timeout = i), s;
|
|
1132
1142
|
}
|
|
1133
|
-
info(
|
|
1134
|
-
const
|
|
1135
|
-
return this.show(
|
|
1143
|
+
info(e) {
|
|
1144
|
+
const t = this.buildNotifyProps("info", e);
|
|
1145
|
+
return this.show(t);
|
|
1136
1146
|
}
|
|
1137
|
-
success(
|
|
1138
|
-
const
|
|
1139
|
-
return this.show(
|
|
1147
|
+
success(e) {
|
|
1148
|
+
const t = this.buildNotifyProps("success", e);
|
|
1149
|
+
return this.show(t);
|
|
1140
1150
|
}
|
|
1141
|
-
warning(
|
|
1142
|
-
const
|
|
1143
|
-
return this.show(
|
|
1151
|
+
warning(e) {
|
|
1152
|
+
const t = this.buildNotifyProps("warning", e);
|
|
1153
|
+
return this.show(t);
|
|
1144
1154
|
}
|
|
1145
|
-
error(
|
|
1146
|
-
const
|
|
1147
|
-
return this.show(
|
|
1155
|
+
error(e) {
|
|
1156
|
+
const t = this.buildNotifyProps("error", e);
|
|
1157
|
+
return this.show(t);
|
|
1148
1158
|
}
|
|
1149
|
-
close(
|
|
1150
|
-
|
|
1159
|
+
close(e) {
|
|
1160
|
+
e && e.unmount();
|
|
1151
1161
|
}
|
|
1152
1162
|
closeAll() {
|
|
1153
|
-
this.notifyRefs.forEach((
|
|
1154
|
-
|
|
1163
|
+
this.notifyRefs.forEach((e) => {
|
|
1164
|
+
e == null || e.value.closeToast();
|
|
1155
1165
|
}), this.notifyRefs.length = 0;
|
|
1156
1166
|
}
|
|
1157
1167
|
}
|
|
1158
1168
|
const Qa = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
1159
1169
|
Ft.install = (n) => {
|
|
1160
1170
|
n.component(Ft.name, Ft), n.component(Ht.name, Ht);
|
|
1161
|
-
const
|
|
1162
|
-
n.provide(Qa,
|
|
1171
|
+
const e = new Et();
|
|
1172
|
+
n.provide(Qa, e), n.provide("FNotifyService", e);
|
|
1163
1173
|
};
|
|
1164
1174
|
const Za = {
|
|
1165
1175
|
designerHostService: { type: Object, default: {} },
|
|
@@ -1169,34 +1179,34 @@ const Za = {
|
|
|
1169
1179
|
bindingEntityId: { type: String, default: "" },
|
|
1170
1180
|
/** 绑定步骤 */
|
|
1171
1181
|
steps: { type: Array, default: ["selectEntity", "selectFields"] }
|
|
1172
|
-
},
|
|
1173
|
-
["appearance",
|
|
1182
|
+
}, vo = /* @__PURE__ */ new Map([
|
|
1183
|
+
["appearance", _o],
|
|
1174
1184
|
["column", "columnOption"]
|
|
1175
1185
|
]);
|
|
1176
|
-
function Ka(n,
|
|
1186
|
+
function Ka(n, e, t) {
|
|
1177
1187
|
var f;
|
|
1178
|
-
const a =
|
|
1179
|
-
s.id = `${
|
|
1188
|
+
const a = t.parentComponentInstance, o = a.schema.type, i = String(((f = a.schema.appearance) == null ? void 0 : f.class) || "").split(" "), r = o === "section" || o === "tab-page", c = i.includes("f-page-content-nav"), d = i.includes("f-page-main"), s = n.getSchemaByType("component");
|
|
1189
|
+
s.id = `${e.id}-component`, s.componentType = "data-grid";
|
|
1180
1190
|
let h = "";
|
|
1181
1191
|
return h += r ? "f-struct-data-grid-in-card f-struct-is-subgrid" : "", h += c ? "f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column" : "", h += d ? "f-struct-data-grid f-struct-wrapper" : "", s.appearance = {
|
|
1182
1192
|
class: h
|
|
1183
|
-
}, s.contents = [
|
|
1193
|
+
}, s.contents = [e], s;
|
|
1184
1194
|
}
|
|
1185
|
-
function er(n,
|
|
1186
|
-
const a =
|
|
1187
|
-
c.id = `${
|
|
1195
|
+
function er(n, e, t) {
|
|
1196
|
+
const a = t.parentComponentInstance, o = String(a.schema.appearance.class || "").split(" "), i = o.includes("f-page-content-nav"), r = o.includes("f-page-main"), c = n.getSchemaByType("section");
|
|
1197
|
+
c.id = `${e.id}-section`;
|
|
1188
1198
|
let d = "";
|
|
1189
|
-
return d += i ? "f-section-in-nav " : "", d += r ? "f-section-in-managelist " : "", d += "f-section-grid", c.appearance = { class: d }, c.contents = [
|
|
1199
|
+
return d += i ? "f-section-in-nav " : "", d += r ? "f-section-in-managelist " : "", d += "f-section-grid", c.appearance = { class: d }, c.contents = [e], c;
|
|
1190
1200
|
}
|
|
1191
|
-
function tr(n,
|
|
1201
|
+
function tr(n, e, t) {
|
|
1192
1202
|
const a = n.getSchemaByType("content-container");
|
|
1193
|
-
return a.id = `${
|
|
1203
|
+
return a.id = `${e.id}-layout`, a.appearance = { class: "f-grid-is-sub f-utils-flex-column" }, a.contents = [e], a;
|
|
1194
1204
|
}
|
|
1195
|
-
function
|
|
1196
|
-
const o =
|
|
1197
|
-
|
|
1198
|
-
const c = (i ? tr : er)(n,
|
|
1199
|
-
return Ka(n, c,
|
|
1205
|
+
function go(n, e, t) {
|
|
1206
|
+
const o = t.parentComponentInstance.schema.type, i = o === "section" || o === "tab-page";
|
|
1207
|
+
e.appearance = { class: "f-component-grid" };
|
|
1208
|
+
const c = (i ? tr : er)(n, e, t);
|
|
1209
|
+
return Ka(n, c, t);
|
|
1200
1210
|
}
|
|
1201
1211
|
const nr = "https://json-schema.org/draft/2020-12/schema", or = "https://farris-design.gitee.io/tree-grid.schema.json", ar = "tree-grid", rr = "A Farris Data Grid Component", ir = "object", lr = {
|
|
1202
1212
|
id: {
|
|
@@ -1978,7 +1988,7 @@ const nr = "https://json-schema.org/draft/2020-12/schema", or = "https://farris-
|
|
|
1978
1988
|
], cr = {
|
|
1979
1989
|
onSelectionChange: "行切换事件",
|
|
1980
1990
|
onClickRow: "行点击事件"
|
|
1981
|
-
},
|
|
1991
|
+
}, yo = {
|
|
1982
1992
|
$schema: nr,
|
|
1983
1993
|
$id: or,
|
|
1984
1994
|
title: ar,
|
|
@@ -1987,7 +1997,7 @@ const nr = "https://json-schema.org/draft/2020-12/schema", or = "https://farris-
|
|
|
1987
1997
|
properties: lr,
|
|
1988
1998
|
required: sr,
|
|
1989
1999
|
events: cr
|
|
1990
|
-
},
|
|
2000
|
+
}, Ut = {
|
|
1991
2001
|
/** 自动勾选子节点 */
|
|
1992
2002
|
autoCheckChildren: { type: Boolean, default: !1 },
|
|
1993
2003
|
/** 列集合 */
|
|
@@ -2117,13 +2127,13 @@ const nr = "https://json-schema.org/draft/2020-12/schema", or = "https://farris-
|
|
|
2117
2127
|
/** 启用虚拟渲染 */
|
|
2118
2128
|
virtualized: { type: Boolean, default: !1 }
|
|
2119
2129
|
};
|
|
2120
|
-
yt(
|
|
2121
|
-
_o();
|
|
2130
|
+
yt(Ut, yo, vo, go);
|
|
2122
2131
|
qo();
|
|
2123
|
-
|
|
2124
|
-
|
|
2132
|
+
Go();
|
|
2133
|
+
const ur = Object.assign({}, Ut, { componentId: { type: String, default: "" } });
|
|
2134
|
+
yt(ur, yo, vo, go);
|
|
2125
2135
|
Uo();
|
|
2126
|
-
function dr(n,
|
|
2136
|
+
function dr(n, e, t, a, o, i, r, c, d, s, h, f, u, l, p, b, D) {
|
|
2127
2137
|
const {
|
|
2128
2138
|
calculateCellPositionInRow: B
|
|
2129
2139
|
} = i, {
|
|
@@ -2136,7 +2146,7 @@ function dr(n, t, e, a, o, i, r, c, d, s, h, f, u, l, p, b, D) {
|
|
|
2136
2146
|
rightFixedGridDataStyle: w
|
|
2137
2147
|
} = l, {
|
|
2138
2148
|
renderDataRow: g
|
|
2139
|
-
} =
|
|
2149
|
+
} = Yo(n, e, j, D, c, d, s, h, f, u, l, p, b), M = [g];
|
|
2140
2150
|
function k(P, W) {
|
|
2141
2151
|
const L = B(P);
|
|
2142
2152
|
return D.value.filter((E) => E.visible !== !1).map((E, I) => M[E.type](E, L, W, I));
|
|
@@ -2152,7 +2162,7 @@ function dr(n, t, e, a, o, i, r, c, d, s, h, f, u, l, p, b, D) {
|
|
|
2152
2162
|
}
|
|
2153
2163
|
function Y() {
|
|
2154
2164
|
return v("div", {
|
|
2155
|
-
ref:
|
|
2165
|
+
ref: t,
|
|
2156
2166
|
class: "fv-grid-content-primary"
|
|
2157
2167
|
}, [v("div", {
|
|
2158
2168
|
class: "fv-grid-data",
|
|
@@ -2178,78 +2188,78 @@ function dr(n, t, e, a, o, i, r, c, d, s, h, f, u, l, p, b, D) {
|
|
|
2178
2188
|
}
|
|
2179
2189
|
const zt = /* @__PURE__ */ Te({
|
|
2180
2190
|
name: "FTreeGrid",
|
|
2181
|
-
props:
|
|
2191
|
+
props: Ut,
|
|
2182
2192
|
emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode"],
|
|
2183
|
-
setup(n,
|
|
2193
|
+
setup(n, e) {
|
|
2184
2194
|
var Se, ye;
|
|
2185
|
-
const a = ((Se = n.rowOption) == null ? void 0 : Se.height) || 28, o = m(20), i = m(n.columns), r =
|
|
2195
|
+
const a = ((Se = n.rowOption) == null ? void 0 : Se.height) || 28, o = m(20), i = m(n.columns), r = Xo(n), {
|
|
2186
2196
|
idField: c
|
|
2187
|
-
} = r, d = m(), s = m(), h = m(), f = m(), u = m(), l = m([]), p = m(!1), b = m(((ye = n.rowOption) == null ? void 0 : ye.wrapContent) || !1), D =
|
|
2197
|
+
} = r, d = m(), s = m(), h = m(), f = m(), u = m(), l = m([]), p = m(!1), b = m(((ye = n.rowOption) == null ? void 0 : ye.wrapContent) || !1), D = Jo(n, r), B = Qo(), j = Zo(n), {
|
|
2188
2198
|
collapseField: T
|
|
2189
2199
|
} = j, {
|
|
2190
2200
|
showLoading: F,
|
|
2191
2201
|
renderLoading: y
|
|
2192
|
-
} =
|
|
2202
|
+
} = Ko(n, d), S = ea(n, /* @__PURE__ */ new Map(), B, j, r), {
|
|
2193
2203
|
dataView: w
|
|
2194
|
-
} = S, g =
|
|
2204
|
+
} = S, g = ta(n, S, r, l, e), M = na(n, l, S, r, g, e), k = U(() => n.disabled), C = U(() => n.virtualized ? Math.min(S.dataView.value.length, o.value) : S.dataView.value.length), {
|
|
2195
2205
|
containerStyleObject: Y
|
|
2196
|
-
} =
|
|
2206
|
+
} = oa(n), te = aa(n), {
|
|
2197
2207
|
applyCommands: O
|
|
2198
2208
|
} = te;
|
|
2199
2209
|
O(i);
|
|
2200
|
-
const P =
|
|
2210
|
+
const P = ra(n), W = ia(n), {
|
|
2201
2211
|
applyColumnSorter: L,
|
|
2202
2212
|
columnContext: E,
|
|
2203
2213
|
updateColumnRenderContext: I
|
|
2204
2214
|
} = P;
|
|
2205
2215
|
L(S, W);
|
|
2206
|
-
const A =
|
|
2216
|
+
const A = la(n, E), V = sa(n, e, g, r), $ = ca(n, e, r, V, l), oe = ua(n), ue = da(n, $, oe), ne = fa(n, S, $, j, r, oe, ue), be = pa(n, i, S, C, 0, ne), {
|
|
2207
2217
|
getVisualData: Fe
|
|
2208
|
-
} = be, ce =
|
|
2218
|
+
} = be, ce = ma(n, E), Q = va(n, g), {
|
|
2209
2219
|
sidebarWidth: se
|
|
2210
|
-
} = Q, pe =
|
|
2220
|
+
} = Q, pe = ga(n, S, l, E, be, C, 0, se), {
|
|
2211
2221
|
onWheel: tt,
|
|
2212
|
-
dataGridWidth:
|
|
2213
|
-
viewPortHeight:
|
|
2222
|
+
dataGridWidth: Re,
|
|
2223
|
+
viewPortHeight: Ve,
|
|
2214
2224
|
viewPortWidth: Ae,
|
|
2215
2225
|
resetScroll: $e,
|
|
2216
2226
|
updateVisibleRowsOnLatestVisibleScope: We
|
|
2217
|
-
} = pe, He =
|
|
2227
|
+
} = pe, He = ya(n, E, s, Ae, A), {
|
|
2218
2228
|
calculateColumnsSize: Ne
|
|
2219
|
-
} = He, nt =
|
|
2229
|
+
} = He, nt = ha(), it = ba(s, u, S, nt, pe), ot = Ca(n, e, P, S, A, D, pe), lt = U(() => ({
|
|
2220
2230
|
"fv-grid": !0,
|
|
2221
2231
|
"fv-grid-bordered": n.showBorder,
|
|
2222
2232
|
"fv-grid-horizontal-bordered": n.showHorizontalLines,
|
|
2223
2233
|
"fv-datagrid-strip": n.showStripe
|
|
2224
|
-
})), at =
|
|
2234
|
+
})), at = U(() => ({
|
|
2225
2235
|
"fv-grid-content": !0,
|
|
2226
2236
|
"fv-grid-content-hover": p.value,
|
|
2227
2237
|
"fv-grid-wrap-content": b.value
|
|
2228
2238
|
})), {
|
|
2229
2239
|
renderDataArea: rt
|
|
2230
|
-
} = dr(n,
|
|
2240
|
+
} = dr(n, e, h, f, u, ce, P, S, $, j, V, g, M, pe, be, oe, l), {
|
|
2231
2241
|
renderGridHeader: N,
|
|
2232
2242
|
renderGridColumnResizeOverlay: re,
|
|
2233
2243
|
shouldShowHeader: de
|
|
2234
|
-
} =
|
|
2244
|
+
} = wa(n, e, s, f, u, P, S, ot, it, B, nt, He, A, g, Q, W, pe, Ae, l), {
|
|
2235
2245
|
renderDataGridSidebar: De
|
|
2236
|
-
} =
|
|
2246
|
+
} = Sa(n, V, g, Q, pe), {
|
|
2237
2247
|
renderDisableMask: Le
|
|
2238
|
-
} =
|
|
2248
|
+
} = Ta(), {
|
|
2239
2249
|
renderHorizontalScrollbar: st
|
|
2240
|
-
} =
|
|
2250
|
+
} = Fa(n, s, pe), {
|
|
2241
2251
|
renderVerticalScrollbar: ht
|
|
2242
|
-
} =
|
|
2252
|
+
} = xa(n, s, pe);
|
|
2243
2253
|
function ct() {
|
|
2244
2254
|
var K, ae, Ce;
|
|
2245
2255
|
if (s.value && s.value.clientHeight > 0 && ((K = s.value) == null ? void 0 : K.clientWidth) > 0) {
|
|
2246
2256
|
const Be = Math.ceil(s.value.clientHeight / a);
|
|
2247
|
-
Be > o.value && (o.value = Be, We()),
|
|
2257
|
+
Be > o.value && (o.value = Be, We()), Ve.value = ((ae = h.value) == null ? void 0 : ae.clientHeight) || 0, Re.value = ((Ce = s.value) == null ? void 0 : Ce.clientWidth) || 0, Ne();
|
|
2248
2258
|
}
|
|
2249
2259
|
}
|
|
2250
|
-
|
|
2251
|
-
s.value && (o.value = Math.max(Math.ceil(s.value.clientHeight / a), o.value), l.value = Fe(0, C.value + 0 - 1),
|
|
2252
|
-
s.value && (
|
|
2260
|
+
Ue(() => {
|
|
2261
|
+
s.value && (o.value = Math.max(Math.ceil(s.value.clientHeight / a), o.value), l.value = Fe(0, C.value + 0 - 1), zo(s.value, ct), Ne(), qt(() => {
|
|
2262
|
+
s.value && (Re.value = s.value.clientWidth), h.value && (Ae.value = h.value.clientWidth, Ve.value = h.value.clientHeight);
|
|
2253
2263
|
})), F.value && y();
|
|
2254
2264
|
}), vt(() => {
|
|
2255
2265
|
}), ve(Ae, () => {
|
|
@@ -2298,25 +2308,25 @@ const zt = /* @__PURE__ */ Te({
|
|
|
2298
2308
|
function Lt(K) {
|
|
2299
2309
|
g.selectItemById(K);
|
|
2300
2310
|
}
|
|
2301
|
-
function
|
|
2311
|
+
function Rt(K) {
|
|
2302
2312
|
const ae = l.value.find((Ce) => Ce.raw[r.idField.value] === K);
|
|
2303
|
-
ae &&
|
|
2313
|
+
ae && V.clickRowItem(ae);
|
|
2304
2314
|
}
|
|
2305
2315
|
function wt(K) {
|
|
2306
|
-
|
|
2316
|
+
V.activeRowById(K);
|
|
2307
2317
|
}
|
|
2308
|
-
function
|
|
2318
|
+
function Vt(K) {
|
|
2309
2319
|
g.selectItemByIds(K);
|
|
2310
2320
|
}
|
|
2311
2321
|
function x() {
|
|
2312
2322
|
return g.getSelectedItems();
|
|
2313
2323
|
}
|
|
2314
|
-
function
|
|
2324
|
+
function R() {
|
|
2315
2325
|
g.clearSelection();
|
|
2316
2326
|
}
|
|
2317
|
-
const
|
|
2327
|
+
const G = U(() => !l.value || !l.value.length), {
|
|
2318
2328
|
renderEmpty: ee
|
|
2319
|
-
} =
|
|
2329
|
+
} = Da(e);
|
|
2320
2330
|
function ie() {
|
|
2321
2331
|
return g.getSelectionRow();
|
|
2322
2332
|
}
|
|
@@ -2364,7 +2374,7 @@ const zt = /* @__PURE__ */ Te({
|
|
|
2364
2374
|
function je() {
|
|
2365
2375
|
return T.value;
|
|
2366
2376
|
}
|
|
2367
|
-
|
|
2377
|
+
e.expose({
|
|
2368
2378
|
activeRowById: wt,
|
|
2369
2379
|
addNewDataItem: Mt,
|
|
2370
2380
|
addNewChildDataItem: kt,
|
|
@@ -2377,21 +2387,21 @@ const zt = /* @__PURE__ */ Te({
|
|
|
2377
2387
|
updateColumns: Ct,
|
|
2378
2388
|
updateDataSource: Pt,
|
|
2379
2389
|
selectItemById: Lt,
|
|
2380
|
-
selectItemByIds:
|
|
2390
|
+
selectItemByIds: Vt,
|
|
2381
2391
|
getSelectedItems: x,
|
|
2382
|
-
clearSelection:
|
|
2392
|
+
clearSelection: R,
|
|
2383
2393
|
getSelectionRow: ie,
|
|
2384
|
-
clickRowItemById:
|
|
2394
|
+
clickRowItemById: Rt,
|
|
2385
2395
|
unSelectItemByIds: le,
|
|
2386
2396
|
getCurrentRowId: Me,
|
|
2387
2397
|
reassignRowData: we,
|
|
2388
2398
|
getCollapseField: je,
|
|
2389
2399
|
getCollapseStatusById: Ee
|
|
2390
2400
|
});
|
|
2391
|
-
const ge =
|
|
2401
|
+
const ge = U(() => {
|
|
2392
2402
|
const K = {};
|
|
2393
2403
|
return pe.shouldShowHorizontalScrollbar.value && (K.paddingBottom = "10px"), pe.shouldShowVirticalScrollbar.value && (K.paddingRight = "10px"), K;
|
|
2394
|
-
}), Pe =
|
|
2404
|
+
}), Pe = U(() => ({
|
|
2395
2405
|
...Y.value,
|
|
2396
2406
|
borderRadius: "5px"
|
|
2397
2407
|
}));
|
|
@@ -2406,12 +2416,12 @@ const zt = /* @__PURE__ */ Te({
|
|
|
2406
2416
|
onMouseover: () => p.value = !0,
|
|
2407
2417
|
onMouseleave: () => p.value = !1,
|
|
2408
2418
|
style: ge.value
|
|
2409
|
-
}, [s.value && De(l), s.value && rt(), s.value &&
|
|
2419
|
+
}, [s.value && De(l), s.value && rt(), s.value && G.value && ee(), s.value && st(), s.value && ht()]), re(), k.value && Le()]);
|
|
2410
2420
|
}
|
|
2411
2421
|
});
|
|
2412
|
-
|
|
2413
|
-
function
|
|
2414
|
-
const { designerHostService:
|
|
2422
|
+
Ho(zt);
|
|
2423
|
+
function ho(n) {
|
|
2424
|
+
const { designerHostService: e } = n, t = /* @__PURE__ */ new Map(), a = m(), o = m(), i = m([
|
|
2415
2425
|
{ field: "name", title: "字段名称" },
|
|
2416
2426
|
{ field: "bindingField", title: "绑定字段" },
|
|
2417
2427
|
{ field: "displayedTypeName", title: "字段类型" }
|
|
@@ -2427,7 +2437,7 @@ function yo(n) {
|
|
|
2427
2437
|
return b.forEach((B) => {
|
|
2428
2438
|
let j = [];
|
|
2429
2439
|
B.type && B.type.fields && B.type.fields.length > 0 && (j = s(B.type.fields));
|
|
2430
|
-
const T = gt(B), F = B.multiLanguage ? "多语言" : B.type.displayName, y = j.length ? !1 : !
|
|
2440
|
+
const T = gt(B), F = B.multiLanguage ? "多语言" : B.type.displayName, y = j.length ? !1 : !t.has(B.id);
|
|
2431
2441
|
y && (c.value = !0), D.push({
|
|
2432
2442
|
data: Object.assign({ displayedTypeName: F, selectable: y }, T),
|
|
2433
2443
|
children: j
|
|
@@ -2446,11 +2456,11 @@ function yo(n) {
|
|
|
2446
2456
|
}
|
|
2447
2457
|
}
|
|
2448
2458
|
function f(b) {
|
|
2449
|
-
if (
|
|
2459
|
+
if (t.clear(), !b)
|
|
2450
2460
|
return;
|
|
2451
2461
|
let D = h(d.value);
|
|
2452
2462
|
["frame", "table", "form"].includes(D) && (D = "form");
|
|
2453
|
-
const { formSchemaUtils: B, schemaService: j } =
|
|
2463
|
+
const { formSchemaUtils: B, schemaService: j } = e;
|
|
2454
2464
|
B.getFormSchema().module.viewmodels.forEach((T) => {
|
|
2455
2465
|
if (!T.fields || T.fields.length === 0)
|
|
2456
2466
|
return;
|
|
@@ -2458,7 +2468,7 @@ function yo(n) {
|
|
|
2458
2468
|
["frame", "table", "form"].includes(y) && (y = "form");
|
|
2459
2469
|
const S = j.getTableInfoByViewModelId(T.id);
|
|
2460
2470
|
y !== D || !S || S.id !== b.id || T.fields.forEach((w) => {
|
|
2461
|
-
|
|
2471
|
+
t.set(w.id, !0);
|
|
2462
2472
|
});
|
|
2463
2473
|
});
|
|
2464
2474
|
}
|
|
@@ -2482,7 +2492,7 @@ function yo(n) {
|
|
|
2482
2492
|
return {
|
|
2483
2493
|
fieldTreeGridRef: o,
|
|
2484
2494
|
resolveFieldDataSource: u,
|
|
2485
|
-
occupiedFieldMap:
|
|
2495
|
+
occupiedFieldMap: t,
|
|
2486
2496
|
fieldDataSource: a,
|
|
2487
2497
|
fieldTreeRowOption: l,
|
|
2488
2498
|
fieldColumns: i,
|
|
@@ -2493,9 +2503,9 @@ function yo(n) {
|
|
|
2493
2503
|
};
|
|
2494
2504
|
}
|
|
2495
2505
|
function fr(n) {
|
|
2496
|
-
const { designerHostService:
|
|
2506
|
+
const { designerHostService: e } = n, t = /* @__PURE__ */ new Map(), a = m(), o = m(), i = m([{ field: "name", title: "实体名称" }]), r = m(), c = m(!1);
|
|
2497
2507
|
function d(p) {
|
|
2498
|
-
const b =
|
|
2508
|
+
const b = ho(n);
|
|
2499
2509
|
return b.resolveFieldDataSource(p), b.hasSelectableField.value ? (r.value = r.value || p, !0) : !1;
|
|
2500
2510
|
}
|
|
2501
2511
|
function s(p) {
|
|
@@ -2506,7 +2516,7 @@ function fr(n) {
|
|
|
2506
2516
|
if (!p)
|
|
2507
2517
|
return;
|
|
2508
2518
|
const D = gt(p), B = b ? `${b}/${D.label}` : "/";
|
|
2509
|
-
|
|
2519
|
+
t.set(D.label, B.replace("//", "/"));
|
|
2510
2520
|
const j = s(D), T = {
|
|
2511
2521
|
data: Object.assign({ selectable: j }, D),
|
|
2512
2522
|
children: []
|
|
@@ -2519,8 +2529,8 @@ function fr(n) {
|
|
|
2519
2529
|
}
|
|
2520
2530
|
function f() {
|
|
2521
2531
|
var B;
|
|
2522
|
-
const { formSchemaUtils: p } =
|
|
2523
|
-
|
|
2532
|
+
const { formSchemaUtils: p } = e, b = (B = p.getFormSchema().module.entity[0]) == null ? void 0 : B.entities[0];
|
|
2533
|
+
t.clear();
|
|
2524
2534
|
const D = h(b);
|
|
2525
2535
|
o.value = [D];
|
|
2526
2536
|
}
|
|
@@ -2537,7 +2547,7 @@ function fr(n) {
|
|
|
2537
2547
|
entityTreeGridRef: a,
|
|
2538
2548
|
entityDataSource: o,
|
|
2539
2549
|
resolveEntityDataSource: f,
|
|
2540
|
-
entityBindToMap:
|
|
2550
|
+
entityBindToMap: t,
|
|
2541
2551
|
checkAndGetSelectedEntity: u,
|
|
2542
2552
|
entityColumns: i,
|
|
2543
2553
|
entityTreeRowOption: {
|
|
@@ -2547,46 +2557,46 @@ function fr(n) {
|
|
|
2547
2557
|
isMainEntityInitialSelected: c
|
|
2548
2558
|
};
|
|
2549
2559
|
}
|
|
2550
|
-
const
|
|
2560
|
+
const bo = {}, Co = {};
|
|
2551
2561
|
function Wt(n) {
|
|
2552
|
-
const { properties:
|
|
2553
|
-
if (
|
|
2554
|
-
const r =
|
|
2562
|
+
const { properties: e, title: t, ignore: a } = n, o = a && Array.isArray(a), i = Object.keys(e).reduce((r, c) => ((!o || !a.find((d) => d === c)) && (r[c] = e[c].type === "object" && e[c].properties ? Wt(e[c]) : gt(e[c].default)), r), {});
|
|
2563
|
+
if (t && (!o || !a.find((r) => r === "id"))) {
|
|
2564
|
+
const r = t.toLowerCase().replace(/-/g, "_");
|
|
2555
2565
|
i.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
2556
2566
|
}
|
|
2557
2567
|
return i;
|
|
2558
2568
|
}
|
|
2559
2569
|
function pr(n) {
|
|
2560
|
-
const { properties:
|
|
2570
|
+
const { properties: e, title: t, required: a } = n;
|
|
2561
2571
|
if (a && Array.isArray(a)) {
|
|
2562
|
-
const o = a.reduce((i, r) => (i[r] =
|
|
2563
|
-
if (
|
|
2564
|
-
const i =
|
|
2572
|
+
const o = a.reduce((i, r) => (i[r] = e[r].type === "object" && e[r].properties ? Wt(e[r]) : gt(e[r].default), i), {});
|
|
2573
|
+
if (t && a.find((i) => i === "id")) {
|
|
2574
|
+
const i = t.toLowerCase().replace(/-/g, "_");
|
|
2565
2575
|
o.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
2566
2576
|
}
|
|
2567
2577
|
return o;
|
|
2568
2578
|
}
|
|
2569
2579
|
return {
|
|
2570
|
-
type:
|
|
2580
|
+
type: t
|
|
2571
2581
|
};
|
|
2572
2582
|
}
|
|
2573
|
-
function Yt(n,
|
|
2574
|
-
const a =
|
|
2583
|
+
function Yt(n, e = {}, t) {
|
|
2584
|
+
const a = bo[n];
|
|
2575
2585
|
if (a) {
|
|
2576
2586
|
let o = pr(a);
|
|
2577
|
-
const i =
|
|
2578
|
-
return o = i ? i({ getSchemaByType: Yt }, o,
|
|
2587
|
+
const i = Co[n];
|
|
2588
|
+
return o = i ? i({ getSchemaByType: Yt }, o, e, t) : o, o;
|
|
2579
2589
|
}
|
|
2580
2590
|
return null;
|
|
2581
2591
|
}
|
|
2582
|
-
function mr(n,
|
|
2583
|
-
const
|
|
2584
|
-
return Object.keys(
|
|
2592
|
+
function mr(n, e) {
|
|
2593
|
+
const t = Wt(e);
|
|
2594
|
+
return Object.keys(t).reduce((a, o) => (Object.prototype.hasOwnProperty.call(n, o) && (a[o] && Zt(a[o]) && Zt(n[o] || !n[o]) ? Object.assign(a[o], n[o] || {}) : a[o] = n[o]), a), t), t;
|
|
2585
2595
|
}
|
|
2586
|
-
function
|
|
2596
|
+
function wo(n, e) {
|
|
2587
2597
|
return Object.keys(n).filter((a) => n[a] != null).reduce((a, o) => {
|
|
2588
|
-
if (
|
|
2589
|
-
const i =
|
|
2598
|
+
if (e.has(o)) {
|
|
2599
|
+
const i = e.get(o);
|
|
2590
2600
|
if (typeof i == "string")
|
|
2591
2601
|
a[i] = n[o];
|
|
2592
2602
|
else {
|
|
@@ -2598,12 +2608,12 @@ function Co(n, t) {
|
|
|
2598
2608
|
return a;
|
|
2599
2609
|
}, {});
|
|
2600
2610
|
}
|
|
2601
|
-
function vr(n,
|
|
2602
|
-
const a = mr(n,
|
|
2603
|
-
return
|
|
2611
|
+
function vr(n, e, t = /* @__PURE__ */ new Map()) {
|
|
2612
|
+
const a = mr(n, e);
|
|
2613
|
+
return wo(a, t);
|
|
2604
2614
|
}
|
|
2605
2615
|
function gr(n = {}) {
|
|
2606
|
-
function
|
|
2616
|
+
function e(s, h, f, u) {
|
|
2607
2617
|
if (typeof f == "number")
|
|
2608
2618
|
return u[s].length === f;
|
|
2609
2619
|
if (typeof f == "object") {
|
|
@@ -2617,12 +2627,12 @@ function gr(n = {}) {
|
|
|
2617
2627
|
}
|
|
2618
2628
|
return !1;
|
|
2619
2629
|
}
|
|
2620
|
-
function
|
|
2630
|
+
function t(s, h, f, u) {
|
|
2621
2631
|
return u[s] && u[s].propertyValue && String(u[s].propertyValue.value) === String(f);
|
|
2622
2632
|
}
|
|
2623
2633
|
const a = /* @__PURE__ */ new Map([
|
|
2624
|
-
["length",
|
|
2625
|
-
["getProperty",
|
|
2634
|
+
["length", e],
|
|
2635
|
+
["getProperty", t]
|
|
2626
2636
|
]);
|
|
2627
2637
|
Object.keys(n).reduce((s, h) => (s.set(h, n[h]), s), a);
|
|
2628
2638
|
function o(s, h) {
|
|
@@ -2703,22 +2713,22 @@ const xe = {
|
|
|
2703
2713
|
"filter-bar": { type: "filter-bar", name: "筛选条" }
|
|
2704
2714
|
}, yr = {}, hr = {};
|
|
2705
2715
|
gr();
|
|
2706
|
-
function
|
|
2707
|
-
return
|
|
2716
|
+
function So(n, e, t = /* @__PURE__ */ new Map(), a = (r, c, d, s) => c, o = {}, i = (r) => r) {
|
|
2717
|
+
return bo[e.title] = e, Co[e.title] = a, yr[e.title] = o, hr[e.title] = i, (r = {}, c = !0) => {
|
|
2708
2718
|
if (!c)
|
|
2709
|
-
return
|
|
2710
|
-
const d = vr(r,
|
|
2719
|
+
return wo(r, t);
|
|
2720
|
+
const d = vr(r, e, t), s = Object.keys(n).reduce((h, f) => (h[f] = n[f].default, h), {});
|
|
2711
2721
|
return Object.assign(s, d);
|
|
2712
2722
|
};
|
|
2713
2723
|
}
|
|
2714
|
-
function
|
|
2715
|
-
return { customClass:
|
|
2724
|
+
function To(n, e) {
|
|
2725
|
+
return { customClass: e.class, customStyle: e.style };
|
|
2716
2726
|
}
|
|
2717
2727
|
const br = /* @__PURE__ */ new Map([
|
|
2718
|
-
["appearance",
|
|
2728
|
+
["appearance", To]
|
|
2719
2729
|
]);
|
|
2720
|
-
function Cr(n,
|
|
2721
|
-
return
|
|
2730
|
+
function Cr(n, e, t) {
|
|
2731
|
+
return e;
|
|
2722
2732
|
}
|
|
2723
2733
|
const wr = "https://json-schema.org/draft/2020-12/schema", Sr = "https://farris-design.gitee.io/step.schema.json", Tr = "step", Fr = "A Farris Component", xr = "object", Dr = {
|
|
2724
2734
|
id: {
|
|
@@ -2820,7 +2830,7 @@ const wr = "https://json-schema.org/draft/2020-12/schema", Sr = "https://farris-
|
|
|
2820
2830
|
description: Mr,
|
|
2821
2831
|
type: kr,
|
|
2822
2832
|
categories: Or
|
|
2823
|
-
},
|
|
2833
|
+
}, Fo = {
|
|
2824
2834
|
/** 步骤条方向 */
|
|
2825
2835
|
direction: { type: String, default: "horizontal" },
|
|
2826
2836
|
/** 是否平铺 */
|
|
@@ -2851,19 +2861,19 @@ const wr = "https://json-schema.org/draft/2020-12/schema", Sr = "https://farris-
|
|
|
2851
2861
|
onClick: { type: Function, default: () => {
|
|
2852
2862
|
} }
|
|
2853
2863
|
};
|
|
2854
|
-
|
|
2864
|
+
So(Fo, Br, br, Cr, Nr);
|
|
2855
2865
|
const jr = /* @__PURE__ */ Te({
|
|
2856
2866
|
name: "FStep",
|
|
2857
|
-
props:
|
|
2867
|
+
props: Fo,
|
|
2858
2868
|
emits: ["click"],
|
|
2859
|
-
setup(n,
|
|
2860
|
-
const
|
|
2861
|
-
"f-progress-step-list":
|
|
2862
|
-
"f-progress-step-list-block":
|
|
2863
|
-
"f-progress-step-horizontal-fill":
|
|
2864
|
-
"f-progress-step-vertical-fill":
|
|
2865
|
-
})), d =
|
|
2866
|
-
height:
|
|
2869
|
+
setup(n, e) {
|
|
2870
|
+
const t = m(n.direction), a = m(n.fill), o = m(n.height), i = m(n.steps), r = m(n.activeIndex), c = U(() => ({
|
|
2871
|
+
"f-progress-step-list": t.value === "horizontal",
|
|
2872
|
+
"f-progress-step-list-block": t.value === "vertical",
|
|
2873
|
+
"f-progress-step-horizontal-fill": t.value === "horizontal" && a.value,
|
|
2874
|
+
"f-progress-step-vertical-fill": t.value === "vertical" && a.value
|
|
2875
|
+
})), d = U(() => ({
|
|
2876
|
+
height: t.value === "vertical" ? `${o.value}px` : ""
|
|
2867
2877
|
}));
|
|
2868
2878
|
function s(F, y) {
|
|
2869
2879
|
const S = {
|
|
@@ -2882,7 +2892,7 @@ const jr = /* @__PURE__ */ Te({
|
|
|
2882
2892
|
step: F,
|
|
2883
2893
|
stepIndex: y
|
|
2884
2894
|
};
|
|
2885
|
-
|
|
2895
|
+
e.emit("click", S);
|
|
2886
2896
|
}
|
|
2887
2897
|
function f(F, y) {
|
|
2888
2898
|
const S = {
|
|
@@ -2933,9 +2943,9 @@ const jr = /* @__PURE__ */ Te({
|
|
|
2933
2943
|
function B(F, y) {
|
|
2934
2944
|
return y !== i.value.length - 1;
|
|
2935
2945
|
}
|
|
2936
|
-
const j =
|
|
2946
|
+
const j = U(() => ({
|
|
2937
2947
|
triangle: !0,
|
|
2938
|
-
"":
|
|
2948
|
+
"": t.value === "vertical"
|
|
2939
2949
|
}));
|
|
2940
2950
|
function T() {
|
|
2941
2951
|
return i.value.map((F, y) => v("li", {
|
|
@@ -2961,20 +2971,20 @@ const jr = /* @__PURE__ */ Te({
|
|
|
2961
2971
|
}, [T()])]);
|
|
2962
2972
|
}
|
|
2963
2973
|
});
|
|
2964
|
-
function
|
|
2974
|
+
function Ts(n, e, t) {
|
|
2965
2975
|
var w;
|
|
2966
|
-
const a =
|
|
2976
|
+
const a = t && t.getStyles && t.getStyles() || "", o = t && t.getDesignerClass && t.getDesignerClass() || "", i = m();
|
|
2967
2977
|
function r() {
|
|
2968
|
-
return (
|
|
2978
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
2969
2979
|
}
|
|
2970
2980
|
function c() {
|
|
2971
2981
|
return !1;
|
|
2972
2982
|
}
|
|
2973
2983
|
function d() {
|
|
2974
|
-
return (
|
|
2984
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
2975
2985
|
}
|
|
2976
2986
|
function s() {
|
|
2977
|
-
return (
|
|
2987
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
2978
2988
|
}
|
|
2979
2989
|
function h(g) {
|
|
2980
2990
|
if (!g || !g.value)
|
|
@@ -2984,10 +2994,10 @@ function Ss(n, t, e) {
|
|
|
2984
2994
|
const M = m(g == null ? void 0 : g.value.parent), k = h(M);
|
|
2985
2995
|
return k || null;
|
|
2986
2996
|
}
|
|
2987
|
-
function f(g =
|
|
2997
|
+
function f(g = e) {
|
|
2988
2998
|
var Y;
|
|
2989
|
-
if (
|
|
2990
|
-
return
|
|
2999
|
+
if (t != null && t.getDraggableDesignItemElement)
|
|
3000
|
+
return t.getDraggableDesignItemElement(g);
|
|
2991
3001
|
const { componentInstance: M, designerItemElementRef: k } = g;
|
|
2992
3002
|
if (!M || !M.value)
|
|
2993
3003
|
return null;
|
|
@@ -2995,42 +3005,42 @@ function Ss(n, t, e) {
|
|
|
2995
3005
|
return M.value.canMove || C && ((Y = C()) != null && Y.length) ? k : f(g.parent);
|
|
2996
3006
|
}
|
|
2997
3007
|
function u(g) {
|
|
2998
|
-
return !!
|
|
3008
|
+
return !!t && t.canAccepts(g);
|
|
2999
3009
|
}
|
|
3000
3010
|
function l() {
|
|
3001
|
-
return (
|
|
3011
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
3002
3012
|
}
|
|
3003
3013
|
function p() {
|
|
3004
3014
|
}
|
|
3005
3015
|
function b(g, M) {
|
|
3006
3016
|
var k;
|
|
3007
|
-
!g || !M || (
|
|
3017
|
+
!g || !M || (t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(g, M), (k = e == null ? void 0 : e.setupContext) == null || k.emit("dragEnd"));
|
|
3008
3018
|
}
|
|
3009
3019
|
function D(g, M) {
|
|
3010
3020
|
const { componentType: k } = g;
|
|
3011
3021
|
let C = Yt(k, g, M);
|
|
3012
|
-
|
|
3022
|
+
t && t.onResolveNewComponentSchema && (C = t.onResolveNewComponentSchema(g, C));
|
|
3013
3023
|
const Y = k.toLowerCase().replace(/-/g, "_");
|
|
3014
3024
|
return C && !C.id && C.type === k && (C.id = `${Y}_${Math.random().toString().slice(2, 6)}`), C;
|
|
3015
3025
|
}
|
|
3016
3026
|
function B(g) {
|
|
3017
|
-
g &&
|
|
3027
|
+
g && t != null && t.onChildElementMovedOut && t.onChildElementMovedOut(g);
|
|
3018
3028
|
}
|
|
3019
3029
|
function j(...g) {
|
|
3020
|
-
if (
|
|
3021
|
-
return
|
|
3030
|
+
if (t && t.getPropsConfig)
|
|
3031
|
+
return t.getPropsConfig(...g);
|
|
3022
3032
|
}
|
|
3023
3033
|
function T(g) {
|
|
3024
3034
|
if (!g)
|
|
3025
3035
|
return;
|
|
3026
|
-
const M =
|
|
3036
|
+
const M = e == null ? void 0 : e.schema, { formSchemaUtils: k } = g;
|
|
3027
3037
|
if (M && k.getExpressions().length) {
|
|
3028
3038
|
const C = k.getExpressions().findIndex((Y) => Y.target === M.id);
|
|
3029
3039
|
C > -1 && k.getExpressions().splice(C, 1);
|
|
3030
3040
|
}
|
|
3031
3041
|
}
|
|
3032
3042
|
function F(g) {
|
|
3033
|
-
|
|
3043
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), T(g), e != null && e.schema.contents && e.schema.contents.map((M) => {
|
|
3034
3044
|
let k = M.id;
|
|
3035
3045
|
M.type === "component-ref" && (k = M.component);
|
|
3036
3046
|
const C = n.value.querySelectorAll(`#${k}-design-item`);
|
|
@@ -3041,22 +3051,22 @@ function Ss(n, t, e) {
|
|
|
3041
3051
|
});
|
|
3042
3052
|
}
|
|
3043
3053
|
function y() {
|
|
3044
|
-
if (
|
|
3045
|
-
return
|
|
3054
|
+
if (t && t.getCustomButtons)
|
|
3055
|
+
return t.getCustomButtons();
|
|
3046
3056
|
}
|
|
3047
3057
|
function S(g) {
|
|
3048
|
-
if (
|
|
3049
|
-
return
|
|
3058
|
+
if (t && t.onPropertyChanged)
|
|
3059
|
+
return t.onPropertyChanged(g);
|
|
3050
3060
|
}
|
|
3051
3061
|
return i.value = {
|
|
3052
3062
|
canMove: r(),
|
|
3053
3063
|
canSelectParent: c(),
|
|
3054
3064
|
canDelete: d(),
|
|
3055
3065
|
canNested: !s(),
|
|
3056
|
-
contents:
|
|
3066
|
+
contents: e == null ? void 0 : e.schema.contents,
|
|
3057
3067
|
elementRef: n,
|
|
3058
|
-
parent: (w =
|
|
3059
|
-
schema:
|
|
3068
|
+
parent: (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance,
|
|
3069
|
+
schema: e == null ? void 0 : e.schema,
|
|
3060
3070
|
styles: a,
|
|
3061
3071
|
designerClass: o,
|
|
3062
3072
|
canAccepts: u,
|
|
@@ -3068,112 +3078,112 @@ function Ss(n, t, e) {
|
|
|
3068
3078
|
onAcceptMovedChildElement: b,
|
|
3069
3079
|
onChildElementMovedOut: B,
|
|
3070
3080
|
addNewChildComponentSchema: D,
|
|
3071
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
3072
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
3081
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || m(!1),
|
|
3082
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || m(!1),
|
|
3073
3083
|
onRemoveComponent: F,
|
|
3074
3084
|
getCustomButtons: y,
|
|
3075
3085
|
onPropertyChanged: S
|
|
3076
3086
|
}, i;
|
|
3077
3087
|
}
|
|
3078
3088
|
const Xt = /* @__PURE__ */ new Map([
|
|
3079
|
-
["appearance",
|
|
3089
|
+
["appearance", To]
|
|
3080
3090
|
]), Pr = /* @__PURE__ */ new Map([]), Lr = "root-viewmodel";
|
|
3081
|
-
class
|
|
3082
|
-
constructor(
|
|
3091
|
+
class Rr {
|
|
3092
|
+
constructor(e, t) {
|
|
3083
3093
|
Ie(this, "formSchemaUtils");
|
|
3084
3094
|
Ie(this, "controlCreatorUtils");
|
|
3085
3095
|
Ie(this, "designViewModelUtils");
|
|
3086
|
-
this.resolver =
|
|
3087
|
-
}
|
|
3088
|
-
createComponent(
|
|
3089
|
-
const
|
|
3090
|
-
return i.module.viewmodels.push(o), i.module.components.push(a), this.designViewModelUtils.assembleDesignViewModel(),
|
|
3091
|
-
}
|
|
3092
|
-
createComponentRefNode(
|
|
3093
|
-
const
|
|
3094
|
-
return Object.assign(
|
|
3095
|
-
id: `${
|
|
3096
|
-
component: `${
|
|
3097
|
-
}),
|
|
3098
|
-
}
|
|
3099
|
-
createComponentNode(
|
|
3100
|
-
const
|
|
3101
|
-
return Object.assign(
|
|
3102
|
-
id: `${
|
|
3103
|
-
viewModel: `${
|
|
3104
|
-
componentType:
|
|
3096
|
+
this.resolver = e, this.designerHostService = t, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
3097
|
+
}
|
|
3098
|
+
createComponent(e) {
|
|
3099
|
+
const t = this.createComponentRefNode(e), a = this.createComponentNode(e), o = this.createViewModeNode(e), i = this.formSchemaUtils.getFormSchema();
|
|
3100
|
+
return i.module.viewmodels.push(o), i.module.components.push(a), this.designViewModelUtils.assembleDesignViewModel(), t;
|
|
3101
|
+
}
|
|
3102
|
+
createComponentRefNode(e) {
|
|
3103
|
+
const t = this.resolver.getSchemaByType("component-ref");
|
|
3104
|
+
return Object.assign(t, {
|
|
3105
|
+
id: `${e.componentId}-component-ref`,
|
|
3106
|
+
component: `${e.componentId}-component`
|
|
3107
|
+
}), t;
|
|
3108
|
+
}
|
|
3109
|
+
createComponentNode(e) {
|
|
3110
|
+
const t = this.resolver.getSchemaByType("component"), a = this.createFormComponentContents(e);
|
|
3111
|
+
return Object.assign(t, {
|
|
3112
|
+
id: `${e.componentId}-component`,
|
|
3113
|
+
viewModel: `${e.componentId}-component-viewmodel`,
|
|
3114
|
+
componentType: e.componentType,
|
|
3105
3115
|
appearance: {
|
|
3106
3116
|
class: this.getFormComponentClass()
|
|
3107
3117
|
},
|
|
3108
|
-
formColumns:
|
|
3118
|
+
formColumns: e.formColumns,
|
|
3109
3119
|
contents: a
|
|
3110
|
-
}),
|
|
3120
|
+
}), t;
|
|
3111
3121
|
}
|
|
3112
3122
|
/**
|
|
3113
3123
|
* 获取卡片组件层级的class样式
|
|
3114
3124
|
*/
|
|
3115
3125
|
getFormComponentClass() {
|
|
3116
|
-
const { templateId:
|
|
3117
|
-
return
|
|
3126
|
+
const { templateId: e } = this.formSchemaUtils.getFormSchema().module;
|
|
3127
|
+
return e === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
3118
3128
|
}
|
|
3119
|
-
createFormComponentContents(
|
|
3120
|
-
const
|
|
3121
|
-
Object.assign(
|
|
3122
|
-
id:
|
|
3129
|
+
createFormComponentContents(e) {
|
|
3130
|
+
const t = this.resolver.getSchemaByType("section");
|
|
3131
|
+
Object.assign(t, {
|
|
3132
|
+
id: e.componentId + "-form-section",
|
|
3123
3133
|
appearance: {
|
|
3124
3134
|
class: "f-section-form f-section-in-mainsubcard"
|
|
3125
3135
|
},
|
|
3126
|
-
mainTitle:
|
|
3136
|
+
mainTitle: e.componentName
|
|
3127
3137
|
});
|
|
3128
3138
|
const a = this.resolver.getSchemaByType("response-form"), o = [];
|
|
3129
3139
|
Object.assign(a, {
|
|
3130
|
-
id:
|
|
3140
|
+
id: e.componentId + "-form",
|
|
3131
3141
|
appearance: {
|
|
3132
3142
|
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
3133
3143
|
},
|
|
3134
3144
|
contents: o
|
|
3135
|
-
}),
|
|
3136
|
-
const { selectedFields: i } =
|
|
3145
|
+
}), t.contents = [a];
|
|
3146
|
+
const { selectedFields: i } = e;
|
|
3137
3147
|
i == null || i.forEach((c) => {
|
|
3138
|
-
const d = gt(c), s = this.resolveControlClassByFormColumns(
|
|
3148
|
+
const d = gt(c), s = this.resolveControlClassByFormColumns(e), h = this.controlCreatorUtils.setFormFieldProperty(d, "", s);
|
|
3139
3149
|
h && o.push(h);
|
|
3140
3150
|
});
|
|
3141
3151
|
const { templateId: r } = this.formSchemaUtils.getFormSchema().module;
|
|
3142
|
-
return r === "double-list-in-tab-template" && (
|
|
3152
|
+
return r === "double-list-in-tab-template" && (t.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", t.fill = !0), [t];
|
|
3143
3153
|
}
|
|
3144
|
-
resolveControlClassByFormColumns(
|
|
3145
|
-
let
|
|
3146
|
-
switch (
|
|
3154
|
+
resolveControlClassByFormColumns(e) {
|
|
3155
|
+
let t = "";
|
|
3156
|
+
switch (e.formColumns) {
|
|
3147
3157
|
case 1: {
|
|
3148
|
-
|
|
3158
|
+
t = "col-12";
|
|
3149
3159
|
break;
|
|
3150
3160
|
}
|
|
3151
3161
|
case 2: {
|
|
3152
|
-
|
|
3162
|
+
t = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
3153
3163
|
break;
|
|
3154
3164
|
}
|
|
3155
3165
|
case 3: {
|
|
3156
|
-
|
|
3166
|
+
t = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
3157
3167
|
break;
|
|
3158
3168
|
}
|
|
3159
3169
|
case 4: {
|
|
3160
|
-
|
|
3170
|
+
t = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
3161
3171
|
break;
|
|
3162
3172
|
}
|
|
3163
3173
|
}
|
|
3164
|
-
return
|
|
3174
|
+
return t;
|
|
3165
3175
|
}
|
|
3166
3176
|
/**
|
|
3167
3177
|
* 添加viewModel节点
|
|
3168
3178
|
*/
|
|
3169
|
-
createViewModeNode(
|
|
3179
|
+
createViewModeNode(e) {
|
|
3170
3180
|
return {
|
|
3171
|
-
id: `${
|
|
3172
|
-
code: `${
|
|
3173
|
-
name:
|
|
3174
|
-
bindTo:
|
|
3181
|
+
id: `${e.componentId}-component-viewmodel`,
|
|
3182
|
+
code: `${e.componentId}-component-viewmodel`,
|
|
3183
|
+
name: e.componentName,
|
|
3184
|
+
bindTo: e.bindTo,
|
|
3175
3185
|
parent: Lr,
|
|
3176
|
-
fields: this.assembleViewModelFields(
|
|
3186
|
+
fields: this.assembleViewModelFields(e),
|
|
3177
3187
|
commands: [],
|
|
3178
3188
|
states: [],
|
|
3179
3189
|
enableValidation: !0
|
|
@@ -3182,12 +3192,12 @@ class Vr {
|
|
|
3182
3192
|
/**
|
|
3183
3193
|
* 组装viewModel fields 节点
|
|
3184
3194
|
*/
|
|
3185
|
-
assembleViewModelFields(
|
|
3186
|
-
const
|
|
3195
|
+
assembleViewModelFields(e) {
|
|
3196
|
+
const t = [], { selectedFields: a } = e;
|
|
3187
3197
|
return a == null || a.forEach((o) => {
|
|
3188
3198
|
let i = "blur";
|
|
3189
3199
|
const r = o.type.name;
|
|
3190
|
-
(r === en.Enum || r === en.Boolean) && (i = "change"),
|
|
3200
|
+
(r === en.Enum || r === en.Boolean) && (i = "change"), t.push({
|
|
3191
3201
|
type: "Form",
|
|
3192
3202
|
id: o.id,
|
|
3193
3203
|
fieldName: o.bindingField,
|
|
@@ -3196,30 +3206,30 @@ class Vr {
|
|
|
3196
3206
|
updateOn: i,
|
|
3197
3207
|
fieldSchema: {}
|
|
3198
3208
|
});
|
|
3199
|
-
}),
|
|
3209
|
+
}), t;
|
|
3200
3210
|
}
|
|
3201
3211
|
}
|
|
3202
|
-
function
|
|
3212
|
+
function Vr(n, e, t, a) {
|
|
3203
3213
|
var i, r, c, d, s, h;
|
|
3204
|
-
const o =
|
|
3214
|
+
const o = t.parentComponentInstance;
|
|
3205
3215
|
if (o && a) {
|
|
3206
3216
|
const f = (i = o.schema) == null ? void 0 : i.type, l = {
|
|
3207
3217
|
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
3208
|
-
componentName: ((r =
|
|
3218
|
+
componentName: ((r = t.bindingSourceContext) == null ? void 0 : r.entityTitle) || ((d = (c = t.bindingSourceContext) == null ? void 0 : c.bindingEntity) == null ? void 0 : d.name) || "标题",
|
|
3209
3219
|
componentType: "form",
|
|
3210
3220
|
formColumns: f === "splitter-pane" ? 1 : 4,
|
|
3211
3221
|
parentContainerId: o.schema.id,
|
|
3212
|
-
bindTo: ((s =
|
|
3213
|
-
selectedFields: (h =
|
|
3222
|
+
bindTo: ((s = t.bindingSourceContext) == null ? void 0 : s.bindTo) || "/",
|
|
3223
|
+
selectedFields: (h = t.bindingSourceContext) == null ? void 0 : h.bindingEntityFields
|
|
3214
3224
|
};
|
|
3215
|
-
return new
|
|
3225
|
+
return new Rr(n, a).createComponent(l);
|
|
3216
3226
|
} else
|
|
3217
|
-
return
|
|
3227
|
+
return e;
|
|
3218
3228
|
}
|
|
3219
|
-
function Ar(n,
|
|
3220
|
-
return
|
|
3229
|
+
function Ar(n, e, t) {
|
|
3230
|
+
return e;
|
|
3221
3231
|
}
|
|
3222
|
-
const $r = "https://json-schema.org/draft/2020-12/schema", Hr = "https://farris-design.gitee.io/response-form.schema.json", zr = "response-form", _r = "A Farris Data Collection Component", qr = "object",
|
|
3232
|
+
const $r = "https://json-schema.org/draft/2020-12/schema", Hr = "https://farris-design.gitee.io/response-form.schema.json", zr = "response-form", _r = "A Farris Data Collection Component", qr = "object", Gr = {
|
|
3223
3233
|
id: {
|
|
3224
3234
|
description: "The unique identifier for a form group",
|
|
3225
3235
|
type: "string"
|
|
@@ -3257,7 +3267,7 @@ const $r = "https://json-schema.org/draft/2020-12/schema", Hr = "https://farris-
|
|
|
3257
3267
|
type: "boolean",
|
|
3258
3268
|
default: !1
|
|
3259
3269
|
}
|
|
3260
|
-
},
|
|
3270
|
+
}, Ur = [
|
|
3261
3271
|
"id",
|
|
3262
3272
|
"type",
|
|
3263
3273
|
"contents"
|
|
@@ -3267,15 +3277,15 @@ const $r = "https://json-schema.org/draft/2020-12/schema", Hr = "https://farris-
|
|
|
3267
3277
|
title: zr,
|
|
3268
3278
|
description: _r,
|
|
3269
3279
|
type: qr,
|
|
3270
|
-
properties:
|
|
3271
|
-
required:
|
|
3280
|
+
properties: Gr,
|
|
3281
|
+
required: Ur
|
|
3272
3282
|
}, Yr = {
|
|
3273
3283
|
customClass: { type: String, default: "" },
|
|
3274
3284
|
customStyle: { type: String, defaut: "" },
|
|
3275
3285
|
/** 控制是否可见 */
|
|
3276
3286
|
visible: { type: Boolean, default: !0 }
|
|
3277
3287
|
};
|
|
3278
|
-
|
|
3288
|
+
So(Yr, Wr, Xt, Vr);
|
|
3279
3289
|
const Xr = "https://json-schema.org/draft/2020-12/schema", Jr = "https://farris-design.gitee.io/form-group.schema.json", Qr = "form-group", Zr = "A Farris Input Component", Kr = "object", ei = {
|
|
3280
3290
|
id: {
|
|
3281
3291
|
description: "The unique identifier for a form group",
|
|
@@ -3342,7 +3352,7 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Jr = "https://farris-
|
|
|
3342
3352
|
"id",
|
|
3343
3353
|
"type",
|
|
3344
3354
|
"editor"
|
|
3345
|
-
],
|
|
3355
|
+
], xo = {
|
|
3346
3356
|
$schema: Xr,
|
|
3347
3357
|
$id: Jr,
|
|
3348
3358
|
title: Qr,
|
|
@@ -3350,7 +3360,7 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Jr = "https://farris-
|
|
|
3350
3360
|
type: Kr,
|
|
3351
3361
|
properties: ei,
|
|
3352
3362
|
required: ti
|
|
3353
|
-
},
|
|
3363
|
+
}, Do = {
|
|
3354
3364
|
id: { type: String, default: "" },
|
|
3355
3365
|
customClass: { type: String, default: "" },
|
|
3356
3366
|
customStyle: { type: String, default: "" },
|
|
@@ -3368,33 +3378,33 @@ const Xr = "https://json-schema.org/draft/2020-12/schema", Jr = "https://farris-
|
|
|
3368
3378
|
errors: { type: Object, default: null }
|
|
3369
3379
|
};
|
|
3370
3380
|
yt(
|
|
3381
|
+
Do,
|
|
3371
3382
|
xo,
|
|
3372
|
-
Fo,
|
|
3373
3383
|
Xt,
|
|
3374
3384
|
void 0
|
|
3375
3385
|
);
|
|
3376
|
-
|
|
3377
|
-
function
|
|
3378
|
-
function n(
|
|
3386
|
+
Wo();
|
|
3387
|
+
function Fs() {
|
|
3388
|
+
function n(e, t) {
|
|
3379
3389
|
var r;
|
|
3380
|
-
if (!
|
|
3390
|
+
if (!e)
|
|
3381
3391
|
return !1;
|
|
3382
|
-
const a = ((r =
|
|
3392
|
+
const a = ((r = e.targetContainer) == null ? void 0 : r.componentInstance) && e.targetContainer.componentInstance.value;
|
|
3383
3393
|
if (!a)
|
|
3384
3394
|
return !1;
|
|
3385
|
-
const o = a.schema.type, i =
|
|
3386
|
-
return !((
|
|
3395
|
+
const o = a.schema.type, i = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
|
|
3396
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![xe["response-layout-item"].type, xe["response-form"].type, xe.fieldset.type].includes(o) || (e.componentType === xe.tabs.type || e.componentType === xe.section.type) && ((i == null ? void 0 : i.componentType) !== "frame" || ![xe["content-container"].type, xe["splitter-pane"].type, xe["response-layout-item"].type].includes(o)) || e.componentType === xe["query-solution"].type || e.componentType === xe.fieldset.type && o !== xe["response-form"].type);
|
|
3387
3397
|
}
|
|
3388
3398
|
return {
|
|
3389
3399
|
basalDragulaRuleForContainer: n
|
|
3390
3400
|
};
|
|
3391
3401
|
}
|
|
3392
|
-
class
|
|
3393
|
-
getTemplateRule(
|
|
3394
|
-
const a =
|
|
3402
|
+
class xs {
|
|
3403
|
+
getTemplateRule(e, t) {
|
|
3404
|
+
const a = t == null ? void 0 : t.formSchemaUtils, o = a == null ? void 0 : a.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
3395
3405
|
if (!o)
|
|
3396
3406
|
return i;
|
|
3397
|
-
const r = this.getComponentContext(
|
|
3407
|
+
const r = this.getComponentContext(e), { componentClassList: c } = r;
|
|
3398
3408
|
return c.forEach((d) => {
|
|
3399
3409
|
if (!d || !o[d])
|
|
3400
3410
|
return;
|
|
@@ -3402,23 +3412,23 @@ class Fs {
|
|
|
3402
3412
|
i.canMove = i.canMove && this.resolveRuleValue(s, r), i.canDelete = i.canDelete && this.resolveRuleValue(h, r), i.canAccept = i.canAccept && this.resolveRuleValue(f, r);
|
|
3403
3413
|
}), i;
|
|
3404
3414
|
}
|
|
3405
|
-
resolveRuleValue(
|
|
3406
|
-
return typeof
|
|
3415
|
+
resolveRuleValue(e, t) {
|
|
3416
|
+
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
3407
3417
|
}
|
|
3408
|
-
parseRuleValueSchema(
|
|
3409
|
-
const a =
|
|
3418
|
+
parseRuleValueSchema(e, t) {
|
|
3419
|
+
const a = e.invalidContext || [];
|
|
3410
3420
|
let o = !0;
|
|
3411
3421
|
for (const i of a) {
|
|
3412
3422
|
if (i.firstLevelChild) {
|
|
3413
3423
|
if (i.firstLevelChild.class) {
|
|
3414
|
-
const { firstLevelChildClassList: r } =
|
|
3424
|
+
const { firstLevelChildClassList: r } = t;
|
|
3415
3425
|
if (r && !r.includes(i.firstLevelChild.class)) {
|
|
3416
3426
|
o = !1;
|
|
3417
3427
|
continue;
|
|
3418
3428
|
}
|
|
3419
3429
|
}
|
|
3420
3430
|
if (i.firstLevelChild.type) {
|
|
3421
|
-
const { firstLevelChildSchema: r } =
|
|
3431
|
+
const { firstLevelChildSchema: r } = t;
|
|
3422
3432
|
if (!r || r.type !== i.firstLevelChild.type) {
|
|
3423
3433
|
o = !1;
|
|
3424
3434
|
continue;
|
|
@@ -3427,14 +3437,14 @@ class Fs {
|
|
|
3427
3437
|
}
|
|
3428
3438
|
if (i.secondLevelChild) {
|
|
3429
3439
|
if (i.secondLevelChild.class) {
|
|
3430
|
-
const { secondLevelChildClassList: r } =
|
|
3440
|
+
const { secondLevelChildClassList: r } = t;
|
|
3431
3441
|
if (r && !r.includes(i.secondLevelChild.class)) {
|
|
3432
3442
|
o = !1;
|
|
3433
3443
|
continue;
|
|
3434
3444
|
}
|
|
3435
3445
|
}
|
|
3436
3446
|
if (i.secondLevelChild.type) {
|
|
3437
|
-
const { secondLevelChildSchema: r } =
|
|
3447
|
+
const { secondLevelChildSchema: r } = t;
|
|
3438
3448
|
if (!r || r.type !== i.secondLevelChild.type) {
|
|
3439
3449
|
o = !1;
|
|
3440
3450
|
continue;
|
|
@@ -3443,14 +3453,14 @@ class Fs {
|
|
|
3443
3453
|
}
|
|
3444
3454
|
if (i.parent) {
|
|
3445
3455
|
if (i.parent.class) {
|
|
3446
|
-
const { parentClassList: r } =
|
|
3456
|
+
const { parentClassList: r } = t;
|
|
3447
3457
|
if (r && !r.includes(i.parent.class)) {
|
|
3448
3458
|
o = !1;
|
|
3449
3459
|
continue;
|
|
3450
3460
|
}
|
|
3451
3461
|
}
|
|
3452
3462
|
if (i.parent.type) {
|
|
3453
|
-
const { parentSchema: r } =
|
|
3463
|
+
const { parentSchema: r } = t;
|
|
3454
3464
|
if (r && r.type !== i.parent.type) {
|
|
3455
3465
|
o = !1;
|
|
3456
3466
|
continue;
|
|
@@ -3462,9 +3472,9 @@ class Fs {
|
|
|
3462
3472
|
}
|
|
3463
3473
|
return !o;
|
|
3464
3474
|
}
|
|
3465
|
-
getComponentContext(
|
|
3475
|
+
getComponentContext(e) {
|
|
3466
3476
|
var b, D, B, j;
|
|
3467
|
-
const
|
|
3477
|
+
const t = e.schema, a = t.appearance && t.appearance.class || "", o = a.split(" ") || [], i = t.contents || [], r = i.length ? i[0] : null, c = r && r.appearance ? r.appearance.class : "", d = c ? c.split(" ") : [], s = (b = r == null ? void 0 : r.contents) != null && b.length ? r == null ? void 0 : r.contents[0] : null, h = s && s.appearance ? s.appearance.class : "", f = h ? h.split(" ") : [], u = t.type === "component" ? (B = (D = e.parent) == null ? void 0 : D.parent) == null ? void 0 : B.schema : (j = e.parent) == null ? void 0 : j.schema, l = u && u.appearance && u.appearance.class || "", p = l ? l.split(" ") : [];
|
|
3468
3478
|
return {
|
|
3469
3479
|
componentClass: a,
|
|
3470
3480
|
componentClassList: o,
|
|
@@ -3481,9 +3491,9 @@ class Fs {
|
|
|
3481
3491
|
};
|
|
3482
3492
|
}
|
|
3483
3493
|
}
|
|
3484
|
-
const
|
|
3494
|
+
const Eo = m(0);
|
|
3485
3495
|
function ni() {
|
|
3486
|
-
|
|
3496
|
+
Eo.value++;
|
|
3487
3497
|
}
|
|
3488
3498
|
const oi = {
|
|
3489
3499
|
id: { type: String },
|
|
@@ -3496,17 +3506,17 @@ const oi = {
|
|
|
3496
3506
|
name: "FDynamicFormLabel",
|
|
3497
3507
|
props: oi,
|
|
3498
3508
|
emits: [],
|
|
3499
|
-
setup(n,
|
|
3509
|
+
setup(n, e) {
|
|
3500
3510
|
m(n.title || n.text);
|
|
3501
|
-
const
|
|
3511
|
+
const t = m(n.required), a = m(n.text), o = m(n.valid), i = m(n.inValidTip);
|
|
3502
3512
|
ve(() => n.text, () => {
|
|
3503
3513
|
a.value = n.text;
|
|
3504
3514
|
}), ve(() => n.required, (d, s) => {
|
|
3505
|
-
d !== s && (
|
|
3515
|
+
d !== s && (t.value = d);
|
|
3506
3516
|
}), ve([() => n.valid, () => n.inValidTip], ([d, s]) => {
|
|
3507
3517
|
o.value = d, i.value = s;
|
|
3508
3518
|
});
|
|
3509
|
-
const r =
|
|
3519
|
+
const r = U(() => o.value ? a.value : i.value), c = U(() => o.value ? "" : "color:red");
|
|
3510
3520
|
return () => a.value && v("label", {
|
|
3511
3521
|
class: "col-form-label",
|
|
3512
3522
|
title: r.value,
|
|
@@ -3517,14 +3527,14 @@ const oi = {
|
|
|
3517
3527
|
title: i.value
|
|
3518
3528
|
}, null), v("span", {
|
|
3519
3529
|
class: "farris-label-text"
|
|
3520
|
-
}, [
|
|
3530
|
+
}, [t.value && v("span", {
|
|
3521
3531
|
class: "farris-label-info text-danger"
|
|
3522
3532
|
}, [Oe("*")]), a.value])]);
|
|
3523
3533
|
}
|
|
3524
3534
|
}), H = {}, z = {}, _ = {}, q = {};
|
|
3525
3535
|
let nn = !1;
|
|
3526
3536
|
function ri() {
|
|
3527
|
-
nn || (nn = !0, fn.register(H, z, _, q), dn.register(H, z, _, q), pn.register(H, z, _, q), mn.register(H, z, _, q), vn.register(H, z, _, q), gn.register(H, z, _, q), $t.register(H, z, _, q), Dt.register(H, z, _, q), $t.register(H, z, _, q), Dt.register(H, z, _, q), yn.register(H, z, _, q),
|
|
3537
|
+
nn || (nn = !0, fn.register(H, z, _, q), dn.register(H, z, _, q), pn.register(H, z, _, q), mn.register(H, z, _, q), vn.register(H, z, _, q), gn.register(H, z, _, q), $t.register(H, z, _, q), Dt.register(H, z, _, q), $t.register(H, z, _, q), Dt.register(H, z, _, q), yn.register(H, z, _, q), Ea.register(H, z, _, q), hn.register(H, z, _, q), Cn.register(H, z, _, q), bn.register(H, z, _, q), wn.register(H, z, _, q), Sn.register(H, z, _, q), Tn.register(H, z, _, q), Fn.register(H, z, _, q), Ba.register(H, z, _, q), $a.register(H, z, _, q), xn.register(H, z, _, q), Ia.register(H, z, _, q), Pa.register(H, z, _, q), Dn.register(H, z, _, q), En.register(H, z, _, q), Bn.register(H, z, _, q), Mn.register(H, z, _, q), In.register(H, z, _, q), kn.register(H, z, _, q), Oa.register(H, z, _, q), On.register(H, z, _, q), Nn.register(H, z, _, q), jn.register(H, z, _, q), Pn.register(H, z, _, q), Ln.register(H, z, _, q), Rn.register(H, z, _, q), Vn.register(H, z, _, q), An.register(H, z, _, q), $n.register(H, z, _, q), Hn.register(H, z, _, q), zn.register(H, z, _, q), qn.register(H, z, _, q), Gn.register(H, z, _, q), _n.register(H, z, _, q), Na.register(H, z, _), Un.register(H, z, _, q), Wn.register(H, z, _, q), Yn.register(H, z, _, q), Xn.register(H, z, _, q), Jn.register(H, z, _, q), Qn.register(H, z, _, q), La.register(H, z, _, q), Zn.register(H, z, _, q), Kn.register(H, z, _, q), eo.register(H, z, _, q), to.register(H, z, _, q), no.register(H, z, _, q), oo.register(H, z, _, q), ro.register(H, z, _, q), ao.register(H, z, _, q), io.register(H, z, _, q), lo.register(H, z, _, q), so.register(H, z, _, q), Ma.register(H, z, _, q), ja.register(H, z, _, q), co.register(H, z, _, q), Ra.register(H, z, _, q), uo.register(H, z, _, q), Va.register(H, z, _, q), Aa.register(H, z, _, q), Ha.register(H, z, _, q), fo.register(H, z, _, q));
|
|
3528
3538
|
}
|
|
3529
3539
|
function ii() {
|
|
3530
3540
|
ri();
|
|
@@ -3534,11 +3544,11 @@ function ii() {
|
|
|
3534
3544
|
throw new Error(`Could not find the editor of type '${r}'`);
|
|
3535
3545
|
return c;
|
|
3536
3546
|
}
|
|
3537
|
-
function
|
|
3547
|
+
function e(r, c) {
|
|
3538
3548
|
const d = z[r];
|
|
3539
3549
|
return d ? d(c) : {};
|
|
3540
3550
|
}
|
|
3541
|
-
function
|
|
3551
|
+
function t(r) {
|
|
3542
3552
|
switch (r) {
|
|
3543
3553
|
case "check-box":
|
|
3544
3554
|
return "onChangeValue";
|
|
@@ -3634,7 +3644,7 @@ function ii() {
|
|
|
3634
3644
|
return "onMouseupEvent";
|
|
3635
3645
|
}
|
|
3636
3646
|
}
|
|
3637
|
-
return { resolveEditorProps:
|
|
3647
|
+
return { resolveEditorProps: e, resolveEditorType: n, getChangeFunctionName: t, getClearFunctionName: a, getMousedownFunctionName: o, getMouseupFunctionName: i };
|
|
3638
3648
|
}
|
|
3639
3649
|
const li = {
|
|
3640
3650
|
/**
|
|
@@ -3648,16 +3658,16 @@ const li = {
|
|
|
3648
3658
|
name: "FValidationMessage",
|
|
3649
3659
|
props: li,
|
|
3650
3660
|
emits: [],
|
|
3651
|
-
setup(n,
|
|
3652
|
-
const
|
|
3661
|
+
setup(n, e) {
|
|
3662
|
+
const t = m(n.errors);
|
|
3653
3663
|
ve(() => n.errors, (i) => {
|
|
3654
|
-
|
|
3664
|
+
t.value = i;
|
|
3655
3665
|
});
|
|
3656
|
-
const a = m(!0), o =
|
|
3657
|
-
if (
|
|
3658
|
-
const i = Object.keys(
|
|
3666
|
+
const a = m(!0), o = U(() => {
|
|
3667
|
+
if (t.value) {
|
|
3668
|
+
const i = Object.keys(t.value).map((r) => {
|
|
3659
3669
|
var c;
|
|
3660
|
-
return (c =
|
|
3670
|
+
return (c = t.value[r]) == null ? void 0 : c.name;
|
|
3661
3671
|
});
|
|
3662
3672
|
return i.length ? i.join(" ") : "";
|
|
3663
3673
|
}
|
|
@@ -3674,55 +3684,55 @@ const li = {
|
|
|
3674
3684
|
}
|
|
3675
3685
|
}), on = /* @__PURE__ */ Te({
|
|
3676
3686
|
name: "FDynamicFormGroup",
|
|
3677
|
-
props:
|
|
3687
|
+
props: Do,
|
|
3678
3688
|
emits: ["change", "update:modelValue"],
|
|
3679
|
-
setup(n,
|
|
3689
|
+
setup(n, e) {
|
|
3680
3690
|
var S;
|
|
3681
|
-
const
|
|
3691
|
+
const t = m(n.id), a = m(n.customClass), o = m(n.editor), i = m(n.label), r = m(n.modelValue), c = m(n.readonly), d = m(((S = n.editor) == null ? void 0 : S.required) || n.required), s = m(n.showLabel), h = m(n.visible);
|
|
3682
3692
|
m(n.type);
|
|
3683
3693
|
const f = m(), u = m(n.errors), {
|
|
3684
3694
|
resolveEditorProps: l,
|
|
3685
3695
|
resolveEditorType: p,
|
|
3686
3696
|
getChangeFunctionName: b,
|
|
3687
3697
|
getClearFunctionName: D
|
|
3688
|
-
} = ii(), B =
|
|
3698
|
+
} = ii(), B = U(() => ({
|
|
3689
3699
|
"form-group": !0,
|
|
3690
3700
|
"farris-form-group": !0,
|
|
3691
3701
|
"common-group": !0,
|
|
3692
3702
|
"q-state-readonly": c.value
|
|
3693
3703
|
}));
|
|
3694
3704
|
function j(w, g, M) {
|
|
3695
|
-
r.value = g !== void 0 ? g : w,
|
|
3705
|
+
r.value = g !== void 0 ? g : w, e.emit("update:modelValue", r.value), e.emit("change", r.value, {
|
|
3696
3706
|
newValue: w,
|
|
3697
3707
|
newModelValue: g,
|
|
3698
3708
|
parameters: M
|
|
3699
3709
|
});
|
|
3700
3710
|
}
|
|
3701
3711
|
function T() {
|
|
3702
|
-
|
|
3712
|
+
e.emit("update:modelValue", "");
|
|
3703
3713
|
}
|
|
3704
|
-
const F =
|
|
3714
|
+
const F = U(() => {
|
|
3705
3715
|
const w = o.value.type || "input-group", g = p(w), M = l(w, o.value), k = b(w), C = D(o.value.type);
|
|
3706
|
-
return C && (M[C] = T), M[k] = j, (M.id == null || M.id === "") && (M.id =
|
|
3716
|
+
return C && (M[C] = T), M[k] = j, (M.id == null || M.id === "") && (M.id = t.value), w === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (M.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (M.onEndValueChange = o.value.onEndValueChange)) : w === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? M["onUpdate:idValue"] = o.value["onUpdate:idValue"] : w === "property-editor" && (M.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => v(g, Ze({
|
|
3707
3717
|
ref: f
|
|
3708
3718
|
}, M, {
|
|
3709
3719
|
modelValue: r.value,
|
|
3710
3720
|
"onUpdate:modelValue": (Y) => r.value = Y
|
|
3711
|
-
}),
|
|
3721
|
+
}), e.slots);
|
|
3712
3722
|
});
|
|
3713
3723
|
function y() {
|
|
3714
3724
|
return v(si, {
|
|
3715
|
-
id: `${
|
|
3725
|
+
id: `${t.value}-validation-message`,
|
|
3716
3726
|
errors: u.value
|
|
3717
3727
|
}, null);
|
|
3718
3728
|
}
|
|
3719
3729
|
return ve([() => n.id, () => n.customClass, () => n.editor, () => n.label, () => n.modelValue, () => n.readonly, () => n.required, () => n.showLabel, () => n.visible, () => n.errors], ([w, g, M, k, C, Y, te, O, P, W]) => {
|
|
3720
3730
|
var L;
|
|
3721
|
-
|
|
3722
|
-
}),
|
|
3731
|
+
t.value = w, a.value = g, o.value = M, i.value = k, r.value = C, c.value = Y, d.value = ((L = o.value) == null ? void 0 : L.required) || te, s.value = O, h.value = P, u.value = W;
|
|
3732
|
+
}), e.expose({
|
|
3723
3733
|
editorRef: f
|
|
3724
3734
|
}), () => h.value && v("div", {
|
|
3725
|
-
id: `${
|
|
3735
|
+
id: `${t.value}-input-group`,
|
|
3726
3736
|
class: a.value,
|
|
3727
3737
|
style: n.customStyle
|
|
3728
3738
|
}, [v("div", {
|
|
@@ -3730,7 +3740,7 @@ const li = {
|
|
|
3730
3740
|
}, [v("div", {
|
|
3731
3741
|
class: B.value
|
|
3732
3742
|
}, [s.value && v(ai, {
|
|
3733
|
-
id: `${
|
|
3743
|
+
id: `${t.value}-lable`,
|
|
3734
3744
|
required: d.value,
|
|
3735
3745
|
text: i.value,
|
|
3736
3746
|
title: i.value
|
|
@@ -3741,7 +3751,7 @@ const li = {
|
|
|
3741
3751
|
}), X = {}, J = {}, Z = {};
|
|
3742
3752
|
let an = !1;
|
|
3743
3753
|
function ci() {
|
|
3744
|
-
an || (an = !0, fn.registerDesigner(X, J, Z), dn.registerDesigner(X, J, Z), pn.registerDesigner(X, J, Z), mn.registerDesigner(X, J, Z), vn.registerDesigner(X, J, Z), gn.registerDesigner(X, J, Z), $t.registerDesigner(X, J, Z), Dt.registerDesigner(X, J, Z), Dt.registerDesigner(X, J, Z), bn.registerDesigner(X, J, Z), yn.registerDesigner(X, J, Z), Cn.registerDesigner(X, J, Z), Sn.registerDesigner(X, J, Z), wn.registerDesigner(X, J, Z), Tn.registerDesigner(X, J, Z), Fn.registerDesigner(X, J, Z),
|
|
3754
|
+
an || (an = !0, fn.registerDesigner(X, J, Z), dn.registerDesigner(X, J, Z), pn.registerDesigner(X, J, Z), mn.registerDesigner(X, J, Z), vn.registerDesigner(X, J, Z), gn.registerDesigner(X, J, Z), $t.registerDesigner(X, J, Z), Dt.registerDesigner(X, J, Z), Dt.registerDesigner(X, J, Z), bn.registerDesigner(X, J, Z), yn.registerDesigner(X, J, Z), Cn.registerDesigner(X, J, Z), Sn.registerDesigner(X, J, Z), wn.registerDesigner(X, J, Z), Tn.registerDesigner(X, J, Z), Fn.registerDesigner(X, J, Z), za.registerDesigner(X, J, Z), xn.registerDesigner(X, J, Z), Dn.registerDesigner(X, J, Z), En.registerDesigner(X, J, Z), Bn.registerDesigner(X, J, Z), Mn.registerDesigner(X, J, Z), In.registerDesigner(X, J, Z), On.registerDesigner(X, J, Z), kn.registerDesigner(X, J, Z), Nn.registerDesigner(X, J, Z), jn.registerDesigner(X, J, Z), Pn.registerDesigner(X, J, Z), Ln.registerDesigner(X, J, Z), Rn.registerDesigner(X, J, Z), Vn.registerDesigner(X, J, Z), An.registerDesigner(X, J, Z), $n.registerDesigner(X, J, Z), Hn.registerDesigner(X, J, Z), qn.registerDesigner(X, J, Z), Gn.registerDesigner(X, J, Z), _n.registerDesigner(X, J, Z), zn.registerDesigner(X, J, Z), Un.registerDesigner(X, J, Z), Wn.registerDesigner(X, J, Z), Yn.registerDesigner(X, J, Z), Xn.registerDesigner(X, J, Z), Jn.registerDesigner(X, J, Z), Qn.registerDesigner(X, J, Z), Zn.registerDesigner(X, J, Z), Kn.registerDesigner(X, J, Z), eo.registerDesigner(X, J, Z), to.registerDesigner(X, J, Z), no.registerDesigner(X, J, Z), oo.registerDesigner(X, J, Z), ao.registerDesigner(X, J, Z), ro.registerDesigner(X, J, Z), hn.registerDesigner(X, J), io.registerDesigner(X, J, Z), lo.registerDesigner(X, J, Z), so.registerDesigner(X, J, Z), co.registerDesigner(X, J, Z), uo.registerDesigner(X, J, Z), fo.registerDesigner(X, J, Z));
|
|
3745
3755
|
}
|
|
3746
3756
|
const ui = {
|
|
3747
3757
|
id: { type: String, default: "" },
|
|
@@ -3760,7 +3770,7 @@ const ui = {
|
|
|
3760
3770
|
};
|
|
3761
3771
|
yt(
|
|
3762
3772
|
ui,
|
|
3763
|
-
|
|
3773
|
+
xo,
|
|
3764
3774
|
Xt,
|
|
3765
3775
|
void 0
|
|
3766
3776
|
);
|
|
@@ -3821,15 +3831,15 @@ async function wi(n) {
|
|
|
3821
3831
|
return navigator.clipboard.writeText(n);
|
|
3822
3832
|
}
|
|
3823
3833
|
async function Si(n) {
|
|
3824
|
-
const
|
|
3825
|
-
|
|
3826
|
-
const
|
|
3827
|
-
|
|
3834
|
+
const e = document.createElement("span");
|
|
3835
|
+
e.textContent = n, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
|
|
3836
|
+
const t = window.getSelection(), a = window.document.createRange();
|
|
3837
|
+
t == null || t.removeAllRanges(), a.selectNode(e), t == null || t.addRange(a);
|
|
3828
3838
|
let o = !1;
|
|
3829
3839
|
try {
|
|
3830
3840
|
o = window.document.execCommand("copy");
|
|
3831
3841
|
} finally {
|
|
3832
|
-
|
|
3842
|
+
t == null || t.removeAllRanges(), window.document.body.removeChild(e);
|
|
3833
3843
|
}
|
|
3834
3844
|
if (!o)
|
|
3835
3845
|
throw Jt();
|
|
@@ -3837,22 +3847,22 @@ async function Si(n) {
|
|
|
3837
3847
|
async function Ti(n) {
|
|
3838
3848
|
try {
|
|
3839
3849
|
await wi(n);
|
|
3840
|
-
} catch (
|
|
3850
|
+
} catch (e) {
|
|
3841
3851
|
try {
|
|
3842
3852
|
await Si(n);
|
|
3843
|
-
} catch (
|
|
3844
|
-
throw
|
|
3853
|
+
} catch (t) {
|
|
3854
|
+
throw t || e || Jt();
|
|
3845
3855
|
}
|
|
3846
3856
|
}
|
|
3847
3857
|
}
|
|
3848
3858
|
function Fi() {
|
|
3849
|
-
async function n(
|
|
3850
|
-
await Ti(
|
|
3859
|
+
async function n(e) {
|
|
3860
|
+
await Ti(e);
|
|
3851
3861
|
}
|
|
3852
3862
|
return { onCopy: n };
|
|
3853
3863
|
}
|
|
3854
|
-
function xi(n,
|
|
3855
|
-
const o = m(14), i = m(140), r = m(""), c = m(a.value.length), d =
|
|
3864
|
+
function xi(n, e, t, a) {
|
|
3865
|
+
const o = m(14), i = m(140), r = m(""), c = m(a.value.length), d = U(() => a.value), s = U(() => ({
|
|
3856
3866
|
"font-size": `${o.value}px`,
|
|
3857
3867
|
height: "100%"
|
|
3858
3868
|
}));
|
|
@@ -3876,17 +3886,17 @@ function xi(n, t, e, a) {
|
|
|
3876
3886
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3877
3887
|
}, [c.value + " / " + i.value])]);
|
|
3878
3888
|
}
|
|
3879
|
-
function Di(n,
|
|
3880
|
-
const o = xi(n,
|
|
3889
|
+
function Di(n, e, t, a) {
|
|
3890
|
+
const o = xi(n, e, t, a), i = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
3881
3891
|
function r(c) {
|
|
3882
3892
|
return i.get(c) || null;
|
|
3883
3893
|
}
|
|
3884
3894
|
return { getEditorRender: r };
|
|
3885
3895
|
}
|
|
3886
3896
|
function Ei() {
|
|
3887
|
-
const n = m(!1),
|
|
3897
|
+
const n = m(!1), e = m("复制成功");
|
|
3888
3898
|
return {
|
|
3889
|
-
feedbackStyle:
|
|
3899
|
+
feedbackStyle: U(() => {
|
|
3890
3900
|
const a = {
|
|
3891
3901
|
position: "absolute",
|
|
3892
3902
|
left: "50%",
|
|
@@ -3905,16 +3915,16 @@ function Ei() {
|
|
|
3905
3915
|
};
|
|
3906
3916
|
return a.opacity = n.value ? "0.8" : "0", a.display = n.value ? "" : "none", a;
|
|
3907
3917
|
}),
|
|
3908
|
-
feedbackMessage:
|
|
3918
|
+
feedbackMessage: e,
|
|
3909
3919
|
toShowFeedback: n
|
|
3910
3920
|
};
|
|
3911
3921
|
}
|
|
3912
|
-
function Bi(n,
|
|
3913
|
-
const
|
|
3914
|
-
return () =>
|
|
3922
|
+
function Bi(n, e) {
|
|
3923
|
+
const t = e.getEditorRender(n.promptEditorType);
|
|
3924
|
+
return () => t && t();
|
|
3915
3925
|
}
|
|
3916
3926
|
function Ii(n) {
|
|
3917
|
-
function
|
|
3927
|
+
function e(u) {
|
|
3918
3928
|
if (u == null)
|
|
3919
3929
|
return 0;
|
|
3920
3930
|
let l = 0;
|
|
@@ -3924,7 +3934,7 @@ function Ii(n) {
|
|
|
3924
3934
|
}
|
|
3925
3935
|
return l;
|
|
3926
3936
|
}
|
|
3927
|
-
function
|
|
3937
|
+
function t(u, l) {
|
|
3928
3938
|
if (u !== "" && u !== void 0 && u !== null) {
|
|
3929
3939
|
u = "" + u;
|
|
3930
3940
|
const p = u.length;
|
|
@@ -3939,10 +3949,10 @@ function Ii(n) {
|
|
|
3939
3949
|
}
|
|
3940
3950
|
return "";
|
|
3941
3951
|
}
|
|
3942
|
-
const a =
|
|
3952
|
+
const a = U(() => !!n.value && !!n.value.date), o = U(() => `发生时间 : ${n.value && n.value.date || ""}`), i = U(() => !!n.value && !!n.value.detail), r = U(() => n.value ? e(n.value.detail) > 160 : !1), c = m(!1), d = U(() => c.value ? "收起" : "展开"), s = U(() => {
|
|
3943
3953
|
const u = "详细信息 : " + (n.value && n.value.detail) || "";
|
|
3944
|
-
return c.value ? u :
|
|
3945
|
-
}), h =
|
|
3954
|
+
return c.value ? u : t(u, 160);
|
|
3955
|
+
}), h = U(() => ({
|
|
3946
3956
|
position: "absolute",
|
|
3947
3957
|
right: 0,
|
|
3948
3958
|
bottom: c.value ? 0 : "2px",
|
|
@@ -3971,13 +3981,13 @@ function Mi(n) {
|
|
|
3971
3981
|
innerHTML: n.value
|
|
3972
3982
|
}, null);
|
|
3973
3983
|
}
|
|
3974
|
-
function ki(n,
|
|
3975
|
-
const o = m(n.exceptionInfo), i =
|
|
3984
|
+
function ki(n, e, t, a) {
|
|
3985
|
+
const o = m(n.exceptionInfo), i = U(() => {
|
|
3976
3986
|
const u = {
|
|
3977
3987
|
"f-icon": !0
|
|
3978
|
-
}, l = `f-icon-${
|
|
3988
|
+
}, l = `f-icon-${e.value}`;
|
|
3979
3989
|
return u[l] = !0, u;
|
|
3980
|
-
}), r =
|
|
3990
|
+
}), r = U(() => t.value || o.value && o.value.message), c = U(() => a.value), d = U(() => !!a.value), s = U(() => !!o.value);
|
|
3981
3991
|
function h() {
|
|
3982
3992
|
return s.value ? Ii(o) : d.value ? Mi(c) : () => null;
|
|
3983
3993
|
}
|
|
@@ -3993,16 +4003,16 @@ function ki(n, t, e, a) {
|
|
|
3993
4003
|
innerHTML: r.value
|
|
3994
4004
|
}, null), f()])]);
|
|
3995
4005
|
}
|
|
3996
|
-
function Oi(n,
|
|
4006
|
+
function Oi(n, e, t) {
|
|
3997
4007
|
const {
|
|
3998
4008
|
onCopy: a
|
|
3999
|
-
} =
|
|
4009
|
+
} = e, {
|
|
4000
4010
|
toShowFeedback: o
|
|
4001
|
-
} =
|
|
4011
|
+
} = t, i = m("复制成功"), r = m("复制详细信息"), c = m(n.exceptionInfo || {
|
|
4002
4012
|
date: "",
|
|
4003
4013
|
message: "",
|
|
4004
4014
|
detail: ""
|
|
4005
|
-
}), d =
|
|
4015
|
+
}), d = U(() => c.value && c.value.detail || "");
|
|
4006
4016
|
function s(h) {
|
|
4007
4017
|
a(d.value).catch((f) => {
|
|
4008
4018
|
i.value = "复制失败";
|
|
@@ -4019,13 +4029,13 @@ function Oi(n, t, e) {
|
|
|
4019
4029
|
style: "cursor: pointer;"
|
|
4020
4030
|
}, [r.value])]);
|
|
4021
4031
|
}
|
|
4022
|
-
function Ni(n,
|
|
4023
|
-
const o = m(n.type), i = m(n.buttons), r = m(n.exceptionInfo), c = m(n.okButtonText), d = m(n.cancelButtonText), s = m(!0), h = m(!0), f =
|
|
4032
|
+
function Ni(n, e, t, a) {
|
|
4033
|
+
const o = m(n.type), i = m(n.buttons), r = m(n.exceptionInfo), c = m(n.okButtonText), d = m(n.cancelButtonText), s = m(!0), h = m(!0), f = U(() => !!(i.value && i.value.length)), u = U(() => r.value && r.value.date && r.value.message && r.value.detail), l = U(() => !(i.value && i.value.length) && (c.value || d.value)), p = U(() => h.value && c.value), b = U(() => s.value && d.value), D = Oi(n, t, a);
|
|
4024
4034
|
function B(T) {
|
|
4025
|
-
o.value === "question" &&
|
|
4035
|
+
o.value === "question" && e.emit("reject"), e.emit("close");
|
|
4026
4036
|
}
|
|
4027
4037
|
function j(T) {
|
|
4028
|
-
o.value === "question" &&
|
|
4038
|
+
o.value === "question" && e.emit("accept"), e.emit("close");
|
|
4029
4039
|
}
|
|
4030
4040
|
return () => v("div", {
|
|
4031
4041
|
class: "modal-footer"
|
|
@@ -4049,18 +4059,18 @@ const xt = /* @__PURE__ */ Te({
|
|
|
4049
4059
|
name: "FMessageBox",
|
|
4050
4060
|
props: Ci,
|
|
4051
4061
|
emits: ["accept", "reject", "close"],
|
|
4052
|
-
setup(n,
|
|
4053
|
-
const
|
|
4062
|
+
setup(n, e) {
|
|
4063
|
+
const t = m(n.type), a = m(n.title), o = m(n.detail), i = U(() => {
|
|
4054
4064
|
const D = {
|
|
4055
4065
|
"modal-tips": !0,
|
|
4056
4066
|
"d-flex": !0,
|
|
4057
4067
|
"flex-row": !0
|
|
4058
|
-
}, B = `messager-type-${
|
|
4068
|
+
}, B = `messager-type-${t.value}`;
|
|
4059
4069
|
return D[B] = !0, D;
|
|
4060
|
-
}), r =
|
|
4070
|
+
}), r = U(() => {
|
|
4061
4071
|
const D = {};
|
|
4062
|
-
return
|
|
4063
|
-
}), c = Fi(), d = Di(n,
|
|
4072
|
+
return t.value === "prompt" ? D.padding = "0.5rem 0.5rem 1rem 1.5rem" : t.value === "error" && (D.padding = "0.5rem 1.5rem 1rem 1.5rem"), D;
|
|
4073
|
+
}), c = Fi(), d = Di(n, t, a, o), s = Ei(), {
|
|
4064
4074
|
feedbackStyle: h,
|
|
4065
4075
|
feedbackMessage: f
|
|
4066
4076
|
} = s;
|
|
@@ -4070,14 +4080,14 @@ const xt = /* @__PURE__ */ Te({
|
|
|
4070
4080
|
}, [f.value]);
|
|
4071
4081
|
}
|
|
4072
4082
|
function l() {
|
|
4073
|
-
switch (
|
|
4083
|
+
switch (t.value) {
|
|
4074
4084
|
case "prompt":
|
|
4075
4085
|
return Bi(n, d);
|
|
4076
4086
|
default:
|
|
4077
|
-
return ki(n,
|
|
4087
|
+
return ki(n, t, a, o);
|
|
4078
4088
|
}
|
|
4079
4089
|
}
|
|
4080
|
-
const p = l(), b = Ni(n,
|
|
4090
|
+
const p = l(), b = Ni(n, e, c, s);
|
|
4081
4091
|
return () => v("div", {
|
|
4082
4092
|
class: "farris-messager"
|
|
4083
4093
|
}, [v("section", {
|
|
@@ -4167,102 +4177,102 @@ const xt = /* @__PURE__ */ Te({
|
|
|
4167
4177
|
host: { type: Object, default: "body" }
|
|
4168
4178
|
};
|
|
4169
4179
|
class fe {
|
|
4170
|
-
constructor(
|
|
4171
|
-
this.x =
|
|
4180
|
+
constructor(e, t) {
|
|
4181
|
+
this.x = e, this.y = t;
|
|
4172
4182
|
}
|
|
4173
|
-
static getTransformInfo(
|
|
4174
|
-
const a = window.getComputedStyle(
|
|
4183
|
+
static getTransformInfo(e) {
|
|
4184
|
+
const a = window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
4175
4185
|
if (a.length >= 6) {
|
|
4176
4186
|
const o = parseInt(a[4], 10), i = parseInt(a[5], 10);
|
|
4177
4187
|
return { x: o, y: i };
|
|
4178
4188
|
}
|
|
4179
4189
|
return { x: 0, y: 0 };
|
|
4180
4190
|
}
|
|
4181
|
-
static fromEvent(
|
|
4182
|
-
if (this.isMouseEvent(
|
|
4183
|
-
return new fe(
|
|
4184
|
-
if (
|
|
4185
|
-
return new fe(
|
|
4186
|
-
for (let a = 0; a <
|
|
4187
|
-
if (
|
|
4188
|
-
return new fe(
|
|
4191
|
+
static fromEvent(e, t = null) {
|
|
4192
|
+
if (this.isMouseEvent(e))
|
|
4193
|
+
return new fe(e.clientX, e.clientY);
|
|
4194
|
+
if (t === null || e.changedTouches.length === 1)
|
|
4195
|
+
return new fe(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
|
|
4196
|
+
for (let a = 0; a < e.changedTouches.length; a++)
|
|
4197
|
+
if (e.changedTouches[a].target === t)
|
|
4198
|
+
return new fe(e.changedTouches[a].clientX, e.changedTouches[a].clientY);
|
|
4189
4199
|
}
|
|
4190
|
-
static isMouseEvent(
|
|
4191
|
-
return Object.prototype.toString.apply(
|
|
4200
|
+
static isMouseEvent(e) {
|
|
4201
|
+
return Object.prototype.toString.apply(e).indexOf("MouseEvent") === 8;
|
|
4192
4202
|
}
|
|
4193
|
-
static isIPosition(
|
|
4194
|
-
return !!
|
|
4203
|
+
static isIPosition(e) {
|
|
4204
|
+
return !!e && "x" in e && "y" in e;
|
|
4195
4205
|
}
|
|
4196
|
-
static getCurrent(
|
|
4197
|
-
const
|
|
4206
|
+
static getCurrent(e) {
|
|
4207
|
+
const t = new fe(0, 0);
|
|
4198
4208
|
if (window) {
|
|
4199
|
-
const a = window.getComputedStyle(
|
|
4209
|
+
const a = window.getComputedStyle(e);
|
|
4200
4210
|
if (a) {
|
|
4201
4211
|
const o = parseInt(a.getPropertyValue("left"), 10), i = parseInt(a.getPropertyValue("top"), 10);
|
|
4202
|
-
|
|
4212
|
+
t.x = isNaN(o) ? 0 : o, t.y = isNaN(i) ? 0 : i;
|
|
4203
4213
|
}
|
|
4204
|
-
return
|
|
4214
|
+
return t;
|
|
4205
4215
|
}
|
|
4206
4216
|
return null;
|
|
4207
4217
|
}
|
|
4208
|
-
static copy(
|
|
4209
|
-
return new fe(0, 0).set(
|
|
4218
|
+
static copy(e) {
|
|
4219
|
+
return new fe(0, 0).set(e);
|
|
4210
4220
|
}
|
|
4211
4221
|
get value() {
|
|
4212
4222
|
return { x: this.x, y: this.y };
|
|
4213
4223
|
}
|
|
4214
|
-
add(
|
|
4215
|
-
return this.x +=
|
|
4224
|
+
add(e) {
|
|
4225
|
+
return this.x += e.x, this.y += e.y, this;
|
|
4216
4226
|
}
|
|
4217
|
-
subtract(
|
|
4218
|
-
return this.x -=
|
|
4227
|
+
subtract(e) {
|
|
4228
|
+
return this.x -= e.x, this.y -= e.y, this;
|
|
4219
4229
|
}
|
|
4220
|
-
multiply(
|
|
4221
|
-
this.x *=
|
|
4230
|
+
multiply(e) {
|
|
4231
|
+
this.x *= e, this.y *= e;
|
|
4222
4232
|
}
|
|
4223
|
-
divide(
|
|
4224
|
-
this.x /=
|
|
4233
|
+
divide(e) {
|
|
4234
|
+
this.x /= e, this.y /= e;
|
|
4225
4235
|
}
|
|
4226
4236
|
reset() {
|
|
4227
4237
|
return this.x = 0, this.y = 0, this;
|
|
4228
4238
|
}
|
|
4229
|
-
set(
|
|
4230
|
-
return this.x =
|
|
4239
|
+
set(e) {
|
|
4240
|
+
return this.x = e.x, this.y = e.y, this;
|
|
4231
4241
|
}
|
|
4232
4242
|
}
|
|
4233
4243
|
class Qe {
|
|
4234
|
-
constructor(
|
|
4235
|
-
this.width =
|
|
4244
|
+
constructor(e, t) {
|
|
4245
|
+
this.width = e, this.height = t;
|
|
4236
4246
|
}
|
|
4237
|
-
static getCurrent(
|
|
4238
|
-
const
|
|
4247
|
+
static getCurrent(e) {
|
|
4248
|
+
const t = new Qe(0, 0);
|
|
4239
4249
|
if (window) {
|
|
4240
|
-
const a = window.getComputedStyle(
|
|
4241
|
-
return a && (
|
|
4250
|
+
const a = window.getComputedStyle(e);
|
|
4251
|
+
return a && (t.width = parseInt(a.getPropertyValue("width"), 10), t.height = parseInt(a.getPropertyValue("height"), 10)), t;
|
|
4242
4252
|
}
|
|
4243
4253
|
return null;
|
|
4244
4254
|
}
|
|
4245
|
-
static copy(
|
|
4246
|
-
return new Qe(0, 0).set(
|
|
4255
|
+
static copy(e) {
|
|
4256
|
+
return new Qe(0, 0).set(e);
|
|
4247
4257
|
}
|
|
4248
|
-
set(
|
|
4249
|
-
return this.width =
|
|
4258
|
+
set(e) {
|
|
4259
|
+
return this.width = e.width, this.height = e.height, this;
|
|
4250
4260
|
}
|
|
4251
4261
|
}
|
|
4252
|
-
function Pi(n,
|
|
4253
|
-
const
|
|
4262
|
+
function Pi(n, e) {
|
|
4263
|
+
const t = m(), a = m(), o = m(), i = m(), r = m(), c = m(), d = m(), s = m(), h = m(), f = m(), u = m(), l = m(n.resizeable), p = m(), b = m(n.draggable), D = m(!1);
|
|
4254
4264
|
function B() {
|
|
4255
4265
|
const E = a.value || document.body, I = window.getComputedStyle(E);
|
|
4256
|
-
if (!I || !
|
|
4266
|
+
if (!I || !t.value)
|
|
4257
4267
|
return;
|
|
4258
|
-
const A = fe.getTransformInfo(
|
|
4259
|
-
d.value && (
|
|
4268
|
+
const A = fe.getTransformInfo(t.value), V = {};
|
|
4269
|
+
d.value && (V.deltaL = t.value.offsetLeft - d.value.x, V.deltaT = t.value.offsetTop - d.value.y);
|
|
4260
4270
|
const $ = I.getPropertyValue("position");
|
|
4261
|
-
|
|
4271
|
+
V.width = E.clientWidth, V.height = E.clientHeight, V.pr = parseInt(I.getPropertyValue("padding-right"), 10), V.pb = parseInt(I.getPropertyValue("padding-bottom"), 10), V.position = I.getPropertyValue("position"), $ === "static" && (E.style.position = "relative"), V.translateX = A.x, V.translateY = A.y, f.value = V;
|
|
4262
4272
|
}
|
|
4263
4273
|
function j(E) {
|
|
4264
|
-
if (
|
|
4265
|
-
i.value = Qe.getCurrent(
|
|
4274
|
+
if (t.value) {
|
|
4275
|
+
i.value = Qe.getCurrent(t.value), r.value = fe.getCurrent(t.value), c.value = i.value ? Qe.copy(i.value) : null, d.value = r.value ? fe.copy(r.value) : null, B();
|
|
4266
4276
|
const I = E.target.getAttribute("type") || "";
|
|
4267
4277
|
s.value = {
|
|
4268
4278
|
n: !!I.match(/n/),
|
|
@@ -4273,10 +4283,10 @@ function Pi(n, t) {
|
|
|
4273
4283
|
}
|
|
4274
4284
|
}
|
|
4275
4285
|
function T() {
|
|
4276
|
-
var E, I, A,
|
|
4277
|
-
if (
|
|
4278
|
-
const $ =
|
|
4279
|
-
s.value && ((s.value.n || s.value.s) && ((E = c.value) != null && E.height) && ($.style.height = c.value.height + "px"), (s.value.w || s.value.e) && ((I = c.value) != null && I.width) && ($.style.width = c.value.width + "px"), d.value && ((A = d.value) != null && A.x && ($.style.left = d.value.x + "px"), (
|
|
4286
|
+
var E, I, A, V;
|
|
4287
|
+
if (t.value) {
|
|
4288
|
+
const $ = t.value;
|
|
4289
|
+
s.value && ((s.value.n || s.value.s) && ((E = c.value) != null && E.height) && ($.style.height = c.value.height + "px"), (s.value.w || s.value.e) && ((I = c.value) != null && I.width) && ($.style.width = c.value.width + "px"), d.value && ((A = d.value) != null && A.x && ($.style.left = d.value.x + "px"), (V = d.value) != null && V.y && ($.style.top = d.value.y + "px")));
|
|
4280
4290
|
}
|
|
4281
4291
|
}
|
|
4282
4292
|
function F() {
|
|
@@ -4306,13 +4316,13 @@ function Pi(n, t) {
|
|
|
4306
4316
|
I && S(I);
|
|
4307
4317
|
}
|
|
4308
4318
|
function g() {
|
|
4309
|
-
if (
|
|
4319
|
+
if (t.value) {
|
|
4310
4320
|
const {
|
|
4311
4321
|
width: E,
|
|
4312
4322
|
height: I,
|
|
4313
4323
|
x: A,
|
|
4314
|
-
y:
|
|
4315
|
-
} =
|
|
4324
|
+
y: V
|
|
4325
|
+
} = t.value.getBoundingClientRect(), $ = fe.getTransformInfo(t.value);
|
|
4316
4326
|
return {
|
|
4317
4327
|
size: {
|
|
4318
4328
|
width: E,
|
|
@@ -4320,14 +4330,14 @@ function Pi(n, t) {
|
|
|
4320
4330
|
},
|
|
4321
4331
|
position: {
|
|
4322
4332
|
x: A - $.x,
|
|
4323
|
-
y:
|
|
4333
|
+
y: V - $.y
|
|
4324
4334
|
}
|
|
4325
4335
|
};
|
|
4326
4336
|
}
|
|
4327
4337
|
return null;
|
|
4328
4338
|
}
|
|
4329
4339
|
function M(E) {
|
|
4330
|
-
if (
|
|
4340
|
+
if (t.value) {
|
|
4331
4341
|
const I = g();
|
|
4332
4342
|
u.value = I;
|
|
4333
4343
|
}
|
|
@@ -4340,7 +4350,7 @@ function Pi(n, t) {
|
|
|
4340
4350
|
E instanceof MouseEvent && E.button === 2 || b.value && (document.body.click(), E.stopPropagation(), E.preventDefault(), o.value = fe.fromEvent(E), h.value = E.target, j(E), k());
|
|
4341
4351
|
}
|
|
4342
4352
|
function Y(E) {
|
|
4343
|
-
return
|
|
4353
|
+
return t.value = E, l.value && v(et, null, [v("div", {
|
|
4344
4354
|
class: "fv-resizable-handle fv-resizable-n",
|
|
4345
4355
|
type: "n",
|
|
4346
4356
|
onMousedown: (I) => C(I)
|
|
@@ -4376,8 +4386,8 @@ function Pi(n, t) {
|
|
|
4376
4386
|
}
|
|
4377
4387
|
function te(E = !0) {
|
|
4378
4388
|
document.body.click();
|
|
4379
|
-
const I = a.value || document.body, A = Qe.getCurrent(I),
|
|
4380
|
-
E &&
|
|
4389
|
+
const I = a.value || document.body, A = Qe.getCurrent(I), V = t.value;
|
|
4390
|
+
E && V && (p.value = g(), p.value.transform = V.style.transform), A && V && (c.value = A, c.value.height -= 14, c.value.width -= 14, V.style.height = c.value.height + "px", V.style.width = c.value.width + "px", V.style.left = "7px", V.style.top = "7px", V.style.transform = "", u.value = {
|
|
4381
4391
|
size: c.value,
|
|
4382
4392
|
position: {
|
|
4383
4393
|
x: 0,
|
|
@@ -4391,27 +4401,27 @@ function Pi(n, t) {
|
|
|
4391
4401
|
const A = {
|
|
4392
4402
|
width: p.value.size.width || 0,
|
|
4393
4403
|
height: p.value.size.height || 0
|
|
4394
|
-
},
|
|
4404
|
+
}, V = {
|
|
4395
4405
|
x: (window.innerWidth - A.width) / 2,
|
|
4396
4406
|
y: (window.innerHeight - A.height) / 2
|
|
4397
4407
|
};
|
|
4398
|
-
(E = c.value) == null || E.set(A), (I = d.value) == null || I.set(
|
|
4399
|
-
const $ =
|
|
4400
|
-
$.style.height = A.height + "px", $.style.width = A.width + "px", $.style.left = `${
|
|
4408
|
+
(E = c.value) == null || E.set(A), (I = d.value) == null || I.set(V);
|
|
4409
|
+
const $ = t.value;
|
|
4410
|
+
$.style.height = A.height + "px", $.style.width = A.width + "px", $.style.left = `${V.x}px`, $.style.top = `${V.y}px`, $.style.transform = "", u.value = {
|
|
4401
4411
|
size: A,
|
|
4402
|
-
position:
|
|
4412
|
+
position: V
|
|
4403
4413
|
}, b.value = n.draggable, D.value = !1;
|
|
4404
4414
|
}
|
|
4405
4415
|
}
|
|
4406
4416
|
function P() {
|
|
4407
|
-
if (
|
|
4408
|
-
const E = Qe.getCurrent(
|
|
4417
|
+
if (t.value) {
|
|
4418
|
+
const E = Qe.getCurrent(t.value);
|
|
4409
4419
|
if (E) {
|
|
4410
4420
|
const {
|
|
4411
4421
|
width: I,
|
|
4412
4422
|
height: A
|
|
4413
4423
|
} = E;
|
|
4414
|
-
|
|
4424
|
+
t.value.style.left = `${(window.innerWidth - I) / 2}px`, t.value.style.top = `${(window.innerHeight - A) / 2}px`, t.value.style.transform = "";
|
|
4415
4425
|
}
|
|
4416
4426
|
}
|
|
4417
4427
|
}
|
|
@@ -4435,9 +4445,9 @@ function Pi(n, t) {
|
|
|
4435
4445
|
unWindowResizeHandle: L
|
|
4436
4446
|
};
|
|
4437
4447
|
}
|
|
4438
|
-
function Li(n,
|
|
4448
|
+
function Li(n, e, t) {
|
|
4439
4449
|
const a = m(), o = m(n.draggable), i = m(n.lockAxis), r = m(), c = m(), d = m(!1), s = m(new fe(0, 0)), h = m(new fe(0, 0)), f = m(new fe(0, 0)), u = m(new fe(0, 0));
|
|
4440
|
-
ve(() =>
|
|
4450
|
+
ve(() => t.value, (w) => {
|
|
4441
4451
|
r.value.style.cursor = w ? "move" : "default";
|
|
4442
4452
|
});
|
|
4443
4453
|
function l(w, g) {
|
|
@@ -4476,7 +4486,7 @@ function Li(n, t, e) {
|
|
|
4476
4486
|
}
|
|
4477
4487
|
function j() {
|
|
4478
4488
|
var w;
|
|
4479
|
-
d.value && (d.value = !1, h.value.add(f.value), f.value.reset(), (w = a.value) == null || w.classList.remove("ng-dragging"),
|
|
4489
|
+
d.value && (d.value = !1, h.value.add(f.value), f.value.reset(), (w = a.value) == null || w.classList.remove("ng-dragging"), e.emit("stopMove"), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", j));
|
|
4480
4490
|
}
|
|
4481
4491
|
function T() {
|
|
4482
4492
|
!d.value && r.value && (d.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", B), document.addEventListener("mouseup", j));
|
|
@@ -4490,7 +4500,7 @@ function Li(n, t, e) {
|
|
|
4490
4500
|
h.value.reset();
|
|
4491
4501
|
}
|
|
4492
4502
|
function y(w) {
|
|
4493
|
-
if (!
|
|
4503
|
+
if (!t.value || w instanceof MouseEvent && w.button === 2)
|
|
4494
4504
|
return;
|
|
4495
4505
|
const g = w.target || w.srcElement;
|
|
4496
4506
|
r.value !== void 0 && g && !l(g, r.value) || o.value !== !1 && (document.body.click(), w.stopPropagation(), w.preventDefault(), s.value = fe.fromEvent(w, a.value), F(), T());
|
|
@@ -4515,30 +4525,30 @@ function Li(n, t, e) {
|
|
|
4515
4525
|
resetTranslate: F
|
|
4516
4526
|
};
|
|
4517
4527
|
}
|
|
4518
|
-
function
|
|
4528
|
+
function Bo(n, e) {
|
|
4519
4529
|
if (n) {
|
|
4520
|
-
const
|
|
4521
|
-
a.key.toLowerCase() === n.toLowerCase() &&
|
|
4530
|
+
const t = (a) => {
|
|
4531
|
+
a.key.toLowerCase() === n.toLowerCase() && e({ event: a, key: n });
|
|
4522
4532
|
};
|
|
4523
|
-
return document.addEventListener("keydown",
|
|
4524
|
-
document.removeEventListener("keydown",
|
|
4533
|
+
return document.addEventListener("keydown", t), () => {
|
|
4534
|
+
document.removeEventListener("keydown", t);
|
|
4525
4535
|
};
|
|
4526
4536
|
}
|
|
4527
4537
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const
|
|
4538
|
+
function Ri(n, e) {
|
|
4539
|
+
const t = m(n.enableEsc);
|
|
4530
4540
|
let a = null;
|
|
4531
|
-
return
|
|
4532
|
-
|
|
4541
|
+
return t.value ? (a = Bo("Escape", (o) => {
|
|
4542
|
+
e.emit("esc", { event: o.event, type: "esc" });
|
|
4533
4543
|
}), {
|
|
4534
4544
|
remove: a
|
|
4535
4545
|
}) : null;
|
|
4536
4546
|
}
|
|
4537
|
-
function
|
|
4538
|
-
const
|
|
4547
|
+
function Vi(n, e) {
|
|
4548
|
+
const t = m(n.enableEnter);
|
|
4539
4549
|
let a = null;
|
|
4540
|
-
return
|
|
4541
|
-
|
|
4550
|
+
return t.value ? (a = Bo("Enter", (o) => {
|
|
4551
|
+
e.emit("enter", { event: o.event, type: "enter" });
|
|
4542
4552
|
}), {
|
|
4543
4553
|
remove: a
|
|
4544
4554
|
}) : null;
|
|
@@ -4547,14 +4557,14 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4547
4557
|
name: "FModal",
|
|
4548
4558
|
props: ji,
|
|
4549
4559
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
4550
|
-
setup(n,
|
|
4551
|
-
const
|
|
4560
|
+
setup(n, e) {
|
|
4561
|
+
const t = m(n.width || 300), a = m(n.height || 200), o = m(n.modelValue), i = m(""), r = m(n.class), c = m(n.fitContent), d = m(n.showHeader), s = m(""), h = m(n.showCloseButton), f = m(n.showMaxButton), u = m(!1), l = m(n.dialogType), p = m(n.src), b = m(""), D = m(n.showButtons), B = m(n.title), j = m(n.containment || null), T = m(), F = m(!1);
|
|
4552
4562
|
function y(N, re) {
|
|
4553
4563
|
Promise.resolve().then(() => {
|
|
4554
4564
|
var de;
|
|
4555
4565
|
return (de = n.beforeClose) == null ? void 0 : de.call(n);
|
|
4556
4566
|
}).then((de) => {
|
|
4557
|
-
de && (o.value = !1,
|
|
4567
|
+
de && (o.value = !1, e.emit("update:modelValue", !1), re != null && e.emit(re ? "accept" : "cancel"), e.emit("closed", N));
|
|
4558
4568
|
});
|
|
4559
4569
|
}
|
|
4560
4570
|
const S = [{
|
|
@@ -4571,7 +4581,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4571
4581
|
handle: (N) => {
|
|
4572
4582
|
y(N, !0);
|
|
4573
4583
|
}
|
|
4574
|
-
}], w = m(n.buttons && n.buttons.length ? n.buttons : S), g =
|
|
4584
|
+
}], w = m(n.buttons && n.buttons.length ? n.buttons : S), g = U(() => !!s.value), M = U(() => !!D.value && !!w.value), k = m(), C = m(), Y = m(!1), {
|
|
4575
4585
|
renderResizeBar: te,
|
|
4576
4586
|
maximize: O,
|
|
4577
4587
|
restore: P,
|
|
@@ -4581,8 +4591,8 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4581
4591
|
unWindowResizeHandle: I
|
|
4582
4592
|
} = Pi(n), {
|
|
4583
4593
|
registerDraggle: A
|
|
4584
|
-
} = Li(n,
|
|
4585
|
-
function
|
|
4594
|
+
} = Li(n, e, E);
|
|
4595
|
+
function V() {
|
|
4586
4596
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
4587
4597
|
}
|
|
4588
4598
|
function $() {
|
|
@@ -4594,20 +4604,20 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4594
4604
|
}), ve(() => n.modelValue, (N, re) => {
|
|
4595
4605
|
N !== re && (o.value = N, o.value && n.draggable && qt(() => {
|
|
4596
4606
|
C.value && !j.value && (j.value = C.value.parentElement, W.value = j.value, A(k.value, C.value, W.value));
|
|
4597
|
-
}), N || (j.value && (j.value = null), $())), o.value && (F.value =
|
|
4607
|
+
}), N || (j.value && (j.value = null), $())), o.value && (F.value = V());
|
|
4598
4608
|
}), ve(() => n.showHeader, (N, re) => {
|
|
4599
4609
|
N !== re && (d.value = N);
|
|
4600
4610
|
}), ve(() => n.showButtons, (N, re) => {
|
|
4601
4611
|
N !== re && (D.value = N);
|
|
4602
4612
|
}), ve(() => L.value, (N, re) => {
|
|
4603
4613
|
const de = N || {}, De = re || {};
|
|
4604
|
-
JSON.stringify(de) !== JSON.stringify(De) &&
|
|
4614
|
+
JSON.stringify(de) !== JSON.stringify(De) && e.emit("resize", {
|
|
4605
4615
|
newSize: N,
|
|
4606
4616
|
oldSize: re,
|
|
4607
4617
|
isMaximized: Y.value
|
|
4608
4618
|
});
|
|
4609
4619
|
});
|
|
4610
|
-
const oe =
|
|
4620
|
+
const oe = U(() => (o.value && document.body.classList.add("modal-open"), o.value)), ue = U(() => {
|
|
4611
4621
|
var de;
|
|
4612
4622
|
const N = {
|
|
4613
4623
|
modal: !0,
|
|
@@ -4617,39 +4627,39 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4617
4627
|
N["f-modal-fitContent"] = !!c.value, N.show = !!oe.value;
|
|
4618
4628
|
const re = (de = n.maskClass) == null ? void 0 : de.split(" ");
|
|
4619
4629
|
return re == null || re.reduce((De, Le) => (De[Le] = !0, De), N), N;
|
|
4620
|
-
}), ne =
|
|
4630
|
+
}), ne = U(() => {
|
|
4621
4631
|
var de;
|
|
4622
4632
|
const N = {
|
|
4623
4633
|
"modal-dialog": !0
|
|
4624
4634
|
}, re = (de = r.value) == null ? void 0 : de.split(" ");
|
|
4625
4635
|
return re == null || re.reduce((De, Le) => (De[Le] = !0, De), N), N;
|
|
4626
|
-
}), be =
|
|
4636
|
+
}), be = U(() => {
|
|
4627
4637
|
const N = {
|
|
4628
4638
|
position: "absolute",
|
|
4629
4639
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
4630
|
-
left: `${(window.innerWidth -
|
|
4631
|
-
width: `${
|
|
4640
|
+
left: `${(window.innerWidth - t.value) / 2}px`,
|
|
4641
|
+
width: `${t.value}px`,
|
|
4632
4642
|
height: c.value ? "auto" : `${a.value}px`
|
|
4633
4643
|
};
|
|
4634
4644
|
return n.mask || (N.pointerEvents = "auto"), N;
|
|
4635
|
-
}), Fe =
|
|
4645
|
+
}), Fe = U(() => {
|
|
4636
4646
|
const N = {
|
|
4637
4647
|
display: "block"
|
|
4638
4648
|
};
|
|
4639
4649
|
return n.mask || (N.pointerEvents = "none", N.backgroundColor = "transparent"), F.value && (N.backgroundColor = "transparent"), N;
|
|
4640
|
-
}), ce =
|
|
4650
|
+
}), ce = U(() => ({
|
|
4641
4651
|
"modal-content": !0,
|
|
4642
4652
|
"modal-content-has-header": d.value
|
|
4643
|
-
})), Q =
|
|
4653
|
+
})), Q = U(() => {
|
|
4644
4654
|
const N = {
|
|
4645
4655
|
display: d.value ? "" : "none"
|
|
4646
4656
|
};
|
|
4647
4657
|
return N["pointer-events"] = E.value ? "auto" : "none", N;
|
|
4648
|
-
}), se =
|
|
4658
|
+
}), se = U(() => ({
|
|
4649
4659
|
"f-icon": !0,
|
|
4650
4660
|
modal_maximize: !0,
|
|
4651
4661
|
modalrevert: Y.value
|
|
4652
|
-
})), pe =
|
|
4662
|
+
})), pe = U(() => ({
|
|
4653
4663
|
"modal-body": !0,
|
|
4654
4664
|
"f-utils-flex-column": l.value === "iframe",
|
|
4655
4665
|
"f-utils-fill": !0
|
|
@@ -4659,13 +4669,13 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4659
4669
|
height: `${n.footerHeight || 60}px`
|
|
4660
4670
|
};
|
|
4661
4671
|
}
|
|
4662
|
-
const
|
|
4672
|
+
const Re = U(() => {
|
|
4663
4673
|
const N = {
|
|
4664
4674
|
textAlgin: b.value
|
|
4665
4675
|
}, re = tt();
|
|
4666
4676
|
return Object.assign(N, re);
|
|
4667
4677
|
});
|
|
4668
|
-
function
|
|
4678
|
+
function Ve(N) {
|
|
4669
4679
|
if (N.stopPropagation(), Y.value) {
|
|
4670
4680
|
Y.value = !1, P();
|
|
4671
4681
|
return;
|
|
@@ -4673,23 +4683,23 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4673
4683
|
O(), Y.value = !0;
|
|
4674
4684
|
}
|
|
4675
4685
|
async function Ae(N, re) {
|
|
4676
|
-
N.handle && await N.handle(re, N) &&
|
|
4686
|
+
N.handle && await N.handle(re, N) && e.emit("closed", re);
|
|
4677
4687
|
}
|
|
4678
4688
|
function $e(N) {
|
|
4679
|
-
N.width && (
|
|
4689
|
+
N.width && (t.value = N.width), N.height && (a.value = N.height), N.buttons && (w.value = N.buttons), N.title && (B.value = N.title);
|
|
4680
4690
|
}
|
|
4681
4691
|
let We = null, He = null;
|
|
4682
4692
|
cn(() => {
|
|
4683
|
-
F.value =
|
|
4684
|
-
}),
|
|
4685
|
-
C.value && !j.value && (j.value = C.value.parentElement, W.value = j.value, A(k.value, C.value, W.value)), oe.value && document.body.classList.add("modal-open"), We =
|
|
4693
|
+
F.value = V();
|
|
4694
|
+
}), Ue(() => {
|
|
4695
|
+
C.value && !j.value && (j.value = C.value.parentElement, W.value = j.value, A(k.value, C.value, W.value)), oe.value && document.body.classList.add("modal-open"), We = Ri(n, e), He = Vi(n, e);
|
|
4686
4696
|
}), vt(() => {
|
|
4687
4697
|
I && I(), We && We.remove(), He && He.remove();
|
|
4688
|
-
}),
|
|
4698
|
+
}), e.expose({
|
|
4689
4699
|
modalElementRef: C,
|
|
4690
4700
|
updateModalOptions: $e,
|
|
4691
4701
|
close: y,
|
|
4692
|
-
maxDialog:
|
|
4702
|
+
maxDialog: Ve,
|
|
4693
4703
|
isMaximized: Y
|
|
4694
4704
|
});
|
|
4695
4705
|
function Ne() {
|
|
@@ -4698,7 +4708,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4698
4708
|
}, [v("span", {
|
|
4699
4709
|
class: "f-icon modal_minimize"
|
|
4700
4710
|
}, null)]), f.value && v("li", {
|
|
4701
|
-
onClick:
|
|
4711
|
+
onClick: Ve,
|
|
4702
4712
|
class: "f-btn-icon f-bare",
|
|
4703
4713
|
style: "pointer-events: auto;"
|
|
4704
4714
|
}, [v("span", {
|
|
@@ -4714,7 +4724,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4714
4724
|
function nt() {
|
|
4715
4725
|
return v("div", {
|
|
4716
4726
|
class: "modal-footer",
|
|
4717
|
-
style:
|
|
4727
|
+
style: Re.value
|
|
4718
4728
|
}, [w.value && w.value.map((N) => {
|
|
4719
4729
|
const re = m(N.disabled);
|
|
4720
4730
|
return v("button", {
|
|
@@ -4735,7 +4745,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4735
4745
|
ref: k,
|
|
4736
4746
|
class: "modal-header",
|
|
4737
4747
|
style: Q.value
|
|
4738
|
-
}, [
|
|
4748
|
+
}, [e.slots.headerTemplate ? e.slots.headerTemplate() : v("div", {
|
|
4739
4749
|
class: "modal-title"
|
|
4740
4750
|
}, [g.value && v("span", {
|
|
4741
4751
|
class: s.value,
|
|
@@ -4747,7 +4757,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4747
4757
|
}, [Ne()])]);
|
|
4748
4758
|
}
|
|
4749
4759
|
function ot() {
|
|
4750
|
-
return
|
|
4760
|
+
return e.slots.footerTemplate ? e.slots.footerTemplate() : M.value && nt();
|
|
4751
4761
|
}
|
|
4752
4762
|
function lt(N) {
|
|
4753
4763
|
if (N.stopPropagation(), n.allowClickMaskToClose) {
|
|
@@ -4767,7 +4777,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4767
4777
|
class: ce.value
|
|
4768
4778
|
}, [d.value && it(), v("div", {
|
|
4769
4779
|
class: pe.value
|
|
4770
|
-
}, [(re = (N =
|
|
4780
|
+
}, [(re = (N = e.slots).default) == null ? void 0 : re.call(N), l.value === "iframe" && v("iframe", {
|
|
4771
4781
|
title: i.value,
|
|
4772
4782
|
class: "f-utils-fill",
|
|
4773
4783
|
width: "100%",
|
|
@@ -4778,7 +4788,7 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4778
4788
|
function rt(N) {
|
|
4779
4789
|
return N || "body";
|
|
4780
4790
|
}
|
|
4781
|
-
return () => v(
|
|
4791
|
+
return () => v(jo, {
|
|
4782
4792
|
to: rt(n.host)
|
|
4783
4793
|
}, {
|
|
4784
4794
|
default: () => [oe.value && v(sn, {
|
|
@@ -4795,29 +4805,29 @@ const mt = /* @__PURE__ */ Te({
|
|
|
4795
4805
|
});
|
|
4796
4806
|
}
|
|
4797
4807
|
});
|
|
4798
|
-
function
|
|
4808
|
+
function Io(n) {
|
|
4799
4809
|
if (n.content && n.content.render)
|
|
4800
4810
|
return n.content.render;
|
|
4801
4811
|
if (n.render && typeof n.render == "function")
|
|
4802
4812
|
return n.render;
|
|
4803
4813
|
}
|
|
4804
4814
|
function Ai(n) {
|
|
4805
|
-
const
|
|
4806
|
-
|
|
4807
|
-
const
|
|
4815
|
+
const e = document.createElement("div");
|
|
4816
|
+
e.style.display = "contents";
|
|
4817
|
+
const t = ln({
|
|
4808
4818
|
setup(a, o) {
|
|
4809
4819
|
vt(() => {
|
|
4810
|
-
document.body.removeChild(
|
|
4820
|
+
document.body.removeChild(e);
|
|
4811
4821
|
});
|
|
4812
4822
|
const i = m(), r = m(n.class || ""), c = m(!!n.showButtons), d = m(!!n.showHeader), s = m(n.showCloseButton == null ? !0 : n.showCloseButton), h = m(!0), f = m(n.title || ""), u = n.acceptCallback || (() => {
|
|
4813
4823
|
}), l = n.rejectCallback || (() => {
|
|
4814
4824
|
}), p = n.closedCallback || ((T) => {
|
|
4815
4825
|
}), b = n.resizeHandle || ((T) => {
|
|
4816
4826
|
}), D = n.stopMoveHandle || ((T) => {
|
|
4817
|
-
}), B =
|
|
4818
|
-
h.value = !1,
|
|
4827
|
+
}), B = Io(n), j = (T) => {
|
|
4828
|
+
h.value = !1, t.unmount(), p(T);
|
|
4819
4829
|
};
|
|
4820
|
-
return
|
|
4830
|
+
return Ue(() => {
|
|
4821
4831
|
}), o.expose({
|
|
4822
4832
|
modalRef: i
|
|
4823
4833
|
}), () => v(mt, {
|
|
@@ -4840,26 +4850,26 @@ function Ai(n) {
|
|
|
4840
4850
|
onResize: b,
|
|
4841
4851
|
onStopMove: D
|
|
4842
4852
|
}, {
|
|
4843
|
-
default: () => [B && B(
|
|
4853
|
+
default: () => [B && B(t)]
|
|
4844
4854
|
});
|
|
4845
4855
|
}
|
|
4846
4856
|
});
|
|
4847
|
-
return document.body.appendChild(
|
|
4857
|
+
return document.body.appendChild(e), t.mount(e), t;
|
|
4848
4858
|
}
|
|
4849
|
-
class
|
|
4850
|
-
constructor(
|
|
4859
|
+
class Mo {
|
|
4860
|
+
constructor(e) {
|
|
4851
4861
|
Ie(this, "appContext", null);
|
|
4852
4862
|
Ie(this, "modalRef", m());
|
|
4853
4863
|
Ie(this, "activeModalIndex", m(0));
|
|
4854
4864
|
Ie(this, "modalRefs", {});
|
|
4855
4865
|
Ie(this, "isUseEscCloseModal", m(!1));
|
|
4856
|
-
Ie(this, "activeModalInstance",
|
|
4857
|
-
this.app =
|
|
4866
|
+
Ie(this, "activeModalInstance", U(() => this.modalRefs[this.activeModalIndex.value]));
|
|
4867
|
+
this.app = e, this.appContext = e ? e._context : null;
|
|
4858
4868
|
}
|
|
4859
4869
|
getCurrentModal() {
|
|
4860
4870
|
return this.activeModalInstance.value;
|
|
4861
4871
|
}
|
|
4862
|
-
adaptToWindow(
|
|
4872
|
+
adaptToWindow(e, t) {
|
|
4863
4873
|
const {
|
|
4864
4874
|
width: a,
|
|
4865
4875
|
height: o
|
|
@@ -4867,45 +4877,45 @@ class Io {
|
|
|
4867
4877
|
width: window.innerWidth,
|
|
4868
4878
|
height: window.innerHeight
|
|
4869
4879
|
};
|
|
4870
|
-
return a <
|
|
4871
|
-
width:
|
|
4872
|
-
height:
|
|
4880
|
+
return a < e && (e = a - 14), o < t && (t = o - 14), {
|
|
4881
|
+
width: e,
|
|
4882
|
+
height: t
|
|
4873
4883
|
};
|
|
4874
4884
|
}
|
|
4875
|
-
static show(
|
|
4876
|
-
const
|
|
4885
|
+
static show(e) {
|
|
4886
|
+
const t = Object.assign({
|
|
4877
4887
|
title: "",
|
|
4878
4888
|
showButtons: !0,
|
|
4879
4889
|
showHeader: !0
|
|
4880
|
-
},
|
|
4881
|
-
return Ai(
|
|
4890
|
+
}, e);
|
|
4891
|
+
return Ai(t);
|
|
4882
4892
|
}
|
|
4883
|
-
close(
|
|
4884
|
-
var
|
|
4885
|
-
|
|
4893
|
+
close(e) {
|
|
4894
|
+
var t, a;
|
|
4895
|
+
e ? (a = e.value) == null || a.close() : (t = this.getCurrentModal()) == null || t.close();
|
|
4886
4896
|
}
|
|
4887
|
-
open(
|
|
4888
|
-
const
|
|
4889
|
-
|
|
4890
|
-
const a =
|
|
4897
|
+
open(e) {
|
|
4898
|
+
const t = document.createDocumentFragment();
|
|
4899
|
+
e.showMaxButton && e.fitContent && (e.showMaxButton = !1);
|
|
4900
|
+
const a = Po(Object.assign({
|
|
4891
4901
|
title: "",
|
|
4892
4902
|
showButtons: !0,
|
|
4893
4903
|
showHeader: !0
|
|
4894
|
-
},
|
|
4904
|
+
}, e)), o = m(!0), i = a.value.acceptCallback || (() => {
|
|
4895
4905
|
}), r = a.value.rejectCallback || (() => {
|
|
4896
4906
|
}), c = a.value.closedCallback || ((y, S) => {
|
|
4897
4907
|
}), d = a.value.resizeHandle || ((y) => {
|
|
4898
|
-
}), s =
|
|
4908
|
+
}), s = e.stopMoveHandle || ((y) => {
|
|
4899
4909
|
});
|
|
4900
4910
|
let h;
|
|
4901
|
-
const f =
|
|
4911
|
+
const f = Io(a.value), u = (y) => {
|
|
4902
4912
|
var w;
|
|
4903
4913
|
o.value = !1;
|
|
4904
4914
|
const S = (w = y == null ? void 0 : y.target) == null ? void 0 : w.classList.contains("modal_close");
|
|
4905
4915
|
c(y, this.isUseEscCloseModal.value ? "esc" : S ? "icon" : "button");
|
|
4906
4916
|
}, l = (y) => {
|
|
4907
4917
|
u(y), h && qt(() => {
|
|
4908
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], At(null,
|
|
4918
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], At(null, t), h = null, this.modalRef.value = null, this.modalRefs) {
|
|
4909
4919
|
const S = Object.keys(this.modalRefs).map((w) => Number(w));
|
|
4910
4920
|
S.length > 0 ? this.activeModalIndex.value = Math.max(...S) : this.activeModalIndex.value = 0;
|
|
4911
4921
|
}
|
|
@@ -4934,8 +4944,8 @@ class Io {
|
|
|
4934
4944
|
default: () => [f && f(this.app)]
|
|
4935
4945
|
});
|
|
4936
4946
|
return h = ((y) => {
|
|
4937
|
-
const S =
|
|
4938
|
-
return S.appContext = this.appContext, At(S,
|
|
4947
|
+
const S = Lo(j, y);
|
|
4948
|
+
return S.appContext = this.appContext, At(S, t), S;
|
|
4939
4949
|
})({
|
|
4940
4950
|
...a.value
|
|
4941
4951
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
@@ -4944,9 +4954,9 @@ class Io {
|
|
|
4944
4954
|
a.value = {
|
|
4945
4955
|
...a.value,
|
|
4946
4956
|
...y
|
|
4947
|
-
}, h && At(
|
|
4957
|
+
}, h && At(Ro(h, {
|
|
4948
4958
|
...a
|
|
4949
|
-
}),
|
|
4959
|
+
}), t);
|
|
4950
4960
|
},
|
|
4951
4961
|
destroy: l,
|
|
4952
4962
|
modalRef: this.activeModalInstance,
|
|
@@ -4954,20 +4964,20 @@ class Io {
|
|
|
4954
4964
|
};
|
|
4955
4965
|
}
|
|
4956
4966
|
}
|
|
4957
|
-
const
|
|
4967
|
+
const ko = Symbol("FModalService");
|
|
4958
4968
|
mt.install = (n) => {
|
|
4959
4969
|
n.component(mt.name, mt);
|
|
4960
|
-
const
|
|
4961
|
-
n.provide(
|
|
4970
|
+
const e = new Mo(n);
|
|
4971
|
+
n.provide(ko, e), n.provide("FModalService", e);
|
|
4962
4972
|
};
|
|
4963
|
-
class
|
|
4964
|
-
static show(
|
|
4965
|
-
const
|
|
4966
|
-
...
|
|
4967
|
-
}), a = !1, o =
|
|
4968
|
-
}), c =
|
|
4973
|
+
class Ge {
|
|
4974
|
+
static show(e) {
|
|
4975
|
+
const t = qe({
|
|
4976
|
+
...e
|
|
4977
|
+
}), a = !1, o = t.type === "error" || t.type === "prompt", i = t.type === "error" ? "错误提示" : t.type === "prompt" && t.title || "", r = t.acceptCallback || (() => {
|
|
4978
|
+
}), c = t.rejectCallback || (() => {
|
|
4969
4979
|
});
|
|
4970
|
-
let d = null, s = new
|
|
4980
|
+
let d = null, s = new Mo(d);
|
|
4971
4981
|
const h = () => {
|
|
4972
4982
|
d && (d == null || d.destroy(), s = null);
|
|
4973
4983
|
};
|
|
@@ -4976,48 +4986,48 @@ class Ue {
|
|
|
4976
4986
|
title: i,
|
|
4977
4987
|
showButtons: a,
|
|
4978
4988
|
showHeader: o,
|
|
4979
|
-
width:
|
|
4989
|
+
width: t.width || 400,
|
|
4980
4990
|
fitContent: !0,
|
|
4981
4991
|
showMaxButton: !1,
|
|
4982
4992
|
draggable: !0,
|
|
4983
|
-
render: () => v(xt, Ze(
|
|
4993
|
+
render: () => v(xt, Ze(t, {
|
|
4984
4994
|
onAccept: r,
|
|
4985
4995
|
onReject: c,
|
|
4986
4996
|
onClose: h
|
|
4987
4997
|
}), null)
|
|
4988
4998
|
}), s == null ? void 0 : s.getCurrentModal();
|
|
4989
4999
|
}
|
|
4990
|
-
static info(
|
|
5000
|
+
static info(e, t) {
|
|
4991
5001
|
const a = qe({
|
|
4992
5002
|
type: "info",
|
|
4993
|
-
title:
|
|
4994
|
-
detail:
|
|
5003
|
+
title: e,
|
|
5004
|
+
detail: t,
|
|
4995
5005
|
okButtonText: "知道了",
|
|
4996
5006
|
cancelButtonText: ""
|
|
4997
5007
|
});
|
|
4998
|
-
|
|
5008
|
+
Ge.show(a);
|
|
4999
5009
|
}
|
|
5000
|
-
static warning(
|
|
5010
|
+
static warning(e, t) {
|
|
5001
5011
|
const a = qe({
|
|
5002
5012
|
type: "warning",
|
|
5003
|
-
title:
|
|
5004
|
-
detail:
|
|
5013
|
+
title: e,
|
|
5014
|
+
detail: t,
|
|
5005
5015
|
okButtonText: "知道了",
|
|
5006
5016
|
cancelButtonText: ""
|
|
5007
5017
|
});
|
|
5008
|
-
|
|
5018
|
+
Ge.show(a);
|
|
5009
5019
|
}
|
|
5010
|
-
static success(
|
|
5020
|
+
static success(e, t) {
|
|
5011
5021
|
const a = qe({
|
|
5012
5022
|
type: "success",
|
|
5013
|
-
title:
|
|
5014
|
-
detail:
|
|
5023
|
+
title: e,
|
|
5024
|
+
detail: t,
|
|
5015
5025
|
okButtonText: "关闭",
|
|
5016
5026
|
cancelButtonText: ""
|
|
5017
5027
|
});
|
|
5018
|
-
|
|
5028
|
+
Ge.show(a);
|
|
5019
5029
|
}
|
|
5020
|
-
static error(
|
|
5030
|
+
static error(e, t, a) {
|
|
5021
5031
|
const o = qe({
|
|
5022
5032
|
width: 500,
|
|
5023
5033
|
type: "error",
|
|
@@ -5025,44 +5035,44 @@ class Ue {
|
|
|
5025
5035
|
cancelButtonText: "",
|
|
5026
5036
|
exceptionInfo: {
|
|
5027
5037
|
date: a,
|
|
5028
|
-
message:
|
|
5029
|
-
detail:
|
|
5038
|
+
message: e,
|
|
5039
|
+
detail: t
|
|
5030
5040
|
}
|
|
5031
5041
|
});
|
|
5032
|
-
|
|
5042
|
+
Ge.show(o);
|
|
5033
5043
|
}
|
|
5034
|
-
static prompt(
|
|
5044
|
+
static prompt(e, t) {
|
|
5035
5045
|
const a = qe({
|
|
5036
5046
|
type: "prompt",
|
|
5037
|
-
title:
|
|
5038
|
-
detail:
|
|
5047
|
+
title: e,
|
|
5048
|
+
detail: t,
|
|
5039
5049
|
okButtonText: "确定",
|
|
5040
5050
|
cancelButtonText: "取消"
|
|
5041
5051
|
});
|
|
5042
|
-
|
|
5052
|
+
Ge.show(a);
|
|
5043
5053
|
}
|
|
5044
|
-
static question(
|
|
5054
|
+
static question(e, t, a, o) {
|
|
5045
5055
|
const i = qe({
|
|
5046
5056
|
type: "question",
|
|
5047
|
-
title:
|
|
5048
|
-
detail:
|
|
5057
|
+
title: e,
|
|
5058
|
+
detail: t,
|
|
5049
5059
|
okButtonText: "确定",
|
|
5050
5060
|
cancelButtonText: "取消",
|
|
5051
5061
|
acceptCallback: a,
|
|
5052
5062
|
rejectCallback: o
|
|
5053
5063
|
});
|
|
5054
|
-
|
|
5064
|
+
Ge.show(i);
|
|
5055
5065
|
}
|
|
5056
5066
|
}
|
|
5057
5067
|
xt.install = (n) => {
|
|
5058
|
-
n.component(xt.name, xt), n.provide("FMessageBoxService",
|
|
5068
|
+
n.component(xt.name, xt), n.provide("FMessageBoxService", Ge);
|
|
5059
5069
|
};
|
|
5060
5070
|
const $i = /* @__PURE__ */ Te({
|
|
5061
5071
|
name: "FEntityBindingSelector",
|
|
5062
5072
|
props: Za,
|
|
5063
5073
|
emits: ["submit", "cancel"],
|
|
5064
|
-
setup(n,
|
|
5065
|
-
const
|
|
5074
|
+
setup(n, e) {
|
|
5075
|
+
const t = fr(n), {
|
|
5066
5076
|
entityColumns: a,
|
|
5067
5077
|
entityTreeGridRef: o,
|
|
5068
5078
|
entityDataSource: i,
|
|
@@ -5071,7 +5081,7 @@ const $i = /* @__PURE__ */ Te({
|
|
|
5071
5081
|
entityTreeRowOption: d,
|
|
5072
5082
|
initialSelectedEntity: s,
|
|
5073
5083
|
isMainEntityInitialSelected: h
|
|
5074
|
-
} =
|
|
5084
|
+
} = t, f = ho(n), {
|
|
5075
5085
|
fieldColumns: u,
|
|
5076
5086
|
resolveFieldDataSource: l,
|
|
5077
5087
|
fieldDataSource: p,
|
|
@@ -5099,7 +5109,7 @@ const $i = /* @__PURE__ */ Te({
|
|
|
5099
5109
|
}, {
|
|
5100
5110
|
id: "selectFields",
|
|
5101
5111
|
title: "选择显示字段"
|
|
5102
|
-
}]), M = m(0), k = m(""), C =
|
|
5112
|
+
}]), M = m(0), k = m(""), C = U(() => ($) => ({
|
|
5103
5113
|
"f-utils-fill": !0,
|
|
5104
5114
|
border: $ !== "selectComponentType",
|
|
5105
5115
|
"mx-3": !0,
|
|
@@ -5116,7 +5126,7 @@ const $i = /* @__PURE__ */ Te({
|
|
|
5116
5126
|
}
|
|
5117
5127
|
cn(() => {
|
|
5118
5128
|
n.steps && (g.value = g.value.filter(($) => n.steps.includes($.id))), k.value = g.value[0].id, c(), Y();
|
|
5119
|
-
}),
|
|
5129
|
+
}), Ue(() => {
|
|
5120
5130
|
var $, oe;
|
|
5121
5131
|
o && (($ = s.value) != null && $.id) && o.value.selectItemById((oe = s.value) == null ? void 0 : oe.id), g.value.length === 1 && g.value[0].id === "selectFields" && te();
|
|
5122
5132
|
});
|
|
@@ -5234,16 +5244,16 @@ const $i = /* @__PURE__ */ Te({
|
|
|
5234
5244
|
M.value++, k.value = g.value[M.value].id;
|
|
5235
5245
|
}
|
|
5236
5246
|
function A() {
|
|
5237
|
-
|
|
5247
|
+
e.emit("cancel");
|
|
5238
5248
|
}
|
|
5239
|
-
function
|
|
5249
|
+
function V() {
|
|
5240
5250
|
var ue;
|
|
5241
5251
|
const $ = r(), oe = j();
|
|
5242
5252
|
if ($ && oe) {
|
|
5243
5253
|
const ne = {
|
|
5244
5254
|
bindingType: "entity"
|
|
5245
5255
|
};
|
|
5246
|
-
ne.bindingEntity = $, ne.bindTo =
|
|
5256
|
+
ne.bindingEntity = $, ne.bindTo = t.entityBindToMap.get(((ue = ne.bindingEntity) == null ? void 0 : ue.label) || ""), ne.bindingEntityFields = oe, ne.entityTitle = w.value, e.emit("submit", {
|
|
5247
5257
|
bindingContext: ne,
|
|
5248
5258
|
componentType: S.value
|
|
5249
5259
|
});
|
|
@@ -5279,13 +5289,13 @@ const $i = /* @__PURE__ */ Te({
|
|
|
5279
5289
|
onClick: I
|
|
5280
5290
|
}, [Oe("下一步")]) : "", M.value === g.value.length - 1 ? v("button", {
|
|
5281
5291
|
class: "btn btn-primary",
|
|
5282
|
-
onClick:
|
|
5292
|
+
onClick: V
|
|
5283
5293
|
}, [Oe("确定")]) : ""])]);
|
|
5284
5294
|
};
|
|
5285
5295
|
}
|
|
5286
5296
|
});
|
|
5287
5297
|
function rn(n) {
|
|
5288
|
-
let
|
|
5298
|
+
let e, t;
|
|
5289
5299
|
function a(T, F, y) {
|
|
5290
5300
|
var w;
|
|
5291
5301
|
const S = {
|
|
@@ -5309,17 +5319,17 @@ function rn(n) {
|
|
|
5309
5319
|
bindingContext: F,
|
|
5310
5320
|
componentType: y
|
|
5311
5321
|
} = T;
|
|
5312
|
-
|
|
5322
|
+
t.bindingSourceContext = F, y && (t.componentType = y), (S = e == null ? void 0 : e.modalRef) != null && S.value.close && ((w = e == null ? void 0 : e.modalRef) == null || w.value.close());
|
|
5313
5323
|
}
|
|
5314
5324
|
function i() {
|
|
5315
5325
|
var T, F;
|
|
5316
|
-
|
|
5326
|
+
t.bindingSourceContext = void 0, (T = e == null ? void 0 : e.modalRef) != null && T.value.close && ((F = e == null ? void 0 : e.modalRef) == null || F.value.close());
|
|
5317
5327
|
}
|
|
5318
5328
|
function r() {
|
|
5319
5329
|
const {
|
|
5320
5330
|
componentType: T,
|
|
5321
5331
|
bindingTargetId: F
|
|
5322
|
-
} =
|
|
5332
|
+
} = t;
|
|
5323
5333
|
let y = [];
|
|
5324
5334
|
return T && (y = ["selectEntity", "selectFields"]), F && (y = ["selectComponentType", "selectFields"]), () => v(et, null, [v($i, {
|
|
5325
5335
|
componentType: T,
|
|
@@ -5334,7 +5344,7 @@ function rn(n) {
|
|
|
5334
5344
|
}
|
|
5335
5345
|
function c() {
|
|
5336
5346
|
return new Promise((T, F) => {
|
|
5337
|
-
|
|
5347
|
+
e = n.modalService.open({
|
|
5338
5348
|
title: "选择绑定",
|
|
5339
5349
|
width: 800,
|
|
5340
5350
|
height: 600,
|
|
@@ -5343,10 +5353,10 @@ function rn(n) {
|
|
|
5343
5353
|
render: r(),
|
|
5344
5354
|
enableEsc: !1,
|
|
5345
5355
|
rejectCallback: () => {
|
|
5346
|
-
|
|
5356
|
+
t.bindingSourceContext = void 0;
|
|
5347
5357
|
},
|
|
5348
5358
|
closedCallback: () => {
|
|
5349
|
-
T(
|
|
5359
|
+
T(t);
|
|
5350
5360
|
},
|
|
5351
5361
|
draggable: !0
|
|
5352
5362
|
});
|
|
@@ -5354,7 +5364,7 @@ function rn(n) {
|
|
|
5354
5364
|
}
|
|
5355
5365
|
function d() {
|
|
5356
5366
|
var T, F;
|
|
5357
|
-
|
|
5367
|
+
t.bindingSourceContext = void 0, (T = e == null ? void 0 : e.modalRef) != null && T.value.close && ((F = e == null ? void 0 : e.modalRef) == null || F.value.close());
|
|
5358
5368
|
}
|
|
5359
5369
|
function s(T) {
|
|
5360
5370
|
let F = "", y = "";
|
|
@@ -5373,7 +5383,7 @@ function rn(n) {
|
|
|
5373
5383
|
} = T, {
|
|
5374
5384
|
groupId: S,
|
|
5375
5385
|
groupName: w
|
|
5376
|
-
} = s(
|
|
5386
|
+
} = s(t.parentComponentInstance), g = {
|
|
5377
5387
|
bindingType: "field"
|
|
5378
5388
|
};
|
|
5379
5389
|
if (y === "Form") {
|
|
@@ -5381,32 +5391,32 @@ function rn(n) {
|
|
|
5381
5391
|
g.entityFieldNode = C, g.designViewModelField = St({}, C, {
|
|
5382
5392
|
groupId: S,
|
|
5383
5393
|
groupName: w
|
|
5384
|
-
}),
|
|
5394
|
+
}), t.bindingSourceContext = g;
|
|
5385
5395
|
} else {
|
|
5386
5396
|
const C = F;
|
|
5387
5397
|
g.variableFieldNode = St({}, C, {
|
|
5388
5398
|
groupId: S,
|
|
5389
5399
|
groupName: w
|
|
5390
|
-
}),
|
|
5400
|
+
}), t.bindingSourceContext = g;
|
|
5391
5401
|
}
|
|
5392
|
-
(M =
|
|
5402
|
+
(M = e == null ? void 0 : e.modalRef) != null && M.value.close && ((k = e == null ? void 0 : e.modalRef) == null || k.value.close());
|
|
5393
5403
|
}
|
|
5394
5404
|
function f() {
|
|
5395
5405
|
const {
|
|
5396
5406
|
parentComponentInstance: T
|
|
5397
|
-
} =
|
|
5407
|
+
} = t, y = {
|
|
5398
5408
|
viewModelId: n.formSchemaUtils.getViewModelIdByComponentId(T == null ? void 0 : T.belongedComponentId),
|
|
5399
5409
|
designerHostService: n,
|
|
5400
5410
|
disableOccupiedFields: !0,
|
|
5401
5411
|
componentSchema: {
|
|
5402
5412
|
editor: {
|
|
5403
|
-
type:
|
|
5413
|
+
type: t.componentType
|
|
5404
5414
|
}
|
|
5405
5415
|
}
|
|
5406
5416
|
}, S = {
|
|
5407
5417
|
enable: !1
|
|
5408
5418
|
};
|
|
5409
|
-
return () => v(et, null, [v(
|
|
5419
|
+
return () => v(et, null, [v(ka, {
|
|
5410
5420
|
editorParams: y,
|
|
5411
5421
|
showCustomFooter: !0,
|
|
5412
5422
|
bindingType: S,
|
|
@@ -5418,7 +5428,7 @@ function rn(n) {
|
|
|
5418
5428
|
}
|
|
5419
5429
|
function u() {
|
|
5420
5430
|
return new Promise((T, F) => {
|
|
5421
|
-
|
|
5431
|
+
e = n.modalService.open({
|
|
5422
5432
|
title: "选择绑定",
|
|
5423
5433
|
width: 800,
|
|
5424
5434
|
height: 600,
|
|
@@ -5427,10 +5437,10 @@ function rn(n) {
|
|
|
5427
5437
|
render: f(),
|
|
5428
5438
|
enableEsc: !1,
|
|
5429
5439
|
rejectCallback: () => {
|
|
5430
|
-
|
|
5440
|
+
t.bindingSourceContext = void 0;
|
|
5431
5441
|
},
|
|
5432
5442
|
closedCallback: () => {
|
|
5433
|
-
T(
|
|
5443
|
+
T(t);
|
|
5434
5444
|
},
|
|
5435
5445
|
draggable: !0
|
|
5436
5446
|
});
|
|
@@ -5439,7 +5449,7 @@ function rn(n) {
|
|
|
5439
5449
|
function l() {
|
|
5440
5450
|
const {
|
|
5441
5451
|
formSchemaUtils: T
|
|
5442
|
-
} = n, F =
|
|
5452
|
+
} = n, F = t.parentComponentInstance.belongedComponentId, y = /* @__PURE__ */ new Set(), S = T.getFormSchema().module, w = S.components.find((k) => k.id === F), g = T.getViewModelById(w.viewModel);
|
|
5443
5453
|
let M = w.componentType;
|
|
5444
5454
|
return (M === "frame" || M === "table") && (M = "form"), S.viewmodels.forEach((k) => {
|
|
5445
5455
|
if (!k.fields || k.fields.length === 0)
|
|
@@ -5457,16 +5467,16 @@ function rn(n) {
|
|
|
5457
5467
|
const {
|
|
5458
5468
|
bindingTargetId: T,
|
|
5459
5469
|
parentComponentInstance: F
|
|
5460
|
-
} =
|
|
5470
|
+
} = t;
|
|
5461
5471
|
if (!T) {
|
|
5462
|
-
|
|
5472
|
+
t.bindingSourceContext = void 0;
|
|
5463
5473
|
return;
|
|
5464
5474
|
}
|
|
5465
5475
|
if (l().has(T)) {
|
|
5466
|
-
const S = new
|
|
5476
|
+
const S = new _a();
|
|
5467
5477
|
S.globalConfig = {
|
|
5468
5478
|
position: "top-center"
|
|
5469
|
-
}, S.warning("表单已经包含此字段,请勿重复添加"),
|
|
5479
|
+
}, S.warning("表单已经包含此字段,请勿重复添加"), t.bindingSourceContext = void 0;
|
|
5470
5480
|
return;
|
|
5471
5481
|
} else {
|
|
5472
5482
|
const S = {
|
|
@@ -5476,26 +5486,26 @@ function rn(n) {
|
|
|
5476
5486
|
const {
|
|
5477
5487
|
groupId: k,
|
|
5478
5488
|
groupName: C
|
|
5479
|
-
} = s(
|
|
5489
|
+
} = s(t.parentComponentInstance);
|
|
5480
5490
|
S.designViewModelField = St({}, M, {
|
|
5481
5491
|
groupId: k,
|
|
5482
5492
|
groupName: C
|
|
5483
|
-
}),
|
|
5493
|
+
}), t.bindingSourceContext = S;
|
|
5484
5494
|
}
|
|
5485
5495
|
}
|
|
5486
5496
|
function b() {
|
|
5487
|
-
return
|
|
5497
|
+
return t.bindingTargetId ? p() : u();
|
|
5488
5498
|
}
|
|
5489
5499
|
function D() {
|
|
5490
5500
|
const {
|
|
5491
5501
|
parentComponentInstance: T
|
|
5492
|
-
} =
|
|
5493
|
-
|
|
5502
|
+
} = t, F = T.addNewChildComponentSchema(t, n);
|
|
5503
|
+
t.componentSchema = F;
|
|
5494
5504
|
}
|
|
5495
5505
|
async function B() {
|
|
5496
5506
|
const {
|
|
5497
5507
|
componentCategory: T
|
|
5498
|
-
} =
|
|
5508
|
+
} = t;
|
|
5499
5509
|
switch (T) {
|
|
5500
5510
|
case "input": {
|
|
5501
5511
|
await b();
|
|
@@ -5508,7 +5518,7 @@ function rn(n) {
|
|
|
5508
5518
|
}
|
|
5509
5519
|
}
|
|
5510
5520
|
async function j(T, F, y) {
|
|
5511
|
-
return
|
|
5521
|
+
return t = a(T, F, y), await B(), t.bindingSourceContext === void 0 ? null : (D(), t);
|
|
5512
5522
|
}
|
|
5513
5523
|
return {
|
|
5514
5524
|
getComponentResolveContext: a,
|
|
@@ -5516,8 +5526,8 @@ function rn(n) {
|
|
|
5516
5526
|
};
|
|
5517
5527
|
}
|
|
5518
5528
|
function Hi(n) {
|
|
5519
|
-
let
|
|
5520
|
-
function
|
|
5529
|
+
let e;
|
|
5530
|
+
function t(u, l, p) {
|
|
5521
5531
|
if (u.contains(l) || l.classList.contains("no-drop"))
|
|
5522
5532
|
return !1;
|
|
5523
5533
|
const b = !0;
|
|
@@ -5601,7 +5611,7 @@ function Hi(n) {
|
|
|
5601
5611
|
Ke.value++;
|
|
5602
5612
|
}
|
|
5603
5613
|
function s(u) {
|
|
5604
|
-
|
|
5614
|
+
e && e.destroy(), tn && (e = tn([], {
|
|
5605
5615
|
// 镜像容器
|
|
5606
5616
|
mirrorContainer: u,
|
|
5607
5617
|
direction: "mixed",
|
|
@@ -5621,7 +5631,7 @@ function Hi(n) {
|
|
|
5621
5631
|
},
|
|
5622
5632
|
// 判断目标区域是否可接收拖拽的控件
|
|
5623
5633
|
accepts(l, p, b) {
|
|
5624
|
-
const D =
|
|
5634
|
+
const D = t(l, p, b), B = u.lastElementChild;
|
|
5625
5635
|
return D ? B.className = B.className.replace("undroppable", "") : B.className.includes("undroppable") || (B.className += " undroppable"), D;
|
|
5626
5636
|
}
|
|
5627
5637
|
}).on("over", (l, p) => {
|
|
@@ -5640,10 +5650,10 @@ function Hi(n) {
|
|
|
5640
5650
|
if (l.noDragDrop)
|
|
5641
5651
|
return u;
|
|
5642
5652
|
const p = u.querySelector(`[data-dragref='${l.id}-container']`) || u;
|
|
5643
|
-
|
|
5653
|
+
e && p && e.containers.push(p);
|
|
5644
5654
|
}
|
|
5645
5655
|
function f() {
|
|
5646
|
-
return
|
|
5656
|
+
return e;
|
|
5647
5657
|
}
|
|
5648
5658
|
return { attachComponents: h, initializeDragula: s, getDragulaInstance: f };
|
|
5649
5659
|
}
|
|
@@ -5671,11 +5681,11 @@ const zi = {
|
|
|
5671
5681
|
props: _i,
|
|
5672
5682
|
emits: [],
|
|
5673
5683
|
setup(n) {
|
|
5674
|
-
const
|
|
5684
|
+
const e = U(() => ({
|
|
5675
5685
|
"drag-and-drop-alert": !0,
|
|
5676
5686
|
"no-drag": !0,
|
|
5677
5687
|
"w-100": !0
|
|
5678
|
-
})),
|
|
5688
|
+
})), t = U(() => ({
|
|
5679
5689
|
height: "60px",
|
|
5680
5690
|
display: "flex",
|
|
5681
5691
|
"justify-content": "center",
|
|
@@ -5689,31 +5699,31 @@ const zi = {
|
|
|
5689
5699
|
"border-color": "#d2e6ff"
|
|
5690
5700
|
}));
|
|
5691
5701
|
return () => v("div", {
|
|
5692
|
-
class:
|
|
5693
|
-
style:
|
|
5702
|
+
class: e.value,
|
|
5703
|
+
style: t.value,
|
|
5694
5704
|
role: "alert",
|
|
5695
5705
|
"data-noattach": "true",
|
|
5696
5706
|
"data-position": "0"
|
|
5697
5707
|
}, [Oe("拖拽组件到这里")]);
|
|
5698
5708
|
}
|
|
5699
5709
|
});
|
|
5700
|
-
function
|
|
5701
|
-
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !
|
|
5710
|
+
function Gi(n) {
|
|
5711
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !Ao(n);
|
|
5702
5712
|
}
|
|
5703
5713
|
const _t = /* @__PURE__ */ Te({
|
|
5704
5714
|
name: "FDesignerItem",
|
|
5705
5715
|
props: zi,
|
|
5706
5716
|
emits: ["selectionChange", "dragEnd"],
|
|
5707
|
-
setup(n,
|
|
5708
|
-
const
|
|
5717
|
+
setup(n, e) {
|
|
5718
|
+
const t = m(`${n.modelValue.id}-component`), a = m(n.canMove), o = m(n.canDelete), i = m(!1), r = m(n.modelValue), c = m(n.componentId || ""), d = m(""), s = m(""), h = m(n.customClass), f = m(), u = me("canvas-dragula"), l = m(), p = me("design-item-context"), b = {
|
|
5709
5719
|
designerItemElementRef: f,
|
|
5710
5720
|
componentInstance: l,
|
|
5711
5721
|
schema: r.value,
|
|
5712
5722
|
parent: p,
|
|
5713
|
-
setupContext:
|
|
5723
|
+
setupContext: e
|
|
5714
5724
|
};
|
|
5715
5725
|
dt("design-item-context", b);
|
|
5716
|
-
const D = me("useFormSchema"), B = me("designer-host-service"), j =
|
|
5726
|
+
const D = me("useFormSchema"), B = me("designer-host-service"), j = U(() => {
|
|
5717
5727
|
var A;
|
|
5718
5728
|
const L = n.modelValue.appearance && n.modelValue.appearance.class || "", E = ((A = l.value) == null ? void 0 : A.getCustomButtons) && l.value.getCustomButtons();
|
|
5719
5729
|
let I = {
|
|
@@ -5728,23 +5738,23 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5728
5738
|
dgComponentFocused: f.value && f.value.classList.contains("dgComponentFocused")
|
|
5729
5739
|
};
|
|
5730
5740
|
return I[`farris-component-${r.value.type}`] = !0, I = ft(I, L), I = ft(I, s.value), I = ft(I, h.value), I;
|
|
5731
|
-
}), T =
|
|
5741
|
+
}), T = U(() => {
|
|
5732
5742
|
const L = {}, E = n.modelValue.appearance && n.modelValue.appearance.style || "";
|
|
5733
5743
|
return E && E.split(";").reduce((I, A) => {
|
|
5734
|
-
const [
|
|
5735
|
-
return I[
|
|
5744
|
+
const [V, $] = A.split(":");
|
|
5745
|
+
return I[V] = $, I;
|
|
5736
5746
|
}, L), d.value && d.value.split(";").reduce((I, A) => {
|
|
5737
|
-
const [
|
|
5738
|
-
return
|
|
5747
|
+
const [V, $] = A.split(":");
|
|
5748
|
+
return V && (I[V] = $), I;
|
|
5739
5749
|
}, L), L;
|
|
5740
5750
|
});
|
|
5741
5751
|
function F(L, E) {
|
|
5742
|
-
var
|
|
5752
|
+
var V, $;
|
|
5743
5753
|
if (L && (L.preventDefault(), L.stopPropagation()), l.value.triggerBelongedComponentToDeleteWhenDeleted) {
|
|
5744
5754
|
const oe = l.value.getBelongedComponentInstance(l);
|
|
5745
5755
|
if (oe && oe.parent) {
|
|
5746
5756
|
const ue = m(oe == null ? void 0 : oe.parent), ne = ue.value.contents.findIndex((be) => be.id === oe.schema.id);
|
|
5747
|
-
($ = (
|
|
5757
|
+
($ = (V = ue.value) == null ? void 0 : V.contents) == null || $.splice(ne, 1), Ke.value++;
|
|
5748
5758
|
}
|
|
5749
5759
|
return;
|
|
5750
5760
|
}
|
|
@@ -5752,7 +5762,7 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5752
5762
|
let I = p, A = (oe) => oe.id === E.id;
|
|
5753
5763
|
if (E.type === "component" && (I = p == null ? void 0 : p.parent, A = (oe) => oe.component === E.id), I && I.schema.contents) {
|
|
5754
5764
|
const oe = I.schema.contents.findIndex(A);
|
|
5755
|
-
I.schema.contents.splice(oe, 1), Ke.value++,
|
|
5765
|
+
I.schema.contents.splice(oe, 1), Ke.value++, e.emit("selectionChange");
|
|
5756
5766
|
}
|
|
5757
5767
|
}
|
|
5758
5768
|
function y(L) {
|
|
@@ -5799,19 +5809,19 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5799
5809
|
}, [v("div", null, [y(L), S(), w()])]);
|
|
5800
5810
|
}
|
|
5801
5811
|
function M(L, E, I, A) {
|
|
5802
|
-
|
|
5812
|
+
e.emit("selectionChange", L, E, I, A);
|
|
5803
5813
|
}
|
|
5804
5814
|
function k() {
|
|
5805
|
-
|
|
5815
|
+
e.emit("dragEnd");
|
|
5806
5816
|
}
|
|
5807
5817
|
function C(L) {
|
|
5808
5818
|
let E;
|
|
5809
|
-
const I = L.type, A = X[I],
|
|
5819
|
+
const I = L.type, A = X[I], V = J[I], $ = V ? V(L) : {};
|
|
5810
5820
|
$.customClass = n.ignore ? $.customClass : "", $.componentId = c.value, $.id = L.id;
|
|
5811
5821
|
const oe = L.contents && L.contents.length === 0;
|
|
5812
5822
|
return L.contents && !!L.contents.length && A ? v(A, Ze({
|
|
5813
5823
|
ref: l
|
|
5814
|
-
}, $),
|
|
5824
|
+
}, $), Gi(E = L.contents.map((ne) => v(_t, {
|
|
5815
5825
|
key: ne.id,
|
|
5816
5826
|
modelValue: ne,
|
|
5817
5827
|
"onUpdate:modelValue": (be) => ne = be,
|
|
@@ -5831,12 +5841,12 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5831
5841
|
}
|
|
5832
5842
|
function Y(L) {
|
|
5833
5843
|
if (L.type === "component-ref") {
|
|
5834
|
-
const A = (n.completeFormSchema ? n.completeFormSchema : D == null ? void 0 : D.getFormSchema()).module.components.find(($) => $.id === L.component),
|
|
5844
|
+
const A = (n.completeFormSchema ? n.completeFormSchema : D == null ? void 0 : D.getFormSchema()).module.components.find(($) => $.id === L.component), V = m(A);
|
|
5835
5845
|
if (A)
|
|
5836
5846
|
return v(_t, {
|
|
5837
5847
|
key: A.id,
|
|
5838
|
-
modelValue:
|
|
5839
|
-
"onUpdate:modelValue": ($) =>
|
|
5848
|
+
modelValue: V.value,
|
|
5849
|
+
"onUpdate:modelValue": ($) => V.value = $,
|
|
5840
5850
|
componentId: A.id,
|
|
5841
5851
|
"complete-form-schema": n.completeFormSchema,
|
|
5842
5852
|
onSelectionChange: M,
|
|
@@ -5845,7 +5855,7 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5845
5855
|
}
|
|
5846
5856
|
}
|
|
5847
5857
|
ve(() => n.modelValue, (L) => {
|
|
5848
|
-
r.value = L,
|
|
5858
|
+
r.value = L, t.value = `${L.id}-component`, Vo(f);
|
|
5849
5859
|
}, {
|
|
5850
5860
|
deep: !0
|
|
5851
5861
|
});
|
|
@@ -5866,7 +5876,7 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5866
5876
|
I && I.addEventListener("scroll", O);
|
|
5867
5877
|
}
|
|
5868
5878
|
}
|
|
5869
|
-
|
|
5879
|
+
Ue(() => {
|
|
5870
5880
|
if (f.value && l.value && l.value.schema) {
|
|
5871
5881
|
const L = f.value.querySelector(`[data-dragref='${l.value.schema.id}-container']`);
|
|
5872
5882
|
u && L && u.attachComponents(L, r.value), i.value = l.value.canNested !== void 0 ? l.value.canNested : i.value, o.value = l.value.canDelete !== void 0 ? l.value.canDelete : o.value, a.value = l.value.canMove !== void 0 ? l.value.canMove : a.value, d.value = l.value.styles || "", s.value = l.value.designerClass || "", f.value && (f.value.componentInstance = l, f.value.designItemContext = b), l.value.belongedComponentId = c.value;
|
|
@@ -5881,9 +5891,9 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5881
5891
|
const I = f.value;
|
|
5882
5892
|
if (I) {
|
|
5883
5893
|
const A = document.getElementsByClassName("dgComponentFocused");
|
|
5884
|
-
A && A.length === 1 && A[0] === f.value || (Array.from(A).forEach(($) => $.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(($) => $.classList.remove("dgComponentSelected")), I.classList.add("dgComponentFocused"),
|
|
5894
|
+
A && A.length === 1 && A[0] === f.value || (Array.from(A).forEach(($) => $.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(($) => $.classList.remove("dgComponentSelected")), I.classList.add("dgComponentFocused"), e.emit("selectionChange", r.value.type, r.value, c.value, l.value), l.value.getDraggableDesignItemElement && (E = l.value.getDraggableDesignItemElement(b), E && E.value && E.value.classList.add("dgComponentSelected")));
|
|
5885
5895
|
}
|
|
5886
|
-
|
|
5896
|
+
Gt(E == null ? void 0 : E.value);
|
|
5887
5897
|
}
|
|
5888
5898
|
return () => r.value.type === "component-ref" ? Y(r.value) : v("div", {
|
|
5889
5899
|
id: `${r.value.id}-design-item`,
|
|
@@ -5893,12 +5903,12 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5893
5903
|
onClick: W
|
|
5894
5904
|
}, [g(r.value), C(r.value)]);
|
|
5895
5905
|
}
|
|
5896
|
-
}),
|
|
5906
|
+
}), Ds = /* @__PURE__ */ Te({
|
|
5897
5907
|
name: "FDesignerCanvas",
|
|
5898
|
-
props:
|
|
5908
|
+
props: Ua,
|
|
5899
5909
|
emits: ["init", "selectionChange", "canvasChanged", "dragEnd"],
|
|
5900
|
-
setup(n,
|
|
5901
|
-
const
|
|
5910
|
+
setup(n, e) {
|
|
5911
|
+
const t = m(), a = m(), o = m(), i = m(), r = m(), c = m(), d = m(n.componentId);
|
|
5902
5912
|
let s, h;
|
|
5903
5913
|
const f = {
|
|
5904
5914
|
eventsEditorUtils: me("eventsEditorUtils"),
|
|
@@ -5909,7 +5919,7 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5909
5919
|
metadataService: me("Meatdata_Http_Service_Token"),
|
|
5910
5920
|
schemaService: me("schemaService"),
|
|
5911
5921
|
useFormCommand: me("useFormCommand"),
|
|
5912
|
-
modalService: me(
|
|
5922
|
+
modalService: me(ko),
|
|
5913
5923
|
formStateMachineUtils: me("useFormStateMachine"),
|
|
5914
5924
|
messagerService: me("FMessageBoxService")
|
|
5915
5925
|
};
|
|
@@ -5921,13 +5931,13 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5921
5931
|
schema: a.value,
|
|
5922
5932
|
parent: void 0
|
|
5923
5933
|
});
|
|
5924
|
-
const l =
|
|
5934
|
+
const l = U(() => ({
|
|
5925
5935
|
"d-flex": !0,
|
|
5926
5936
|
"flex-fill": !0,
|
|
5927
5937
|
"flex-column": !0
|
|
5928
5938
|
}));
|
|
5929
5939
|
ve(Ke, () => {
|
|
5930
|
-
pt(o.value),
|
|
5940
|
+
pt(o.value), e.emit("canvasChanged");
|
|
5931
5941
|
}, {
|
|
5932
5942
|
flush: "post"
|
|
5933
5943
|
});
|
|
@@ -5939,21 +5949,21 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5939
5949
|
}), s.observe(i.value);
|
|
5940
5950
|
}
|
|
5941
5951
|
function b(j, T, F, y) {
|
|
5942
|
-
|
|
5952
|
+
e.emit("selectionChange", j, T, F, y);
|
|
5943
5953
|
}
|
|
5944
5954
|
function D() {
|
|
5945
|
-
|
|
5955
|
+
e.emit("dragEnd");
|
|
5946
5956
|
}
|
|
5947
5957
|
function B() {
|
|
5948
5958
|
i.value.addEventListener("scroll", (j) => {
|
|
5949
5959
|
pt(i.value);
|
|
5950
5960
|
});
|
|
5951
5961
|
}
|
|
5952
|
-
return
|
|
5953
|
-
o.value && u.initializeDragula(o.value),
|
|
5962
|
+
return Ue(() => {
|
|
5963
|
+
o.value && u.initializeDragula(o.value), t.value = n.modelValue, e.emit("init", u), p(), B();
|
|
5954
5964
|
}), vt(() => {
|
|
5955
5965
|
s && (s.unobserve(o.value), s.disconnect(), s = null);
|
|
5956
|
-
}),
|
|
5966
|
+
}), e.expose({
|
|
5957
5967
|
refreshCanvas: ni,
|
|
5958
5968
|
designerCanvasElementRef: o
|
|
5959
5969
|
}), () => v("div", {
|
|
@@ -5964,16 +5974,16 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5964
5974
|
}, [v("div", {
|
|
5965
5975
|
ref: o,
|
|
5966
5976
|
class: l.value
|
|
5967
|
-
}, [
|
|
5968
|
-
key:
|
|
5969
|
-
modelValue:
|
|
5970
|
-
"onUpdate:modelValue": (j) =>
|
|
5977
|
+
}, [t.value && v(_t, {
|
|
5978
|
+
key: Eo.value,
|
|
5979
|
+
modelValue: t.value,
|
|
5980
|
+
"onUpdate:modelValue": (j) => t.value = j,
|
|
5971
5981
|
onSelectionChange: b,
|
|
5972
5982
|
componentId: d.value,
|
|
5973
5983
|
onDragEnd: D
|
|
5974
5984
|
}, null)])])]);
|
|
5975
5985
|
}
|
|
5976
|
-
}),
|
|
5986
|
+
}), Ui = {
|
|
5977
5987
|
id: { type: String, default: "" },
|
|
5978
5988
|
componentId: { type: String, default: "" },
|
|
5979
5989
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -5987,20 +5997,20 @@ const _t = /* @__PURE__ */ Te({
|
|
|
5987
5997
|
*/
|
|
5988
5998
|
modelValue: { type: Object }
|
|
5989
5999
|
};
|
|
5990
|
-
function Wi(n,
|
|
6000
|
+
function Wi(n, e, t) {
|
|
5991
6001
|
var S;
|
|
5992
|
-
const a =
|
|
6002
|
+
const a = t && t.getStyles && t.getStyles() || "", o = m();
|
|
5993
6003
|
function i() {
|
|
5994
|
-
return
|
|
6004
|
+
return t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
5995
6005
|
}
|
|
5996
6006
|
function r() {
|
|
5997
6007
|
return !1;
|
|
5998
6008
|
}
|
|
5999
6009
|
function c() {
|
|
6000
|
-
return
|
|
6010
|
+
return t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
6001
6011
|
}
|
|
6002
6012
|
function d() {
|
|
6003
|
-
return
|
|
6013
|
+
return t && t.checkCanAddComponent ? t.checkCanAddComponent() : !0;
|
|
6004
6014
|
}
|
|
6005
6015
|
function s() {
|
|
6006
6016
|
return !0;
|
|
@@ -6011,7 +6021,7 @@ function Wi(n, t, e) {
|
|
|
6011
6021
|
const g = m(w == null ? void 0 : w.value.parent), M = h(g);
|
|
6012
6022
|
return M || null;
|
|
6013
6023
|
}
|
|
6014
|
-
function f(w =
|
|
6024
|
+
function f(w = e) {
|
|
6015
6025
|
var C;
|
|
6016
6026
|
const { componentInstance: g, designerItemElementRef: M } = w;
|
|
6017
6027
|
if (!g || !g.value)
|
|
@@ -6020,37 +6030,37 @@ function Wi(n, t, e) {
|
|
|
6020
6030
|
return g.value.canMove || g.value.canAdd || g.value.canDelete || k && ((C = k()) != null && C.length) ? M : f(w.parent);
|
|
6021
6031
|
}
|
|
6022
6032
|
function u() {
|
|
6023
|
-
if (
|
|
6024
|
-
return
|
|
6033
|
+
if (t && t.getCustomButtons)
|
|
6034
|
+
return t.getCustomButtons();
|
|
6025
6035
|
}
|
|
6026
6036
|
function l(w) {
|
|
6027
|
-
return !!
|
|
6037
|
+
return !!t && t.canAccepts(w);
|
|
6028
6038
|
}
|
|
6029
6039
|
function p() {
|
|
6030
|
-
return (
|
|
6040
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
6031
6041
|
}
|
|
6032
6042
|
function b() {
|
|
6033
6043
|
}
|
|
6034
6044
|
function D(w, g) {
|
|
6035
|
-
!w || !g ||
|
|
6045
|
+
!w || !g || t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w, g);
|
|
6036
6046
|
}
|
|
6037
6047
|
function B(w) {
|
|
6038
6048
|
const { componentType: g } = w, M = me("designer-host-service");
|
|
6039
6049
|
let k = Yt(g, w, M);
|
|
6040
|
-
|
|
6050
|
+
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(w, k));
|
|
6041
6051
|
const C = g.toLowerCase().replace(/-/g, "_");
|
|
6042
6052
|
return k && !k.id && k.type === g && (k.id = `${C}_${Math.random().toString().slice(2, 6)}`), k;
|
|
6043
6053
|
}
|
|
6044
6054
|
function j(w) {
|
|
6045
6055
|
}
|
|
6046
6056
|
function T(...w) {
|
|
6047
|
-
return
|
|
6057
|
+
return t && t.getPropsConfig ? t.getPropsConfig(...w) : [];
|
|
6048
6058
|
}
|
|
6049
6059
|
function F() {
|
|
6050
6060
|
}
|
|
6051
6061
|
function y(w) {
|
|
6052
|
-
if (
|
|
6053
|
-
return
|
|
6062
|
+
if (t && t.onPropertyChanged)
|
|
6063
|
+
return t.onPropertyChanged(w);
|
|
6054
6064
|
}
|
|
6055
6065
|
return o.value = {
|
|
6056
6066
|
canMove: i(),
|
|
@@ -6060,8 +6070,8 @@ function Wi(n, t, e) {
|
|
|
6060
6070
|
canNested: !s(),
|
|
6061
6071
|
contents: [],
|
|
6062
6072
|
elementRef: n,
|
|
6063
|
-
parent: (S =
|
|
6064
|
-
schema:
|
|
6073
|
+
parent: (S = e.parent) == null ? void 0 : S.componentInstance,
|
|
6074
|
+
schema: e.schema,
|
|
6065
6075
|
styles: a,
|
|
6066
6076
|
canAccepts: l,
|
|
6067
6077
|
getBelongedComponentInstance: h,
|
|
@@ -6073,38 +6083,38 @@ function Wi(n, t, e) {
|
|
|
6073
6083
|
onChildElementMovedOut: j,
|
|
6074
6084
|
addNewChildComponentSchema: B,
|
|
6075
6085
|
onRemoveComponent: F,
|
|
6076
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
6077
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
6086
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || m(!1),
|
|
6087
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || m(!1),
|
|
6078
6088
|
onPropertyChanged: y,
|
|
6079
6089
|
getCustomButtons: u
|
|
6080
6090
|
}, o;
|
|
6081
6091
|
}
|
|
6082
|
-
const
|
|
6092
|
+
const Es = /* @__PURE__ */ Te({
|
|
6083
6093
|
name: "FDesignerInnerItem",
|
|
6084
|
-
props:
|
|
6094
|
+
props: Ui,
|
|
6085
6095
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
6086
|
-
setup(n,
|
|
6087
|
-
const
|
|
6096
|
+
setup(n, e) {
|
|
6097
|
+
const t = m(n.canMove), a = m(n.canAdd), o = m(n.canDelete), i = m(!1), r = m(n.contentKey), c = m(n.childType), d = m(n.childLabel), s = m(n.modelValue), h = m(""), f = m(), u = me("canvas-dragula"), l = m(), p = me("design-item-context"), b = {
|
|
6088
6098
|
designerItemElementRef: f,
|
|
6089
6099
|
componentInstance: l,
|
|
6090
6100
|
schema: s.value,
|
|
6091
6101
|
parent: p,
|
|
6092
|
-
setupContext:
|
|
6102
|
+
setupContext: e
|
|
6093
6103
|
};
|
|
6094
6104
|
dt("design-item-context", b);
|
|
6095
|
-
const D =
|
|
6105
|
+
const D = U(() => {
|
|
6096
6106
|
var W;
|
|
6097
6107
|
const O = ((W = l.value) == null ? void 0 : W.getCustomButtons) && l.value.getCustomButtons();
|
|
6098
6108
|
return {
|
|
6099
6109
|
"farris-component": !0,
|
|
6100
6110
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
6101
6111
|
"flex-fill": n.id === "root-component",
|
|
6102
|
-
"position-relative":
|
|
6112
|
+
"position-relative": t.value || o.value || (O == null ? void 0 : O.length),
|
|
6103
6113
|
"farris-nested": i.value,
|
|
6104
|
-
"can-move":
|
|
6114
|
+
"can-move": t.value,
|
|
6105
6115
|
"d-none": f.value && f.value.classList.contains("d-none")
|
|
6106
6116
|
};
|
|
6107
|
-
}), B =
|
|
6117
|
+
}), B = U(() => {
|
|
6108
6118
|
const O = {};
|
|
6109
6119
|
return h.value && h.value.split(";").reduce((P, W) => {
|
|
6110
6120
|
const [L, E] = W.split(":");
|
|
@@ -6116,7 +6126,7 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6116
6126
|
const W = p.schema[r.value].findIndex((L) => L.id === P.id);
|
|
6117
6127
|
if (W > -1) {
|
|
6118
6128
|
const L = p.schema[r.value].length, E = p.schema[r.value][W % L];
|
|
6119
|
-
p.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), p.schema[r.value].splice(W, 1), Ke.value++,
|
|
6129
|
+
p.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), p.schema[r.value].splice(W, 1), Ke.value++, e.emit("removeComponent"), e.emit("selectionChange");
|
|
6120
6130
|
}
|
|
6121
6131
|
}
|
|
6122
6132
|
}
|
|
@@ -6128,7 +6138,7 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6128
6138
|
parentComponentInstance: l.value,
|
|
6129
6139
|
targetPosition: -1
|
|
6130
6140
|
}, W = l.value.addNewChildComponentSchema(P);
|
|
6131
|
-
s.value[r.value].push(W),
|
|
6141
|
+
s.value[r.value].push(W), e.emit("addComponent");
|
|
6132
6142
|
}
|
|
6133
6143
|
}
|
|
6134
6144
|
function F() {
|
|
@@ -6150,13 +6160,13 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6150
6160
|
class: "btn component-settings-button",
|
|
6151
6161
|
title: "删除",
|
|
6152
6162
|
ref: "removeComponent",
|
|
6153
|
-
onClick:
|
|
6163
|
+
onClick: $o((P) => j(P, O), ["stop"])
|
|
6154
6164
|
}, [v("i", {
|
|
6155
6165
|
class: "f-icon f-icon-yxs_delete"
|
|
6156
6166
|
}, null)]);
|
|
6157
6167
|
}
|
|
6158
6168
|
function S() {
|
|
6159
|
-
return
|
|
6169
|
+
return t.value && v("div", {
|
|
6160
6170
|
role: "button",
|
|
6161
6171
|
class: "btn component-settings-button",
|
|
6162
6172
|
title: "移动",
|
|
@@ -6207,10 +6217,10 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6207
6217
|
const O = f.value, P = m(O.children[1]);
|
|
6208
6218
|
return Wi(P, b).value;
|
|
6209
6219
|
}
|
|
6210
|
-
|
|
6220
|
+
Ue(() => {
|
|
6211
6221
|
if (f.value) {
|
|
6212
6222
|
const O = f.value.querySelector(`[data-dragref='${s.value.id}-container']`);
|
|
6213
|
-
l.value = O && O.componentInstance ? O.componentInstance.value : Y(), u && O && u.attachComponents(O, s.value), i.value = l.value.canNested !== void 0 ? l.value.canNested : i.value, a.value = l.value.canAdd !== void 0 ? l.value.canAdd : a.value, o.value = l.value.canDelete !== void 0 ? l.value.canDelete : o.value,
|
|
6223
|
+
l.value = O && O.componentInstance ? O.componentInstance.value : Y(), u && O && u.attachComponents(O, s.value), i.value = l.value.canNested !== void 0 ? l.value.canNested : i.value, a.value = l.value.canAdd !== void 0 ? l.value.canAdd : a.value, o.value = l.value.canDelete !== void 0 ? l.value.canDelete : o.value, t.value = l.value.canMove !== void 0 ? l.value.canMove : t.value, h.value = l.value.styles || "", f.value && (f.value.componentInstance = l, f.value.designItemContext = b);
|
|
6214
6224
|
}
|
|
6215
6225
|
C(), Ke.value++;
|
|
6216
6226
|
}), un(() => {
|
|
@@ -6222,9 +6232,9 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6222
6232
|
const W = f.value;
|
|
6223
6233
|
if (W) {
|
|
6224
6234
|
const L = document.getElementsByClassName("dgComponentFocused");
|
|
6225
|
-
L && L.length === 1 && L[0] === f.value && f.value.classList.contains("dgComponentSelected") || (Array.from(L).forEach((I) => I.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((I) => I.classList.remove("dgComponentSelected")), W.classList.add("dgComponentFocused"),
|
|
6235
|
+
L && L.length === 1 && L[0] === f.value && f.value.classList.contains("dgComponentSelected") || (Array.from(L).forEach((I) => I.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((I) => I.classList.remove("dgComponentSelected")), W.classList.add("dgComponentFocused"), e.emit("selectionChange", s.value.type, s.value, n.componentId, l.value), l.value.getDraggableDesignItemElement && (P = l.value.getDraggableDesignItemElement(b), P && P.value && P.value.classList.add("dgComponentSelected")));
|
|
6226
6236
|
}
|
|
6227
|
-
|
|
6237
|
+
Gt(P == null ? void 0 : P.value);
|
|
6228
6238
|
}
|
|
6229
6239
|
return () => v("div", {
|
|
6230
6240
|
id: `${n.id}-design-item`,
|
|
@@ -6232,20 +6242,21 @@ const Ds = /* @__PURE__ */ Te({
|
|
|
6232
6242
|
class: D.value,
|
|
6233
6243
|
style: B.value,
|
|
6234
6244
|
onClick: te
|
|
6235
|
-
}, [g(s.value),
|
|
6245
|
+
}, [g(s.value), e.slots.default && e.slots.default()]);
|
|
6236
6246
|
}
|
|
6237
6247
|
});
|
|
6238
6248
|
export {
|
|
6239
6249
|
xe as DgControl,
|
|
6240
|
-
|
|
6241
|
-
|
|
6250
|
+
Ds as FDesignerCanvas,
|
|
6251
|
+
Es as FDesignerInnerItem,
|
|
6242
6252
|
_t as FDesignerItem,
|
|
6243
|
-
|
|
6253
|
+
xs as UseTemplateDragAndDropRules,
|
|
6244
6254
|
Ke as canvasChanged,
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
Ss as
|
|
6255
|
+
Ua as designerCanvasProps,
|
|
6256
|
+
po as setPositionForSelectedElement,
|
|
6257
|
+
Gt as setPositionOfButtonGroup,
|
|
6258
|
+
Ss as setPositionOfSelectedComponentBtnGroup,
|
|
6259
|
+
Ts as useDesignerComponent,
|
|
6249
6260
|
Wi as useDesignerInnerComponent,
|
|
6250
|
-
|
|
6261
|
+
Fs as useDragulaCommonRule
|
|
6251
6262
|
};
|