@farris/ui-vue 1.6.5-beta.7 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var an = Object.defineProperty;
|
|
2
2
|
var ln = (t, e, n) => e in t ? an(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var G = (t, e, n) => ln(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { ref as Y, computed as ee, defineComponent as Se, watch as we, createVNode as O, createTextVNode as Ie, Teleport as cn, getCurrentInstance as un, reactive as Fe, withDirectives as Ae, resolveDirective as Re, onMounted as ke, onUnmounted as gt, nextTick as
|
|
5
|
-
import {
|
|
4
|
+
import { ref as Y, computed as ee, defineComponent as Se, watch as we, createVNode as O, createTextVNode as Ie, Teleport as cn, getCurrentInstance as un, reactive as Fe, withDirectives as Ae, resolveDirective as Re, onMounted as ke, onUnmounted as gt, nextTick as De, inject as de, provide as mt, onBeforeUnmount as dn, withModifiers as fn } from "vue";
|
|
5
|
+
import { cloneDeep as xe, isPlainObject as lt } from "lodash-es";
|
|
6
6
|
import pn from "../response-toolbar/index.esm.js";
|
|
7
7
|
import { getCustomClass as oe, useGuid as gn, withInstall as mn } from "../common/index.esm.js";
|
|
8
8
|
import { getSchemaByTypeForDesigner as ht } from "../dynamic-resolver/index.esm.js";
|
|
@@ -11,7 +11,7 @@ import { useDesignerInnerComponent as vn, useDesignerComponent as bn } from "../
|
|
|
11
11
|
function vt(t, e) {
|
|
12
12
|
let n;
|
|
13
13
|
function o(c) {
|
|
14
|
-
const { properties: f, title: h, ignore: u } = c, a = u && Array.isArray(u), S = Object.keys(f).reduce((F,
|
|
14
|
+
const { properties: f, title: h, ignore: u } = c, a = u && Array.isArray(u), S = Object.keys(f).reduce((F, M) => ((!a || !u.find((R) => R === M)) && (F[M] = f[M].type === "object" && f[M].properties ? o(f[M]) : xe(f[M].default)), F), {});
|
|
15
15
|
if (h && (!a || !u.find((F) => F === "id"))) {
|
|
16
16
|
const F = h.toLowerCase().replace(/-/g, "_");
|
|
17
17
|
S.id = `${F}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -73,21 +73,21 @@ function vt(t, e) {
|
|
|
73
73
|
return c;
|
|
74
74
|
const a = s(c, u), S = ((h = c.editor) == null ? void 0 : h.type) || "";
|
|
75
75
|
if (S) {
|
|
76
|
-
const F = t[S],
|
|
77
|
-
a.editor =
|
|
76
|
+
const F = t[S], M = s(c.editor, F);
|
|
77
|
+
a.editor = M;
|
|
78
78
|
}
|
|
79
79
|
return a;
|
|
80
80
|
}
|
|
81
81
|
return c;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function C(c) {
|
|
84
84
|
n = c;
|
|
85
85
|
}
|
|
86
|
-
return { getSchemaByType: i, resolveSchemaWithDefaultValue: m, resolveSchemaToProps: l, mappingSchemaToProps: g, setDesignerContext:
|
|
86
|
+
return { getSchemaByType: i, resolveSchemaWithDefaultValue: m, resolveSchemaToProps: l, mappingSchemaToProps: g, setDesignerContext: C };
|
|
87
87
|
}
|
|
88
|
-
const bt = {}, yt = {}, { getSchemaByType: Ct, resolveSchemaWithDefaultValue: yn, resolveSchemaToProps: Cn, mappingSchemaToProps: wn } = vt(bt, yt);
|
|
88
|
+
const bt = {}, yt = {}, { getSchemaByType: Ct, resolveSchemaWithDefaultValue: yn, resolveSchemaToProps: Cn, mappingSchemaToProps: wn, setDesignerContext: ur } = vt(bt, yt);
|
|
89
89
|
function xn(t = {}) {
|
|
90
|
-
function e(m,
|
|
90
|
+
function e(m, C, c, f) {
|
|
91
91
|
if (typeof c == "number")
|
|
92
92
|
return f[m].length === c;
|
|
93
93
|
if (typeof c == "object") {
|
|
@@ -101,20 +101,20 @@ function xn(t = {}) {
|
|
|
101
101
|
}
|
|
102
102
|
return !1;
|
|
103
103
|
}
|
|
104
|
-
function n(m,
|
|
104
|
+
function n(m, C, c, f) {
|
|
105
105
|
return f[m] && f[m].propertyValue && String(f[m].propertyValue.value) === String(c);
|
|
106
106
|
}
|
|
107
107
|
const o = /* @__PURE__ */ new Map([
|
|
108
108
|
["length", e],
|
|
109
109
|
["getProperty", n]
|
|
110
110
|
]);
|
|
111
|
-
Object.keys(t).reduce((m,
|
|
112
|
-
function r(m,
|
|
111
|
+
Object.keys(t).reduce((m, C) => (m.set(C, t[C]), m), o);
|
|
112
|
+
function r(m, C) {
|
|
113
113
|
const c = m;
|
|
114
|
-
return typeof
|
|
114
|
+
return typeof C == "number" ? [{ target: c, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: c, operator: "getProperty", param: m, value: !!C }] : typeof C == "object" ? Object.keys(C).map((f) => {
|
|
115
115
|
if (f === "length")
|
|
116
|
-
return { target: c, operator: "length", param: null, value:
|
|
117
|
-
const h = f, u =
|
|
116
|
+
return { target: c, operator: "length", param: null, value: C[f] };
|
|
117
|
+
const h = f, u = C[f];
|
|
118
118
|
return { target: c, operator: "getProperty", param: h, value: u };
|
|
119
119
|
}) : [];
|
|
120
120
|
}
|
|
@@ -124,18 +124,18 @@ function xn(t = {}) {
|
|
|
124
124
|
return c.push(...h), c;
|
|
125
125
|
}, []);
|
|
126
126
|
}
|
|
127
|
-
function s(m,
|
|
127
|
+
function s(m, C) {
|
|
128
128
|
if (o.has(m.operator)) {
|
|
129
129
|
const c = o.get(m.operator);
|
|
130
|
-
return c && c(m.target, m.param, m.value,
|
|
130
|
+
return c && c(m.target, m.param, m.value, C) || !1;
|
|
131
131
|
}
|
|
132
132
|
return !1;
|
|
133
133
|
}
|
|
134
|
-
function g(m,
|
|
135
|
-
return i(m).reduce((h, u) => h && s(u,
|
|
134
|
+
function g(m, C) {
|
|
135
|
+
return i(m).reduce((h, u) => h && s(u, C), !0);
|
|
136
136
|
}
|
|
137
|
-
function l(m,
|
|
138
|
-
const c = Object.keys(m), f = c.includes("allOf"), h = c.includes("anyOf"), u = f || h, F = (u ? m[u ? f ? "allOf" : "anyOf" : "allOf"] : [m]).map((R) => g(R,
|
|
137
|
+
function l(m, C) {
|
|
138
|
+
const c = Object.keys(m), f = c.includes("allOf"), h = c.includes("anyOf"), u = f || h, F = (u ? m[u ? f ? "allOf" : "anyOf" : "allOf"] : [m]).map((R) => g(R, C));
|
|
139
139
|
return f ? !F.includes(!1) : F.includes(!0);
|
|
140
140
|
}
|
|
141
141
|
return { parseValueSchema: l };
|
|
@@ -152,7 +152,7 @@ const Tn = {
|
|
|
152
152
|
t.editor && (t.editor[e] = n);
|
|
153
153
|
},
|
|
154
154
|
convertFrom: (t, e, n) => t.editor && Object.prototype.hasOwnProperty.call(t.editor, e) ? t.editor[e] : t[e]
|
|
155
|
-
},
|
|
155
|
+
}, Me = {
|
|
156
156
|
button: { type: "button", name: "按钮" },
|
|
157
157
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
158
158
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -203,14 +203,14 @@ const Tn = {
|
|
|
203
203
|
convertFrom: (t, e, n) => {
|
|
204
204
|
var r;
|
|
205
205
|
const o = t.editor && t.editor[e] ? t.editor[e] : t[e];
|
|
206
|
-
return ((r =
|
|
206
|
+
return ((r = Me[o]) == null ? void 0 : r.name) || o;
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, Dn = {
|
|
209
209
|
convertTo: (t, e, n, o) => {
|
|
210
210
|
t[e] = t[e];
|
|
211
211
|
},
|
|
212
212
|
convertFrom: (t, e, n) => t.editor ? n.getRealEditorType(t.editor.type) : ""
|
|
213
|
-
},
|
|
213
|
+
}, Mn = {
|
|
214
214
|
convertTo: (t, e, n, o) => {
|
|
215
215
|
(t.type === "data-grid-column" || t.type === "tree-grid-column") && (t.formatter ? t.formatter[e] = n : t.formatter = {
|
|
216
216
|
[e]: n
|
|
@@ -388,8 +388,8 @@ function wt(t, e, n) {
|
|
|
388
388
|
["/converter/property-editor.converter", Pn],
|
|
389
389
|
["/converter/items-count.converter", $n],
|
|
390
390
|
["/converter/type.converter", En],
|
|
391
|
-
["/converter/change-editor.converter",
|
|
392
|
-
["/converter/change-formatter.converter",
|
|
391
|
+
["/converter/change-editor.converter", Dn],
|
|
392
|
+
["/converter/change-formatter.converter", Mn],
|
|
393
393
|
["/converter/column-command.converter", kn],
|
|
394
394
|
["/converter/column-option.converter", Bn],
|
|
395
395
|
["/converter/summary.converter", In],
|
|
@@ -442,62 +442,62 @@ function wt(t, e, n) {
|
|
|
442
442
|
const S = u.$converter || a;
|
|
443
443
|
return typeof S == "string" && S && o.has(S) ? o.get(S) || null : S || null;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function C(u, a, S, F, M, R = "", k = "") {
|
|
446
446
|
return Object.keys(u).map((A) => {
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
const I =
|
|
450
|
-
let
|
|
451
|
-
const
|
|
447
|
+
const P = Y(1), p = A, B = u[A], T = Object.keys(B), y = B.title, v = B.type, d = r.get(v) || { type: "input-group", enableClear: !1 }, b = B.editor ? Object.assign({}, d, B.editor) : Object.assign({}, d), D = g(T, B, a), w = l(T, B, a);
|
|
448
|
+
b.readonly = b.readonly === void 0 ? w() : b.readonly;
|
|
449
|
+
const I = B.type === "cascade" ? C(B.properties, a, S, F, M, R, k) : [], V = !0;
|
|
450
|
+
let _ = m(B, k);
|
|
451
|
+
const L = ee({
|
|
452
452
|
get() {
|
|
453
|
-
if (
|
|
454
|
-
if (["class", "style"].find((N) => N === p) && !
|
|
455
|
-
return
|
|
453
|
+
if (P.value) {
|
|
454
|
+
if (["class", "style"].find((N) => N === p) && !_ && (_ = o.get("/converter/appearance.converter") || null), _ && _.convertFrom)
|
|
455
|
+
return _.convertFrom(S, A, M, R);
|
|
456
456
|
const ne = S[A];
|
|
457
|
-
return Object.prototype.hasOwnProperty.call(
|
|
457
|
+
return Object.prototype.hasOwnProperty.call(B, "defaultValue") && (ne === void 0 || typeof ne == "string" && ne === "") ? B.type === "boolean" ? B.defaultValue : B.defaultValue || "" : ne;
|
|
458
458
|
}
|
|
459
459
|
return null;
|
|
460
460
|
},
|
|
461
461
|
set(ne) {
|
|
462
|
-
|
|
462
|
+
P.value += 1, _ && _.convertTo ? (_.convertTo(F, A, ne, M, R), _.convertTo(S, A, ne, M, R)) : (F[A] = ne, S[A] = ne);
|
|
463
463
|
}
|
|
464
|
-
}), { refreshPanelAfterChanged:
|
|
464
|
+
}), { refreshPanelAfterChanged: q, description: Z, isExpand: X, parentPropertyID: J } = B, H = { propertyID: p, propertyName: y, propertyType: v, propertyValue: L, editor: b, visible: D, readonly: w, cascadeConfig: I, hideCascadeTitle: V, refreshPanelAfterChanged: q, description: Z, isExpand: X, parentPropertyID: J };
|
|
465
465
|
return a[p] = H, H;
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
function c(u, a, S = {}) {
|
|
469
|
-
const F = {},
|
|
470
|
-
return
|
|
471
|
-
const
|
|
472
|
-
return { categoryId:
|
|
469
|
+
const F = {}, M = t[u];
|
|
470
|
+
return M && M.categories ? Object.keys(M.categories).map((k) => {
|
|
471
|
+
const x = M.categories[k], A = x == null ? void 0 : x.title, P = C(x.properties || {}, F, {}, S, a);
|
|
472
|
+
return { categoryId: k, categoryName: A, properties: P };
|
|
473
473
|
}) : [];
|
|
474
474
|
}
|
|
475
|
-
function f(u, a, S, F,
|
|
476
|
-
const R = a.$ref.schema,
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
475
|
+
function f(u, a, S, F, M = "") {
|
|
476
|
+
const R = a.$ref.schema, k = a.$ref.converter, x = S[R], A = x.type, P = n(x), p = {}, B = t[A];
|
|
477
|
+
if (B && B.categories) {
|
|
478
|
+
const T = B.categories[u], y = T == null ? void 0 : T.title;
|
|
479
|
+
k && Object.keys(T.properties).forEach((b) => {
|
|
480
|
+
T.properties[b].$converter = k;
|
|
481
481
|
});
|
|
482
|
-
const v = (
|
|
483
|
-
return { categoryId: u, categoryName:
|
|
482
|
+
const v = (T == null ? void 0 : T.properties) || {}, d = C(v, p, P, x, F, M);
|
|
483
|
+
return { categoryId: u, categoryName: y, properties: d };
|
|
484
484
|
}
|
|
485
485
|
return { categoryId: u, categoryName: "", properties: [] };
|
|
486
486
|
}
|
|
487
|
-
function h(u, a, S, F,
|
|
488
|
-
const R = u.type,
|
|
489
|
-
let A =
|
|
487
|
+
function h(u, a, S, F, M) {
|
|
488
|
+
const R = u.type, k = n(u), x = {};
|
|
489
|
+
let A = M || t[R];
|
|
490
490
|
if (A && Object.keys(A).length === 0 && S && S.getPropConfig && (A = S.getPropConfig(F)), A && A.categories) {
|
|
491
|
-
const
|
|
491
|
+
const P = [];
|
|
492
492
|
return Object.keys(A.categories).map((p) => {
|
|
493
|
-
const
|
|
494
|
-
if (
|
|
495
|
-
|
|
493
|
+
const B = A.categories[p];
|
|
494
|
+
if (B.$ref) {
|
|
495
|
+
P.push(f(p, B, u, a, F));
|
|
496
496
|
return;
|
|
497
497
|
}
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
}),
|
|
498
|
+
const T = B == null ? void 0 : B.title, y = B == null ? void 0 : B.tabId, v = B == null ? void 0 : B.tabName, d = B == null ? void 0 : B.hide, b = B == null ? void 0 : B.hideTitle, D = C(B.properties || {}, x, k, u, a, F, B.$converter), { setPropertyRelates: w } = B, I = B == null ? void 0 : B.parentPropertyID;
|
|
499
|
+
P.push({ categoryId: p, categoryName: T, tabId: y, tabName: v, hide: d, properties: D, hideTitle: b, setPropertyRelates: w, parentPropertyID: I });
|
|
500
|
+
}), P;
|
|
501
501
|
}
|
|
502
502
|
return [];
|
|
503
503
|
}
|
|
@@ -509,17 +509,17 @@ function wt(t, e, n) {
|
|
|
509
509
|
}
|
|
510
510
|
const xt = {}, Tt = {};
|
|
511
511
|
wt(xt, Tt, yn);
|
|
512
|
-
const St = {}, Pt = {}, { getSchemaByType: Un, resolveSchemaWithDefaultValue: Hn } = vt(St, Pt), Et = {},
|
|
513
|
-
wt(Et,
|
|
512
|
+
const St = {}, Pt = {}, { getSchemaByType: Un, resolveSchemaWithDefaultValue: Hn, resolveSchemaToProps: dr, mappingSchemaToProps: fr, setDesignerContext: pr } = vt(St, Pt), Et = {}, Dt = {};
|
|
513
|
+
wt(Et, Dt, Hn);
|
|
514
514
|
function $e(t, e, n = /* @__PURE__ */ new Map(), o = (s, g, l, m) => g, r = {}, i = (s) => s) {
|
|
515
|
-
return bt[e.title] = e, yt[e.title] = o, xt[e.title] = r, Tt[e.title] = i, St[e.title] = e, Pt[e.title] = o, Et[e.title] = r,
|
|
515
|
+
return bt[e.title] = e, yt[e.title] = o, xt[e.title] = r, Tt[e.title] = i, St[e.title] = e, Pt[e.title] = o, Et[e.title] = r, Dt[e.title] = i, (s = {}, g = !0) => {
|
|
516
516
|
if (!g)
|
|
517
517
|
return wn(s, n);
|
|
518
|
-
const l = Cn(s, e, n), m = Object.keys(t).reduce((
|
|
518
|
+
const l = Cn(s, e, n), m = Object.keys(t).reduce((C, c) => (C[c] = t[c].default, C), {});
|
|
519
519
|
return Object.assign(m, l);
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Mt(t, e) {
|
|
523
523
|
return { customClass: e.class, customStyle: e.style };
|
|
524
524
|
}
|
|
525
525
|
function zn(t, e) {
|
|
@@ -577,7 +577,7 @@ function Yn() {
|
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
579
|
const Bt = /* @__PURE__ */ new Map([
|
|
580
|
-
["appearance",
|
|
580
|
+
["appearance", Mt],
|
|
581
581
|
["toolbar", zn]
|
|
582
582
|
]), Xn = "https://json-schema.org/draft/2020-12/schema", Qn = "https://farris-design.gitee.io/page-header.schema.json", Zn = "page-header", Jn = "A Farris Container Component", Kn = "object", eo = {
|
|
583
583
|
id: {
|
|
@@ -798,14 +798,14 @@ const Xe = {
|
|
|
798
798
|
props: Xe,
|
|
799
799
|
emits: ["click", "prePaginationClick", "nextPaginationClick"],
|
|
800
800
|
setup(t, e) {
|
|
801
|
-
const n = Y(t.buttons), o = (
|
|
802
|
-
e.emit("click",
|
|
801
|
+
const n = Y(t.buttons), o = (M, R) => {
|
|
802
|
+
e.emit("click", M, R);
|
|
803
803
|
}, r = ee(() => {
|
|
804
|
-
const
|
|
804
|
+
const M = {
|
|
805
805
|
"f-page-header": !0,
|
|
806
806
|
"d-none": !t.visible
|
|
807
807
|
};
|
|
808
|
-
return oe(
|
|
808
|
+
return oe(M, t.customClass);
|
|
809
809
|
}), i = ee(() => oe({
|
|
810
810
|
"f-title-icon": !0
|
|
811
811
|
}, t.iconClass)), s = ee(() => oe({
|
|
@@ -816,18 +816,18 @@ const Xe = {
|
|
|
816
816
|
"f-content": !0
|
|
817
817
|
}, t.contentClass)), m = ee(() => oe({
|
|
818
818
|
"f-page-header-extend": !0
|
|
819
|
-
}, t.downContentClass)),
|
|
819
|
+
}, t.downContentClass)), C = ee(() => ({
|
|
820
820
|
"f-icon f-icon-arrow-w": !0,
|
|
821
821
|
"f-state-disabled": t.prePaginationDisabled
|
|
822
822
|
})), c = ee(() => ({
|
|
823
823
|
"f-icon f-icon-arrow-e": !0,
|
|
824
824
|
"f-state-disabled": t.nextPaginationDisabled
|
|
825
825
|
}));
|
|
826
|
-
function f(
|
|
827
|
-
t.prePaginationDisabled || e.emit("prePaginationClick",
|
|
826
|
+
function f(M) {
|
|
827
|
+
t.prePaginationDisabled || e.emit("prePaginationClick", M);
|
|
828
828
|
}
|
|
829
|
-
function h(
|
|
830
|
-
t.nextPaginationDisabled || e.emit("nextPaginationClick",
|
|
829
|
+
function h(M) {
|
|
830
|
+
t.nextPaginationDisabled || e.emit("nextPaginationClick", M);
|
|
831
831
|
}
|
|
832
832
|
function u() {
|
|
833
833
|
return e.slots.titleContent ? O("div", {
|
|
@@ -847,7 +847,7 @@ const Xe = {
|
|
|
847
847
|
}, [t.subTitle]) : "", t.showPagination ? O("div", {
|
|
848
848
|
class: "f-title-pagination"
|
|
849
849
|
}, [O("span", {
|
|
850
|
-
class:
|
|
850
|
+
class: C.value,
|
|
851
851
|
onClick: f
|
|
852
852
|
}, null), O("span", {
|
|
853
853
|
class: c.value,
|
|
@@ -878,8 +878,8 @@ const Xe = {
|
|
|
878
878
|
class: m.value
|
|
879
879
|
}, [t.downContentRenderFunction()]) : null;
|
|
880
880
|
}
|
|
881
|
-
return we(() => t.buttons, (
|
|
882
|
-
n.value =
|
|
881
|
+
return we(() => t.buttons, (M) => {
|
|
882
|
+
n.value = M;
|
|
883
883
|
}, {
|
|
884
884
|
deep: !0
|
|
885
885
|
}), () => t.visible ? O("div", {
|
|
@@ -890,7 +890,7 @@ const Xe = {
|
|
|
890
890
|
}
|
|
891
891
|
});
|
|
892
892
|
function io(t, e, n) {
|
|
893
|
-
var
|
|
893
|
+
var y;
|
|
894
894
|
const o = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", i = Y();
|
|
895
895
|
let s;
|
|
896
896
|
function g() {
|
|
@@ -902,7 +902,7 @@ function io(t, e, n) {
|
|
|
902
902
|
function m() {
|
|
903
903
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function C() {
|
|
906
906
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
907
907
|
}
|
|
908
908
|
function c(v) {
|
|
@@ -910,18 +910,18 @@ function io(t, e, n) {
|
|
|
910
910
|
return null;
|
|
911
911
|
if (v.value.schema && v.value.schema.type === "component")
|
|
912
912
|
return v.value;
|
|
913
|
-
const d = Y(v == null ? void 0 : v.value.parent),
|
|
914
|
-
return
|
|
913
|
+
const d = Y(v == null ? void 0 : v.value.parent), b = c(d);
|
|
914
|
+
return b || null;
|
|
915
915
|
}
|
|
916
916
|
function f(v = e) {
|
|
917
|
-
var
|
|
917
|
+
var w;
|
|
918
918
|
if (n != null && n.getDraggableDesignItemElement)
|
|
919
919
|
return n.getDraggableDesignItemElement(v);
|
|
920
|
-
const { componentInstance: d, designerItemElementRef:
|
|
920
|
+
const { componentInstance: d, designerItemElementRef: b } = v;
|
|
921
921
|
if (!d || !d.value)
|
|
922
922
|
return null;
|
|
923
923
|
const { getCustomButtons: D } = d.value;
|
|
924
|
-
return d.value.canMove || D && ((
|
|
924
|
+
return d.value.canMove || D && ((w = D()) != null && w.length) ? b : f(v.parent);
|
|
925
925
|
}
|
|
926
926
|
function h(v) {
|
|
927
927
|
return !!n && n.canAccepts(v);
|
|
@@ -932,56 +932,56 @@ function io(t, e, n) {
|
|
|
932
932
|
function a() {
|
|
933
933
|
}
|
|
934
934
|
function S(v, d) {
|
|
935
|
-
var
|
|
936
|
-
!v || !d || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(v, d), (
|
|
935
|
+
var b;
|
|
936
|
+
!v || !d || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(v, d), (b = e == null ? void 0 : e.setupContext) == null || b.emit("dragEnd"));
|
|
937
937
|
}
|
|
938
938
|
function F(v, d) {
|
|
939
|
-
const { componentType:
|
|
940
|
-
let D = ht(
|
|
939
|
+
const { componentType: b } = v;
|
|
940
|
+
let D = ht(b, v, d);
|
|
941
941
|
n && n.onResolveNewComponentSchema && (D = n.onResolveNewComponentSchema(v, D));
|
|
942
|
-
const
|
|
943
|
-
return D && !D.id && D.type ===
|
|
942
|
+
const w = b.toLowerCase().replace(/-/g, "_");
|
|
943
|
+
return D && !D.id && D.type === b && (D.id = `${w}_${Math.random().toString().slice(2, 6)}`), D;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function M(v) {
|
|
946
946
|
v && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(v);
|
|
947
947
|
}
|
|
948
948
|
function R(...v) {
|
|
949
949
|
if (n && n.getPropsConfig)
|
|
950
950
|
return n.getPropsConfig(...v);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function k(v) {
|
|
953
953
|
if (!v)
|
|
954
954
|
return;
|
|
955
|
-
const d = e == null ? void 0 : e.schema, { formSchemaUtils:
|
|
956
|
-
if (d &&
|
|
957
|
-
const D =
|
|
958
|
-
D > -1 &&
|
|
955
|
+
const d = e == null ? void 0 : e.schema, { formSchemaUtils: b } = v;
|
|
956
|
+
if (d && b.getExpressions().length) {
|
|
957
|
+
const D = b.getExpressions().findIndex((w) => w.target === d.id);
|
|
958
|
+
D > -1 && b.getExpressions().splice(D, 1);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function x(v) {
|
|
962
962
|
if (!v || !(e != null && e.schema))
|
|
963
963
|
return;
|
|
964
|
-
const d = e.schema, { formSchemaUtils:
|
|
965
|
-
|
|
964
|
+
const d = e.schema, { formSchemaUtils: b } = v;
|
|
965
|
+
b.removeCommunicationInComponent(d);
|
|
966
966
|
}
|
|
967
967
|
function A(v) {
|
|
968
|
-
n && n.onRemoveComponent && n.onRemoveComponent(),
|
|
969
|
-
let
|
|
970
|
-
d.type === "component-ref" && (
|
|
971
|
-
const D = t.value.querySelectorAll(`#${
|
|
972
|
-
D != null && D.length && Array.from(D).map((
|
|
968
|
+
n && n.onRemoveComponent && n.onRemoveComponent(), k(v), x(v), e != null && e.schema.contents && e.schema.contents.map((d) => {
|
|
969
|
+
let b = d.id;
|
|
970
|
+
d.type === "component-ref" && (b = d.component);
|
|
971
|
+
const D = t.value.querySelectorAll(`#${b}-design-item`);
|
|
972
|
+
D != null && D.length && Array.from(D).map((w) => {
|
|
973
973
|
var I;
|
|
974
|
-
(I =
|
|
974
|
+
(I = w == null ? void 0 : w.componentInstance) != null && I.value.onRemoveComponent && w.componentInstance.value.onRemoveComponent(v);
|
|
975
975
|
});
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function P() {
|
|
979
979
|
if (n && n.getCustomButtons)
|
|
980
980
|
return n.getCustomButtons();
|
|
981
981
|
}
|
|
982
982
|
function p(v) {
|
|
983
|
-
var
|
|
984
|
-
if (!((
|
|
983
|
+
var b, D;
|
|
984
|
+
if (!((b = e == null ? void 0 : e.schema) != null && b.id))
|
|
985
985
|
return;
|
|
986
986
|
if (!s && v && (s = v.formSchemaUtils), n != null && n.setComponentBasicInfoMap) {
|
|
987
987
|
n.setComponentBasicInfoMap();
|
|
@@ -991,40 +991,40 @@ function io(t, e, n) {
|
|
|
991
991
|
if (n != null && n.getComponentTitle)
|
|
992
992
|
d = n.getComponentTitle();
|
|
993
993
|
else {
|
|
994
|
-
const { text:
|
|
995
|
-
d =
|
|
994
|
+
const { text: w, title: I, label: V, mainTitle: _, name: L, type: q } = e.schema;
|
|
995
|
+
d = w || I || V || _ || L || ((D = Me[q]) == null ? void 0 : D.name);
|
|
996
996
|
}
|
|
997
997
|
d && s.getControlBasicInfoMap().set(e.schema.id, {
|
|
998
998
|
componentTitle: d,
|
|
999
999
|
parentPathName: d
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
var
|
|
1004
|
-
const { changeObject: d } = v, { propertyID:
|
|
1005
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
1006
|
-
const I = s.getControlBasicInfoMap(),
|
|
1007
|
-
var
|
|
1008
|
-
return ((
|
|
1002
|
+
function B(v) {
|
|
1003
|
+
var w;
|
|
1004
|
+
const { changeObject: d } = v, { propertyID: b, propertyValue: D } = d;
|
|
1005
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((w = v == null ? void 0 : v.changeObject) == null ? void 0 : w.propertyID) && b && D && (p(), s)) {
|
|
1006
|
+
const I = s.getControlBasicInfoMap(), V = I.keys().toArray().filter((_) => {
|
|
1007
|
+
var L, q;
|
|
1008
|
+
return ((L = I.get(_)) == null ? void 0 : L.reliedComponentId) === ((q = e == null ? void 0 : e.schema) == null ? void 0 : q.id);
|
|
1009
1009
|
});
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1010
|
+
V != null && V.length && V.forEach((_) => {
|
|
1011
|
+
const L = I.get(_).parentPathName.split(" > ");
|
|
1012
|
+
L[0] = D, I.get(_).parentPathName = L.join(" > ");
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
if (
|
|
1016
|
+
function T(v) {
|
|
1017
|
+
if (B(v), n && n.onPropertyChanged)
|
|
1018
1018
|
return n.onPropertyChanged(v);
|
|
1019
1019
|
}
|
|
1020
1020
|
return i.value = {
|
|
1021
1021
|
canMove: g(),
|
|
1022
1022
|
canSelectParent: l(),
|
|
1023
1023
|
canDelete: m(),
|
|
1024
|
-
canNested: !
|
|
1024
|
+
canNested: !C(),
|
|
1025
1025
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1026
1026
|
elementRef: t,
|
|
1027
|
-
parent: (
|
|
1027
|
+
parent: (y = e == null ? void 0 : e.parent) == null ? void 0 : y.componentInstance,
|
|
1028
1028
|
schema: e == null ? void 0 : e.schema,
|
|
1029
1029
|
styles: o,
|
|
1030
1030
|
designerClass: r,
|
|
@@ -1035,13 +1035,13 @@ function io(t, e, n) {
|
|
|
1035
1035
|
getPropConfig: R,
|
|
1036
1036
|
getDragScopeElement: a,
|
|
1037
1037
|
onAcceptMovedChildElement: S,
|
|
1038
|
-
onChildElementMovedOut:
|
|
1038
|
+
onChildElementMovedOut: M,
|
|
1039
1039
|
addNewChildComponentSchema: F,
|
|
1040
1040
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || Y(!1),
|
|
1041
1041
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || Y(!1),
|
|
1042
1042
|
onRemoveComponent: A,
|
|
1043
|
-
getCustomButtons:
|
|
1044
|
-
onPropertyChanged:
|
|
1043
|
+
getCustomButtons: P,
|
|
1044
|
+
onPropertyChanged: T,
|
|
1045
1045
|
setComponentBasicInfoMap: p,
|
|
1046
1046
|
updateContextSchema: e == null ? void 0 : e.updateContextSchema
|
|
1047
1047
|
}, i;
|
|
@@ -1122,11 +1122,11 @@ function fo(t) {
|
|
|
1122
1122
|
return e.getViewModelById(l).states.map((c) => o(c, m));
|
|
1123
1123
|
}
|
|
1124
1124
|
function i(l) {
|
|
1125
|
-
const m = e.getRootViewModelId(),
|
|
1125
|
+
const m = e.getRootViewModelId(), C = r(l);
|
|
1126
1126
|
if (l === m)
|
|
1127
|
-
return
|
|
1127
|
+
return C;
|
|
1128
1128
|
const c = r(m, "root-component.");
|
|
1129
|
-
return [...
|
|
1129
|
+
return [...C, ...c];
|
|
1130
1130
|
}
|
|
1131
1131
|
function s(l) {
|
|
1132
1132
|
return l.binding && l.binding.path || l.id || "";
|
|
@@ -1321,12 +1321,12 @@ class po {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
updateExpression(e, n, o, r) {
|
|
1323
1323
|
const i = n === "Field" ? e.binding.field : e.id, s = this.buildRule(i, o, r, e.type === "form-group" ? e.id : "");
|
|
1324
|
-
let l = this.getExpressionData().find((
|
|
1325
|
-
const m = (
|
|
1324
|
+
let l = this.getExpressionData().find((C) => C.targetType === n && C.target === i);
|
|
1325
|
+
const m = (C) => C.value.trim() === "";
|
|
1326
1326
|
if (l) {
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1329
|
-
m(s) ? l.rules = l.rules.filter((c) => c.id !== s.id) : (Object.assign(
|
|
1327
|
+
const C = l.rules.find((c) => c.id === s.id);
|
|
1328
|
+
if (C)
|
|
1329
|
+
m(s) ? l.rules = l.rules.filter((c) => c.id !== s.id) : (Object.assign(C, s), r === "validate" && e.type === "form-group" && (C.elementId = e.id));
|
|
1330
1330
|
else {
|
|
1331
1331
|
if (m(s))
|
|
1332
1332
|
return null;
|
|
@@ -1361,10 +1361,10 @@ class po {
|
|
|
1361
1361
|
showMessage: s === "validate" || s === "dataPicking" || s === "required",
|
|
1362
1362
|
showMessageType: s === "dataPicking",
|
|
1363
1363
|
beforeOpen: () => this.onBeforeOpenExpression(e, s, n),
|
|
1364
|
-
onSubmitModal: (
|
|
1365
|
-
const c = this.updateExpression(e, n,
|
|
1364
|
+
onSubmitModal: (C) => {
|
|
1365
|
+
const c = this.updateExpression(e, n, C, s);
|
|
1366
1366
|
if (r) {
|
|
1367
|
-
const f = this.buildRule(g,
|
|
1367
|
+
const f = this.buildRule(g, C, s);
|
|
1368
1368
|
r(f);
|
|
1369
1369
|
}
|
|
1370
1370
|
return c;
|
|
@@ -1464,7 +1464,7 @@ class je {
|
|
|
1464
1464
|
valueField: "value",
|
|
1465
1465
|
idField: "value",
|
|
1466
1466
|
editable: !1,
|
|
1467
|
-
data: [{ value: e.type, name:
|
|
1467
|
+
data: [{ value: e.type, name: Me[e.type] && Me[e.type].name }]
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
@@ -1520,7 +1520,7 @@ class je {
|
|
|
1520
1520
|
* @returns
|
|
1521
1521
|
*/
|
|
1522
1522
|
getPropertyEditorParams(e, n = [], o = "visible", r = {}, i = {}, s = "") {
|
|
1523
|
-
const { getVariables: g, getControlName: l, getStateMachines: m } = fo(this.designerHostService),
|
|
1523
|
+
const { getVariables: g, getControlName: l, getStateMachines: m } = fo(this.designerHostService), C = this.getRealTargetType(e), c = n && n.length > 0 ? n : ["Const", "Variable", "StateMachine", "Expression"], f = {
|
|
1524
1524
|
type: "property-editor",
|
|
1525
1525
|
propertyTypes: c
|
|
1526
1526
|
};
|
|
@@ -1533,7 +1533,7 @@ class je {
|
|
|
1533
1533
|
}, r);
|
|
1534
1534
|
break;
|
|
1535
1535
|
case "Expression":
|
|
1536
|
-
f.expressionConfig = this.getExpressionOptions(e,
|
|
1536
|
+
f.expressionConfig = this.getExpressionOptions(e, C, s || o);
|
|
1537
1537
|
break;
|
|
1538
1538
|
case "StateMachine":
|
|
1539
1539
|
f.stateMachines = m();
|
|
@@ -1643,16 +1643,16 @@ class je {
|
|
|
1643
1643
|
const n = e.propertyValue;
|
|
1644
1644
|
if (!((n && n.type) === "Expression" && n.expressionInfo))
|
|
1645
1645
|
return;
|
|
1646
|
-
const { expressionId: i, expressionInfo: s } = n, { targetId: g, targetType: l, expressionType: m, value:
|
|
1646
|
+
const { expressionId: i, expressionInfo: s } = n, { targetId: g, targetType: l, expressionType: m, value: C, message: c } = s, f = this.formSchemaUtils.getModule();
|
|
1647
1647
|
f.expressions = f.expressions || [];
|
|
1648
1648
|
const { expressions: h } = f;
|
|
1649
1649
|
let u = h.find((S) => S.target === g);
|
|
1650
1650
|
u || (u = { target: g, rules: [], targetType: l }, h.push(u));
|
|
1651
1651
|
const a = u.rules.find((S) => S.type === m);
|
|
1652
1652
|
if (a)
|
|
1653
|
-
a.value =
|
|
1653
|
+
a.value = C, a.message = c;
|
|
1654
1654
|
else {
|
|
1655
|
-
const S = { id: i, type: m, value:
|
|
1655
|
+
const S = { id: i, type: m, value: C, message: c };
|
|
1656
1656
|
u.rules.push(S);
|
|
1657
1657
|
}
|
|
1658
1658
|
delete n.expressionInfo;
|
|
@@ -1912,7 +1912,7 @@ class Oe extends Nt {
|
|
|
1912
1912
|
}
|
|
1913
1913
|
const bo = /* @__PURE__ */ new Map([
|
|
1914
1914
|
["buttons", "items"],
|
|
1915
|
-
["appearance",
|
|
1915
|
+
["appearance", Mt]
|
|
1916
1916
|
]);
|
|
1917
1917
|
function jt(t, e, n) {
|
|
1918
1918
|
return e;
|
|
@@ -1962,7 +1962,7 @@ const yo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
1962
1962
|
"buttons"
|
|
1963
1963
|
], Eo = {
|
|
1964
1964
|
onClick: "点击事件"
|
|
1965
|
-
},
|
|
1965
|
+
}, Do = {
|
|
1966
1966
|
$schema: yo,
|
|
1967
1967
|
$id: Co,
|
|
1968
1968
|
title: wo,
|
|
@@ -1971,7 +1971,7 @@ const yo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
1971
1971
|
properties: So,
|
|
1972
1972
|
required: Po,
|
|
1973
1973
|
events: Eo
|
|
1974
|
-
},
|
|
1974
|
+
}, Mo = "https://json-schema.org/draft/2020-12/schema", ko = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Bo = "response-toolbar-item", Io = "A Farris Toolbar Item Component", Oo = "object", Fo = {
|
|
1975
1975
|
id: {
|
|
1976
1976
|
description: "The unique identifier for a Response Toolbar",
|
|
1977
1977
|
type: "string"
|
|
@@ -2048,7 +2048,7 @@ const yo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
2048
2048
|
], Ro = {
|
|
2049
2049
|
onClick: "点击事件"
|
|
2050
2050
|
}, No = {
|
|
2051
|
-
$schema:
|
|
2051
|
+
$schema: Mo,
|
|
2052
2052
|
$id: ko,
|
|
2053
2053
|
title: Bo,
|
|
2054
2054
|
description: Io,
|
|
@@ -2071,7 +2071,7 @@ const yo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-
|
|
|
2071
2071
|
componentId: { type: String, default: "" }
|
|
2072
2072
|
}), Ze = $e(
|
|
2073
2073
|
Qe,
|
|
2074
|
-
|
|
2074
|
+
Do,
|
|
2075
2075
|
bo,
|
|
2076
2076
|
jt
|
|
2077
2077
|
), Vt = {
|
|
@@ -2115,169 +2115,169 @@ function Je() {
|
|
|
2115
2115
|
return { iconClass: t, shouldShowIcon: e };
|
|
2116
2116
|
}
|
|
2117
2117
|
function _o(t, e) {
|
|
2118
|
-
function n(
|
|
2118
|
+
function n(P) {
|
|
2119
2119
|
return oe({
|
|
2120
2120
|
"dropdown-menu": !0
|
|
2121
|
-
},
|
|
2121
|
+
}, P.menuClass);
|
|
2122
2122
|
}
|
|
2123
|
-
function o(
|
|
2123
|
+
function o(P) {
|
|
2124
2124
|
const p = {
|
|
2125
|
-
disabled: !
|
|
2125
|
+
disabled: !P.enable,
|
|
2126
2126
|
"dropdown-submenu": !0,
|
|
2127
2127
|
"f-rt-dropdown": !0,
|
|
2128
2128
|
"text-truncate": !0
|
|
2129
2129
|
};
|
|
2130
|
-
return oe(p,
|
|
2130
|
+
return oe(p, P.dropdownClass);
|
|
2131
2131
|
}
|
|
2132
|
-
function r(
|
|
2132
|
+
function r(P) {
|
|
2133
2133
|
const p = {
|
|
2134
|
-
disabled: !
|
|
2134
|
+
disabled: !P.enable,
|
|
2135
2135
|
"dropdown-item": !0,
|
|
2136
2136
|
"f-rt-btn": !0,
|
|
2137
2137
|
"text-truncate": !0
|
|
2138
2138
|
};
|
|
2139
|
-
return oe(p,
|
|
2139
|
+
return oe(p, P.dropdownClass);
|
|
2140
2140
|
}
|
|
2141
|
-
function i(
|
|
2141
|
+
function i(P) {
|
|
2142
2142
|
const p = {
|
|
2143
|
-
disabled: !
|
|
2143
|
+
disabled: !P.enable,
|
|
2144
2144
|
"dropdown-item": !0,
|
|
2145
2145
|
"f-rt-btn": !0,
|
|
2146
2146
|
"text-truncate": !0,
|
|
2147
|
-
"f-rt-toggle": !
|
|
2148
|
-
"btn-icontext": !!(
|
|
2149
|
-
"dropdown-toggle": !
|
|
2147
|
+
"f-rt-toggle": !P.split,
|
|
2148
|
+
"btn-icontext": !!(P.icon && P.icon.trim()),
|
|
2149
|
+
"dropdown-toggle": !P.split
|
|
2150
2150
|
};
|
|
2151
|
-
return oe(p,
|
|
2151
|
+
return oe(p, P.dropdownClass);
|
|
2152
2152
|
}
|
|
2153
|
-
function s(
|
|
2153
|
+
function s(P) {
|
|
2154
2154
|
const p = {
|
|
2155
2155
|
"f-rt-btn": !0,
|
|
2156
2156
|
"text-truncate": !0,
|
|
2157
|
-
"btn-icontext": !!(
|
|
2157
|
+
"btn-icontext": !!(P.icon && P.icon.trim()),
|
|
2158
2158
|
"d-block": !0
|
|
2159
2159
|
};
|
|
2160
|
-
return oe(p,
|
|
2160
|
+
return oe(p, P.dropdownClass);
|
|
2161
2161
|
}
|
|
2162
2162
|
let g;
|
|
2163
2163
|
const l = /* @__PURE__ */ new Map();
|
|
2164
2164
|
let m = "";
|
|
2165
|
-
function
|
|
2166
|
-
m = "#" +
|
|
2165
|
+
function C(P) {
|
|
2166
|
+
m = "#" + P;
|
|
2167
2167
|
}
|
|
2168
|
-
function c(
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2168
|
+
function c(P, p, B) {
|
|
2169
|
+
P.stopPropagation();
|
|
2170
|
+
const T = B ? B.id : "__top_item__";
|
|
2171
2171
|
if (p.children && p.children.length && (p.expanded = !p.expanded, p.expanded)) {
|
|
2172
|
-
if (l.has(
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2172
|
+
if (l.has(T) && l.get(T) !== p) {
|
|
2173
|
+
const y = l.get(T);
|
|
2174
|
+
y && (y.expanded = !1, l.delete(T));
|
|
2175
2175
|
}
|
|
2176
|
-
l.set(
|
|
2176
|
+
l.set(T, p);
|
|
2177
2177
|
}
|
|
2178
2178
|
}
|
|
2179
|
-
function f(
|
|
2180
|
-
document.body.click(), p.enable && (
|
|
2179
|
+
function f(P, p) {
|
|
2180
|
+
document.body.click(), p.enable && (P.stopPropagation(), typeof p.onClick == "function" && p.onClick(P, p.id), t.emit("click", P, p.id));
|
|
2181
2181
|
}
|
|
2182
|
-
function h(
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2182
|
+
function h(P, p) {
|
|
2183
|
+
const B = P.target;
|
|
2184
|
+
B.className.indexOf("dropdown-item") < 0 || (B.title = B.scrollWidth > B.clientWidth ? p : "");
|
|
2185
2185
|
}
|
|
2186
|
-
function u(
|
|
2186
|
+
function u(P, p, B) {
|
|
2187
2187
|
if (p.tipsEnable && p.tipsText) {
|
|
2188
|
-
const
|
|
2188
|
+
const T = Fe({
|
|
2189
2189
|
content: p.tipsText,
|
|
2190
2190
|
enable: p.tipsEnable
|
|
2191
2191
|
});
|
|
2192
2192
|
return Ae(O("li", {
|
|
2193
2193
|
class: r(p),
|
|
2194
2194
|
id: p.id,
|
|
2195
|
-
key: p.id + "_" +
|
|
2196
|
-
onClick: (
|
|
2195
|
+
key: p.id + "_" + B,
|
|
2196
|
+
onClick: (y) => f(y, p)
|
|
2197
2197
|
}, [O("span", {
|
|
2198
2198
|
class: s(p)
|
|
2199
2199
|
}, [e.shouldShowIcon(p) && O("i", {
|
|
2200
2200
|
class: e.iconClass(p)
|
|
2201
|
-
}, null), p.text])]), [[Re("tooltip"),
|
|
2201
|
+
}, null), p.text])]), [[Re("tooltip"), T]]);
|
|
2202
2202
|
}
|
|
2203
2203
|
return O("li", {
|
|
2204
2204
|
class: r(p),
|
|
2205
2205
|
id: p.id,
|
|
2206
|
-
onClick: (
|
|
2206
|
+
onClick: (T) => f(T, p)
|
|
2207
2207
|
}, [O("span", {
|
|
2208
2208
|
class: s(p),
|
|
2209
|
-
onMouseenter: (
|
|
2209
|
+
onMouseenter: (T) => h(T, p.text)
|
|
2210
2210
|
}, [e.shouldShowIcon(p) && O("i", {
|
|
2211
2211
|
class: e.iconClass(p)
|
|
2212
2212
|
}, null), p.text])]);
|
|
2213
2213
|
}
|
|
2214
|
-
function a(
|
|
2215
|
-
p.enable && (typeof p.onClick == "function" &&
|
|
2214
|
+
function a(P, p, B) {
|
|
2215
|
+
p.enable && (typeof p.onClick == "function" && B.onClick(P, p.id), t.emit("click", P, p.id), B.split || c(P, p, B));
|
|
2216
2216
|
}
|
|
2217
|
-
function S(
|
|
2218
|
-
|
|
2217
|
+
function S(P, p, B) {
|
|
2218
|
+
P && P.stopPropagation(), c(P, p, B);
|
|
2219
2219
|
}
|
|
2220
|
-
function F(
|
|
2221
|
-
|
|
2222
|
-
const
|
|
2223
|
-
if (p.children && p.children.length && p.expanded && l.has(
|
|
2224
|
-
const
|
|
2225
|
-
|
|
2220
|
+
function F(P, p) {
|
|
2221
|
+
P.stopPropagation();
|
|
2222
|
+
const B = p.id;
|
|
2223
|
+
if (p.children && p.children.length && p.expanded && l.has(B)) {
|
|
2224
|
+
const T = l.get(B);
|
|
2225
|
+
T && (T.expanded = !1, l.delete(B));
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2228
|
+
function M(P, p, B) {
|
|
2229
2229
|
if (p.tipsEnable && p.tipsText) {
|
|
2230
|
-
const
|
|
2230
|
+
const T = Fe({
|
|
2231
2231
|
content: p.tipsText,
|
|
2232
2232
|
enable: p.tipsEnable
|
|
2233
2233
|
});
|
|
2234
2234
|
return O("li", {
|
|
2235
2235
|
class: o(p),
|
|
2236
2236
|
id: p.id,
|
|
2237
|
-
key: p.id + "_" +
|
|
2238
|
-
onClick: (
|
|
2237
|
+
key: p.id + "_" + B,
|
|
2238
|
+
onClick: (y) => a(y, p, P)
|
|
2239
2239
|
}, [Ae(O("span", {
|
|
2240
2240
|
class: i(p)
|
|
2241
2241
|
}, [e.shouldShowIcon(p) && O("i", {
|
|
2242
2242
|
class: e.iconClass(p)
|
|
2243
|
-
}, null), p.text]), [[Re("tooltip"),
|
|
2243
|
+
}, null), p.text]), [[Re("tooltip"), T]]), p.split && O("span", {
|
|
2244
2244
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
2245
|
-
onClick: (
|
|
2245
|
+
onClick: (y) => S(y, p, P)
|
|
2246
2246
|
}, null), g(p, p)]);
|
|
2247
2247
|
}
|
|
2248
2248
|
return O("li", {
|
|
2249
2249
|
class: o(p),
|
|
2250
2250
|
id: p.id,
|
|
2251
|
-
onClick: (
|
|
2252
|
-
onMouseenter: (
|
|
2251
|
+
onClick: (T) => a(T, p, P),
|
|
2252
|
+
onMouseenter: (T) => h(T, p.text)
|
|
2253
2253
|
}, [O("span", {
|
|
2254
2254
|
class: i(p)
|
|
2255
2255
|
}, [e.shouldShowIcon(p) && O("i", {
|
|
2256
2256
|
class: e.iconClass(p)
|
|
2257
2257
|
}, null), p.text]), p.split && O("span", {
|
|
2258
2258
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
2259
|
-
onClick: (
|
|
2259
|
+
onClick: (T) => S(T, p, P)
|
|
2260
2260
|
}, null), g(p, p)]);
|
|
2261
2261
|
}
|
|
2262
|
-
function R(
|
|
2263
|
-
return
|
|
2262
|
+
function R(P) {
|
|
2263
|
+
return P.children.filter((p) => p.visible).map((p, B) => p.children && p.children.length ? M(P, p, B) : u(P, p, B));
|
|
2264
2264
|
}
|
|
2265
|
-
function
|
|
2266
|
-
if (!
|
|
2265
|
+
function k(P, p) {
|
|
2266
|
+
if (!P)
|
|
2267
2267
|
return 1080;
|
|
2268
|
-
let
|
|
2269
|
-
const
|
|
2270
|
-
for (let
|
|
2271
|
-
if (
|
|
2272
|
-
|
|
2268
|
+
let B = -1;
|
|
2269
|
+
const T = P.children.length;
|
|
2270
|
+
for (let y = 0; y < T; y++)
|
|
2271
|
+
if (P.children[y].id === p) {
|
|
2272
|
+
B = y;
|
|
2273
2273
|
break;
|
|
2274
2274
|
}
|
|
2275
|
-
return 1080 +
|
|
2275
|
+
return 1080 + T - B;
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2278
|
-
var I,
|
|
2279
|
-
const
|
|
2280
|
-
display:
|
|
2277
|
+
function x(P, p, B) {
|
|
2278
|
+
var I, V;
|
|
2279
|
+
const T = {
|
|
2280
|
+
display: P.expanded ? "block" : "none",
|
|
2281
2281
|
position: "fixed",
|
|
2282
2282
|
maxWidth: "300px",
|
|
2283
2283
|
minWidth: "120px",
|
|
@@ -2285,62 +2285,62 @@ function _o(t, e) {
|
|
|
2285
2285
|
// 先用固定zIndex,后期会统一调用动态的zIndex
|
|
2286
2286
|
overflowY: "auto",
|
|
2287
2287
|
maxHeight: "none"
|
|
2288
|
-
},
|
|
2289
|
-
if (!
|
|
2290
|
-
return
|
|
2288
|
+
}, y = document.querySelector(m);
|
|
2289
|
+
if (!y)
|
|
2290
|
+
return T;
|
|
2291
2291
|
const v = un();
|
|
2292
|
-
let d = (
|
|
2293
|
-
if (d || (d =
|
|
2294
|
-
return
|
|
2295
|
-
const
|
|
2296
|
-
if (d &&
|
|
2292
|
+
let d = (V = (I = v == null ? void 0 : v.exposed) == null ? void 0 : I.elementRef.value) == null ? void 0 : V.querySelector("#" + p);
|
|
2293
|
+
if (d || (d = y == null ? void 0 : y.querySelector("#" + p)), !d)
|
|
2294
|
+
return T;
|
|
2295
|
+
const b = window.innerWidth, D = window.innerHeight, w = d == null ? void 0 : d.getClientRects();
|
|
2296
|
+
if (d && w && w.length) {
|
|
2297
2297
|
const {
|
|
2298
|
-
top:
|
|
2299
|
-
width:
|
|
2300
|
-
left:
|
|
2298
|
+
top: _,
|
|
2299
|
+
width: L,
|
|
2300
|
+
left: q,
|
|
2301
2301
|
right: Z,
|
|
2302
2302
|
height: X
|
|
2303
|
-
} =
|
|
2304
|
-
|
|
2305
|
-
const H =
|
|
2303
|
+
} = w[0], J = Math.ceil(X + _);
|
|
2304
|
+
T.top = `${J}px`, T.left = `${q}px`;
|
|
2305
|
+
const H = P.id + "_menu", ne = (d == null ? void 0 : d.querySelector("#" + H)) || (y == null ? void 0 : y.querySelector("#" + H)) || null;
|
|
2306
2306
|
if (ne) {
|
|
2307
2307
|
ne.style.visibility = "hidden", ne.style.display = "block";
|
|
2308
2308
|
const N = ne.offsetHeight;
|
|
2309
|
-
|
|
2309
|
+
T.zIndex = P.expanded ? k(y, H) : 1080, T.display === "block" && (ne.style.display = "block");
|
|
2310
2310
|
const U = ne.getBoundingClientRect();
|
|
2311
|
-
if (
|
|
2312
|
-
|
|
2313
|
-
const $ = Math.ceil(
|
|
2314
|
-
|
|
2311
|
+
if (B) {
|
|
2312
|
+
T.top = `${_ - 6}px`;
|
|
2313
|
+
const $ = Math.ceil(L + q);
|
|
2314
|
+
T.left = `${$}px`;
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2316
|
+
b - q - L < U.width && (T.left = `${(B ? q : Z) - U.width}px`), D - _ - X < N ? _ > N ? (T.top = `${_ - N - 6}px`, T.maxHeight = `${_ - 16}px`) : (T.maxHeight = `${D - J}px`, _ > D - _ - X && (T.top = "10px", T.maxHeight = `${_ - 16}px`)) : T.maxHeight = `${D - J}px`, ne.style.visibility = "visible";
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
|
-
return
|
|
2319
|
+
return T;
|
|
2320
2320
|
}
|
|
2321
|
-
g = function(
|
|
2322
|
-
const
|
|
2321
|
+
g = function(P, p) {
|
|
2322
|
+
const B = p ? p.id : P.id;
|
|
2323
2323
|
return O(cn, {
|
|
2324
2324
|
to: m,
|
|
2325
|
-
disabled: !
|
|
2325
|
+
disabled: !P.expanded
|
|
2326
2326
|
}, {
|
|
2327
2327
|
default: () => [O("ul", {
|
|
2328
|
-
class: n(
|
|
2329
|
-
style:
|
|
2330
|
-
id:
|
|
2331
|
-
onWheel: (
|
|
2332
|
-
}, [R(
|
|
2328
|
+
class: n(P),
|
|
2329
|
+
style: x(P, B, p),
|
|
2330
|
+
id: P.id + "_menu",
|
|
2331
|
+
onWheel: (T) => F(T, P)
|
|
2332
|
+
}, [R(P)])]
|
|
2333
2333
|
});
|
|
2334
2334
|
};
|
|
2335
2335
|
function A() {
|
|
2336
|
-
l.forEach((
|
|
2337
|
-
|
|
2336
|
+
l.forEach((P) => {
|
|
2337
|
+
P.expanded = !1;
|
|
2338
2338
|
}), l.clear();
|
|
2339
2339
|
}
|
|
2340
2340
|
return {
|
|
2341
2341
|
renderDropdownMenu: g,
|
|
2342
2342
|
clearAllDropDownMenu: A,
|
|
2343
|
-
updateContainerId:
|
|
2343
|
+
updateContainerId: C
|
|
2344
2344
|
};
|
|
2345
2345
|
}
|
|
2346
2346
|
function Lo(t, e, n) {
|
|
@@ -2376,7 +2376,7 @@ function Lo(t, e, n) {
|
|
|
2376
2376
|
"dropdown-toggle-split": !0
|
|
2377
2377
|
}, a.class);
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2379
|
+
function C(a) {
|
|
2380
2380
|
return a.split ? {
|
|
2381
2381
|
display: "flex"
|
|
2382
2382
|
} : {
|
|
@@ -2405,14 +2405,14 @@ function Lo(t, e, n) {
|
|
|
2405
2405
|
class: g(a)
|
|
2406
2406
|
}, [Ae(O("div", {
|
|
2407
2407
|
class: l(a),
|
|
2408
|
-
style:
|
|
2409
|
-
onClick: (
|
|
2408
|
+
style: C(a),
|
|
2409
|
+
onClick: (M) => a.enable && c(M, a)
|
|
2410
2410
|
}, [n.shouldShowIcon(a) && O("i", {
|
|
2411
2411
|
class: n.iconClass(a)
|
|
2412
2412
|
}, null), O("span", null, [a.text])]), [[Re("tooltip"), F]]), a.split && O("button", {
|
|
2413
2413
|
class: m(a),
|
|
2414
2414
|
style: "border-radius:0 6px 6px 0;",
|
|
2415
|
-
onClick: (
|
|
2415
|
+
onClick: (M) => f(M, a)
|
|
2416
2416
|
}, null), S && r(a)]);
|
|
2417
2417
|
}
|
|
2418
2418
|
return O("div", {
|
|
@@ -2420,7 +2420,7 @@ function Lo(t, e, n) {
|
|
|
2420
2420
|
class: g(a)
|
|
2421
2421
|
}, [O("div", {
|
|
2422
2422
|
class: l(a),
|
|
2423
|
-
style:
|
|
2423
|
+
style: C(a),
|
|
2424
2424
|
onClick: (F) => a.enable && c(F, a)
|
|
2425
2425
|
}, [n.shouldShowIcon(a) && O("i", {
|
|
2426
2426
|
class: n.iconClass(a)
|
|
@@ -2454,29 +2454,29 @@ const {
|
|
|
2454
2454
|
}, l = Y(new Oe(g)), m = {
|
|
2455
2455
|
id: g.id + "width",
|
|
2456
2456
|
text: g.text
|
|
2457
|
-
},
|
|
2457
|
+
}, C = Y(-1), c = Je();
|
|
2458
2458
|
let f = !1;
|
|
2459
2459
|
const {
|
|
2460
2460
|
guid: h,
|
|
2461
2461
|
uuid: u
|
|
2462
2462
|
} = gn(), a = t.id ? t.id : "toolbar-" + h(), S = Y(), F = "dropdown-container-" + a + "-" + u(4), {
|
|
2463
|
-
renderToolbarDropdown:
|
|
2463
|
+
renderToolbarDropdown: M,
|
|
2464
2464
|
clearAllDropDown: R,
|
|
2465
|
-
updateContainerId:
|
|
2465
|
+
updateContainerId: k
|
|
2466
2466
|
} = Lo(t, e, c);
|
|
2467
|
-
|
|
2468
|
-
const
|
|
2469
|
-
function
|
|
2467
|
+
k(F);
|
|
2468
|
+
const x = ee(() => l.value.children.length > 0), A = ee(() => t.visible ? l.value.children.length > 0 ? !0 : o.value.findIndex((N) => N.shown && N.children && N.children.length > 0) > -1 : !1);
|
|
2469
|
+
function P() {
|
|
2470
2470
|
t.visible && !S.value && document && (S.value = document.createElement("div"), S.value.id = F, document.body.appendChild(S.value));
|
|
2471
2471
|
}
|
|
2472
|
-
|
|
2472
|
+
P();
|
|
2473
2473
|
function p() {
|
|
2474
2474
|
S.value && document.body.contains(S.value) && (document.body.removeChild(S.value), S.value = null);
|
|
2475
2475
|
}
|
|
2476
2476
|
we(A, (N, U) => {
|
|
2477
|
-
N ?
|
|
2477
|
+
N ? P() : p();
|
|
2478
2478
|
});
|
|
2479
|
-
const
|
|
2479
|
+
const B = ee(() => {
|
|
2480
2480
|
const N = {
|
|
2481
2481
|
"f-toolbar": !0,
|
|
2482
2482
|
"f-response-toolbar": !0,
|
|
@@ -2486,7 +2486,7 @@ const {
|
|
|
2486
2486
|
"d-none": !t.visible
|
|
2487
2487
|
};
|
|
2488
2488
|
return oe(N, t.customClass);
|
|
2489
|
-
}),
|
|
2489
|
+
}), T = ee(() => ({
|
|
2490
2490
|
"w-100": !0,
|
|
2491
2491
|
"d-flex": !0,
|
|
2492
2492
|
"flex-nowrap": !0,
|
|
@@ -2494,7 +2494,7 @@ const {
|
|
|
2494
2494
|
"justify-content-start": t.alignment === "left",
|
|
2495
2495
|
"justify-content-center": t.alignment === "center"
|
|
2496
2496
|
}));
|
|
2497
|
-
function
|
|
2497
|
+
function y(N) {
|
|
2498
2498
|
N && N.target.closest("ul.dropdown-menu") && N.type === "wheel" || (o.value.filter((U) => U.children && U.children.length > 0).forEach((U) => {
|
|
2499
2499
|
U.expanded = !1;
|
|
2500
2500
|
}), l.value.expanded = !1, R());
|
|
@@ -2513,7 +2513,7 @@ const {
|
|
|
2513
2513
|
function d(N, U) {
|
|
2514
2514
|
document.body.click(), typeof U.onClick == "function" && U.onClick(N, U.id), e.emit("click", N, U.id);
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function b(N, U) {
|
|
2517
2517
|
if (N.tipsEnable && N.tipsText) {
|
|
2518
2518
|
const $ = Fe({
|
|
2519
2519
|
content: N.tipsText,
|
|
@@ -2539,27 +2539,27 @@ const {
|
|
|
2539
2539
|
class: c.iconClass(N)
|
|
2540
2540
|
}, null), N.text]);
|
|
2541
2541
|
}
|
|
2542
|
-
let D = /* @__PURE__ */ new Map(),
|
|
2542
|
+
let D = /* @__PURE__ */ new Map(), w = [];
|
|
2543
2543
|
function I(N) {
|
|
2544
2544
|
const U = Math.ceil(parseFloat(getComputedStyle(N).getPropertyValue("margin-left"))), $ = Math.ceil(parseFloat(getComputedStyle(N).getPropertyValue("margin-right")));
|
|
2545
2545
|
return (U || 0) + N.getBoundingClientRect().width + ($ || 0);
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2548
|
-
if (U <
|
|
2547
|
+
function V(N, U, $) {
|
|
2548
|
+
if (U < C.value) {
|
|
2549
2549
|
let Q = $ - 1;
|
|
2550
2550
|
for (; Q >= 0; Q--) {
|
|
2551
2551
|
const ae = N[Q], se = I(ae);
|
|
2552
|
-
if (U += se, U >=
|
|
2552
|
+
if (U += se, U >= C.value)
|
|
2553
2553
|
break;
|
|
2554
2554
|
}
|
|
2555
2555
|
$ = Q;
|
|
2556
2556
|
}
|
|
2557
|
-
return U -=
|
|
2557
|
+
return U -= C.value, {
|
|
2558
2558
|
start: $,
|
|
2559
2559
|
space: U
|
|
2560
2560
|
};
|
|
2561
2561
|
}
|
|
2562
|
-
function
|
|
2562
|
+
function _(N) {
|
|
2563
2563
|
const U = s.value;
|
|
2564
2564
|
let $ = N;
|
|
2565
2565
|
const ae = Array.from(U.children).filter((ce) => ce.id !== "__more_buttons__"), se = ae.length;
|
|
@@ -2569,44 +2569,44 @@ const {
|
|
|
2569
2569
|
if (ye <= $)
|
|
2570
2570
|
$ -= ye;
|
|
2571
2571
|
else {
|
|
2572
|
-
const Ce =
|
|
2572
|
+
const Ce = V(ae, $, re);
|
|
2573
2573
|
re = Ce.start, $ = Ce.space, ie = !0;
|
|
2574
2574
|
break;
|
|
2575
2575
|
}
|
|
2576
2576
|
}
|
|
2577
|
-
if (!ie &&
|
|
2578
|
-
const ce =
|
|
2577
|
+
if (!ie && w.length > 0) {
|
|
2578
|
+
const ce = V(ae, $, re);
|
|
2579
2579
|
re = ce.start, $ = ce.space;
|
|
2580
2580
|
}
|
|
2581
|
-
const Pe =
|
|
2581
|
+
const Pe = w.length > 0;
|
|
2582
2582
|
for (; re < se; re++) {
|
|
2583
2583
|
const ce = ae[re], ye = I(ce);
|
|
2584
2584
|
D.set(ce.id, !0);
|
|
2585
|
-
const Ce =
|
|
2586
|
-
Ce ? Ce.width = ye :
|
|
2585
|
+
const Ce = w.find((Ee) => Ee.id === ce.id);
|
|
2586
|
+
Ce ? Ce.width = ye : w[Pe ? "unshift" : "push"]({
|
|
2587
2587
|
id: ce.id,
|
|
2588
2588
|
width: ye
|
|
2589
2589
|
});
|
|
2590
2590
|
}
|
|
2591
2591
|
return $;
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2594
|
-
let U =
|
|
2595
|
-
if (
|
|
2593
|
+
function L(N) {
|
|
2594
|
+
let U = _(N);
|
|
2595
|
+
if (w.length) {
|
|
2596
2596
|
let se = 0;
|
|
2597
|
-
for (; se <
|
|
2598
|
-
const ie = t.items.find((re) => re.id ===
|
|
2597
|
+
for (; se < w.length; se++) {
|
|
2598
|
+
const ie = t.items.find((re) => re.id === w[se].id);
|
|
2599
2599
|
if (ie && ie.visible !== !1) {
|
|
2600
|
-
const re =
|
|
2601
|
-
if (U >= re || se ===
|
|
2600
|
+
const re = w[se].width;
|
|
2601
|
+
if (U >= re || se === w.length - 1 && U + C.value >= re)
|
|
2602
2602
|
U -= re;
|
|
2603
2603
|
else
|
|
2604
2604
|
break;
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
2607
|
for (let ie = 0; ie < se; ie++)
|
|
2608
|
-
D.delete(
|
|
2609
|
-
|
|
2608
|
+
D.delete(w[ie].id);
|
|
2609
|
+
w.splice(0, se - 1);
|
|
2610
2610
|
}
|
|
2611
2611
|
const $ = Object.assign({}, l.value);
|
|
2612
2612
|
$.children = [];
|
|
@@ -2616,67 +2616,67 @@ const {
|
|
|
2616
2616
|
}, []);
|
|
2617
2617
|
l.value = Q, o.value = ae;
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2619
|
+
function q(N = -1) {
|
|
2620
2620
|
if (N === 0 || !s.value || !i.value)
|
|
2621
2621
|
return;
|
|
2622
2622
|
N < 0 && (N = i.value.getBoundingClientRect().width);
|
|
2623
2623
|
const U = s.value.getBoundingClientRect().width;
|
|
2624
|
-
(N >= 0 && N < U ||
|
|
2624
|
+
(N >= 0 && N < U || w.length) && (L(N), y());
|
|
2625
2625
|
}
|
|
2626
2626
|
function Z() {
|
|
2627
|
-
return
|
|
2627
|
+
return C.value < 0 && O("div", {
|
|
2628
2628
|
style: "position:absolute;top:-30px;visibility:hidden;"
|
|
2629
|
-
}, [
|
|
2629
|
+
}, [M(new Oe(m))]);
|
|
2630
2630
|
}
|
|
2631
2631
|
const X = new ResizeObserver((N) => {
|
|
2632
2632
|
if (N.length) {
|
|
2633
2633
|
const $ = N[0].contentRect.width;
|
|
2634
|
-
|
|
2634
|
+
q($);
|
|
2635
2635
|
}
|
|
2636
2636
|
});
|
|
2637
2637
|
function J() {
|
|
2638
|
-
D = /* @__PURE__ */ new Map(),
|
|
2638
|
+
D = /* @__PURE__ */ new Map(), w = [];
|
|
2639
2639
|
}
|
|
2640
2640
|
function H() {
|
|
2641
2641
|
i.value && !f && (X.observe(i.value), f = !0);
|
|
2642
2642
|
}
|
|
2643
2643
|
function ne() {
|
|
2644
|
-
if (r.value &&
|
|
2644
|
+
if (r.value && C.value < 0) {
|
|
2645
2645
|
const N = r.value.querySelector("#" + m.id);
|
|
2646
|
-
N && (
|
|
2646
|
+
N && (C.value = I(N));
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
2649
|
return ke(() => {
|
|
2650
|
-
ne(),
|
|
2650
|
+
ne(), q(), H(), document.body.addEventListener("click", y), document.body.addEventListener("wheel", y);
|
|
2651
2651
|
}), gt(() => {
|
|
2652
|
-
X.disconnect(), p(), document.body.removeEventListener("click",
|
|
2652
|
+
X.disconnect(), p(), document.body.removeEventListener("click", y), document.body.removeEventListener("wheel", y);
|
|
2653
2653
|
}), we(() => t.items, () => {
|
|
2654
|
-
o.value = ct(t.items), l.value.children = [],
|
|
2655
|
-
J(),
|
|
2654
|
+
o.value = ct(t.items), l.value.children = [], De(() => {
|
|
2655
|
+
J(), q();
|
|
2656
2656
|
});
|
|
2657
2657
|
}, {
|
|
2658
2658
|
deep: !0
|
|
2659
2659
|
}), we(() => t.visible, (N) => {
|
|
2660
|
-
N &&
|
|
2661
|
-
ne(),
|
|
2660
|
+
N && De(() => {
|
|
2661
|
+
ne(), q(), H();
|
|
2662
2662
|
});
|
|
2663
2663
|
}), e.expose({
|
|
2664
2664
|
elementRef: r
|
|
2665
2665
|
}), () => O("div", {
|
|
2666
|
-
class:
|
|
2666
|
+
class: B.value,
|
|
2667
2667
|
id: a,
|
|
2668
2668
|
ref: r,
|
|
2669
2669
|
style: {
|
|
2670
|
-
"overflow-y":
|
|
2670
|
+
"overflow-y": C.value < 0 ? "hidden" : "initial"
|
|
2671
2671
|
}
|
|
2672
2672
|
}, [t.visible && Z(), t.visible && O("div", {
|
|
2673
2673
|
ref: i,
|
|
2674
|
-
class:
|
|
2674
|
+
class: T.value
|
|
2675
2675
|
}, [O("div", {
|
|
2676
2676
|
ref: s,
|
|
2677
2677
|
class: "d-inline-block f-response-content",
|
|
2678
2678
|
style: "white-space: nowrap;"
|
|
2679
|
-
}, [o.value.filter((N) => N.shown).map((N, U) => N.children && N.children.length > 0 ?
|
|
2679
|
+
}, [o.value.filter((N) => N.shown).map((N, U) => N.children && N.children.length > 0 ? M(N) : b(N, U)), x.value && M(l.value)])])]);
|
|
2680
2680
|
}
|
|
2681
2681
|
});
|
|
2682
2682
|
class qo extends je {
|
|
@@ -2760,14 +2760,14 @@ function Wo(t, e, n) {
|
|
|
2760
2760
|
function m() {
|
|
2761
2761
|
return !1;
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2763
|
+
function C() {
|
|
2764
2764
|
return !0;
|
|
2765
2765
|
}
|
|
2766
2766
|
function c(u) {
|
|
2767
2767
|
return new qo(u, e, o.type).getPropertyConfig(o);
|
|
2768
2768
|
}
|
|
2769
2769
|
function f(u) {
|
|
2770
|
-
var
|
|
2770
|
+
var M;
|
|
2771
2771
|
u && (u.stopPropagation(), u.preventDefault());
|
|
2772
2772
|
const { schema: a } = t;
|
|
2773
2773
|
a.buttons || (a.buttons = []);
|
|
@@ -2775,7 +2775,7 @@ function Wo(t, e, n) {
|
|
|
2775
2775
|
if (a.type)
|
|
2776
2776
|
S = a.type + "-item";
|
|
2777
2777
|
else {
|
|
2778
|
-
const R = (
|
|
2778
|
+
const R = (M = t.parent) == null ? void 0 : M.schema.type;
|
|
2779
2779
|
S = R === "tabs" ? "tab-toolbar-item" : R === "section" ? "section-toolbar-item" : "response-toolbar-item";
|
|
2780
2780
|
}
|
|
2781
2781
|
const F = Ct(S);
|
|
@@ -2797,7 +2797,7 @@ function Wo(t, e, n) {
|
|
|
2797
2797
|
checkCanAddComponent: m,
|
|
2798
2798
|
checkCanDeleteComponent: l,
|
|
2799
2799
|
checkCanMoveComponent: g,
|
|
2800
|
-
hideNestedPaddingInDesginerView:
|
|
2800
|
+
hideNestedPaddingInDesginerView: C,
|
|
2801
2801
|
onResolveNewComponentSchema: s,
|
|
2802
2802
|
getPropsConfig: c,
|
|
2803
2803
|
getCustomButtons: h
|
|
@@ -2817,11 +2817,11 @@ var _t = { exports: {} };
|
|
|
2817
2817
|
})(function() {
|
|
2818
2818
|
return (/* @__PURE__ */ function() {
|
|
2819
2819
|
function n(o, r, i) {
|
|
2820
|
-
function s(m,
|
|
2820
|
+
function s(m, C) {
|
|
2821
2821
|
if (!r[m]) {
|
|
2822
2822
|
if (!o[m]) {
|
|
2823
2823
|
var c = typeof Be == "function" && Be;
|
|
2824
|
-
if (!
|
|
2824
|
+
if (!C && c) return c(m, !0);
|
|
2825
2825
|
if (g) return g(m, !0);
|
|
2826
2826
|
var f = new Error("Cannot find module '" + m + "'");
|
|
2827
2827
|
throw f.code = "MODULE_NOT_FOUND", f;
|
|
@@ -2849,22 +2849,22 @@ var _t = { exports: {} };
|
|
|
2849
2849
|
var h = c.className;
|
|
2850
2850
|
h.length ? l(f).test(h) || (c.className += " " + f) : c.className = f;
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function C(c, f) {
|
|
2853
2853
|
c.className = c.className.replace(l(f), " ").trim();
|
|
2854
2854
|
}
|
|
2855
2855
|
o.exports = {
|
|
2856
2856
|
add: m,
|
|
2857
|
-
rm:
|
|
2857
|
+
rm: C
|
|
2858
2858
|
};
|
|
2859
2859
|
}, {}],
|
|
2860
2860
|
2: [function(n, o, r) {
|
|
2861
2861
|
(function(i) {
|
|
2862
|
-
var s = n("contra/emitter"), g = n("crossvent"), l = n("./classes"), m = document,
|
|
2863
|
-
function c(
|
|
2862
|
+
var s = n("contra/emitter"), g = n("crossvent"), l = n("./classes"), m = document, C = m.documentElement;
|
|
2863
|
+
function c(y, v) {
|
|
2864
2864
|
var d = arguments.length;
|
|
2865
|
-
d === 1 && Array.isArray(
|
|
2866
|
-
var
|
|
2867
|
-
$.moves === void 0 && ($.moves =
|
|
2865
|
+
d === 1 && Array.isArray(y) === !1 && (v = y, y = []);
|
|
2866
|
+
var b, D, w, I, V, _, L, q, Z, X = null, J, H, ne = !1, N = 0, U, $ = v || {};
|
|
2867
|
+
$.moves === void 0 && ($.moves = M), $.accepts === void 0 && ($.accepts = M), $.invalid === void 0 && ($.invalid = zt), $.containers === void 0 && ($.containers = y || []), $.isContainer === void 0 && ($.isContainer = F), $.copy === void 0 && ($.copy = !1), $.copySortSource === void 0 && ($.copySortSource = !1), $.revertOnSpill === void 0 && ($.revertOnSpill = !1), $.removeOnSpill === void 0 && ($.removeOnSpill = !1), $.direction === void 0 && ($.direction = "vertical"), $.ignoreInputTextSelection === void 0 && ($.ignoreInputTextSelection = !0), $.mirrorContainer === void 0 && ($.mirrorContainer = m.body);
|
|
2868
2868
|
var Q = s({
|
|
2869
2869
|
containers: $.containers,
|
|
2870
2870
|
start: Ht,
|
|
@@ -2876,152 +2876,152 @@ var _t = { exports: {} };
|
|
|
2876
2876
|
dragging: !1
|
|
2877
2877
|
});
|
|
2878
2878
|
return $.removeOnSpill === !0 && Q.on("over", Yt).on("out", Xt), se(), Q;
|
|
2879
|
-
function ae(
|
|
2880
|
-
return Q.containers.indexOf(
|
|
2879
|
+
function ae(E) {
|
|
2880
|
+
return Q.containers.indexOf(E) !== -1 || $.isContainer(E);
|
|
2881
2881
|
}
|
|
2882
|
-
function se(
|
|
2883
|
-
var j =
|
|
2884
|
-
u(
|
|
2882
|
+
function se(E) {
|
|
2883
|
+
var j = E ? "remove" : "add";
|
|
2884
|
+
u(C, j, "mousedown", ye), u(C, j, "mouseup", Ve);
|
|
2885
2885
|
}
|
|
2886
|
-
function ie(
|
|
2887
|
-
var j =
|
|
2888
|
-
u(
|
|
2886
|
+
function ie(E) {
|
|
2887
|
+
var j = E ? "remove" : "add";
|
|
2888
|
+
u(C, j, "mousemove", Ce);
|
|
2889
2889
|
}
|
|
2890
|
-
function re(
|
|
2891
|
-
var j =
|
|
2892
|
-
g[j](
|
|
2890
|
+
function re(E) {
|
|
2891
|
+
var j = E ? "remove" : "add";
|
|
2892
|
+
g[j](C, "selectstart", ce), g[j](C, "click", ce);
|
|
2893
2893
|
}
|
|
2894
2894
|
function Pe() {
|
|
2895
2895
|
se(!0), Ve({});
|
|
2896
2896
|
}
|
|
2897
|
-
function ce(
|
|
2898
|
-
J &&
|
|
2897
|
+
function ce(E) {
|
|
2898
|
+
J && E.preventDefault();
|
|
2899
2899
|
}
|
|
2900
|
-
function ye(
|
|
2901
|
-
I =
|
|
2902
|
-
var j = a(
|
|
2900
|
+
function ye(E) {
|
|
2901
|
+
I = E.clientX, V = E.clientY;
|
|
2902
|
+
var j = a(E) !== 1 || E.metaKey || E.ctrlKey;
|
|
2903
2903
|
if (!j) {
|
|
2904
|
-
var
|
|
2905
|
-
z && (J = z, ie(),
|
|
2904
|
+
var W = E.target, z = Ee(W);
|
|
2905
|
+
z && (J = z, ie(), E.type === "mousedown" && (A(W) ? W.focus() : E.preventDefault()));
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
function Ce(
|
|
2908
|
+
function Ce(E) {
|
|
2909
2909
|
if (J) {
|
|
2910
|
-
if (a(
|
|
2910
|
+
if (a(E) === 0) {
|
|
2911
2911
|
Ve({});
|
|
2912
2912
|
return;
|
|
2913
2913
|
}
|
|
2914
|
-
if (!(
|
|
2914
|
+
if (!(E.clientX !== void 0 && Math.abs(E.clientX - I) <= ($.slideFactorX || 0) && E.clientY !== void 0 && Math.abs(E.clientY - V) <= ($.slideFactorY || 0))) {
|
|
2915
2915
|
if ($.ignoreInputTextSelection) {
|
|
2916
|
-
var j =
|
|
2916
|
+
var j = T("clientX", E) || 0, W = T("clientY", E) || 0, z = m.elementFromPoint(j, W);
|
|
2917
2917
|
if (A(z))
|
|
2918
2918
|
return;
|
|
2919
2919
|
}
|
|
2920
2920
|
var K = J;
|
|
2921
|
-
ie(!0), re(), et(), Ke(K), l.add(
|
|
2921
|
+
ie(!0), re(), et(), Ke(K), l.add(q || w, "gu-transit"), Zt(), Qt(), N = 0, qe(E);
|
|
2922
2922
|
}
|
|
2923
2923
|
}
|
|
2924
2924
|
}
|
|
2925
|
-
function Ee(
|
|
2926
|
-
if (!(Q.dragging &&
|
|
2927
|
-
for (var j =
|
|
2928
|
-
if ($.invalid(
|
|
2925
|
+
function Ee(E) {
|
|
2926
|
+
if (!(Q.dragging && b) && !ae(E)) {
|
|
2927
|
+
for (var j = E; x(E) && ae(x(E)) === !1; )
|
|
2928
|
+
if ($.invalid(E, j) || (E = x(E), !E))
|
|
2929
2929
|
return;
|
|
2930
|
-
var
|
|
2931
|
-
if (
|
|
2932
|
-
var z = $.moves(
|
|
2930
|
+
var W = x(E);
|
|
2931
|
+
if (W && !$.invalid(E, j)) {
|
|
2932
|
+
var z = $.moves(E, W, j, p(E));
|
|
2933
2933
|
if (z)
|
|
2934
2934
|
return {
|
|
2935
|
-
item:
|
|
2936
|
-
source:
|
|
2935
|
+
item: E,
|
|
2936
|
+
source: W
|
|
2937
2937
|
};
|
|
2938
2938
|
}
|
|
2939
2939
|
}
|
|
2940
2940
|
}
|
|
2941
|
-
function Ut(
|
|
2942
|
-
return !!Ee(
|
|
2941
|
+
function Ut(E) {
|
|
2942
|
+
return !!Ee(E);
|
|
2943
2943
|
}
|
|
2944
|
-
function Ht(
|
|
2945
|
-
var j = Ee(
|
|
2944
|
+
function Ht(E) {
|
|
2945
|
+
var j = Ee(E);
|
|
2946
2946
|
j && Ke(j);
|
|
2947
2947
|
}
|
|
2948
|
-
function Ke(
|
|
2949
|
-
sn(
|
|
2948
|
+
function Ke(E) {
|
|
2949
|
+
sn(E.item, E.source) && (q = E.item.cloneNode(!0), Q.emit("cloned", q, E.item, "copy")), D = E.source, w = E.item, _ = L = p(E.item), Q.dragging = !0, Q.emit("drag", w, D);
|
|
2950
2950
|
}
|
|
2951
2951
|
function zt() {
|
|
2952
2952
|
return !1;
|
|
2953
2953
|
}
|
|
2954
2954
|
function et() {
|
|
2955
2955
|
if (Q.dragging) {
|
|
2956
|
-
var
|
|
2957
|
-
nt(
|
|
2956
|
+
var E = q || w;
|
|
2957
|
+
nt(E, x(E));
|
|
2958
2958
|
}
|
|
2959
2959
|
}
|
|
2960
2960
|
function tt() {
|
|
2961
2961
|
J = !1, ie(!0), re(!0);
|
|
2962
2962
|
}
|
|
2963
|
-
function Ve(
|
|
2963
|
+
function Ve(E) {
|
|
2964
2964
|
if (tt(), !!Q.dragging) {
|
|
2965
|
-
var j =
|
|
2966
|
-
te && (
|
|
2965
|
+
var j = q || w, W = T("clientX", E) || 0, z = T("clientY", E) || 0, K = S(b, W, z), te = it(K, W, z);
|
|
2966
|
+
te && (q && $.copySortSource || !q || te !== D) ? nt(j, te) : $.removeOnSpill ? ot() : rt();
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
|
-
function nt(
|
|
2970
|
-
var
|
|
2971
|
-
|
|
2969
|
+
function nt(E, j) {
|
|
2970
|
+
var W = x(E);
|
|
2971
|
+
q && $.copySortSource && j === D && W.removeChild(w), Le(j) ? Q.emit("cancel", E, D) : Q.emit("drop", E, j, D, L), _e();
|
|
2972
2972
|
}
|
|
2973
2973
|
function ot() {
|
|
2974
2974
|
if (Q.dragging) {
|
|
2975
|
-
var
|
|
2976
|
-
j && j.removeChild(
|
|
2975
|
+
var E = q || w, j = x(E);
|
|
2976
|
+
j && j.removeChild(E), Q.emit(q ? "cancel" : "remove", E, j, D), _e();
|
|
2977
2977
|
}
|
|
2978
2978
|
}
|
|
2979
|
-
function rt(
|
|
2979
|
+
function rt(E) {
|
|
2980
2980
|
if (Q.dragging) {
|
|
2981
|
-
var j = arguments.length > 0 ?
|
|
2982
|
-
K === !1 && j && (
|
|
2981
|
+
var j = arguments.length > 0 ? E : $.revertOnSpill, W = q || w, z = x(W), K = Le(z);
|
|
2982
|
+
K === !1 && j && (q ? z && z.removeChild(q) : D.insertBefore(W, _)), K || j ? Q.emit("cancel", W, D, D) : Q.emit("drop", W, z, D, L), _e();
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
2985
|
function _e() {
|
|
2986
|
-
var
|
|
2987
|
-
tt(), Jt(), Kt(),
|
|
2986
|
+
var E = q || w;
|
|
2987
|
+
tt(), Jt(), Kt(), E && l.rm(E, "gu-transit"), Z && clearTimeout(Z), Q.dragging = !1, X && Q.emit("out", E, X, D), Q.emit("dragend", E, N), D = w = q = _ = L = Z = X = null;
|
|
2988
2988
|
}
|
|
2989
|
-
function Le(
|
|
2990
|
-
var
|
|
2991
|
-
return j !== void 0 ?
|
|
2989
|
+
function Le(E, j) {
|
|
2990
|
+
var W;
|
|
2991
|
+
return j !== void 0 ? W = j : b ? W = L : W = p(q || w), E === D && W === _;
|
|
2992
2992
|
}
|
|
2993
|
-
function it(
|
|
2994
|
-
for (var z =
|
|
2995
|
-
z =
|
|
2993
|
+
function it(E, j, W) {
|
|
2994
|
+
for (var z = E; z && !K(); )
|
|
2995
|
+
z = x(z);
|
|
2996
2996
|
return z;
|
|
2997
2997
|
function K() {
|
|
2998
2998
|
var te = ae(z);
|
|
2999
2999
|
if (te === !1)
|
|
3000
3000
|
return !1;
|
|
3001
|
-
var me = st(z,
|
|
3002
|
-
return ge ? !0 : $.accepts(
|
|
3001
|
+
var me = st(z, E), fe = at(z, me, j, W), ge = Le(z, fe);
|
|
3002
|
+
return ge ? !0 : $.accepts(w, z, D, fe);
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
|
-
function qe(
|
|
3006
|
-
if (!
|
|
3005
|
+
function qe(E) {
|
|
3006
|
+
if (!b)
|
|
3007
3007
|
return;
|
|
3008
|
-
|
|
3009
|
-
var j =
|
|
3010
|
-
|
|
3011
|
-
var z =
|
|
3012
|
-
(me || te === null) && (pe(), X = te, ve()), rn(K,
|
|
3013
|
-
var fe =
|
|
3014
|
-
if (te === D &&
|
|
3008
|
+
E.preventDefault();
|
|
3009
|
+
var j = T("clientX", E) || 0, W = T("clientY", E) || 0;
|
|
3010
|
+
b.style.left = j - 2 + "px", b.style.top = W - 2 + "px";
|
|
3011
|
+
var z = q || w, K = S(b, j, W), te = it(K, j, W), me = te !== null && te !== X;
|
|
3012
|
+
(me || te === null) && (pe(), X = te, ve()), rn(K, W);
|
|
3013
|
+
var fe = x(z);
|
|
3014
|
+
if (te === D && q && !$.copySortSource) {
|
|
3015
3015
|
fe && fe.removeChild(z);
|
|
3016
3016
|
return;
|
|
3017
3017
|
}
|
|
3018
3018
|
var ge, he = st(te, K);
|
|
3019
3019
|
if (ne = en(he, te), he !== null)
|
|
3020
|
-
ge = at(te, he, j,
|
|
3021
|
-
else if ($.revertOnSpill === !0 && !
|
|
3022
|
-
ge =
|
|
3020
|
+
ge = at(te, he, j, W);
|
|
3021
|
+
else if ($.revertOnSpill === !0 && !q)
|
|
3022
|
+
ge = _, te = D;
|
|
3023
3023
|
else {
|
|
3024
|
-
|
|
3024
|
+
q && fe && fe.removeChild(z), q && H && (H.style.display = "none");
|
|
3025
3025
|
return;
|
|
3026
3026
|
}
|
|
3027
3027
|
H.style.display = "block", Gt(ge, z, me), ge ? nn(he, ge) : on(te);
|
|
@@ -3035,43 +3035,43 @@ var _t = { exports: {} };
|
|
|
3035
3035
|
X && le("out");
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
|
-
function Gt(
|
|
3039
|
-
(
|
|
3038
|
+
function Gt(E, j, W) {
|
|
3039
|
+
(E === j || E === p(j)) && (L = p(j)), (E === null && W || E !== j && E !== p(j)) && (L = E);
|
|
3040
3040
|
}
|
|
3041
|
-
function Yt(
|
|
3042
|
-
l.rm(
|
|
3041
|
+
function Yt(E) {
|
|
3042
|
+
l.rm(E, "gu-hide");
|
|
3043
3043
|
}
|
|
3044
|
-
function Xt(
|
|
3045
|
-
Q.dragging && l.add(
|
|
3044
|
+
function Xt(E) {
|
|
3045
|
+
Q.dragging && l.add(E, "gu-hide");
|
|
3046
3046
|
}
|
|
3047
3047
|
function Qt() {
|
|
3048
|
-
|
|
3048
|
+
b || (b = document.createElement("div"), b.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", b.innerHTML = $.getMirrorText && $.getMirrorText(w) || "控件", l.add(b, "gu-mirror"), $.mirrorContainer.appendChild(b), u(C, "add", "mousemove", qe), l.add($.mirrorContainer, "gu-unselectable"), Q.emit("cloned", b, w, "mirror"));
|
|
3049
3049
|
}
|
|
3050
3050
|
function Zt() {
|
|
3051
|
-
if (H = document.createElement("div"), l.add(H, "gu-insertion"),
|
|
3052
|
-
var
|
|
3053
|
-
H.style.left =
|
|
3051
|
+
if (H = document.createElement("div"), l.add(H, "gu-insertion"), w) {
|
|
3052
|
+
var E = w.getBoundingClientRect();
|
|
3053
|
+
H.style.left = E.left + "px", H.style.top = E.top + "px";
|
|
3054
3054
|
}
|
|
3055
3055
|
ne = !1, $.mirrorContainer.appendChild(H);
|
|
3056
3056
|
}
|
|
3057
3057
|
function Jt() {
|
|
3058
|
-
|
|
3058
|
+
b && (l.rm($.mirrorContainer, "gu-unselectable"), u(C, "remove", "mousemove", qe), x(b).removeChild(b), b = null);
|
|
3059
3059
|
}
|
|
3060
3060
|
function Kt() {
|
|
3061
|
-
H && (
|
|
3061
|
+
H && (x(H).removeChild(H), H = null);
|
|
3062
3062
|
}
|
|
3063
|
-
function st(
|
|
3064
|
-
for (var
|
|
3065
|
-
|
|
3066
|
-
return
|
|
3063
|
+
function st(E, j) {
|
|
3064
|
+
for (var W = j; W !== E && x(W) !== E; )
|
|
3065
|
+
W = x(W);
|
|
3066
|
+
return W === C ? null : W;
|
|
3067
3067
|
}
|
|
3068
|
-
function en(
|
|
3068
|
+
function en(E, j) {
|
|
3069
3069
|
if (!j)
|
|
3070
3070
|
return ne;
|
|
3071
|
-
var
|
|
3072
|
-
if (!
|
|
3071
|
+
var W = E || j && j.lastElementChild;
|
|
3072
|
+
if (!W)
|
|
3073
3073
|
return !0;
|
|
3074
|
-
var z = getComputedStyle(
|
|
3074
|
+
var z = getComputedStyle(E), K = /^inline/.test(z.getPropertyValue("display")) || /^(left|right)$/.test(z.getPropertyValue("float"));
|
|
3075
3075
|
if (K)
|
|
3076
3076
|
return !0;
|
|
3077
3077
|
if (j) {
|
|
@@ -3085,10 +3085,10 @@ var _t = { exports: {} };
|
|
|
3085
3085
|
}
|
|
3086
3086
|
return !0;
|
|
3087
3087
|
}
|
|
3088
|
-
function tn(
|
|
3089
|
-
if (!
|
|
3088
|
+
function tn(E) {
|
|
3089
|
+
if (!E.children || !E.children.length)
|
|
3090
3090
|
return !1;
|
|
3091
|
-
for (const j of Array.from(
|
|
3091
|
+
for (const j of Array.from(E.children)) {
|
|
3092
3092
|
const z = (j.className && j.className.split(" ") || []).filter((K) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(K));
|
|
3093
3093
|
if (!z.length)
|
|
3094
3094
|
return !1;
|
|
@@ -3100,93 +3100,93 @@ var _t = { exports: {} };
|
|
|
3100
3100
|
}
|
|
3101
3101
|
return !0;
|
|
3102
3102
|
}
|
|
3103
|
-
function nn(
|
|
3104
|
-
const
|
|
3105
|
-
if (H.style.left =
|
|
3106
|
-
if (H.style.height =
|
|
3107
|
-
const z =
|
|
3108
|
-
z.top !==
|
|
3103
|
+
function nn(E, j) {
|
|
3104
|
+
const W = j.getBoundingClientRect();
|
|
3105
|
+
if (H.style.left = W.left + "px", H.style.top = W.top + "px", ne) {
|
|
3106
|
+
if (H.style.height = W.height + "px", H.style.width = "4px", E) {
|
|
3107
|
+
const z = E.getBoundingClientRect();
|
|
3108
|
+
z.top !== W.top && (H.style.left = z.right + "px", H.style.top = z.top + "px", H.style.height = z.height + "px");
|
|
3109
3109
|
}
|
|
3110
|
-
} else if (H.style.height = "4px", H.style.width =
|
|
3110
|
+
} else if (H.style.height = "4px", H.style.width = W.width + "px", U) {
|
|
3111
3111
|
const z = U.getBoundingClientRect();
|
|
3112
|
-
|
|
3112
|
+
W.top < z.top && (H.style.display = "none");
|
|
3113
3113
|
}
|
|
3114
|
-
j ===
|
|
3114
|
+
j === w && w && (H.style.display = "none");
|
|
3115
3115
|
}
|
|
3116
|
-
function on(
|
|
3117
|
-
|
|
3118
|
-
var j =
|
|
3116
|
+
function on(E) {
|
|
3117
|
+
L = null;
|
|
3118
|
+
var j = E.lastElementChild;
|
|
3119
3119
|
if (j) {
|
|
3120
|
-
var
|
|
3121
|
-
ne ? (H.style.left =
|
|
3120
|
+
var W = j.getBoundingClientRect();
|
|
3121
|
+
ne ? (H.style.left = W.right + "px", H.style.top = W.top + "px", H.style.height = W.height + "px", H.style.width = "4px") : (H.style.left = W.left + "px", H.style.top = W.bottom + "px", H.style.height = "4px", H.style.width = W.width + "px"), j === w && w && (H.style.display = "none");
|
|
3122
3122
|
} else
|
|
3123
3123
|
H.style.display = "none";
|
|
3124
3124
|
}
|
|
3125
|
-
function rn(
|
|
3126
|
-
if (!$.mirrorContainer.contains(
|
|
3125
|
+
function rn(E, j) {
|
|
3126
|
+
if (!$.mirrorContainer.contains(E) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (U = f(E), !U || !U.contains(E)))
|
|
3127
3127
|
return;
|
|
3128
|
-
const
|
|
3128
|
+
const W = document.querySelector(".dgComponentSelected"), z = U.getBoundingClientRect();
|
|
3129
3129
|
if (j - 30 < z.top && U.scrollTop > 0) {
|
|
3130
3130
|
let K = U.scrollTop < 10 ? U.scrollTop : 10;
|
|
3131
|
-
U.scrollBy(0, -1 * K),
|
|
3131
|
+
U.scrollBy(0, -1 * K), W && U.contains(W) && (N = N + -1 * K);
|
|
3132
3132
|
}
|
|
3133
3133
|
if (j + 30 > z.bottom && U.scrollTop < U.scrollHeight - U.clientHeight) {
|
|
3134
3134
|
const K = U.scrollHeight - U.clientHeight - U.scrollTop;
|
|
3135
3135
|
let te = K < 10 ? K : 10;
|
|
3136
|
-
U.scrollBy(0, te),
|
|
3136
|
+
U.scrollBy(0, te), W && U.contains(W) && (N = N + te);
|
|
3137
3137
|
}
|
|
3138
3138
|
}
|
|
3139
|
-
function at(
|
|
3140
|
-
var K = $.direction === "horizontal", te = $.direction === "mixed", me = j !==
|
|
3139
|
+
function at(E, j, W, z) {
|
|
3140
|
+
var K = $.direction === "horizontal", te = $.direction === "mixed", me = j !== E ? ge() : fe();
|
|
3141
3141
|
return me;
|
|
3142
3142
|
function fe() {
|
|
3143
|
-
var le =
|
|
3143
|
+
var le = E.children.length, ve, pe, ue;
|
|
3144
3144
|
for (ve = 0; ve < le; ve++)
|
|
3145
|
-
if (pe =
|
|
3145
|
+
if (pe = E.children[ve], ue = pe.getBoundingClientRect(), K && ue.left + ue.width / 2 > W || !te && !K && ue.top + ue.height / 2 > z || te && ue.left + ue.width > W && ue.top + ue.height > z)
|
|
3146
3146
|
return pe;
|
|
3147
3147
|
return null;
|
|
3148
3148
|
}
|
|
3149
3149
|
function ge() {
|
|
3150
3150
|
var le = j.getBoundingClientRect();
|
|
3151
3151
|
if (te) {
|
|
3152
|
-
var ve = z - le.top, pe =
|
|
3152
|
+
var ve = z - le.top, pe = W - le.left, ue = le.bottom - z, We = le.right - W, Ue = Math.min(pe, We, ve, ue), He;
|
|
3153
3153
|
return ne ? He = We < pe : He = ue === Ue || We === Ue || pe === Ue, he(He);
|
|
3154
3154
|
}
|
|
3155
|
-
return he(K ?
|
|
3155
|
+
return he(K ? W > le.left + R(le) / 2 : z > le.top + k(le) / 2);
|
|
3156
3156
|
}
|
|
3157
3157
|
function he(le) {
|
|
3158
3158
|
return le ? p(j) : j;
|
|
3159
3159
|
}
|
|
3160
3160
|
}
|
|
3161
|
-
function sn(
|
|
3162
|
-
return typeof $.copy == "boolean" ? $.copy : $.copy(
|
|
3161
|
+
function sn(E, j) {
|
|
3162
|
+
return typeof $.copy == "boolean" ? $.copy : $.copy(E, j);
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
|
-
function f(
|
|
3165
|
+
function f(y) {
|
|
3166
3166
|
const v = Array.from(window.scrollContainerList);
|
|
3167
3167
|
if (v.length === 1) {
|
|
3168
|
-
const
|
|
3169
|
-
return document.getElementById(
|
|
3168
|
+
const b = Array.from(window.scrollContainerList)[0];
|
|
3169
|
+
return document.getElementById(b);
|
|
3170
3170
|
}
|
|
3171
3171
|
const d = h(v);
|
|
3172
|
-
for (const
|
|
3173
|
-
if (
|
|
3174
|
-
return
|
|
3172
|
+
for (const b of d)
|
|
3173
|
+
if (b.contains(y))
|
|
3174
|
+
return b;
|
|
3175
3175
|
return null;
|
|
3176
3176
|
}
|
|
3177
|
-
function h(
|
|
3177
|
+
function h(y) {
|
|
3178
3178
|
const v = [];
|
|
3179
|
-
return
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
}), v.sort((d,
|
|
3179
|
+
return y.forEach((d) => {
|
|
3180
|
+
const b = document.getElementById(d);
|
|
3181
|
+
b && v.push(b);
|
|
3182
|
+
}), v.sort((d, b) => d.contains(b) ? 1 : b.contains(d) ? -1 : 0), v;
|
|
3183
3183
|
}
|
|
3184
|
-
function u(
|
|
3184
|
+
function u(y, v, d, b) {
|
|
3185
3185
|
var D = {
|
|
3186
3186
|
mouseup: "touchend",
|
|
3187
3187
|
mousedown: "touchstart",
|
|
3188
3188
|
mousemove: "touchmove"
|
|
3189
|
-
},
|
|
3189
|
+
}, w = {
|
|
3190
3190
|
mouseup: "pointerup",
|
|
3191
3191
|
mousedown: "pointerdown",
|
|
3192
3192
|
mousemove: "pointermove"
|
|
@@ -3195,66 +3195,66 @@ var _t = { exports: {} };
|
|
|
3195
3195
|
mousedown: "MSPointerDown",
|
|
3196
3196
|
mousemove: "MSPointerMove"
|
|
3197
3197
|
};
|
|
3198
|
-
i.navigator.pointerEnabled ? g[v](
|
|
3198
|
+
i.navigator.pointerEnabled ? g[v](y, w[d], b) : i.navigator.msPointerEnabled ? g[v](y, I[d], b) : (g[v](y, D[d], b), g[v](y, d, b));
|
|
3199
3199
|
}
|
|
3200
|
-
function a(
|
|
3201
|
-
if (
|
|
3202
|
-
return
|
|
3203
|
-
if (
|
|
3204
|
-
return
|
|
3205
|
-
if (
|
|
3206
|
-
return
|
|
3207
|
-
var v =
|
|
3200
|
+
function a(y) {
|
|
3201
|
+
if (y.touches !== void 0)
|
|
3202
|
+
return y.touches.length;
|
|
3203
|
+
if (y.which !== void 0 && y.which !== 0)
|
|
3204
|
+
return y.which;
|
|
3205
|
+
if (y.buttons !== void 0)
|
|
3206
|
+
return y.buttons;
|
|
3207
|
+
var v = y.button;
|
|
3208
3208
|
if (v !== void 0)
|
|
3209
3209
|
return v & 1 ? 1 : v & 2 ? 3 : v & 4 ? 2 : 0;
|
|
3210
3210
|
}
|
|
3211
|
-
function S(
|
|
3212
|
-
|
|
3213
|
-
var
|
|
3214
|
-
return
|
|
3211
|
+
function S(y, v, d) {
|
|
3212
|
+
y = y || {};
|
|
3213
|
+
var b = y.className || "", D;
|
|
3214
|
+
return y.className += " gu-hide", D = m.elementFromPoint(v, d), y.className = b, D;
|
|
3215
3215
|
}
|
|
3216
3216
|
function F() {
|
|
3217
3217
|
return !1;
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function M() {
|
|
3220
3220
|
return !0;
|
|
3221
3221
|
}
|
|
3222
|
-
function R(
|
|
3223
|
-
return
|
|
3222
|
+
function R(y) {
|
|
3223
|
+
return y.width || y.right - y.left;
|
|
3224
3224
|
}
|
|
3225
|
-
function
|
|
3226
|
-
return
|
|
3225
|
+
function k(y) {
|
|
3226
|
+
return y.height || y.bottom - y.top;
|
|
3227
3227
|
}
|
|
3228
|
-
function
|
|
3229
|
-
return
|
|
3228
|
+
function x(y) {
|
|
3229
|
+
return y.parentNode === m ? null : y.parentNode;
|
|
3230
3230
|
}
|
|
3231
|
-
function A(
|
|
3232
|
-
return
|
|
3231
|
+
function A(y) {
|
|
3232
|
+
return y.tagName === "INPUT" || y.tagName === "TEXTAREA" || y.tagName === "SELECT" || P(y);
|
|
3233
3233
|
}
|
|
3234
|
-
function
|
|
3235
|
-
return !
|
|
3234
|
+
function P(y) {
|
|
3235
|
+
return !y || y.contentEditable === "false" ? !1 : y.contentEditable === "true" ? !0 : P(x(y));
|
|
3236
3236
|
}
|
|
3237
|
-
function p(
|
|
3238
|
-
return
|
|
3237
|
+
function p(y) {
|
|
3238
|
+
return y.nextElementSibling || v();
|
|
3239
3239
|
function v() {
|
|
3240
|
-
var d =
|
|
3240
|
+
var d = y;
|
|
3241
3241
|
do
|
|
3242
3242
|
d = d.nextSibling;
|
|
3243
3243
|
while (d && d.nodeType !== 1);
|
|
3244
3244
|
return d;
|
|
3245
3245
|
}
|
|
3246
3246
|
}
|
|
3247
|
-
function
|
|
3248
|
-
return
|
|
3247
|
+
function B(y) {
|
|
3248
|
+
return y.targetTouches && y.targetTouches.length ? y.targetTouches[0] : y.changedTouches && y.changedTouches.length ? y.changedTouches[0] : y;
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3251
|
-
var d =
|
|
3250
|
+
function T(y, v) {
|
|
3251
|
+
var d = B(v), b = {
|
|
3252
3252
|
pageX: "clientX",
|
|
3253
3253
|
// IE8
|
|
3254
3254
|
pageY: "clientY"
|
|
3255
3255
|
// IE8
|
|
3256
3256
|
};
|
|
3257
|
-
return
|
|
3257
|
+
return y in b && !(y in d) && b[y] in d && (y = b[y]), d[y];
|
|
3258
3258
|
}
|
|
3259
3259
|
o.exports = c;
|
|
3260
3260
|
}).call(this, typeof be < "u" ? be : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -3275,7 +3275,7 @@ var _t = { exports: {} };
|
|
|
3275
3275
|
5: [function(n, o, r) {
|
|
3276
3276
|
var i = n("atoa"), s = n("./debounce");
|
|
3277
3277
|
o.exports = function(l, m) {
|
|
3278
|
-
var
|
|
3278
|
+
var C = m || {}, c = {};
|
|
3279
3279
|
return l === void 0 && (l = {}), l.on = function(f, h) {
|
|
3280
3280
|
return c[f] ? c[f].push(h) : c[f] = [h], l;
|
|
3281
3281
|
}, l.once = function(f, h) {
|
|
@@ -3300,10 +3300,10 @@ var _t = { exports: {} };
|
|
|
3300
3300
|
var h = (c[f] || []).slice(0);
|
|
3301
3301
|
return function() {
|
|
3302
3302
|
var u = i(arguments), a = this || l;
|
|
3303
|
-
if (f === "error" &&
|
|
3303
|
+
if (f === "error" && C.throws !== !1 && !h.length)
|
|
3304
3304
|
throw u.length === 1 ? u[0] : u;
|
|
3305
3305
|
return h.forEach(function(F) {
|
|
3306
|
-
|
|
3306
|
+
C.async ? s(F, u, a) : F.apply(a, u), F._once && l.off(f, F);
|
|
3307
3307
|
}), l;
|
|
3308
3308
|
};
|
|
3309
3309
|
}, l;
|
|
@@ -3311,67 +3311,67 @@ var _t = { exports: {} };
|
|
|
3311
3311
|
}, { "./debounce": 4, atoa: 3 }],
|
|
3312
3312
|
6: [function(n, o, r) {
|
|
3313
3313
|
(function(i) {
|
|
3314
|
-
var s = n("custom-event"), g = n("./eventmap"), l = i.document, m = f,
|
|
3315
|
-
i.addEventListener || (m = h,
|
|
3314
|
+
var s = n("custom-event"), g = n("./eventmap"), l = i.document, m = f, C = u, c = [];
|
|
3315
|
+
i.addEventListener || (m = h, C = a), o.exports = {
|
|
3316
3316
|
add: m,
|
|
3317
|
-
remove:
|
|
3317
|
+
remove: C,
|
|
3318
3318
|
fabricate: S
|
|
3319
3319
|
};
|
|
3320
|
-
function f(
|
|
3321
|
-
return
|
|
3320
|
+
function f(x, A, P, p) {
|
|
3321
|
+
return x.addEventListener(A, P, p);
|
|
3322
3322
|
}
|
|
3323
|
-
function h(
|
|
3324
|
-
return
|
|
3323
|
+
function h(x, A, P) {
|
|
3324
|
+
return x.attachEvent("on" + A, M(x, A, P));
|
|
3325
3325
|
}
|
|
3326
|
-
function u(
|
|
3327
|
-
return
|
|
3326
|
+
function u(x, A, P, p) {
|
|
3327
|
+
return x.removeEventListener(A, P, p);
|
|
3328
3328
|
}
|
|
3329
|
-
function a(
|
|
3330
|
-
var p = R(
|
|
3329
|
+
function a(x, A, P) {
|
|
3330
|
+
var p = R(x, A, P);
|
|
3331
3331
|
if (p)
|
|
3332
|
-
return
|
|
3332
|
+
return x.detachEvent("on" + A, p);
|
|
3333
3333
|
}
|
|
3334
|
-
function S(
|
|
3335
|
-
var p = g.indexOf(A) === -1 ?
|
|
3336
|
-
|
|
3337
|
-
function
|
|
3338
|
-
var
|
|
3339
|
-
return l.createEvent ? (
|
|
3334
|
+
function S(x, A, P) {
|
|
3335
|
+
var p = g.indexOf(A) === -1 ? T() : B();
|
|
3336
|
+
x.dispatchEvent ? x.dispatchEvent(p) : x.fireEvent("on" + A, p);
|
|
3337
|
+
function B() {
|
|
3338
|
+
var y;
|
|
3339
|
+
return l.createEvent ? (y = l.createEvent("Event"), y.initEvent(A, !0, !0)) : l.createEventObject && (y = l.createEventObject()), y;
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3342
|
-
return new s(A, { detail:
|
|
3341
|
+
function T() {
|
|
3342
|
+
return new s(A, { detail: P });
|
|
3343
3343
|
}
|
|
3344
3344
|
}
|
|
3345
|
-
function F(
|
|
3346
|
-
return function(
|
|
3347
|
-
var
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
},
|
|
3351
|
-
|
|
3352
|
-
},
|
|
3345
|
+
function F(x, A, P) {
|
|
3346
|
+
return function(B) {
|
|
3347
|
+
var T = B || i.event;
|
|
3348
|
+
T.target = T.target || T.srcElement, T.preventDefault = T.preventDefault || function() {
|
|
3349
|
+
T.returnValue = !1;
|
|
3350
|
+
}, T.stopPropagation = T.stopPropagation || function() {
|
|
3351
|
+
T.cancelBubble = !0;
|
|
3352
|
+
}, T.which = T.which || T.keyCode, P.call(x, T);
|
|
3353
3353
|
};
|
|
3354
3354
|
}
|
|
3355
|
-
function
|
|
3356
|
-
var p = R(
|
|
3355
|
+
function M(x, A, P) {
|
|
3356
|
+
var p = R(x, A, P) || F(x, A, P);
|
|
3357
3357
|
return c.push({
|
|
3358
3358
|
wrapper: p,
|
|
3359
|
-
element:
|
|
3359
|
+
element: x,
|
|
3360
3360
|
type: A,
|
|
3361
|
-
fn:
|
|
3361
|
+
fn: P
|
|
3362
3362
|
}), p;
|
|
3363
3363
|
}
|
|
3364
|
-
function R(
|
|
3365
|
-
var p =
|
|
3364
|
+
function R(x, A, P) {
|
|
3365
|
+
var p = k(x, A, P);
|
|
3366
3366
|
if (p) {
|
|
3367
|
-
var
|
|
3368
|
-
return c.splice(p, 1),
|
|
3367
|
+
var B = c[p].wrapper;
|
|
3368
|
+
return c.splice(p, 1), B;
|
|
3369
3369
|
}
|
|
3370
3370
|
}
|
|
3371
|
-
function
|
|
3372
|
-
var p,
|
|
3371
|
+
function k(x, A, P) {
|
|
3372
|
+
var p, B;
|
|
3373
3373
|
for (p = 0; p < c.length; p++)
|
|
3374
|
-
if (
|
|
3374
|
+
if (B = c[p], B.element === x && B.type === A && B.fn === P)
|
|
3375
3375
|
return p;
|
|
3376
3376
|
}
|
|
3377
3377
|
}).call(this, typeof be < "u" ? be : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -3397,14 +3397,14 @@ var _t = { exports: {} };
|
|
|
3397
3397
|
}
|
|
3398
3398
|
o.exports = g() ? s : (
|
|
3399
3399
|
// IE >= 9
|
|
3400
|
-
typeof document < "u" && typeof document.createEvent == "function" ? function(m,
|
|
3400
|
+
typeof document < "u" && typeof document.createEvent == "function" ? function(m, C) {
|
|
3401
3401
|
var c = document.createEvent("CustomEvent");
|
|
3402
|
-
return
|
|
3402
|
+
return C ? c.initCustomEvent(m, C.bubbles, C.cancelable, C.detail) : c.initCustomEvent(m, !1, !1, void 0), c;
|
|
3403
3403
|
} : (
|
|
3404
3404
|
// IE <= 8
|
|
3405
|
-
function(m,
|
|
3405
|
+
function(m, C) {
|
|
3406
3406
|
var c = document.createEventObject();
|
|
3407
|
-
return c.type = m,
|
|
3407
|
+
return c.type = m, C ? (c.bubbles = !!C.bubbles, c.cancelable = !!C.cancelable, c.detail = C.detail) : (c.bubbles = !1, c.cancelable = !1, c.detail = void 0), c;
|
|
3408
3408
|
}
|
|
3409
3409
|
)
|
|
3410
3410
|
);
|
|
@@ -3430,33 +3430,33 @@ var _t = { exports: {} };
|
|
|
3430
3430
|
g = m;
|
|
3431
3431
|
}
|
|
3432
3432
|
})();
|
|
3433
|
-
function
|
|
3433
|
+
function C(k) {
|
|
3434
3434
|
if (s === setTimeout)
|
|
3435
|
-
return setTimeout(
|
|
3435
|
+
return setTimeout(k, 0);
|
|
3436
3436
|
if ((s === l || !s) && setTimeout)
|
|
3437
|
-
return s = setTimeout, setTimeout(
|
|
3437
|
+
return s = setTimeout, setTimeout(k, 0);
|
|
3438
3438
|
try {
|
|
3439
|
-
return s(
|
|
3439
|
+
return s(k, 0);
|
|
3440
3440
|
} catch {
|
|
3441
3441
|
try {
|
|
3442
|
-
return s.call(null,
|
|
3442
|
+
return s.call(null, k, 0);
|
|
3443
3443
|
} catch {
|
|
3444
|
-
return s.call(this,
|
|
3444
|
+
return s.call(this, k, 0);
|
|
3445
3445
|
}
|
|
3446
3446
|
}
|
|
3447
3447
|
}
|
|
3448
|
-
function c(
|
|
3448
|
+
function c(k) {
|
|
3449
3449
|
if (g === clearTimeout)
|
|
3450
|
-
return clearTimeout(
|
|
3450
|
+
return clearTimeout(k);
|
|
3451
3451
|
if ((g === m || !g) && clearTimeout)
|
|
3452
|
-
return g = clearTimeout, clearTimeout(
|
|
3452
|
+
return g = clearTimeout, clearTimeout(k);
|
|
3453
3453
|
try {
|
|
3454
|
-
return g(
|
|
3454
|
+
return g(k);
|
|
3455
3455
|
} catch {
|
|
3456
3456
|
try {
|
|
3457
|
-
return g.call(null,
|
|
3457
|
+
return g.call(null, k);
|
|
3458
3458
|
} catch {
|
|
3459
|
-
return g.call(this,
|
|
3459
|
+
return g.call(this, k);
|
|
3460
3460
|
}
|
|
3461
3461
|
}
|
|
3462
3462
|
}
|
|
@@ -3466,38 +3466,38 @@ var _t = { exports: {} };
|
|
|
3466
3466
|
}
|
|
3467
3467
|
function F() {
|
|
3468
3468
|
if (!h) {
|
|
3469
|
-
var
|
|
3469
|
+
var k = C(S);
|
|
3470
3470
|
h = !0;
|
|
3471
|
-
for (var
|
|
3472
|
-
for (u = f, f = []; ++a <
|
|
3471
|
+
for (var x = f.length; x; ) {
|
|
3472
|
+
for (u = f, f = []; ++a < x; )
|
|
3473
3473
|
u && u[a].run();
|
|
3474
|
-
a = -1,
|
|
3474
|
+
a = -1, x = f.length;
|
|
3475
3475
|
}
|
|
3476
|
-
u = null, h = !1, c(
|
|
3476
|
+
u = null, h = !1, c(k);
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
|
-
i.nextTick = function(
|
|
3480
|
-
var
|
|
3479
|
+
i.nextTick = function(k) {
|
|
3480
|
+
var x = new Array(arguments.length - 1);
|
|
3481
3481
|
if (arguments.length > 1)
|
|
3482
3482
|
for (var A = 1; A < arguments.length; A++)
|
|
3483
|
-
|
|
3484
|
-
f.push(new k
|
|
3483
|
+
x[A - 1] = arguments[A];
|
|
3484
|
+
f.push(new M(k, x)), f.length === 1 && !h && C(F);
|
|
3485
3485
|
};
|
|
3486
|
-
function k
|
|
3487
|
-
this.fun =
|
|
3486
|
+
function M(k, x) {
|
|
3487
|
+
this.fun = k, this.array = x;
|
|
3488
3488
|
}
|
|
3489
|
-
|
|
3489
|
+
M.prototype.run = function() {
|
|
3490
3490
|
this.fun.apply(null, this.array);
|
|
3491
3491
|
}, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {};
|
|
3492
3492
|
function R() {
|
|
3493
3493
|
}
|
|
3494
|
-
i.on = R, i.addListener = R, i.once = R, i.off = R, i.removeListener = R, i.removeAllListeners = R, i.emit = R, i.prependListener = R, i.prependOnceListener = R, i.listeners = function(
|
|
3494
|
+
i.on = R, i.addListener = R, i.once = R, i.off = R, i.removeListener = R, i.removeAllListeners = R, i.emit = R, i.prependListener = R, i.prependOnceListener = R, i.listeners = function(k) {
|
|
3495
3495
|
return [];
|
|
3496
|
-
}, i.binding = function(
|
|
3496
|
+
}, i.binding = function(k) {
|
|
3497
3497
|
throw new Error("process.binding is not supported");
|
|
3498
3498
|
}, i.cwd = function() {
|
|
3499
3499
|
return "/";
|
|
3500
|
-
}, i.chdir = function(
|
|
3500
|
+
}, i.chdir = function(k) {
|
|
3501
3501
|
throw new Error("process.chdir is not supported");
|
|
3502
3502
|
}, i.umask = function() {
|
|
3503
3503
|
return 0;
|
|
@@ -3515,7 +3515,7 @@ var _t = { exports: {} };
|
|
|
3515
3515
|
}, { timers: 11 }],
|
|
3516
3516
|
11: [function(n, o, r) {
|
|
3517
3517
|
(function(i, s) {
|
|
3518
|
-
var g = n("process/browser.js").nextTick, l = Function.prototype.apply, m = Array.prototype.slice,
|
|
3518
|
+
var g = n("process/browser.js").nextTick, l = Function.prototype.apply, m = Array.prototype.slice, C = {}, c = 0;
|
|
3519
3519
|
r.setTimeout = function() {
|
|
3520
3520
|
return new f(l.call(setTimeout, window, arguments), clearTimeout);
|
|
3521
3521
|
}, r.setInterval = function() {
|
|
@@ -3541,11 +3541,11 @@ var _t = { exports: {} };
|
|
|
3541
3541
|
}, u));
|
|
3542
3542
|
}, r.setImmediate = typeof i == "function" ? i : function(h) {
|
|
3543
3543
|
var u = c++, a = arguments.length < 2 ? !1 : m.call(arguments, 1);
|
|
3544
|
-
return
|
|
3545
|
-
|
|
3544
|
+
return C[u] = !0, g(function() {
|
|
3545
|
+
C[u] && (a ? h.apply(null, a) : h.call(null), r.clearImmediate(u));
|
|
3546
3546
|
}), u;
|
|
3547
3547
|
}, r.clearImmediate = typeof s == "function" ? s : function(h) {
|
|
3548
|
-
delete
|
|
3548
|
+
delete C[h];
|
|
3549
3549
|
};
|
|
3550
3550
|
}).call(this, n("timers").setImmediate, n("timers").clearImmediate);
|
|
3551
3551
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
@@ -3566,8 +3566,8 @@ function zo(t) {
|
|
|
3566
3566
|
m = Array.from(i.children).findIndex((u) => u.getAttribute("id") === h);
|
|
3567
3567
|
} else
|
|
3568
3568
|
m = Array.from(i.children).length;
|
|
3569
|
-
const
|
|
3570
|
-
c !== m && c > -1 && m > -1 && (c < m && (m = m - 1), l.buttons.splice(c, 1), l.buttons.splice(m, 0, f), g(),
|
|
3569
|
+
const C = r.getAttribute("id"), c = Array.from(i.children).findIndex((h) => h.getAttribute("id") === C), f = l.buttons[c];
|
|
3570
|
+
c !== m && c > -1 && m > -1 && (c < m && (m = m - 1), l.buttons.splice(c, 1), l.buttons.splice(m, 0, f), g(), De(() => {
|
|
3571
3571
|
const h = i.querySelector(".dgComponentSelected");
|
|
3572
3572
|
h != null && h.className.includes("dgComponentSelected") && (h.classList.remove("dgComponentSelected"), h.classList.remove("dgComponentFocused"), h.click()), Te.value++;
|
|
3573
3573
|
}));
|
|
@@ -3581,10 +3581,10 @@ function zo(t) {
|
|
|
3581
3581
|
},
|
|
3582
3582
|
// 判断是否可移动
|
|
3583
3583
|
moves(g, l, m) {
|
|
3584
|
-
let
|
|
3585
|
-
return m.classList.contains("dropdown-item") ? (
|
|
3584
|
+
let C = !0;
|
|
3585
|
+
return m.classList.contains("dropdown-item") ? (C = !1, C) : (g.classList.contains("no-drag") && (C = !1), C);
|
|
3586
3586
|
}
|
|
3587
|
-
}).on("drop", (g, l, m,
|
|
3587
|
+
}).on("drop", (g, l, m, C) => n(g, l, C, s)));
|
|
3588
3588
|
}
|
|
3589
3589
|
return {
|
|
3590
3590
|
dragulaInstance: e,
|
|
@@ -3597,42 +3597,42 @@ function Go(t, e, n) {
|
|
|
3597
3597
|
actionHandlers: r
|
|
3598
3598
|
} = n;
|
|
3599
3599
|
let i;
|
|
3600
|
-
function s(
|
|
3601
|
-
i =
|
|
3600
|
+
function s(M) {
|
|
3601
|
+
i = M;
|
|
3602
3602
|
}
|
|
3603
|
-
function g(
|
|
3604
|
-
const
|
|
3605
|
-
if (
|
|
3603
|
+
function g(M, R = null) {
|
|
3604
|
+
const k = e.value.find((x) => x.id === M.id);
|
|
3605
|
+
if (k.isDP)
|
|
3606
3606
|
if (document.body.click(), typeof R == "boolean")
|
|
3607
|
-
|
|
3607
|
+
k.expanded = R;
|
|
3608
3608
|
else {
|
|
3609
|
-
const
|
|
3610
|
-
|
|
3609
|
+
const x = M.expanded;
|
|
3610
|
+
k.expanded = !x;
|
|
3611
3611
|
}
|
|
3612
3612
|
}
|
|
3613
3613
|
r.toggleDropdownMenu = g;
|
|
3614
|
-
function l(
|
|
3615
|
-
var
|
|
3614
|
+
function l(M) {
|
|
3615
|
+
var k;
|
|
3616
3616
|
const R = {
|
|
3617
3617
|
"dropdown-menu": !0
|
|
3618
3618
|
};
|
|
3619
|
-
if (
|
|
3620
|
-
const
|
|
3621
|
-
|
|
3619
|
+
if (M.class) {
|
|
3620
|
+
const x = (k = M.menuClass) == null ? void 0 : k.split(" ");
|
|
3621
|
+
x && x.length && x.reduce((A, P) => (A[P] = !0, A), R);
|
|
3622
3622
|
}
|
|
3623
3623
|
return R;
|
|
3624
3624
|
}
|
|
3625
|
-
function m(
|
|
3626
|
-
var
|
|
3625
|
+
function m(M) {
|
|
3626
|
+
var x;
|
|
3627
3627
|
const R = {
|
|
3628
|
-
disabled:
|
|
3628
|
+
disabled: M.disabled === !1,
|
|
3629
3629
|
"dropdown-submenu": !0,
|
|
3630
3630
|
"f-rt-dropdown": !0,
|
|
3631
3631
|
"text-truncate": !0
|
|
3632
|
-
},
|
|
3633
|
-
return
|
|
3632
|
+
}, k = (x = M.dropdownClass) == null ? void 0 : x.split(" ");
|
|
3633
|
+
return k && k.length && k.reduce((A, P) => (A[P] = !0, A), R), R;
|
|
3634
3634
|
}
|
|
3635
|
-
function
|
|
3635
|
+
function C(M) {
|
|
3636
3636
|
const R = {
|
|
3637
3637
|
disabled: !1,
|
|
3638
3638
|
"dropdown-item": !0,
|
|
@@ -3640,125 +3640,125 @@ function Go(t, e, n) {
|
|
|
3640
3640
|
"position-relative": !0,
|
|
3641
3641
|
"farris-component": !0,
|
|
3642
3642
|
"text-truncate": !0
|
|
3643
|
-
},
|
|
3644
|
-
return
|
|
3643
|
+
}, k = (M.class || "").split(" ");
|
|
3644
|
+
return k && k.length && k.reduce((x, A) => (x[A] = !0, x), R), R;
|
|
3645
3645
|
}
|
|
3646
3646
|
let c;
|
|
3647
3647
|
const f = /* @__PURE__ */ new Map();
|
|
3648
|
-
function h(
|
|
3649
|
-
|
|
3650
|
-
const
|
|
3648
|
+
function h(M, R, k) {
|
|
3649
|
+
M.stopPropagation();
|
|
3650
|
+
const x = k ? k.id : "__top_item__";
|
|
3651
3651
|
if (R.children && R.children.length && (R.expanded = !R.expanded, R.expanded)) {
|
|
3652
|
-
if (f.has(
|
|
3653
|
-
const A = f.get(
|
|
3654
|
-
A && (A.expanded = !1, f.delete(
|
|
3652
|
+
if (f.has(x) && f.get(x) !== R) {
|
|
3653
|
+
const A = f.get(x);
|
|
3654
|
+
A && (A.expanded = !1, f.delete(x));
|
|
3655
3655
|
}
|
|
3656
|
-
f.set(
|
|
3656
|
+
f.set(x, R);
|
|
3657
3657
|
}
|
|
3658
3658
|
}
|
|
3659
|
-
function u(
|
|
3659
|
+
function u(M) {
|
|
3660
3660
|
var R;
|
|
3661
|
-
return (R =
|
|
3662
|
-
class: m(
|
|
3663
|
-
id:
|
|
3661
|
+
return (R = M.children) == null ? void 0 : R.map((k, x) => k.children && k.children.length ? O("li", {
|
|
3662
|
+
class: m(k),
|
|
3663
|
+
id: k.id
|
|
3664
3664
|
}, [O("span", {
|
|
3665
|
-
class:
|
|
3666
|
-
onClick: (A) => h(A,
|
|
3667
|
-
}, [
|
|
3665
|
+
class: C(k),
|
|
3666
|
+
onClick: (A) => h(A, k, M)
|
|
3667
|
+
}, [k.text, O("i", {
|
|
3668
3668
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
3669
3669
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
3670
|
-
}, null)]), c(
|
|
3670
|
+
}, null)]), c(k, k)]) : o(k, x, !0));
|
|
3671
3671
|
}
|
|
3672
|
-
function a(
|
|
3672
|
+
function a(M, R, k, x) {
|
|
3673
3673
|
const {
|
|
3674
3674
|
height: p,
|
|
3675
|
-
left:
|
|
3676
|
-
top:
|
|
3677
|
-
} =
|
|
3678
|
-
width:
|
|
3675
|
+
left: B,
|
|
3676
|
+
top: T
|
|
3677
|
+
} = x[0], {
|
|
3678
|
+
width: y,
|
|
3679
3679
|
height: v
|
|
3680
|
-
} =
|
|
3680
|
+
} = k.getBoundingClientRect(), {
|
|
3681
3681
|
marginTop: d,
|
|
3682
|
-
marginBottom:
|
|
3683
|
-
} = getComputedStyle(
|
|
3684
|
-
function
|
|
3682
|
+
marginBottom: b
|
|
3683
|
+
} = getComputedStyle(k), D = Math.ceil(parseFloat(d)) + Math.ceil(parseFloat(b)), w = T + p, I = R == null ? void 0 : R.getBoundingClientRect();
|
|
3684
|
+
function V() {
|
|
3685
3685
|
let Z = 0, X = "left";
|
|
3686
3686
|
const J = I ? I.right : window.innerWidth, H = I ? I.left : 0;
|
|
3687
|
-
return Z = J -
|
|
3687
|
+
return Z = J - B - 10, J - B < y && B - H > J - B && (X = "right", Z = B - H - 10), {
|
|
3688
3688
|
hposition: X,
|
|
3689
3689
|
maxWidth: Math.min(Z, 300)
|
|
3690
3690
|
};
|
|
3691
3691
|
}
|
|
3692
|
-
let
|
|
3693
|
-
if (
|
|
3694
|
-
|
|
3692
|
+
let _ = 0, L = "bottom";
|
|
3693
|
+
if (M === "tabs" || M === "section")
|
|
3694
|
+
_ = R.getBoundingClientRect().bottom - w - D - 10;
|
|
3695
3695
|
else {
|
|
3696
3696
|
const Z = I ? I.bottom : window.innerHeight;
|
|
3697
|
-
|
|
3697
|
+
_ = M === "page-header" ? Z - w : T, _ = _ - D - 10, L = M === "page-header" ? "bottom" : "top";
|
|
3698
3698
|
}
|
|
3699
|
-
const
|
|
3699
|
+
const q = V();
|
|
3700
3700
|
return {
|
|
3701
|
-
position:
|
|
3702
|
-
maxWidth:
|
|
3703
|
-
maxHeight:
|
|
3701
|
+
position: L + "-" + q.hposition,
|
|
3702
|
+
maxWidth: q.maxWidth,
|
|
3703
|
+
maxHeight: _
|
|
3704
3704
|
};
|
|
3705
3705
|
}
|
|
3706
|
-
function S(
|
|
3707
|
-
var
|
|
3708
|
-
const R = "300px",
|
|
3709
|
-
display:
|
|
3706
|
+
function S(M) {
|
|
3707
|
+
var P, p, B;
|
|
3708
|
+
const R = "300px", k = {
|
|
3709
|
+
display: M.expanded === !0 ? "block" : "none",
|
|
3710
3710
|
position: "absolute",
|
|
3711
3711
|
maxWidth: R,
|
|
3712
3712
|
minWidth: "120px"
|
|
3713
3713
|
};
|
|
3714
3714
|
if (!(i != null && i.value))
|
|
3715
|
-
return
|
|
3716
|
-
const
|
|
3717
|
-
if (
|
|
3718
|
-
const
|
|
3719
|
-
if (!
|
|
3720
|
-
return
|
|
3721
|
-
|
|
3722
|
-
let
|
|
3715
|
+
return k;
|
|
3716
|
+
const x = i.value.querySelector("#" + M.id), A = x == null ? void 0 : x.getClientRects();
|
|
3717
|
+
if (x && A && A.length > 0) {
|
|
3718
|
+
const T = x ? x.querySelector("#" + M.id + "_menu") : null;
|
|
3719
|
+
if (!T || M.expanded !== !0)
|
|
3720
|
+
return k;
|
|
3721
|
+
T.style.visibility = "hidden", T.style.display = "block", T.style.maxHeight = "auto", T.style.maxWidth = R;
|
|
3722
|
+
let y;
|
|
3723
3723
|
switch (r.toolbarPosition) {
|
|
3724
3724
|
case "tabs":
|
|
3725
|
-
|
|
3725
|
+
y = (P = i.value) == null ? void 0 : P.closest(".farris-tabs");
|
|
3726
3726
|
break;
|
|
3727
3727
|
case "section":
|
|
3728
|
-
|
|
3728
|
+
y = (p = i.value) == null ? void 0 : p.closest(".f-section");
|
|
3729
3729
|
break;
|
|
3730
3730
|
default:
|
|
3731
|
-
|
|
3731
|
+
y = (B = i.value) == null ? void 0 : B.closest(".f-page");
|
|
3732
3732
|
}
|
|
3733
|
-
const v = a(r.toolbarPosition,
|
|
3733
|
+
const v = a(r.toolbarPosition, y, T, A), {
|
|
3734
3734
|
position: d,
|
|
3735
|
-
maxHeight:
|
|
3735
|
+
maxHeight: b,
|
|
3736
3736
|
maxWidth: D
|
|
3737
3737
|
} = v;
|
|
3738
|
-
|
|
3739
|
-
const
|
|
3738
|
+
T.style.visibility = "visible";
|
|
3739
|
+
const w = {
|
|
3740
3740
|
left: d.indexOf("left") > -1 ? 0 : "unset",
|
|
3741
3741
|
right: d.indexOf("left") > -1 ? "unset" : 0,
|
|
3742
3742
|
bottom: d.indexOf("bottom") > -1 ? "unset" : "100%",
|
|
3743
3743
|
top: d.indexOf("bottom") > -1 ? "!00%" : "unset",
|
|
3744
3744
|
maxWidth: D ? D + "px" : "300px",
|
|
3745
|
-
maxHeight:
|
|
3746
|
-
overflowY:
|
|
3745
|
+
maxHeight: b ? b + "px" : "auto",
|
|
3746
|
+
overflowY: b ? "auto" : "unset"
|
|
3747
3747
|
};
|
|
3748
|
-
Object.assign(
|
|
3748
|
+
Object.assign(k, w);
|
|
3749
3749
|
}
|
|
3750
|
-
return
|
|
3750
|
+
return k;
|
|
3751
3751
|
}
|
|
3752
|
-
r.changeMenuPosition = S, c = function(
|
|
3752
|
+
r.changeMenuPosition = S, c = function(M, R) {
|
|
3753
3753
|
return O("ul", {
|
|
3754
|
-
class: l(
|
|
3755
|
-
style: S(
|
|
3756
|
-
id:
|
|
3757
|
-
}, [u(
|
|
3754
|
+
class: l(M),
|
|
3755
|
+
style: S(M),
|
|
3756
|
+
id: M.id + "_menu"
|
|
3757
|
+
}, [u(M)]);
|
|
3758
3758
|
};
|
|
3759
|
-
function F(
|
|
3760
|
-
|
|
3761
|
-
|
|
3759
|
+
function F(M = "") {
|
|
3760
|
+
M && f.has(M) ? f.forEach((R, k) => {
|
|
3761
|
+
k !== M && (R.expanded = !1, f.delete(k));
|
|
3762
3762
|
}) : (f.forEach((R) => {
|
|
3763
3763
|
R.expanded = !1;
|
|
3764
3764
|
}), f.clear());
|
|
@@ -3784,7 +3784,7 @@ const Yo = {
|
|
|
3784
3784
|
modelValue: { type: Object }
|
|
3785
3785
|
};
|
|
3786
3786
|
function Xo(t, e, n) {
|
|
3787
|
-
var
|
|
3787
|
+
var B;
|
|
3788
3788
|
const o = "", r = Y();
|
|
3789
3789
|
let i;
|
|
3790
3790
|
function s() {
|
|
@@ -3799,93 +3799,96 @@ function Xo(t, e, n) {
|
|
|
3799
3799
|
function m() {
|
|
3800
3800
|
return !0;
|
|
3801
3801
|
}
|
|
3802
|
-
function
|
|
3803
|
-
|
|
3802
|
+
function C() {
|
|
3803
|
+
return !0;
|
|
3804
|
+
}
|
|
3805
|
+
function c(T) {
|
|
3806
|
+
if (!T || !T.value)
|
|
3804
3807
|
return null;
|
|
3805
|
-
const
|
|
3806
|
-
return
|
|
3808
|
+
const y = Y(T == null ? void 0 : T.value.parent), v = c(y);
|
|
3809
|
+
return v || null;
|
|
3807
3810
|
}
|
|
3808
|
-
function
|
|
3809
|
-
var
|
|
3810
|
-
const { componentInstance:
|
|
3811
|
-
if (!
|
|
3811
|
+
function f(T = e) {
|
|
3812
|
+
var b;
|
|
3813
|
+
const { componentInstance: y, designerItemElementRef: v } = T;
|
|
3814
|
+
if (!y || !y.value)
|
|
3812
3815
|
return null;
|
|
3813
|
-
const { getCustomButtons:
|
|
3814
|
-
return
|
|
3816
|
+
const { getCustomButtons: d } = y.value;
|
|
3817
|
+
return y.value.canMove || y.value.canAdd || y.value.canDelete || d && ((b = d()) != null && b.length) ? v : f(T.parent);
|
|
3815
3818
|
}
|
|
3816
|
-
function
|
|
3819
|
+
function h() {
|
|
3817
3820
|
}
|
|
3818
|
-
function
|
|
3819
|
-
return
|
|
3821
|
+
function u(T) {
|
|
3822
|
+
return !!n;
|
|
3820
3823
|
}
|
|
3821
|
-
function
|
|
3824
|
+
function a() {
|
|
3822
3825
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
3823
3826
|
}
|
|
3824
|
-
function
|
|
3827
|
+
function S() {
|
|
3825
3828
|
}
|
|
3826
|
-
function
|
|
3829
|
+
function F(T, y) {
|
|
3827
3830
|
}
|
|
3828
|
-
function
|
|
3829
|
-
const { componentType:
|
|
3830
|
-
let
|
|
3831
|
-
const
|
|
3832
|
-
return
|
|
3831
|
+
function M(T) {
|
|
3832
|
+
const { componentType: y } = T, v = de("designer-host-service");
|
|
3833
|
+
let d = ht(y, T, v);
|
|
3834
|
+
const b = y.toLowerCase().replace(/-/g, "_");
|
|
3835
|
+
return d && !d.id && d.type === y && (d.id = `${b}_${Math.random().toString().slice(2, 6)}`), d;
|
|
3833
3836
|
}
|
|
3834
|
-
function
|
|
3837
|
+
function R(T) {
|
|
3835
3838
|
}
|
|
3836
|
-
function
|
|
3839
|
+
function k(...T) {
|
|
3837
3840
|
return [];
|
|
3838
3841
|
}
|
|
3839
|
-
function
|
|
3842
|
+
function x() {
|
|
3840
3843
|
}
|
|
3841
|
-
function T
|
|
3842
|
-
var
|
|
3844
|
+
function A(T) {
|
|
3845
|
+
var v;
|
|
3843
3846
|
if (!(e != null && e.schema))
|
|
3844
3847
|
return;
|
|
3845
|
-
let
|
|
3848
|
+
let y = "";
|
|
3846
3849
|
{
|
|
3847
|
-
const { text:
|
|
3848
|
-
|
|
3850
|
+
const { text: d, title: b, label: D, mainTitle: w, name: I, type: V } = e.schema;
|
|
3851
|
+
y = d || b || D || w || I || ((v = Me[V]) == null ? void 0 : v.name);
|
|
3849
3852
|
}
|
|
3850
|
-
|
|
3851
|
-
componentTitle:
|
|
3852
|
-
parentPathName:
|
|
3853
|
+
y && (!i && T && (i = T.formSchemaUtils), i.getControlBasicInfoMap().set(e.schema.id, {
|
|
3854
|
+
componentTitle: y,
|
|
3855
|
+
parentPathName: y
|
|
3853
3856
|
}));
|
|
3854
3857
|
}
|
|
3855
|
-
function
|
|
3856
|
-
var
|
|
3857
|
-
const { changeObject:
|
|
3858
|
-
["text", "title", "label", "name", "mainTitle"].includes((
|
|
3858
|
+
function P(T) {
|
|
3859
|
+
var b;
|
|
3860
|
+
const { changeObject: y } = T, { propertyID: v, propertyValue: d } = y;
|
|
3861
|
+
["text", "title", "label", "name", "mainTitle"].includes((b = T == null ? void 0 : T.changeObject) == null ? void 0 : b.propertyID) && v && d && A();
|
|
3859
3862
|
}
|
|
3860
|
-
function
|
|
3861
|
-
|
|
3863
|
+
function p(T) {
|
|
3864
|
+
P(T);
|
|
3862
3865
|
}
|
|
3863
3866
|
return r.value = {
|
|
3864
3867
|
canMove: s(),
|
|
3865
3868
|
canSelectParent: g(),
|
|
3866
3869
|
canAdd: m(),
|
|
3867
3870
|
canDelete: l(),
|
|
3868
|
-
canNested: !
|
|
3871
|
+
canNested: !C(),
|
|
3869
3872
|
contents: [],
|
|
3870
3873
|
elementRef: t,
|
|
3871
|
-
parent: (
|
|
3874
|
+
parent: (B = e.parent) == null ? void 0 : B.componentInstance,
|
|
3872
3875
|
schema: e.schema,
|
|
3873
3876
|
styles: o,
|
|
3874
|
-
canAccepts:
|
|
3875
|
-
getBelongedComponentInstance:
|
|
3876
|
-
getDraggableDesignItemElement:
|
|
3877
|
-
getDraggingDisplayText:
|
|
3878
|
-
getPropConfig:
|
|
3879
|
-
getDragScopeElement:
|
|
3880
|
-
onAcceptMovedChildElement:
|
|
3881
|
-
onChildElementMovedOut:
|
|
3882
|
-
addNewChildComponentSchema:
|
|
3883
|
-
onRemoveComponent:
|
|
3877
|
+
canAccepts: u,
|
|
3878
|
+
getBelongedComponentInstance: c,
|
|
3879
|
+
getDraggableDesignItemElement: f,
|
|
3880
|
+
getDraggingDisplayText: a,
|
|
3881
|
+
getPropConfig: k,
|
|
3882
|
+
getDragScopeElement: S,
|
|
3883
|
+
onAcceptMovedChildElement: F,
|
|
3884
|
+
onChildElementMovedOut: R,
|
|
3885
|
+
addNewChildComponentSchema: M,
|
|
3886
|
+
onRemoveComponent: x,
|
|
3884
3887
|
triggerBelongedComponentToMoveWhenMoved: Y(!1),
|
|
3885
3888
|
triggerBelongedComponentToDeleteWhenDeleted: Y(!1),
|
|
3886
|
-
onPropertyChanged:
|
|
3887
|
-
getCustomButtons:
|
|
3888
|
-
setComponentBasicInfoMap:
|
|
3889
|
+
onPropertyChanged: p,
|
|
3890
|
+
getCustomButtons: h,
|
|
3891
|
+
setComponentBasicInfoMap: A
|
|
3889
3892
|
}, r;
|
|
3890
3893
|
}
|
|
3891
3894
|
const Lt = /* @__PURE__ */ Se({
|
|
@@ -3893,7 +3896,7 @@ const Lt = /* @__PURE__ */ Se({
|
|
|
3893
3896
|
props: Yo,
|
|
3894
3897
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
3895
3898
|
setup(t, e) {
|
|
3896
|
-
const n = Y(t.canMove), o = Y(t.canAdd), r = Y(t.canDelete), i = Y(!1), s = Y(t.contentKey), g = Y(t.childType), l = Y(t.childLabel), m = Y(t.modelValue),
|
|
3899
|
+
const n = Y(t.canMove), o = Y(t.canAdd), r = Y(t.canDelete), i = Y(!1), s = Y(t.contentKey), g = Y(t.childType), l = Y(t.childLabel), m = Y(t.modelValue), C = Y(""), c = Y(), f = de("canvas-dragula"), h = Y(), u = de("design-item-context"), a = {
|
|
3897
3900
|
designerItemElementRef: c,
|
|
3898
3901
|
componentInstance: h,
|
|
3899
3902
|
schema: m.value,
|
|
@@ -3901,43 +3904,43 @@ const Lt = /* @__PURE__ */ Se({
|
|
|
3901
3904
|
setupContext: e
|
|
3902
3905
|
};
|
|
3903
3906
|
mt("design-item-context", a);
|
|
3904
|
-
const S = de("designer-host-service"), F = de("external-container-id"),
|
|
3905
|
-
var
|
|
3906
|
-
const
|
|
3907
|
+
const S = de("designer-host-service"), F = de("external-container-id"), M = ee(() => {
|
|
3908
|
+
var V;
|
|
3909
|
+
const w = ((V = h.value) == null ? void 0 : V.getCustomButtons) && h.value.getCustomButtons();
|
|
3907
3910
|
return {
|
|
3908
3911
|
"farris-component": !0,
|
|
3909
3912
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
3910
3913
|
"flex-fill": t.id === "root-component",
|
|
3911
|
-
"position-relative": n.value || r.value || (
|
|
3914
|
+
"position-relative": n.value || r.value || (w == null ? void 0 : w.length),
|
|
3912
3915
|
"farris-nested": i.value,
|
|
3913
3916
|
"can-move": n.value,
|
|
3914
3917
|
"d-none": c.value && c.value.classList.contains("d-none")
|
|
3915
3918
|
};
|
|
3916
3919
|
}), R = ee(() => {
|
|
3917
|
-
const
|
|
3918
|
-
return
|
|
3919
|
-
const [
|
|
3920
|
-
return
|
|
3921
|
-
},
|
|
3920
|
+
const w = {};
|
|
3921
|
+
return C.value && C.value.split(";").reduce((I, V) => {
|
|
3922
|
+
const [_, L] = V.split(":");
|
|
3923
|
+
return _ && (I[_] = L), I;
|
|
3924
|
+
}, w), w;
|
|
3922
3925
|
});
|
|
3923
|
-
function
|
|
3926
|
+
function k(w, I) {
|
|
3924
3927
|
if (u && u.schema[s.value]) {
|
|
3925
|
-
const
|
|
3926
|
-
if (
|
|
3927
|
-
const
|
|
3928
|
-
u.designerItemElementRef.value.querySelector(`#${
|
|
3928
|
+
const V = u.schema[s.value].findIndex((_) => _.id === I.id);
|
|
3929
|
+
if (V > -1) {
|
|
3930
|
+
const _ = u.schema[s.value].length, L = u.schema[s.value][V % _];
|
|
3931
|
+
u.designerItemElementRef.value.querySelector(`#${L.id}-design-item`), u.schema[s.value].splice(V, 1), Te.value++, e.emit("removeComponent"), e.emit("selectionChange");
|
|
3929
3932
|
}
|
|
3930
3933
|
}
|
|
3931
3934
|
}
|
|
3932
|
-
function
|
|
3935
|
+
function x(w) {
|
|
3933
3936
|
if (h.value.addNewChildComponentSchema) {
|
|
3934
3937
|
const I = {
|
|
3935
3938
|
componentType: g.value,
|
|
3936
3939
|
label: l.value,
|
|
3937
3940
|
parentComponentInstance: h.value,
|
|
3938
3941
|
targetPosition: -1
|
|
3939
|
-
},
|
|
3940
|
-
m.value[s.value].push(
|
|
3942
|
+
}, V = h.value.addNewChildComponentSchema(I);
|
|
3943
|
+
m.value[s.value].push(V), e.emit("addComponent");
|
|
3941
3944
|
}
|
|
3942
3945
|
}
|
|
3943
3946
|
function A() {
|
|
@@ -3946,20 +3949,20 @@ const Lt = /* @__PURE__ */ Se({
|
|
|
3946
3949
|
class: "btn component-settings-button",
|
|
3947
3950
|
title: "新增",
|
|
3948
3951
|
ref: "removeComponent",
|
|
3949
|
-
onClick: (
|
|
3950
|
-
|
|
3952
|
+
onClick: (w) => {
|
|
3953
|
+
x();
|
|
3951
3954
|
}
|
|
3952
3955
|
}, [O("i", {
|
|
3953
3956
|
class: "f-icon f-icon-plus-circle"
|
|
3954
3957
|
}, null)]);
|
|
3955
3958
|
}
|
|
3956
|
-
function
|
|
3959
|
+
function P(w) {
|
|
3957
3960
|
return r.value && O("div", {
|
|
3958
3961
|
role: "button",
|
|
3959
3962
|
class: "btn component-settings-button",
|
|
3960
3963
|
title: "删除",
|
|
3961
3964
|
ref: "removeComponent",
|
|
3962
|
-
onClick: fn((I) =>
|
|
3965
|
+
onClick: fn((I) => k(I, w), ["stop"])
|
|
3963
3966
|
}, [O("i", {
|
|
3964
3967
|
class: "f-icon f-icon-yxs_delete"
|
|
3965
3968
|
}, null)]);
|
|
@@ -3975,77 +3978,77 @@ const Lt = /* @__PURE__ */ Se({
|
|
|
3975
3978
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
3976
3979
|
}, null)]);
|
|
3977
3980
|
}
|
|
3978
|
-
function
|
|
3981
|
+
function B() {
|
|
3979
3982
|
var I;
|
|
3980
|
-
const
|
|
3981
|
-
return
|
|
3983
|
+
const w = ((I = h.value) == null ? void 0 : I.getCustomButtons) && h.value.getCustomButtons();
|
|
3984
|
+
return w && !!w.length && w.map((V) => O("div", {
|
|
3982
3985
|
role: "button",
|
|
3983
|
-
class: `btn component-settings-button ${
|
|
3984
|
-
title:
|
|
3985
|
-
ref:
|
|
3986
|
-
onClick: (
|
|
3986
|
+
class: `btn component-settings-button ${V.class || ""} ${V.text ? "settings-button-extend" : ""}`,
|
|
3987
|
+
title: V.title,
|
|
3988
|
+
ref: V.id,
|
|
3989
|
+
onClick: (_) => V.onClick && V.onClick(_)
|
|
3987
3990
|
}, [O("i", {
|
|
3988
|
-
class: "f-icon " +
|
|
3989
|
-
}, null),
|
|
3991
|
+
class: "f-icon " + V.icon
|
|
3992
|
+
}, null), V.text && O("span", {
|
|
3990
3993
|
class: "icon-text"
|
|
3991
|
-
}, [
|
|
3994
|
+
}, [V.text])]));
|
|
3992
3995
|
}
|
|
3993
|
-
function
|
|
3996
|
+
function T(w) {
|
|
3994
3997
|
return O("div", {
|
|
3995
3998
|
class: "component-btn-group",
|
|
3996
3999
|
"data-noattach": "true"
|
|
3997
|
-
}, [O("div", null, [A(), p(),
|
|
4000
|
+
}, [O("div", null, [A(), p(), P(w), B()])]);
|
|
3998
4001
|
}
|
|
3999
|
-
we(() => t.modelValue, (
|
|
4000
|
-
m.value =
|
|
4002
|
+
we(() => t.modelValue, (w) => {
|
|
4003
|
+
m.value = w, a.schema = w;
|
|
4001
4004
|
});
|
|
4002
|
-
function w
|
|
4005
|
+
function y(w) {
|
|
4003
4006
|
window.scrollContainerList || (window.scrollContainerList = /* @__PURE__ */ new Set());
|
|
4004
|
-
const I =
|
|
4007
|
+
const I = w.getAttribute("id");
|
|
4005
4008
|
I && window.scrollContainerList.add(I);
|
|
4006
4009
|
}
|
|
4007
|
-
function v(
|
|
4008
|
-
const I =
|
|
4009
|
-
|
|
4010
|
+
function v(w) {
|
|
4011
|
+
const I = w.target;
|
|
4012
|
+
y(I), uo(I);
|
|
4010
4013
|
}
|
|
4011
4014
|
function d() {
|
|
4012
|
-
var
|
|
4013
|
-
(I = (
|
|
4015
|
+
var w, I;
|
|
4016
|
+
(I = (w = m.value) == null ? void 0 : w.contents) != null && I.length && c.value && c.value.addEventListener("scroll", v);
|
|
4014
4017
|
}
|
|
4015
|
-
function
|
|
4016
|
-
const
|
|
4018
|
+
function b() {
|
|
4019
|
+
const w = c.value, I = Y(w.children[1]);
|
|
4017
4020
|
return Xo(I, a).value;
|
|
4018
4021
|
}
|
|
4019
4022
|
ke(() => {
|
|
4020
4023
|
if (c.value) {
|
|
4021
|
-
const
|
|
4022
|
-
h.value =
|
|
4024
|
+
const w = c.value.querySelector(`[data-dragref='${m.value.id}-container']`);
|
|
4025
|
+
h.value = w && w.componentInstance ? w.componentInstance.value : b(), f && w && f.attachComponents(w, m.value), i.value = h.value.canNested !== void 0 ? h.value.canNested : i.value, o.value = h.value.canAdd !== void 0 ? h.value.canAdd : o.value, r.value = h.value.canDelete !== void 0 ? h.value.canDelete : r.value, n.value = h.value.canMove !== void 0 ? h.value.canMove : n.value, C.value = h.value.styles || "", c.value && (c.value.componentInstance = h, c.value.designItemContext = a), h.value.setComponentBasicInfoMap(S);
|
|
4023
4026
|
}
|
|
4024
4027
|
d(), Te.value++;
|
|
4025
4028
|
}), dn(() => {
|
|
4026
4029
|
c.value && c.value.removeEventListener("scroll", v);
|
|
4027
4030
|
});
|
|
4028
|
-
function D(
|
|
4029
|
-
if (
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4031
|
+
function D(w) {
|
|
4032
|
+
if (w && (w.preventDefault(), w.stopPropagation()), F) {
|
|
4033
|
+
const _ = document.getElementById(`${F}-design-item`);
|
|
4034
|
+
_ && _.click();
|
|
4032
4035
|
return;
|
|
4033
4036
|
}
|
|
4034
4037
|
let I = a.designerItemElementRef;
|
|
4035
|
-
const
|
|
4036
|
-
if (
|
|
4037
|
-
const
|
|
4038
|
-
|
|
4038
|
+
const V = c.value;
|
|
4039
|
+
if (V) {
|
|
4040
|
+
const _ = document.getElementsByClassName("dgComponentFocused");
|
|
4041
|
+
_ && _.length === 1 && _[0] === c.value && c.value.classList.contains("dgComponentSelected") || (Array.from(_).forEach((q) => q.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((q) => q.classList.remove("dgComponentSelected")), V.classList.add("dgComponentFocused"), e.emit("selectionChange", m.value.type, m.value, t.componentId, h.value), h.value.getDraggableDesignItemElement && (I = h.value.getDraggableDesignItemElement(a), I && I.value && I.value.classList.add("dgComponentSelected")));
|
|
4039
4042
|
}
|
|
4040
4043
|
Rt(I == null ? void 0 : I.value);
|
|
4041
4044
|
}
|
|
4042
4045
|
return () => O("div", {
|
|
4043
4046
|
id: `${t.id}-design-item`,
|
|
4044
4047
|
ref: c,
|
|
4045
|
-
class:
|
|
4048
|
+
class: M.value,
|
|
4046
4049
|
style: R.value,
|
|
4047
4050
|
onClick: D
|
|
4048
|
-
}, [
|
|
4051
|
+
}, [T(m.value), e.slots.default && e.slots.default()]);
|
|
4049
4052
|
}
|
|
4050
4053
|
});
|
|
4051
4054
|
class Qo extends je {
|
|
@@ -4271,32 +4274,32 @@ function Ko(t, e, n) {
|
|
|
4271
4274
|
}
|
|
4272
4275
|
function l(v, d = "") {
|
|
4273
4276
|
setTimeout(() => {
|
|
4274
|
-
var I,
|
|
4275
|
-
const
|
|
4277
|
+
var I, V;
|
|
4278
|
+
const b = (I = t.parent) == null ? void 0 : I.designerItemElementRef.value;
|
|
4276
4279
|
let D;
|
|
4277
|
-
d && (D =
|
|
4278
|
-
const
|
|
4279
|
-
|
|
4280
|
+
d && (D = b == null ? void 0 : b.querySelector("#" + d));
|
|
4281
|
+
const w = (V = D || b) == null ? void 0 : V.querySelector("#" + v);
|
|
4282
|
+
w == null || w.click();
|
|
4280
4283
|
}, 0);
|
|
4281
4284
|
}
|
|
4282
4285
|
function m(v, d) {
|
|
4283
4286
|
d.disabled && d.disabled.expressionId && (d.disabled.expressionId = `${d.id}_disabled`), d.visible && d.visible.expressionId && (d.visible.expressionId = `${d.id}_visible`);
|
|
4284
|
-
const
|
|
4287
|
+
const b = e.formSchemaUtils.getExpressions(), D = b.find((I) => I.target === v.id);
|
|
4285
4288
|
if (!D || !D.rules || !D.rules.length)
|
|
4286
4289
|
return;
|
|
4287
|
-
const
|
|
4290
|
+
const w = {
|
|
4288
4291
|
target: d.id,
|
|
4289
4292
|
rules: [],
|
|
4290
4293
|
targetType: "Button"
|
|
4291
4294
|
};
|
|
4292
4295
|
D.rules.forEach((I) => {
|
|
4293
|
-
const
|
|
4296
|
+
const V = Object.assign(xe(I), {
|
|
4294
4297
|
id: `${d.id}_${I.type}`
|
|
4295
4298
|
});
|
|
4296
|
-
|
|
4297
|
-
}),
|
|
4299
|
+
w.rules.push(V);
|
|
4300
|
+
}), b.push(w);
|
|
4298
4301
|
}
|
|
4299
|
-
function
|
|
4302
|
+
function C() {
|
|
4300
4303
|
var D;
|
|
4301
4304
|
const v = t.schema, d = Object.assign(
|
|
4302
4305
|
xe(v),
|
|
@@ -4306,26 +4309,26 @@ function Ko(t, e, n) {
|
|
|
4306
4309
|
}
|
|
4307
4310
|
);
|
|
4308
4311
|
(D = e == null ? void 0 : e.designerContext) != null && D.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(d);
|
|
4309
|
-
let
|
|
4310
|
-
return d.children && d.children.length && (
|
|
4311
|
-
var
|
|
4312
|
-
const I = xe(
|
|
4312
|
+
let b = [];
|
|
4313
|
+
return d.children && d.children.length && (b = d.children.map((w) => {
|
|
4314
|
+
var V;
|
|
4315
|
+
const I = xe(w);
|
|
4313
4316
|
return Object.assign(
|
|
4314
4317
|
I,
|
|
4315
4318
|
{
|
|
4316
4319
|
id: `${t.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
4317
4320
|
onClick: null
|
|
4318
4321
|
}
|
|
4319
|
-
), (
|
|
4320
|
-
}), d.children =
|
|
4322
|
+
), (V = e == null ? void 0 : e.designerContext) != null && V.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(I), m(w, I), I;
|
|
4323
|
+
}), d.children = b), m(v, d), d;
|
|
4321
4324
|
}
|
|
4322
4325
|
function c() {
|
|
4323
|
-
const v = t.schema.type || "response-toolbar-item", d = Un(v),
|
|
4324
|
-
return d && !d.id && d.type === v && (d.id = `${
|
|
4326
|
+
const v = t.schema.type || "response-toolbar-item", d = Un(v), b = v.toLowerCase().replace("-", "_");
|
|
4327
|
+
return d && !d.id && d.type === v && (d.id = `${b}_${Math.random().toString().slice(2, 6)}`, d.text = "按钮"), d;
|
|
4325
4328
|
}
|
|
4326
4329
|
function f(v) {
|
|
4327
|
-
const d = g(),
|
|
4328
|
-
return { index:
|
|
4330
|
+
const d = g(), b = d == null ? void 0 : d.findIndex((w) => w.id === v), D = b === -1 ? null : d[b];
|
|
4331
|
+
return { index: b, toolbarItem: D };
|
|
4329
4332
|
}
|
|
4330
4333
|
function h() {
|
|
4331
4334
|
const v = t.schema.id, d = g();
|
|
@@ -4335,12 +4338,12 @@ function Ko(t, e, n) {
|
|
|
4335
4338
|
const d = e.formSchemaUtils.getExpressions();
|
|
4336
4339
|
if (!d || !d.length)
|
|
4337
4340
|
return;
|
|
4338
|
-
const
|
|
4339
|
-
const
|
|
4340
|
-
|
|
4341
|
+
const b = (D) => {
|
|
4342
|
+
const w = d && d.findIndex((I) => I.target === D.id);
|
|
4343
|
+
w > -1 && d.splice(w, 1);
|
|
4341
4344
|
};
|
|
4342
|
-
|
|
4343
|
-
|
|
4345
|
+
b(v), v.children && v.children.length && v.children.forEach((D) => {
|
|
4346
|
+
b(D);
|
|
4344
4347
|
});
|
|
4345
4348
|
}
|
|
4346
4349
|
function a(v) {
|
|
@@ -4352,50 +4355,50 @@ function Ko(t, e, n) {
|
|
|
4352
4355
|
});
|
|
4353
4356
|
}
|
|
4354
4357
|
function F() {
|
|
4355
|
-
var D,
|
|
4358
|
+
var D, w, I;
|
|
4356
4359
|
if ((D = e == null ? void 0 : e.designerContext) != null && D.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
4357
4360
|
return;
|
|
4358
|
-
const v = g(), { parentIndex: d, itemIndex:
|
|
4359
|
-
d === -1 ||
|
|
4361
|
+
const v = g(), { parentIndex: d, itemIndex: b } = dt(t.schema.id, v);
|
|
4362
|
+
d === -1 || b === -1 || (u(t.schema), S(t.schema), v[d].children.splice(b, 1), n.updateToolbarItems(), (w = t.setupContext) == null || w.emit("removeComponent"), (I = t.setupContext) == null || I.emit("selectionChange"), Te.value++);
|
|
4360
4363
|
}
|
|
4361
|
-
function
|
|
4362
|
-
var D,
|
|
4364
|
+
function M() {
|
|
4365
|
+
var D, w, I;
|
|
4363
4366
|
if ((D = e == null ? void 0 : e.designerContext) != null && D.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
4364
4367
|
return;
|
|
4365
|
-
const v = t.schema.id, d = g(),
|
|
4366
|
-
|
|
4368
|
+
const v = t.schema.id, d = g(), b = d == null ? void 0 : d.findIndex((V) => V.id === v);
|
|
4369
|
+
b !== -1 && (u(d[b]), S(d[b]), d == null || d.splice(b, 1), n.updateToolbarItems(), (w = t.setupContext) == null || w.emit("removeComponent"), (I = t.setupContext) == null || I.emit("selectionChange"), Te.value++);
|
|
4367
4370
|
}
|
|
4368
4371
|
function R(v = "Append") {
|
|
4369
|
-
var
|
|
4370
|
-
const d = g(), { parentIndex:
|
|
4371
|
-
if (
|
|
4372
|
+
var V;
|
|
4373
|
+
const d = g(), { parentIndex: b, itemIndex: D } = dt(t.schema.id, d);
|
|
4374
|
+
if (b === -1 || D === -1)
|
|
4372
4375
|
return;
|
|
4373
|
-
const
|
|
4374
|
-
d[
|
|
4376
|
+
const w = c(), I = v === "Copy" ? C() : Object.assign({}, w);
|
|
4377
|
+
d[b].children.splice(D + 1, 0, I), n.updateToolbarItems(), a(I.id), (V = t.setupContext) == null || V.emit("addComponent");
|
|
4375
4378
|
}
|
|
4376
|
-
function
|
|
4377
|
-
const { index:
|
|
4378
|
-
if (
|
|
4379
|
-
return { index:
|
|
4380
|
-
const D = c(),
|
|
4381
|
-
return { index:
|
|
4379
|
+
function k(v, d) {
|
|
4380
|
+
const { index: b } = f(d);
|
|
4381
|
+
if (b === -1)
|
|
4382
|
+
return { index: b, schema: null };
|
|
4383
|
+
const D = c(), w = v === "Copy" ? C() : Object.assign({}, D);
|
|
4384
|
+
return { index: b, schema: w };
|
|
4382
4385
|
}
|
|
4383
|
-
function
|
|
4386
|
+
function x() {
|
|
4384
4387
|
var D;
|
|
4385
|
-
const v = t.schema.id, { index: d, schema:
|
|
4386
|
-
|
|
4388
|
+
const v = t.schema.id, { index: d, schema: b } = k("Copy", v);
|
|
4389
|
+
b && (g().splice(d + 1, 0, b), n.updateToolbarItems(), l(b.id), (D = t.setupContext) == null || D.emit("addComponent"));
|
|
4387
4390
|
}
|
|
4388
4391
|
function A() {
|
|
4389
4392
|
var D;
|
|
4390
|
-
const v = t.schema.id, { index: d, schema:
|
|
4391
|
-
if (
|
|
4393
|
+
const v = t.schema.id, { index: d, schema: b } = k("Append", v);
|
|
4394
|
+
if (b && t.parent) {
|
|
4392
4395
|
const I = g()[d].children || [];
|
|
4393
|
-
I.push(
|
|
4394
|
-
const
|
|
4395
|
-
|
|
4396
|
+
I.push(b);
|
|
4397
|
+
const V = g();
|
|
4398
|
+
V[d].children = I, n.updateToolbarItems(), a(b.id), (D = t.setupContext) == null || D.emit("addComponent");
|
|
4396
4399
|
}
|
|
4397
4400
|
}
|
|
4398
|
-
function
|
|
4401
|
+
function P(v) {
|
|
4399
4402
|
let d;
|
|
4400
4403
|
switch (t.schema.type) {
|
|
4401
4404
|
case "tab-toolbar-item":
|
|
@@ -4409,14 +4412,14 @@ function Ko(t, e, n) {
|
|
|
4409
4412
|
function p(v) {
|
|
4410
4413
|
v.stopPropagation(), v.stopImmediatePropagation();
|
|
4411
4414
|
}
|
|
4412
|
-
function
|
|
4415
|
+
function B() {
|
|
4413
4416
|
const v = [{
|
|
4414
4417
|
id: "delete",
|
|
4415
4418
|
title: "删除",
|
|
4416
4419
|
text: "",
|
|
4417
4420
|
icon: "f-icon-yxs_delete",
|
|
4418
4421
|
onClick: (d) => {
|
|
4419
|
-
p(d), h() ? F() :
|
|
4422
|
+
p(d), h() ? F() : M();
|
|
4420
4423
|
}
|
|
4421
4424
|
}, {
|
|
4422
4425
|
id: "copy",
|
|
@@ -4424,10 +4427,10 @@ function Ko(t, e, n) {
|
|
|
4424
4427
|
icon: "f-icon-yxs_copy",
|
|
4425
4428
|
onClick: (d) => {
|
|
4426
4429
|
p(d);
|
|
4427
|
-
const { activeElement:
|
|
4428
|
-
D && D === "input" || D === "textarea" ? (
|
|
4429
|
-
h() ? R("Copy") :
|
|
4430
|
-
})) : h() ? R("Copy") :
|
|
4430
|
+
const { activeElement: b } = document, D = b ? b.tagName.toLowerCase() : "";
|
|
4431
|
+
D && D === "input" || D === "textarea" ? (b == null || b.blur(), De(() => {
|
|
4432
|
+
h() ? R("Copy") : x();
|
|
4433
|
+
})) : h() ? R("Copy") : x();
|
|
4431
4434
|
}
|
|
4432
4435
|
}];
|
|
4433
4436
|
return v.push(h() ? {
|
|
@@ -4448,17 +4451,17 @@ function Ko(t, e, n) {
|
|
|
4448
4451
|
}
|
|
4449
4452
|
}), v;
|
|
4450
4453
|
}
|
|
4451
|
-
function
|
|
4454
|
+
function T() {
|
|
4452
4455
|
const { schema: v } = t;
|
|
4453
4456
|
u(v);
|
|
4454
4457
|
}
|
|
4455
|
-
function
|
|
4456
|
-
var v, d,
|
|
4458
|
+
function y() {
|
|
4459
|
+
var v, d, b, D;
|
|
4457
4460
|
if (t && e) {
|
|
4458
|
-
const { formSchemaUtils:
|
|
4461
|
+
const { formSchemaUtils: w } = e, { schema: I } = t;
|
|
4459
4462
|
switch (I.type) {
|
|
4460
4463
|
case "response-toolbar-item": {
|
|
4461
|
-
|
|
4464
|
+
w.getControlBasicInfoMap().set(I.id, {
|
|
4462
4465
|
componentTitle: I.text,
|
|
4463
4466
|
parentPathName: I.text
|
|
4464
4467
|
});
|
|
@@ -4466,9 +4469,9 @@ function Ko(t, e, n) {
|
|
|
4466
4469
|
}
|
|
4467
4470
|
case "tab-toolbar-item":
|
|
4468
4471
|
case "section-toolbar-item": {
|
|
4469
|
-
let
|
|
4470
|
-
const
|
|
4471
|
-
(
|
|
4472
|
+
let V;
|
|
4473
|
+
const _ = (v = t.parent) == null ? void 0 : v.parent;
|
|
4474
|
+
(_ == null ? void 0 : _.schema.type) === "tabs" || (_ == null ? void 0 : _.schema.type) === "section" ? V = (d = _.componentInstance) == null ? void 0 : d.value : V = (D = (b = _ == null ? void 0 : _.parent) == null ? void 0 : b.componentInstance) == null ? void 0 : D.value, V != null && V.setComponentBasicInfoMap && V.setComponentBasicInfoMap();
|
|
4472
4475
|
}
|
|
4473
4476
|
}
|
|
4474
4477
|
}
|
|
@@ -4478,10 +4481,10 @@ function Ko(t, e, n) {
|
|
|
4478
4481
|
checkCanMoveComponent: r,
|
|
4479
4482
|
checkCanDeleteComponent: i,
|
|
4480
4483
|
checkCanAddComponent: s,
|
|
4481
|
-
getPropsConfig:
|
|
4482
|
-
getCustomButtons:
|
|
4483
|
-
onRemoveComponent:
|
|
4484
|
-
setComponentBasicInfoMap:
|
|
4484
|
+
getPropsConfig: P,
|
|
4485
|
+
getCustomButtons: B,
|
|
4486
|
+
onRemoveComponent: T,
|
|
4487
|
+
setComponentBasicInfoMap: y
|
|
4485
4488
|
};
|
|
4486
4489
|
}
|
|
4487
4490
|
const qt = /* @__PURE__ */ Se({
|
|
@@ -4493,17 +4496,17 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4493
4496
|
ke(() => {
|
|
4494
4497
|
r.value.componentInstance = m;
|
|
4495
4498
|
}), e.expose(m.value);
|
|
4496
|
-
function
|
|
4497
|
-
const
|
|
4499
|
+
function C() {
|
|
4500
|
+
const k = {
|
|
4498
4501
|
"f-icon": !0
|
|
4499
|
-
},
|
|
4500
|
-
return oe(
|
|
4502
|
+
}, x = t.icon ? t.icon.trim() : "";
|
|
4503
|
+
return oe(k, x);
|
|
4501
4504
|
}
|
|
4502
4505
|
function c() {
|
|
4503
4506
|
return !!(t.icon && t.icon.trim());
|
|
4504
4507
|
}
|
|
4505
4508
|
const f = ee(() => {
|
|
4506
|
-
const
|
|
4509
|
+
const k = {
|
|
4507
4510
|
btn: !0,
|
|
4508
4511
|
"f-rt-btn": !0,
|
|
4509
4512
|
"f-btn-ml": !t.isDP && (n.value === "right" || n.value === "center"),
|
|
@@ -4514,7 +4517,7 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4514
4517
|
"text-truncate": !0
|
|
4515
4518
|
// 'f-rt-toggle':props.isDP&&!props.split
|
|
4516
4519
|
};
|
|
4517
|
-
return oe(
|
|
4520
|
+
return oe(k, t.class);
|
|
4518
4521
|
}), h = ee(() => t.split ? {
|
|
4519
4522
|
display: "flex",
|
|
4520
4523
|
"align-items": "center"
|
|
@@ -4526,16 +4529,16 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4526
4529
|
"border-top-right-radius": "6px",
|
|
4527
4530
|
"border-bottom-right-radius": "6px"
|
|
4528
4531
|
}), u = ee(() => {
|
|
4529
|
-
const
|
|
4532
|
+
const k = {
|
|
4530
4533
|
btn: !0,
|
|
4531
4534
|
"dropdown-toggle": !0,
|
|
4532
4535
|
"f-btn-mr": n.value === "left",
|
|
4533
4536
|
"dropdown-toggle-split": !0,
|
|
4534
4537
|
"no-drag": !0
|
|
4535
4538
|
};
|
|
4536
|
-
return oe(
|
|
4539
|
+
return oe(k, t.class);
|
|
4537
4540
|
}), a = ee(() => {
|
|
4538
|
-
let
|
|
4541
|
+
let k = {
|
|
4539
4542
|
btn: !t.isDPItem,
|
|
4540
4543
|
// 不是下拉按钮,不是下拉项
|
|
4541
4544
|
disabled: t.disabled === !0,
|
|
@@ -4547,10 +4550,10 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4547
4550
|
// 保证内部层级不被拖拽
|
|
4548
4551
|
"no-drag": !0
|
|
4549
4552
|
};
|
|
4550
|
-
return t.isDPItem || (
|
|
4553
|
+
return t.isDPItem || (k = oe(k, t.class || "")), t.isDP && (k = oe(k, t.dropdownClass || "")), k;
|
|
4551
4554
|
});
|
|
4552
|
-
function S(
|
|
4553
|
-
|
|
4555
|
+
function S(k, x) {
|
|
4556
|
+
x && x.stopPropagation(), e.emit(k, {
|
|
4554
4557
|
id: t.id,
|
|
4555
4558
|
isDP: t.isDP
|
|
4556
4559
|
});
|
|
@@ -4564,7 +4567,7 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4564
4567
|
"f-btn-mr": n.value === "left"
|
|
4565
4568
|
};
|
|
4566
4569
|
}
|
|
4567
|
-
function
|
|
4570
|
+
function M() {
|
|
4568
4571
|
return O("div", {
|
|
4569
4572
|
ref: r,
|
|
4570
4573
|
"data-dragref": `${s.schema.id}-container`,
|
|
@@ -4582,11 +4585,11 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4582
4585
|
}, null), O("span", null, [t.text]), !t.split && O("span", {
|
|
4583
4586
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
4584
4587
|
style: "margin:0 0.5rem 0 0.25rem;",
|
|
4585
|
-
onClick: (
|
|
4588
|
+
onClick: (k) => S("dropdown", k)
|
|
4586
4589
|
}, null)]), t.split && O("button", {
|
|
4587
4590
|
class: u.value,
|
|
4588
4591
|
style: "border-radius:0 6px 6px 0;",
|
|
4589
|
-
onClick: (
|
|
4592
|
+
onClick: (k) => S("dropdown", k)
|
|
4590
4593
|
}, null), g.renderDropdownMenu(t.item, t.item)])]);
|
|
4591
4594
|
}
|
|
4592
4595
|
function R() {
|
|
@@ -4599,7 +4602,7 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4599
4602
|
class: o.iconClass(t)
|
|
4600
4603
|
}, null), t.text]);
|
|
4601
4604
|
}
|
|
4602
|
-
return () => t.isDP ?
|
|
4605
|
+
return () => t.isDP ? M() : t.isDPItem ? R() : O("div", {
|
|
4603
4606
|
ref: r,
|
|
4604
4607
|
"data-dragref": `${s.schema.id}-container`,
|
|
4605
4608
|
class: "farris-component position-relative",
|
|
@@ -4610,7 +4613,7 @@ const qt = /* @__PURE__ */ Se({
|
|
|
4610
4613
|
id: t.id,
|
|
4611
4614
|
onClick: () => S("clearAll")
|
|
4612
4615
|
}, [c() && O("i", {
|
|
4613
|
-
class:
|
|
4616
|
+
class: C()
|
|
4614
4617
|
}, null), t.text])]);
|
|
4615
4618
|
}
|
|
4616
4619
|
});
|
|
@@ -4637,7 +4640,7 @@ function er(t, e, n, o) {
|
|
|
4637
4640
|
const u = f.target;
|
|
4638
4641
|
u != null && u.classList.contains("dgComponentFocused") && (u == null || u.classList.add("dgComponentSelected"));
|
|
4639
4642
|
}
|
|
4640
|
-
function
|
|
4643
|
+
function C(f, h = !1) {
|
|
4641
4644
|
if (!h)
|
|
4642
4645
|
return;
|
|
4643
4646
|
const u = f.target;
|
|
@@ -4659,7 +4662,7 @@ function er(t, e, n, o) {
|
|
|
4659
4662
|
onSelectionChange: r,
|
|
4660
4663
|
onRemoveComponent: i,
|
|
4661
4664
|
onMouseenter: (F) => m(F, u),
|
|
4662
|
-
onMouseleave: (F) =>
|
|
4665
|
+
onMouseleave: (F) => C(F, u)
|
|
4663
4666
|
}, {
|
|
4664
4667
|
default: () => {
|
|
4665
4668
|
var F;
|
|
@@ -4675,7 +4678,7 @@ function er(t, e, n, o) {
|
|
|
4675
4678
|
class: ((F = f.appearance) == null ? void 0 : F.class) || "btn-secondary",
|
|
4676
4679
|
alignment: t.alignment || "right",
|
|
4677
4680
|
onDropdown: () => s(f),
|
|
4678
|
-
onClearAll: (
|
|
4681
|
+
onClearAll: (M) => g(M),
|
|
4679
4682
|
componentId: t.componentId
|
|
4680
4683
|
}, null)];
|
|
4681
4684
|
}
|
|
@@ -4714,66 +4717,66 @@ const Wt = /* @__PURE__ */ Se({
|
|
|
4714
4717
|
setup(t, e) {
|
|
4715
4718
|
const n = Y(Ye(t.items)), o = Y(), r = Y(), i = Y(), s = Y("");
|
|
4716
4719
|
let g = 0;
|
|
4717
|
-
const l = 15, m = de("designer-host-service"),
|
|
4718
|
-
clearAllDropdown: (
|
|
4720
|
+
const l = 15, m = de("designer-host-service"), C = de("design-item-context"), c = {
|
|
4721
|
+
clearAllDropdown: (L) => {
|
|
4719
4722
|
},
|
|
4720
|
-
toggleDropdownMenu: (
|
|
4723
|
+
toggleDropdownMenu: (L) => {
|
|
4721
4724
|
},
|
|
4722
4725
|
updateToolbarItems: () => {
|
|
4723
4726
|
},
|
|
4724
|
-
changeSelectedId: (
|
|
4725
|
-
s.value =
|
|
4727
|
+
changeSelectedId: (L) => {
|
|
4728
|
+
s.value = L;
|
|
4726
4729
|
},
|
|
4727
|
-
renderDropdownMenu: (
|
|
4730
|
+
renderDropdownMenu: (L, q) => {
|
|
4728
4731
|
},
|
|
4729
|
-
toolbarContext:
|
|
4730
|
-
changeMenuPosition: (
|
|
4732
|
+
toolbarContext: C,
|
|
4733
|
+
changeMenuPosition: (L, q, Z) => ({}),
|
|
4731
4734
|
toolbarPosition: ""
|
|
4732
|
-
}, f = Wo(
|
|
4735
|
+
}, f = Wo(C, m, c), h = bn(i, C, f), u = de("toolbar-item-handler"), {
|
|
4733
4736
|
initDragula: a,
|
|
4734
4737
|
dragulaInstance: S
|
|
4735
|
-
} = zo(
|
|
4736
|
-
renderToolbarItemDesigner:
|
|
4737
|
-
} =
|
|
4738
|
-
clearAllDropDownMenu:
|
|
4738
|
+
} = zo(C), F = Je(), M = er(t, r, C, c), R = Go(F, n, M), {
|
|
4739
|
+
renderToolbarItemDesigner: k
|
|
4740
|
+
} = M, {
|
|
4741
|
+
clearAllDropDownMenu: x,
|
|
4739
4742
|
renderDropdownMenu: A,
|
|
4740
|
-
setResponseToolbarRef:
|
|
4743
|
+
setResponseToolbarRef: P
|
|
4741
4744
|
} = R;
|
|
4742
|
-
mt("toolbar-item-action", c), c.renderDropdownMenu = A,
|
|
4743
|
-
s.value =
|
|
4745
|
+
mt("toolbar-item-action", c), c.renderDropdownMenu = A, P(i), u && (u.changeSelectedId = function(L) {
|
|
4746
|
+
s.value = L;
|
|
4744
4747
|
});
|
|
4745
4748
|
function p() {
|
|
4746
|
-
const
|
|
4747
|
-
|
|
4749
|
+
const L = r.value.querySelector(".dgComponentSelected");
|
|
4750
|
+
L && At(L);
|
|
4748
4751
|
}
|
|
4749
|
-
function
|
|
4752
|
+
function B() {
|
|
4750
4753
|
if (s.value)
|
|
4751
4754
|
if (Ge(s.value, n.value)) {
|
|
4752
4755
|
const {
|
|
4753
|
-
parent:
|
|
4754
|
-
item:
|
|
4756
|
+
parent: L,
|
|
4757
|
+
item: q
|
|
4755
4758
|
} = ft(s.value, n.value);
|
|
4756
|
-
|
|
4759
|
+
L && (c.toggleDropdownMenu(L, !0), setTimeout(() => {
|
|
4757
4760
|
var J;
|
|
4758
|
-
const Z = i.value.querySelector("#" +
|
|
4761
|
+
const Z = i.value.querySelector("#" + L.id), X = Z == null ? void 0 : Z.querySelector("#" + q.id);
|
|
4759
4762
|
(((J = X == null ? void 0 : X.parentElement) == null ? void 0 : J.className) || "").indexOf("dgComponentFocused") < 0 && (X == null || X.click());
|
|
4760
4763
|
}, 0));
|
|
4761
4764
|
} else
|
|
4762
4765
|
p();
|
|
4763
4766
|
}
|
|
4764
|
-
function
|
|
4765
|
-
n.value.filter((
|
|
4766
|
-
|
|
4767
|
-
}),
|
|
4767
|
+
function T(L = "") {
|
|
4768
|
+
n.value.filter((q) => q.id !== L && q.children && q.children.length > 0).forEach((q) => {
|
|
4769
|
+
q.expanded = !1;
|
|
4770
|
+
}), x(L);
|
|
4768
4771
|
}
|
|
4769
|
-
c.clearAllDropdown =
|
|
4770
|
-
function
|
|
4772
|
+
c.clearAllDropdown = T;
|
|
4773
|
+
function y() {
|
|
4771
4774
|
u && u.updateToolbarItems && u.updateToolbarItems();
|
|
4772
4775
|
}
|
|
4773
|
-
c.updateToolbarItems =
|
|
4774
|
-
function v(
|
|
4775
|
-
if (
|
|
4776
|
-
const
|
|
4776
|
+
c.updateToolbarItems = y;
|
|
4777
|
+
function v(L) {
|
|
4778
|
+
if (L) {
|
|
4779
|
+
const q = i.value.querySelector("#" + L.id), Z = q.querySelector("#" + L.id + "_menu"), X = c.changeMenuPosition(L, q);
|
|
4777
4780
|
Object.keys(X).forEach((J) => {
|
|
4778
4781
|
Z.style[J] = X[J];
|
|
4779
4782
|
});
|
|
@@ -4789,10 +4792,10 @@ const Wt = /* @__PURE__ */ Se({
|
|
|
4789
4792
|
H.querySelector(".dropdown-toggle-split") ? H.querySelector(".f-rt-btn").style.maxWidth = Z - 38 + "px" : H.style.maxWidth = Z - 12 + "px";
|
|
4790
4793
|
});
|
|
4791
4794
|
}
|
|
4792
|
-
const
|
|
4793
|
-
var
|
|
4794
|
-
if (
|
|
4795
|
-
const X =
|
|
4795
|
+
const b = new ResizeObserver((L) => {
|
|
4796
|
+
var q;
|
|
4797
|
+
if (L.length) {
|
|
4798
|
+
const X = L[0].contentRect.width;
|
|
4796
4799
|
if (X === 0) {
|
|
4797
4800
|
g = 0;
|
|
4798
4801
|
return;
|
|
@@ -4805,29 +4808,29 @@ const Wt = /* @__PURE__ */ Se({
|
|
|
4805
4808
|
} = ft(s.value, n.value);
|
|
4806
4809
|
v(J);
|
|
4807
4810
|
} else if (Jo(s.value, n.value)) {
|
|
4808
|
-
const J = (
|
|
4811
|
+
const J = (q = n.value) == null ? void 0 : q.find((H) => H.id === s.value);
|
|
4809
4812
|
v(J);
|
|
4810
4813
|
} else
|
|
4811
|
-
|
|
4814
|
+
T();
|
|
4812
4815
|
d();
|
|
4813
4816
|
}
|
|
4814
4817
|
}
|
|
4815
4818
|
});
|
|
4816
4819
|
ke(() => {
|
|
4817
|
-
|
|
4820
|
+
b.observe(i.value), g = i.value.clientWidth, i.value.componentInstance = h, a(r.value, o.value, y);
|
|
4818
4821
|
}), gt(() => {
|
|
4819
|
-
|
|
4822
|
+
b.disconnect(), S && S.destroy && S.destroy();
|
|
4820
4823
|
}), e.expose(h.value);
|
|
4821
4824
|
const D = ee(() => {
|
|
4822
|
-
const
|
|
4825
|
+
const L = {
|
|
4823
4826
|
"f-toolbar": !0,
|
|
4824
4827
|
"f-response-toolbar": !0,
|
|
4825
4828
|
"position-relative": !0,
|
|
4826
4829
|
"f-response-toolbar-sm": t.buttonSize === "sm",
|
|
4827
4830
|
"f-response-toolbar-lg": t.buttonSize === "lg"
|
|
4828
4831
|
};
|
|
4829
|
-
return oe(
|
|
4830
|
-
}),
|
|
4832
|
+
return oe(L, t.customClass);
|
|
4833
|
+
}), w = ee(() => ({
|
|
4831
4834
|
"text-left": t.alignment === "left",
|
|
4832
4835
|
"text-right": t.alignment === "right",
|
|
4833
4836
|
"justify-content-end": t.alignment === "right",
|
|
@@ -4837,24 +4840,24 @@ const Wt = /* @__PURE__ */ Se({
|
|
|
4837
4840
|
"w-100": !0
|
|
4838
4841
|
}));
|
|
4839
4842
|
we(() => t.items, () => {
|
|
4840
|
-
n.value = Ye(t.items),
|
|
4841
|
-
|
|
4843
|
+
n.value = Ye(t.items), De(() => {
|
|
4844
|
+
B(), d();
|
|
4842
4845
|
});
|
|
4843
4846
|
}, {
|
|
4844
4847
|
deep: !0
|
|
4845
4848
|
});
|
|
4846
|
-
function I(
|
|
4847
|
-
|
|
4849
|
+
function I(L) {
|
|
4850
|
+
L && (L.stopPropagation(), L.preventDefault());
|
|
4848
4851
|
const {
|
|
4849
|
-
schema:
|
|
4850
|
-
} =
|
|
4851
|
-
|
|
4852
|
+
schema: q
|
|
4853
|
+
} = C;
|
|
4854
|
+
q.buttons || (q.buttons = []);
|
|
4852
4855
|
const Z = Ct("response-toolbar-item");
|
|
4853
4856
|
Z.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, Z.appearance = {
|
|
4854
4857
|
class: "btn btn-secondary"
|
|
4855
|
-
},
|
|
4858
|
+
}, q.buttons.push(Z);
|
|
4856
4859
|
}
|
|
4857
|
-
function
|
|
4860
|
+
function V() {
|
|
4858
4861
|
return O("li", {
|
|
4859
4862
|
style: "border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",
|
|
4860
4863
|
onClick: I
|
|
@@ -4865,24 +4868,24 @@ const Wt = /* @__PURE__ */ Se({
|
|
|
4865
4868
|
class: "farris-tag-add-text"
|
|
4866
4869
|
}, [Ie("添加按钮")])]);
|
|
4867
4870
|
}
|
|
4868
|
-
function
|
|
4869
|
-
return n.value.map((
|
|
4871
|
+
function _() {
|
|
4872
|
+
return n.value.map((L, q) => k(L, q));
|
|
4870
4873
|
}
|
|
4871
4874
|
return () => {
|
|
4872
|
-
var
|
|
4875
|
+
var L;
|
|
4873
4876
|
return O("div", {
|
|
4874
4877
|
ref: i,
|
|
4875
|
-
"data-dragref": `${
|
|
4878
|
+
"data-dragref": `${C.schema.id}-container`,
|
|
4876
4879
|
class: D.value,
|
|
4877
4880
|
id: t.id
|
|
4878
4881
|
}, [O("div", {
|
|
4879
4882
|
ref: o,
|
|
4880
|
-
class:
|
|
4881
|
-
onClick: (
|
|
4883
|
+
class: w.value,
|
|
4884
|
+
onClick: (q) => T(q)
|
|
4882
4885
|
}, [O("div", {
|
|
4883
4886
|
ref: r,
|
|
4884
4887
|
class: "d-block f-response-content"
|
|
4885
|
-
}, [(
|
|
4888
|
+
}, [(L = n.value) != null && L.length ? _() : V()])])]);
|
|
4886
4889
|
};
|
|
4887
4890
|
}
|
|
4888
4891
|
}), pt = Ze;
|
|
@@ -4913,29 +4916,29 @@ const tr = /* @__PURE__ */ Se({
|
|
|
4913
4916
|
deep: !0
|
|
4914
4917
|
});
|
|
4915
4918
|
const m = ee(() => [...l.value.items]);
|
|
4916
|
-
function
|
|
4917
|
-
r && r.setupContext && r.setupContext.emit("selectionChange",
|
|
4919
|
+
function C(x, A, P, p) {
|
|
4920
|
+
r && r.setupContext && r.setupContext.emit("selectionChange", x, A, P, p);
|
|
4918
4921
|
}
|
|
4919
4922
|
e.expose(s.value);
|
|
4920
|
-
function c(
|
|
4921
|
-
|
|
4923
|
+
function c(x, A) {
|
|
4924
|
+
x && A && A.split(" ").reduce((p, B) => (p[B] = !0, p), x);
|
|
4922
4925
|
}
|
|
4923
4926
|
const f = ee(() => {
|
|
4924
|
-
const
|
|
4927
|
+
const x = {
|
|
4925
4928
|
"f-title-icon": !0
|
|
4926
4929
|
};
|
|
4927
|
-
return c(
|
|
4930
|
+
return c(x, t.iconClass), x;
|
|
4928
4931
|
}), h = ee(() => {
|
|
4929
|
-
const
|
|
4932
|
+
const x = {
|
|
4930
4933
|
"f-icon": !0
|
|
4931
4934
|
};
|
|
4932
|
-
return c(
|
|
4935
|
+
return c(x, t.icon), x;
|
|
4933
4936
|
}), u = ee(() => {
|
|
4934
|
-
const
|
|
4937
|
+
const x = {
|
|
4935
4938
|
"text-right": !0,
|
|
4936
4939
|
"col-6": !0
|
|
4937
4940
|
};
|
|
4938
|
-
return c(
|
|
4941
|
+
return c(x, t.buttonClass || ""), x;
|
|
4939
4942
|
}), a = ee(() => oe({
|
|
4940
4943
|
"f-title": !0
|
|
4941
4944
|
}, t.titleContentClass)), S = ee(() => oe({
|
|
@@ -4943,7 +4946,7 @@ const tr = /* @__PURE__ */ Se({
|
|
|
4943
4946
|
}, t.contentClass)), F = ee(() => oe({
|
|
4944
4947
|
"f-page-header-extend": !0
|
|
4945
4948
|
}, t.downContentClass));
|
|
4946
|
-
function
|
|
4949
|
+
function M() {
|
|
4947
4950
|
return t.titleContentHtml ? O("div", {
|
|
4948
4951
|
class: a.value,
|
|
4949
4952
|
innerHTML: t.titleContentHtml
|
|
@@ -4963,7 +4966,7 @@ const tr = /* @__PURE__ */ Se({
|
|
|
4963
4966
|
innerHTML: t.contentHtml
|
|
4964
4967
|
}, null) : null;
|
|
4965
4968
|
}
|
|
4966
|
-
function
|
|
4969
|
+
function k() {
|
|
4967
4970
|
return t.downContentHtml ? O("div", {
|
|
4968
4971
|
class: F.value,
|
|
4969
4972
|
innerHTML: t.downContentHtml
|
|
@@ -4973,17 +4976,17 @@ const tr = /* @__PURE__ */ Se({
|
|
|
4973
4976
|
ref: n
|
|
4974
4977
|
}, [O("nav", {
|
|
4975
4978
|
class: "f-page-header-base"
|
|
4976
|
-
}, [
|
|
4979
|
+
}, [M(), R(), O(Lt, {
|
|
4977
4980
|
class: u.value,
|
|
4978
4981
|
modelValue: g.value,
|
|
4979
|
-
"onUpdate:modelValue": (
|
|
4982
|
+
"onUpdate:modelValue": (x) => g.value = x,
|
|
4980
4983
|
canAdd: !1,
|
|
4981
4984
|
childType: "response-toolbar-item",
|
|
4982
4985
|
childLabel: "按钮",
|
|
4983
4986
|
contentKey: "buttons",
|
|
4984
4987
|
id: g.value.id,
|
|
4985
4988
|
componentId: t.componentId,
|
|
4986
|
-
onSelectionChange:
|
|
4989
|
+
onSelectionChange: C
|
|
4987
4990
|
}, {
|
|
4988
4991
|
default: () => [O(Wt, {
|
|
4989
4992
|
id: g.value.id,
|
|
@@ -4991,9 +4994,9 @@ const tr = /* @__PURE__ */ Se({
|
|
|
4991
4994
|
items: m.value,
|
|
4992
4995
|
componentId: t.componentId
|
|
4993
4996
|
}, null)]
|
|
4994
|
-
})]),
|
|
4997
|
+
})]), k()]);
|
|
4995
4998
|
}
|
|
4996
|
-
}),
|
|
4999
|
+
}), gr = {
|
|
4997
5000
|
install(t) {
|
|
4998
5001
|
t.component(ze.name, ze);
|
|
4999
5002
|
},
|
|
@@ -5006,7 +5009,7 @@ const tr = /* @__PURE__ */ Se({
|
|
|
5006
5009
|
};
|
|
5007
5010
|
export {
|
|
5008
5011
|
ze as PageHeader,
|
|
5009
|
-
|
|
5012
|
+
gr as default,
|
|
5010
5013
|
ro as eventHandlerResolver,
|
|
5011
5014
|
Ft as pageHeaderDesignerProps,
|
|
5012
5015
|
Xe as pageHeaderProps,
|