@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 Yt = Object.defineProperty;
|
|
2
2
|
var Xt = (t, e, n) => e in t ? Yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Y = (t, e, n) => Xt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { computed as ue, ref as Q, createVNode as
|
|
5
|
-
import {
|
|
4
|
+
import { computed as ue, ref as Q, createVNode as $, Teleport as Ht, getCurrentInstance as Qt, reactive as ke, withDirectives as De, resolveDirective as Be, defineComponent as Fe, watch as Ee, onMounted as Ae, onUnmounted as ct, nextTick as Ie, inject as pe, provide as ut, onBeforeUnmount as Zt, withModifiers as Jt, createTextVNode as Kt } from "vue";
|
|
5
|
+
import { cloneDeep as we, isPlainObject as rt } from "lodash-es";
|
|
6
6
|
import { getCustomClass as se, useGuid as en, withInstall as tn } from "../common/index.esm.js";
|
|
7
7
|
import { useI18n as nn } from "vue-i18n";
|
|
8
8
|
import { useDesignerInnerComponent as on, useDesignerComponent as rn } from "../designer-canvas/index.esm.js";
|
|
@@ -110,7 +110,7 @@ class Me extends dt {
|
|
|
110
110
|
}), this.shown = this.visible, n.children && n.children.length && (this.children = an(n.children));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class
|
|
113
|
+
class Vo {
|
|
114
114
|
constructor(e, n) {
|
|
115
115
|
Y(this, "id");
|
|
116
116
|
Y(this, "name");
|
|
@@ -227,14 +227,14 @@ function pt(t, e) {
|
|
|
227
227
|
}
|
|
228
228
|
return a;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function b(a) {
|
|
231
231
|
n = a;
|
|
232
232
|
}
|
|
233
|
-
return { getSchemaByType: i, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: c, mappingSchemaToProps: h, setDesignerContext:
|
|
233
|
+
return { getSchemaByType: i, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: c, mappingSchemaToProps: h, setDesignerContext: b };
|
|
234
234
|
}
|
|
235
|
-
const gt = {}, mt = {}, { getSchemaByType: ht, resolveSchemaWithDefaultValue: cn, resolveSchemaToProps: un, mappingSchemaToProps: dn } = pt(gt, mt);
|
|
235
|
+
const gt = {}, mt = {}, { getSchemaByType: ht, resolveSchemaWithDefaultValue: cn, resolveSchemaToProps: un, mappingSchemaToProps: dn, setDesignerContext: _o } = pt(gt, mt);
|
|
236
236
|
function fn(t = {}) {
|
|
237
|
-
function e(g,
|
|
237
|
+
function e(g, b, a, d) {
|
|
238
238
|
if (typeof a == "number")
|
|
239
239
|
return d[g].length === a;
|
|
240
240
|
if (typeof a == "object") {
|
|
@@ -248,20 +248,20 @@ function fn(t = {}) {
|
|
|
248
248
|
}
|
|
249
249
|
return !1;
|
|
250
250
|
}
|
|
251
|
-
function n(g,
|
|
251
|
+
function n(g, b, a, d) {
|
|
252
252
|
return d[g] && d[g].propertyValue && String(d[g].propertyValue.value) === String(a);
|
|
253
253
|
}
|
|
254
254
|
const o = /* @__PURE__ */ new Map([
|
|
255
255
|
["length", e],
|
|
256
256
|
["getProperty", n]
|
|
257
257
|
]);
|
|
258
|
-
Object.keys(t).reduce((g,
|
|
259
|
-
function r(g,
|
|
258
|
+
Object.keys(t).reduce((g, b) => (g.set(b, t[b]), g), o);
|
|
259
|
+
function r(g, b) {
|
|
260
260
|
const a = g;
|
|
261
|
-
return typeof
|
|
261
|
+
return typeof b == "number" ? [{ target: a, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: a, operator: "getProperty", param: g, value: !!b }] : typeof b == "object" ? Object.keys(b).map((d) => {
|
|
262
262
|
if (d === "length")
|
|
263
|
-
return { target: a, operator: "length", param: null, value:
|
|
264
|
-
const p = d, u =
|
|
263
|
+
return { target: a, operator: "length", param: null, value: b[d] };
|
|
264
|
+
const p = d, u = b[d];
|
|
265
265
|
return { target: a, operator: "getProperty", param: p, value: u };
|
|
266
266
|
}) : [];
|
|
267
267
|
}
|
|
@@ -271,18 +271,18 @@ function fn(t = {}) {
|
|
|
271
271
|
return a.push(...p), a;
|
|
272
272
|
}, []);
|
|
273
273
|
}
|
|
274
|
-
function l(g,
|
|
274
|
+
function l(g, b) {
|
|
275
275
|
if (o.has(g.operator)) {
|
|
276
276
|
const a = o.get(g.operator);
|
|
277
|
-
return a && a(g.target, g.param, g.value,
|
|
277
|
+
return a && a(g.target, g.param, g.value, b) || !1;
|
|
278
278
|
}
|
|
279
279
|
return !1;
|
|
280
280
|
}
|
|
281
|
-
function h(g,
|
|
282
|
-
return i(g).reduce((p, u) => p && l(u,
|
|
281
|
+
function h(g, b) {
|
|
282
|
+
return i(g).reduce((p, u) => p && l(u, b), !0);
|
|
283
283
|
}
|
|
284
|
-
function c(g,
|
|
285
|
-
const a = Object.keys(g), d = a.includes("allOf"), p = a.includes("anyOf"), u = d || p, R = (u ? g[u ? d ? "allOf" : "anyOf" : "allOf"] : [g]).map((A) => h(A,
|
|
284
|
+
function c(g, b) {
|
|
285
|
+
const a = Object.keys(g), d = a.includes("allOf"), p = a.includes("anyOf"), u = d || p, R = (u ? g[u ? d ? "allOf" : "anyOf" : "allOf"] : [g]).map((A) => h(A, b));
|
|
286
286
|
return d ? !R.includes(!1) : R.includes(!0);
|
|
287
287
|
}
|
|
288
288
|
return { parseValueSchema: c };
|
|
@@ -589,61 +589,61 @@ function vt(t, e, n) {
|
|
|
589
589
|
const T = u.$converter || s;
|
|
590
590
|
return typeof T == "string" && T && o.has(T) ? o.get(T) || null : T || null;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function b(u, s, T, R, k, A = "", P = "") {
|
|
593
593
|
return Object.keys(u).map((F) => {
|
|
594
|
-
const S = Q(1), f = F,
|
|
595
|
-
|
|
596
|
-
const B =
|
|
597
|
-
let
|
|
598
|
-
const
|
|
594
|
+
const S = Q(1), f = F, M = u[F], y = Object.keys(M), v = M.title, E = M.type, m = r.get(E) || { type: "input-group", enableClear: !1 }, C = M.editor ? Object.assign({}, m, M.editor) : Object.assign({}, m), D = h(y, M, s), x = c(y, M, s);
|
|
595
|
+
C.readonly = C.readonly === void 0 ? x() : C.readonly;
|
|
596
|
+
const B = M.type === "cascade" ? b(M.properties, s, T, R, k, A, P) : [], L = !0;
|
|
597
|
+
let q = g(M, P);
|
|
598
|
+
const W = ue({
|
|
599
599
|
get() {
|
|
600
600
|
if (S.value) {
|
|
601
|
-
if (["class", "style"].find((O) => O === f) && !
|
|
602
|
-
return
|
|
601
|
+
if (["class", "style"].find((O) => O === f) && !q && (q = o.get("/converter/appearance.converter") || null), q && q.convertFrom)
|
|
602
|
+
return q.convertFrom(T, F, k, A);
|
|
603
603
|
const te = T[F];
|
|
604
|
-
return Object.prototype.hasOwnProperty.call(
|
|
604
|
+
return Object.prototype.hasOwnProperty.call(M, "defaultValue") && (te === void 0 || typeof te == "string" && te === "") ? M.type === "boolean" ? M.defaultValue : M.defaultValue || "" : te;
|
|
605
605
|
}
|
|
606
606
|
return null;
|
|
607
607
|
},
|
|
608
608
|
set(te) {
|
|
609
|
-
S.value += 1,
|
|
609
|
+
S.value += 1, q && q.convertTo ? (q.convertTo(R, F, te, k, A), q.convertTo(T, F, te, k, A)) : (R[F] = te, T[F] = te);
|
|
610
610
|
}
|
|
611
|
-
}), { refreshPanelAfterChanged:
|
|
611
|
+
}), { refreshPanelAfterChanged: _, description: Z, isExpand: X, parentPropertyID: J } = M, z = { propertyID: f, propertyName: v, propertyType: E, propertyValue: W, editor: C, visible: D, readonly: x, cascadeConfig: B, hideCascadeTitle: L, refreshPanelAfterChanged: _, description: Z, isExpand: X, parentPropertyID: J };
|
|
612
612
|
return s[f] = z, z;
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
615
|
function a(u, s, T = {}) {
|
|
616
616
|
const R = {}, k = t[u];
|
|
617
|
-
return k && k.categories ? Object.keys(k.categories).map((
|
|
618
|
-
const
|
|
619
|
-
return { categoryId:
|
|
617
|
+
return k && k.categories ? Object.keys(k.categories).map((P) => {
|
|
618
|
+
const I = k.categories[P], F = I == null ? void 0 : I.title, S = b(I.properties || {}, R, {}, T, s);
|
|
619
|
+
return { categoryId: P, categoryName: F, properties: S };
|
|
620
620
|
}) : [];
|
|
621
621
|
}
|
|
622
622
|
function d(u, s, T, R, k = "") {
|
|
623
|
-
const A = s.$ref.schema,
|
|
624
|
-
if (
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
const A = s.$ref.schema, P = s.$ref.converter, I = T[A], F = I.type, S = n(I), f = {}, M = t[F];
|
|
624
|
+
if (M && M.categories) {
|
|
625
|
+
const y = M.categories[u], v = y == null ? void 0 : y.title;
|
|
626
|
+
P && Object.keys(y.properties).forEach((C) => {
|
|
627
|
+
y.properties[C].$converter = P;
|
|
628
628
|
});
|
|
629
|
-
const
|
|
630
|
-
return { categoryId: u, categoryName:
|
|
629
|
+
const E = (y == null ? void 0 : y.properties) || {}, m = b(E, f, S, I, R, k);
|
|
630
|
+
return { categoryId: u, categoryName: v, properties: m };
|
|
631
631
|
}
|
|
632
632
|
return { categoryId: u, categoryName: "", properties: [] };
|
|
633
633
|
}
|
|
634
634
|
function p(u, s, T, R, k) {
|
|
635
|
-
const A = u.type,
|
|
635
|
+
const A = u.type, P = n(u), I = {};
|
|
636
636
|
let F = k || t[A];
|
|
637
637
|
if (F && Object.keys(F).length === 0 && T && T.getPropConfig && (F = T.getPropConfig(R)), F && F.categories) {
|
|
638
638
|
const S = [];
|
|
639
639
|
return Object.keys(F.categories).map((f) => {
|
|
640
|
-
const
|
|
641
|
-
if (
|
|
642
|
-
S.push(d(f,
|
|
640
|
+
const M = F.categories[f];
|
|
641
|
+
if (M.$ref) {
|
|
642
|
+
S.push(d(f, M, u, s, R));
|
|
643
643
|
return;
|
|
644
644
|
}
|
|
645
|
-
const
|
|
646
|
-
S.push({ categoryId: f, categoryName:
|
|
645
|
+
const y = M == null ? void 0 : M.title, v = M == null ? void 0 : M.tabId, E = M == null ? void 0 : M.tabName, m = M == null ? void 0 : M.hide, C = M == null ? void 0 : M.hideTitle, D = b(M.properties || {}, I, P, u, s, R, M.$converter), { setPropertyRelates: x } = M, B = M == null ? void 0 : M.parentPropertyID;
|
|
646
|
+
S.push({ categoryId: f, categoryName: y, tabId: v, tabName: E, hide: m, properties: D, hideTitle: C, setPropertyRelates: x, parentPropertyID: B });
|
|
647
647
|
}), S;
|
|
648
648
|
}
|
|
649
649
|
return [];
|
|
@@ -656,13 +656,13 @@ function vt(t, e, n) {
|
|
|
656
656
|
}
|
|
657
657
|
const bt = {}, yt = {};
|
|
658
658
|
vt(bt, yt, cn);
|
|
659
|
-
const Ct = {}, wt = {}, { getSchemaByType: Fn, resolveSchemaWithDefaultValue: An } = pt(Ct, wt), xt = {}, Tt = {};
|
|
659
|
+
const Ct = {}, wt = {}, { getSchemaByType: Fn, resolveSchemaWithDefaultValue: An, resolveSchemaToProps: Lo, mappingSchemaToProps: qo, setDesignerContext: Wo } = pt(Ct, wt), xt = {}, Tt = {};
|
|
660
660
|
vt(xt, Tt, An);
|
|
661
661
|
function St(t, e, n = /* @__PURE__ */ new Map(), o = (l, h, c, g) => h, r = {}, i = (l) => l) {
|
|
662
662
|
return gt[e.title] = e, mt[e.title] = o, bt[e.title] = r, yt[e.title] = i, Ct[e.title] = e, wt[e.title] = o, xt[e.title] = r, Tt[e.title] = i, (l = {}, h = !0) => {
|
|
663
663
|
if (!h)
|
|
664
664
|
return dn(l, n);
|
|
665
|
-
const c = un(l, e, n), g = Object.keys(t).reduce((
|
|
665
|
+
const c = un(l, e, n), g = Object.keys(t).reduce((b, a) => (b[a] = t[a].default, b), {});
|
|
666
666
|
return Object.assign(g, c);
|
|
667
667
|
};
|
|
668
668
|
}
|
|
@@ -683,7 +683,7 @@ function jn(t, e) {
|
|
|
683
683
|
}
|
|
684
684
|
return null;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function $n() {
|
|
687
687
|
function t(e, n) {
|
|
688
688
|
const o = e.buttons;
|
|
689
689
|
if (!o || o.length < 1)
|
|
@@ -695,14 +695,14 @@ function Vn() {
|
|
|
695
695
|
resolve: t
|
|
696
696
|
};
|
|
697
697
|
}
|
|
698
|
-
const
|
|
698
|
+
const Vn = /* @__PURE__ */ new Map([
|
|
699
699
|
["buttons", "items"],
|
|
700
700
|
["appearance", Nn]
|
|
701
701
|
]);
|
|
702
702
|
function Et(t, e, n) {
|
|
703
703
|
return e;
|
|
704
704
|
}
|
|
705
|
-
const
|
|
705
|
+
const _n = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-design.gitee.io/response-toolbar.schema.json", qn = "response-toolbar", Wn = "A Farris Toolbar Component", Un = "object", zn = {
|
|
706
706
|
id: {
|
|
707
707
|
description: "The unique identifier for a Response Toolbar",
|
|
708
708
|
type: "string"
|
|
@@ -748,7 +748,7 @@ const $n = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
748
748
|
], Yn = {
|
|
749
749
|
onClick: "点击事件"
|
|
750
750
|
}, Xn = {
|
|
751
|
-
$schema:
|
|
751
|
+
$schema: _n,
|
|
752
752
|
$id: Ln,
|
|
753
753
|
title: qn,
|
|
754
754
|
description: Wn,
|
|
@@ -857,7 +857,7 @@ const $n = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
857
857
|
}), Ge = St(
|
|
858
858
|
ze,
|
|
859
859
|
Xn,
|
|
860
|
-
|
|
860
|
+
Vn,
|
|
861
861
|
Et
|
|
862
862
|
), It = {
|
|
863
863
|
id: { type: String, default: "" },
|
|
@@ -882,7 +882,7 @@ const $n = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
882
882
|
oo,
|
|
883
883
|
void 0,
|
|
884
884
|
Et
|
|
885
|
-
), so =
|
|
885
|
+
), so = $n();
|
|
886
886
|
function Ye() {
|
|
887
887
|
function t(n) {
|
|
888
888
|
const o = {
|
|
@@ -947,121 +947,121 @@ function lo(t, e) {
|
|
|
947
947
|
let h;
|
|
948
948
|
const c = /* @__PURE__ */ new Map();
|
|
949
949
|
let g = "";
|
|
950
|
-
function
|
|
950
|
+
function b(S) {
|
|
951
951
|
g = "#" + S;
|
|
952
952
|
}
|
|
953
|
-
function a(S, f,
|
|
953
|
+
function a(S, f, M) {
|
|
954
954
|
S.stopPropagation();
|
|
955
|
-
const
|
|
955
|
+
const y = M ? M.id : "__top_item__";
|
|
956
956
|
if (f.children && f.children.length && (f.expanded = !f.expanded, f.expanded)) {
|
|
957
|
-
if (c.has(
|
|
958
|
-
const
|
|
959
|
-
|
|
957
|
+
if (c.has(y) && c.get(y) !== f) {
|
|
958
|
+
const v = c.get(y);
|
|
959
|
+
v && (v.expanded = !1, c.delete(y));
|
|
960
960
|
}
|
|
961
|
-
c.set(
|
|
961
|
+
c.set(y, f);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
964
|
function d(S, f) {
|
|
965
965
|
document.body.click(), f.enable && (S.stopPropagation(), typeof f.onClick == "function" && f.onClick(S, f.id), t.emit("click", S, f.id));
|
|
966
966
|
}
|
|
967
967
|
function p(S, f) {
|
|
968
|
-
const
|
|
969
|
-
|
|
968
|
+
const M = S.target;
|
|
969
|
+
M.className.indexOf("dropdown-item") < 0 || (M.title = M.scrollWidth > M.clientWidth ? f : "");
|
|
970
970
|
}
|
|
971
|
-
function u(S, f,
|
|
971
|
+
function u(S, f, M) {
|
|
972
972
|
if (f.tipsEnable && f.tipsText) {
|
|
973
|
-
const
|
|
973
|
+
const y = ke({
|
|
974
974
|
content: f.tipsText,
|
|
975
975
|
enable: f.tipsEnable
|
|
976
976
|
});
|
|
977
|
-
return De(
|
|
977
|
+
return De($("li", {
|
|
978
978
|
class: r(f),
|
|
979
979
|
id: f.id,
|
|
980
|
-
key: f.id + "_" +
|
|
981
|
-
onClick: (
|
|
982
|
-
}, [
|
|
980
|
+
key: f.id + "_" + M,
|
|
981
|
+
onClick: (v) => d(v, f)
|
|
982
|
+
}, [$("span", {
|
|
983
983
|
class: l(f)
|
|
984
|
-
}, [e.shouldShowIcon(f) &&
|
|
984
|
+
}, [e.shouldShowIcon(f) && $("i", {
|
|
985
985
|
class: e.iconClass(f)
|
|
986
|
-
}, null), f.text])]), [[Be("tooltip"),
|
|
986
|
+
}, null), f.text])]), [[Be("tooltip"), y]]);
|
|
987
987
|
}
|
|
988
|
-
return
|
|
988
|
+
return $("li", {
|
|
989
989
|
class: r(f),
|
|
990
990
|
id: f.id,
|
|
991
|
-
onClick: (
|
|
992
|
-
}, [
|
|
991
|
+
onClick: (y) => d(y, f)
|
|
992
|
+
}, [$("span", {
|
|
993
993
|
class: l(f),
|
|
994
|
-
onMouseenter: (
|
|
995
|
-
}, [e.shouldShowIcon(f) &&
|
|
994
|
+
onMouseenter: (y) => p(y, f.text)
|
|
995
|
+
}, [e.shouldShowIcon(f) && $("i", {
|
|
996
996
|
class: e.iconClass(f)
|
|
997
997
|
}, null), f.text])]);
|
|
998
998
|
}
|
|
999
|
-
function s(S, f,
|
|
1000
|
-
f.enable && (typeof f.onClick == "function" &&
|
|
999
|
+
function s(S, f, M) {
|
|
1000
|
+
f.enable && (typeof f.onClick == "function" && M.onClick(S, f.id), t.emit("click", S, f.id), M.split || a(S, f, M));
|
|
1001
1001
|
}
|
|
1002
|
-
function T(S, f,
|
|
1003
|
-
S && S.stopPropagation(), a(S, f,
|
|
1002
|
+
function T(S, f, M) {
|
|
1003
|
+
S && S.stopPropagation(), a(S, f, M);
|
|
1004
1004
|
}
|
|
1005
1005
|
function R(S, f) {
|
|
1006
1006
|
S.stopPropagation();
|
|
1007
|
-
const
|
|
1008
|
-
if (f.children && f.children.length && f.expanded && c.has(
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1007
|
+
const M = f.id;
|
|
1008
|
+
if (f.children && f.children.length && f.expanded && c.has(M)) {
|
|
1009
|
+
const y = c.get(M);
|
|
1010
|
+
y && (y.expanded = !1, c.delete(M));
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
|
-
function k(S, f,
|
|
1013
|
+
function k(S, f, M) {
|
|
1014
1014
|
if (f.tipsEnable && f.tipsText) {
|
|
1015
|
-
const
|
|
1015
|
+
const y = ke({
|
|
1016
1016
|
content: f.tipsText,
|
|
1017
1017
|
enable: f.tipsEnable
|
|
1018
1018
|
});
|
|
1019
|
-
return
|
|
1019
|
+
return $("li", {
|
|
1020
1020
|
class: o(f),
|
|
1021
1021
|
id: f.id,
|
|
1022
|
-
key: f.id + "_" +
|
|
1023
|
-
onClick: (
|
|
1024
|
-
}, [De(
|
|
1022
|
+
key: f.id + "_" + M,
|
|
1023
|
+
onClick: (v) => s(v, f, S)
|
|
1024
|
+
}, [De($("span", {
|
|
1025
1025
|
class: i(f)
|
|
1026
|
-
}, [e.shouldShowIcon(f) &&
|
|
1026
|
+
}, [e.shouldShowIcon(f) && $("i", {
|
|
1027
1027
|
class: e.iconClass(f)
|
|
1028
|
-
}, null), f.text]), [[Be("tooltip"),
|
|
1028
|
+
}, null), f.text]), [[Be("tooltip"), y]]), f.split && $("span", {
|
|
1029
1029
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
1030
|
-
onClick: (
|
|
1030
|
+
onClick: (v) => T(v, f, S)
|
|
1031
1031
|
}, null), h(f, f)]);
|
|
1032
1032
|
}
|
|
1033
|
-
return
|
|
1033
|
+
return $("li", {
|
|
1034
1034
|
class: o(f),
|
|
1035
1035
|
id: f.id,
|
|
1036
|
-
onClick: (
|
|
1037
|
-
onMouseenter: (
|
|
1038
|
-
}, [
|
|
1036
|
+
onClick: (y) => s(y, f, S),
|
|
1037
|
+
onMouseenter: (y) => p(y, f.text)
|
|
1038
|
+
}, [$("span", {
|
|
1039
1039
|
class: i(f)
|
|
1040
|
-
}, [e.shouldShowIcon(f) &&
|
|
1040
|
+
}, [e.shouldShowIcon(f) && $("i", {
|
|
1041
1041
|
class: e.iconClass(f)
|
|
1042
|
-
}, null), f.text]), f.split &&
|
|
1042
|
+
}, null), f.text]), f.split && $("span", {
|
|
1043
1043
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
1044
|
-
onClick: (
|
|
1044
|
+
onClick: (y) => T(y, f, S)
|
|
1045
1045
|
}, null), h(f, f)]);
|
|
1046
1046
|
}
|
|
1047
1047
|
function A(S) {
|
|
1048
|
-
return S.children.filter((f) => f.visible).map((f,
|
|
1048
|
+
return S.children.filter((f) => f.visible).map((f, M) => f.children && f.children.length ? k(S, f, M) : u(S, f, M));
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function P(S, f) {
|
|
1051
1051
|
if (!S)
|
|
1052
1052
|
return 1080;
|
|
1053
|
-
let
|
|
1054
|
-
const
|
|
1055
|
-
for (let
|
|
1056
|
-
if (S.children[
|
|
1057
|
-
|
|
1053
|
+
let M = -1;
|
|
1054
|
+
const y = S.children.length;
|
|
1055
|
+
for (let v = 0; v < y; v++)
|
|
1056
|
+
if (S.children[v].id === f) {
|
|
1057
|
+
M = v;
|
|
1058
1058
|
break;
|
|
1059
1059
|
}
|
|
1060
|
-
return 1080 +
|
|
1060
|
+
return 1080 + y - M;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
var B,
|
|
1064
|
-
const
|
|
1062
|
+
function I(S, f, M) {
|
|
1063
|
+
var B, L;
|
|
1064
|
+
const y = {
|
|
1065
1065
|
display: S.expanded ? "block" : "none",
|
|
1066
1066
|
position: "fixed",
|
|
1067
1067
|
maxWidth: "300px",
|
|
@@ -1070,50 +1070,50 @@ function lo(t, e) {
|
|
|
1070
1070
|
// 先用固定zIndex,后期会统一调用动态的zIndex
|
|
1071
1071
|
overflowY: "auto",
|
|
1072
1072
|
maxHeight: "none"
|
|
1073
|
-
},
|
|
1074
|
-
if (!
|
|
1075
|
-
return
|
|
1076
|
-
const
|
|
1077
|
-
let m = (
|
|
1078
|
-
if (m || (m =
|
|
1079
|
-
return
|
|
1080
|
-
const
|
|
1073
|
+
}, v = document.querySelector(g);
|
|
1074
|
+
if (!v)
|
|
1075
|
+
return y;
|
|
1076
|
+
const E = Qt();
|
|
1077
|
+
let m = (L = (B = E == null ? void 0 : E.exposed) == null ? void 0 : B.elementRef.value) == null ? void 0 : L.querySelector("#" + f);
|
|
1078
|
+
if (m || (m = v == null ? void 0 : v.querySelector("#" + f)), !m)
|
|
1079
|
+
return y;
|
|
1080
|
+
const C = window.innerWidth, D = window.innerHeight, x = m == null ? void 0 : m.getClientRects();
|
|
1081
1081
|
if (m && x && x.length) {
|
|
1082
1082
|
const {
|
|
1083
|
-
top:
|
|
1084
|
-
width:
|
|
1085
|
-
left:
|
|
1083
|
+
top: q,
|
|
1084
|
+
width: W,
|
|
1085
|
+
left: _,
|
|
1086
1086
|
right: Z,
|
|
1087
1087
|
height: X
|
|
1088
|
-
} = x[0], J = Math.ceil(X +
|
|
1089
|
-
|
|
1090
|
-
const z = S.id + "_menu", te = (m == null ? void 0 : m.querySelector("#" + z)) || (
|
|
1088
|
+
} = x[0], J = Math.ceil(X + q);
|
|
1089
|
+
y.top = `${J}px`, y.left = `${_}px`;
|
|
1090
|
+
const z = S.id + "_menu", te = (m == null ? void 0 : m.querySelector("#" + z)) || (v == null ? void 0 : v.querySelector("#" + z)) || null;
|
|
1091
1091
|
if (te) {
|
|
1092
1092
|
te.style.visibility = "hidden", te.style.display = "block";
|
|
1093
1093
|
const O = te.offsetHeight;
|
|
1094
|
-
|
|
1094
|
+
y.zIndex = S.expanded ? P(v, z) : 1080, y.display === "block" && (te.style.display = "block");
|
|
1095
1095
|
const U = te.getBoundingClientRect();
|
|
1096
|
-
if (
|
|
1097
|
-
|
|
1098
|
-
const N = Math.ceil(
|
|
1099
|
-
|
|
1096
|
+
if (M) {
|
|
1097
|
+
y.top = `${q - 6}px`;
|
|
1098
|
+
const N = Math.ceil(W + _);
|
|
1099
|
+
y.left = `${N}px`;
|
|
1100
1100
|
}
|
|
1101
|
-
|
|
1101
|
+
C - _ - W < U.width && (y.left = `${(M ? _ : Z) - U.width}px`), D - q - X < O ? q > O ? (y.top = `${q - O - 6}px`, y.maxHeight = `${q - 16}px`) : (y.maxHeight = `${D - J}px`, q > D - q - X && (y.top = "10px", y.maxHeight = `${q - 16}px`)) : y.maxHeight = `${D - J}px`, te.style.visibility = "visible";
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
return
|
|
1104
|
+
return y;
|
|
1105
1105
|
}
|
|
1106
1106
|
h = function(S, f) {
|
|
1107
|
-
const
|
|
1108
|
-
return
|
|
1107
|
+
const M = f ? f.id : S.id;
|
|
1108
|
+
return $(Ht, {
|
|
1109
1109
|
to: g,
|
|
1110
1110
|
disabled: !S.expanded
|
|
1111
1111
|
}, {
|
|
1112
|
-
default: () => [
|
|
1112
|
+
default: () => [$("ul", {
|
|
1113
1113
|
class: n(S),
|
|
1114
|
-
style:
|
|
1114
|
+
style: I(S, M, f),
|
|
1115
1115
|
id: S.id + "_menu",
|
|
1116
|
-
onWheel: (
|
|
1116
|
+
onWheel: (y) => R(y, S)
|
|
1117
1117
|
}, [A(S)])]
|
|
1118
1118
|
});
|
|
1119
1119
|
};
|
|
@@ -1125,7 +1125,7 @@ function lo(t, e) {
|
|
|
1125
1125
|
return {
|
|
1126
1126
|
renderDropdownMenu: h,
|
|
1127
1127
|
clearAllDropDownMenu: F,
|
|
1128
|
-
updateContainerId:
|
|
1128
|
+
updateContainerId: b
|
|
1129
1129
|
};
|
|
1130
1130
|
}
|
|
1131
1131
|
function ao(t, e, n) {
|
|
@@ -1161,7 +1161,7 @@ function ao(t, e, n) {
|
|
|
1161
1161
|
"dropdown-toggle-split": !0
|
|
1162
1162
|
}, s.class);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function b(s) {
|
|
1165
1165
|
return s.split ? {
|
|
1166
1166
|
display: "flex"
|
|
1167
1167
|
} : {
|
|
@@ -1185,31 +1185,31 @@ function ao(t, e, n) {
|
|
|
1185
1185
|
content: s.tipsText,
|
|
1186
1186
|
enable: s.tipsEnable
|
|
1187
1187
|
});
|
|
1188
|
-
return
|
|
1188
|
+
return $("div", {
|
|
1189
1189
|
id: s.id,
|
|
1190
1190
|
class: h(s)
|
|
1191
|
-
}, [De(
|
|
1191
|
+
}, [De($("div", {
|
|
1192
1192
|
class: c(s),
|
|
1193
|
-
style:
|
|
1193
|
+
style: b(s),
|
|
1194
1194
|
onClick: (k) => s.enable && a(k, s)
|
|
1195
|
-
}, [n.shouldShowIcon(s) &&
|
|
1195
|
+
}, [n.shouldShowIcon(s) && $("i", {
|
|
1196
1196
|
class: n.iconClass(s)
|
|
1197
|
-
}, null),
|
|
1197
|
+
}, null), $("span", null, [s.text])]), [[Be("tooltip"), R]]), s.split && $("button", {
|
|
1198
1198
|
class: g(s),
|
|
1199
1199
|
style: "border-radius:0 6px 6px 0;",
|
|
1200
1200
|
onClick: (k) => d(k, s)
|
|
1201
1201
|
}, null), T && r(s)]);
|
|
1202
1202
|
}
|
|
1203
|
-
return
|
|
1203
|
+
return $("div", {
|
|
1204
1204
|
id: s.id,
|
|
1205
1205
|
class: h(s)
|
|
1206
|
-
}, [
|
|
1206
|
+
}, [$("div", {
|
|
1207
1207
|
class: c(s),
|
|
1208
|
-
style:
|
|
1208
|
+
style: b(s),
|
|
1209
1209
|
onClick: (R) => s.enable && a(R, s)
|
|
1210
|
-
}, [n.shouldShowIcon(s) &&
|
|
1210
|
+
}, [n.shouldShowIcon(s) && $("i", {
|
|
1211
1211
|
class: n.iconClass(s)
|
|
1212
|
-
}, null),
|
|
1212
|
+
}, null), $("span", null, [s.text])]), s.split && $("button", {
|
|
1213
1213
|
class: g(s),
|
|
1214
1214
|
style: "border-radius:0 6px 6px 0;",
|
|
1215
1215
|
onClick: (R) => d(R, s)
|
|
@@ -1239,7 +1239,7 @@ const {
|
|
|
1239
1239
|
}, c = Q(new Me(h)), g = {
|
|
1240
1240
|
id: h.id + "width",
|
|
1241
1241
|
text: h.text
|
|
1242
|
-
},
|
|
1242
|
+
}, b = Q(-1), a = Ye();
|
|
1243
1243
|
let d = !1;
|
|
1244
1244
|
const {
|
|
1245
1245
|
guid: p,
|
|
@@ -1247,10 +1247,10 @@ const {
|
|
|
1247
1247
|
} = en(), s = t.id ? t.id : "toolbar-" + p(), T = Q(), R = "dropdown-container-" + s + "-" + u(4), {
|
|
1248
1248
|
renderToolbarDropdown: k,
|
|
1249
1249
|
clearAllDropDown: A,
|
|
1250
|
-
updateContainerId:
|
|
1250
|
+
updateContainerId: P
|
|
1251
1251
|
} = ao(t, e, a);
|
|
1252
|
-
|
|
1253
|
-
const
|
|
1252
|
+
P(R);
|
|
1253
|
+
const I = ue(() => c.value.children.length > 0), F = ue(() => t.visible ? c.value.children.length > 0 ? !0 : o.value.findIndex((O) => O.shown && O.children && O.children.length > 0) > -1 : !1);
|
|
1254
1254
|
function S() {
|
|
1255
1255
|
t.visible && !T.value && document && (T.value = document.createElement("div"), T.value.id = R, document.body.appendChild(T.value));
|
|
1256
1256
|
}
|
|
@@ -1261,7 +1261,7 @@ const {
|
|
|
1261
1261
|
Ee(F, (O, U) => {
|
|
1262
1262
|
O ? S() : f();
|
|
1263
1263
|
});
|
|
1264
|
-
const
|
|
1264
|
+
const M = ue(() => {
|
|
1265
1265
|
const O = {
|
|
1266
1266
|
"f-toolbar": !0,
|
|
1267
1267
|
"f-response-toolbar": !0,
|
|
@@ -1271,7 +1271,7 @@ const {
|
|
|
1271
1271
|
"d-none": !t.visible
|
|
1272
1272
|
};
|
|
1273
1273
|
return se(O, t.customClass);
|
|
1274
|
-
}),
|
|
1274
|
+
}), y = ue(() => ({
|
|
1275
1275
|
"w-100": !0,
|
|
1276
1276
|
"d-flex": !0,
|
|
1277
1277
|
"flex-nowrap": !0,
|
|
@@ -1279,12 +1279,12 @@ const {
|
|
|
1279
1279
|
"justify-content-start": t.alignment === "left",
|
|
1280
1280
|
"justify-content-center": t.alignment === "center"
|
|
1281
1281
|
}));
|
|
1282
|
-
function
|
|
1282
|
+
function v(O) {
|
|
1283
1283
|
O && O.target.closest("ul.dropdown-menu") && O.type === "wheel" || (o.value.filter((U) => U.children && U.children.length > 0).forEach((U) => {
|
|
1284
1284
|
U.expanded = !1;
|
|
1285
1285
|
}), c.value.expanded = !1, A());
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function E(O, U) {
|
|
1288
1288
|
var ie;
|
|
1289
1289
|
const N = {
|
|
1290
1290
|
btn: !0,
|
|
@@ -1298,29 +1298,29 @@ const {
|
|
|
1298
1298
|
function m(O, U) {
|
|
1299
1299
|
document.body.click(), typeof U.onClick == "function" && U.onClick(O, U.id), e.emit("click", O, U.id);
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function C(O, U) {
|
|
1302
1302
|
if (O.tipsEnable && O.tipsText) {
|
|
1303
1303
|
const N = ke({
|
|
1304
1304
|
content: O.tipsText,
|
|
1305
1305
|
enable: O.tipsEnable
|
|
1306
1306
|
});
|
|
1307
|
-
return De(
|
|
1307
|
+
return De($("button", {
|
|
1308
1308
|
type: "button",
|
|
1309
|
-
class:
|
|
1309
|
+
class: E(O, U),
|
|
1310
1310
|
id: O.id,
|
|
1311
1311
|
disabled: !O.enable,
|
|
1312
1312
|
onClick: (H) => m(H, O)
|
|
1313
|
-
}, [a.shouldShowIcon(O) &&
|
|
1313
|
+
}, [a.shouldShowIcon(O) && $("i", {
|
|
1314
1314
|
class: a.iconClass(O)
|
|
1315
1315
|
}, null), O.text]), [[Be("tooltip"), N]]);
|
|
1316
1316
|
}
|
|
1317
|
-
return
|
|
1317
|
+
return $("button", {
|
|
1318
1318
|
type: "button",
|
|
1319
|
-
class:
|
|
1319
|
+
class: E(O, U),
|
|
1320
1320
|
id: O.id,
|
|
1321
1321
|
disabled: !O.enable,
|
|
1322
1322
|
onClick: (N) => m(N, O)
|
|
1323
|
-
}, [a.shouldShowIcon(O) &&
|
|
1323
|
+
}, [a.shouldShowIcon(O) && $("i", {
|
|
1324
1324
|
class: a.iconClass(O)
|
|
1325
1325
|
}, null), O.text]);
|
|
1326
1326
|
}
|
|
@@ -1329,22 +1329,22 @@ const {
|
|
|
1329
1329
|
const U = Math.ceil(parseFloat(getComputedStyle(O).getPropertyValue("margin-left"))), N = Math.ceil(parseFloat(getComputedStyle(O).getPropertyValue("margin-right")));
|
|
1330
1330
|
return (U || 0) + O.getBoundingClientRect().width + (N || 0);
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1333
|
-
if (U <
|
|
1332
|
+
function L(O, U, N) {
|
|
1333
|
+
if (U < b.value) {
|
|
1334
1334
|
let H = N - 1;
|
|
1335
1335
|
for (; H >= 0; H--) {
|
|
1336
1336
|
const ie = O[H], re = B(ie);
|
|
1337
|
-
if (U += re, U >=
|
|
1337
|
+
if (U += re, U >= b.value)
|
|
1338
1338
|
break;
|
|
1339
1339
|
}
|
|
1340
1340
|
N = H;
|
|
1341
1341
|
}
|
|
1342
|
-
return U -=
|
|
1342
|
+
return U -= b.value, {
|
|
1343
1343
|
start: N,
|
|
1344
1344
|
space: U
|
|
1345
1345
|
};
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function q(O) {
|
|
1348
1348
|
const U = l.value;
|
|
1349
1349
|
let N = O;
|
|
1350
1350
|
const ie = Array.from(U.children).filter((ae) => ae.id !== "__more_buttons__"), re = ie.length;
|
|
@@ -1354,13 +1354,13 @@ const {
|
|
|
1354
1354
|
if (ye <= N)
|
|
1355
1355
|
N -= ye;
|
|
1356
1356
|
else {
|
|
1357
|
-
const Ce =
|
|
1357
|
+
const Ce = L(ie, N, ne);
|
|
1358
1358
|
ne = Ce.start, N = Ce.space, oe = !0;
|
|
1359
1359
|
break;
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
if (!oe && x.length > 0) {
|
|
1363
|
-
const ae =
|
|
1363
|
+
const ae = L(ie, N, ne);
|
|
1364
1364
|
ne = ae.start, N = ae.space;
|
|
1365
1365
|
}
|
|
1366
1366
|
const Te = x.length > 0;
|
|
@@ -1375,15 +1375,15 @@ const {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
return N;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1379
|
-
let U =
|
|
1378
|
+
function W(O) {
|
|
1379
|
+
let U = q(O);
|
|
1380
1380
|
if (x.length) {
|
|
1381
1381
|
let re = 0;
|
|
1382
1382
|
for (; re < x.length; re++) {
|
|
1383
1383
|
const oe = t.items.find((ne) => ne.id === x[re].id);
|
|
1384
1384
|
if (oe && oe.visible !== !1) {
|
|
1385
1385
|
const ne = x[re].width;
|
|
1386
|
-
if (U >= ne || re === x.length - 1 && U +
|
|
1386
|
+
if (U >= ne || re === x.length - 1 && U + b.value >= ne)
|
|
1387
1387
|
U -= ne;
|
|
1388
1388
|
else
|
|
1389
1389
|
break;
|
|
@@ -1401,22 +1401,22 @@ const {
|
|
|
1401
1401
|
}, []);
|
|
1402
1402
|
c.value = H, o.value = ie;
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function _(O = -1) {
|
|
1405
1405
|
if (O === 0 || !l.value || !i.value)
|
|
1406
1406
|
return;
|
|
1407
1407
|
O < 0 && (O = i.value.getBoundingClientRect().width);
|
|
1408
1408
|
const U = l.value.getBoundingClientRect().width;
|
|
1409
|
-
(O >= 0 && O < U || x.length) && (
|
|
1409
|
+
(O >= 0 && O < U || x.length) && (W(O), v());
|
|
1410
1410
|
}
|
|
1411
1411
|
function Z() {
|
|
1412
|
-
return
|
|
1412
|
+
return b.value < 0 && $("div", {
|
|
1413
1413
|
style: "position:absolute;top:-30px;visibility:hidden;"
|
|
1414
1414
|
}, [k(new Me(g))]);
|
|
1415
1415
|
}
|
|
1416
1416
|
const X = new ResizeObserver((O) => {
|
|
1417
1417
|
if (O.length) {
|
|
1418
1418
|
const N = O[0].contentRect.width;
|
|
1419
|
-
|
|
1419
|
+
_(N);
|
|
1420
1420
|
}
|
|
1421
1421
|
});
|
|
1422
1422
|
function J() {
|
|
@@ -1426,42 +1426,42 @@ const {
|
|
|
1426
1426
|
i.value && !d && (X.observe(i.value), d = !0);
|
|
1427
1427
|
}
|
|
1428
1428
|
function te() {
|
|
1429
|
-
if (r.value &&
|
|
1429
|
+
if (r.value && b.value < 0) {
|
|
1430
1430
|
const O = r.value.querySelector("#" + g.id);
|
|
1431
|
-
O && (
|
|
1431
|
+
O && (b.value = B(O));
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
1434
|
return Ae(() => {
|
|
1435
|
-
te(),
|
|
1435
|
+
te(), _(), z(), document.body.addEventListener("click", v), document.body.addEventListener("wheel", v);
|
|
1436
1436
|
}), ct(() => {
|
|
1437
|
-
X.disconnect(), f(), document.body.removeEventListener("click",
|
|
1437
|
+
X.disconnect(), f(), document.body.removeEventListener("click", v), document.body.removeEventListener("wheel", v);
|
|
1438
1438
|
}), Ee(() => t.items, () => {
|
|
1439
1439
|
o.value = it(t.items), c.value.children = [], Ie(() => {
|
|
1440
|
-
J(),
|
|
1440
|
+
J(), _();
|
|
1441
1441
|
});
|
|
1442
1442
|
}, {
|
|
1443
1443
|
deep: !0
|
|
1444
1444
|
}), Ee(() => t.visible, (O) => {
|
|
1445
1445
|
O && Ie(() => {
|
|
1446
|
-
te(),
|
|
1446
|
+
te(), _(), z();
|
|
1447
1447
|
});
|
|
1448
1448
|
}), e.expose({
|
|
1449
1449
|
elementRef: r
|
|
1450
|
-
}), () =>
|
|
1451
|
-
class:
|
|
1450
|
+
}), () => $("div", {
|
|
1451
|
+
class: M.value,
|
|
1452
1452
|
id: s,
|
|
1453
1453
|
ref: r,
|
|
1454
1454
|
style: {
|
|
1455
|
-
"overflow-y":
|
|
1455
|
+
"overflow-y": b.value < 0 ? "hidden" : "initial"
|
|
1456
1456
|
}
|
|
1457
|
-
}, [t.visible && Z(), t.visible &&
|
|
1457
|
+
}, [t.visible && Z(), t.visible && $("div", {
|
|
1458
1458
|
ref: i,
|
|
1459
|
-
class:
|
|
1460
|
-
}, [
|
|
1459
|
+
class: y.value
|
|
1460
|
+
}, [$("div", {
|
|
1461
1461
|
ref: l,
|
|
1462
1462
|
class: "d-inline-block f-response-content",
|
|
1463
1463
|
style: "white-space: nowrap;"
|
|
1464
|
-
}, [o.value.filter((O) => O.shown).map((O, U) => O.children && O.children.length > 0 ? k(O) :
|
|
1464
|
+
}, [o.value.filter((O) => O.shown).map((O, U) => O.children && O.children.length > 0 ? k(O) : C(O, U)), I.value && k(c.value)])])]);
|
|
1465
1465
|
}
|
|
1466
1466
|
}), co = Q(0);
|
|
1467
1467
|
function uo() {
|
|
@@ -1539,11 +1539,11 @@ function mo(t) {
|
|
|
1539
1539
|
return e.getViewModelById(c).states.map((a) => o(a, g));
|
|
1540
1540
|
}
|
|
1541
1541
|
function i(c) {
|
|
1542
|
-
const g = e.getRootViewModelId(),
|
|
1542
|
+
const g = e.getRootViewModelId(), b = r(c);
|
|
1543
1543
|
if (c === g)
|
|
1544
|
-
return
|
|
1544
|
+
return b;
|
|
1545
1545
|
const a = r(g, "root-component.");
|
|
1546
|
-
return [...
|
|
1546
|
+
return [...b, ...a];
|
|
1547
1547
|
}
|
|
1548
1548
|
function l(c) {
|
|
1549
1549
|
return c.binding && c.binding.path || c.id || "";
|
|
@@ -1738,12 +1738,12 @@ class ho {
|
|
|
1738
1738
|
}
|
|
1739
1739
|
updateExpression(e, n, o, r) {
|
|
1740
1740
|
const i = n === "Field" ? e.binding.field : e.id, l = this.buildRule(i, o, r, e.type === "form-group" ? e.id : "");
|
|
1741
|
-
let c = this.getExpressionData().find((
|
|
1742
|
-
const g = (
|
|
1741
|
+
let c = this.getExpressionData().find((b) => b.targetType === n && b.target === i);
|
|
1742
|
+
const g = (b) => b.value.trim() === "";
|
|
1743
1743
|
if (c) {
|
|
1744
|
-
const
|
|
1745
|
-
if (
|
|
1746
|
-
g(l) ? c.rules = c.rules.filter((a) => a.id !== l.id) : (Object.assign(
|
|
1744
|
+
const b = c.rules.find((a) => a.id === l.id);
|
|
1745
|
+
if (b)
|
|
1746
|
+
g(l) ? c.rules = c.rules.filter((a) => a.id !== l.id) : (Object.assign(b, l), r === "validate" && e.type === "form-group" && (b.elementId = e.id));
|
|
1747
1747
|
else {
|
|
1748
1748
|
if (g(l))
|
|
1749
1749
|
return null;
|
|
@@ -1778,10 +1778,10 @@ class ho {
|
|
|
1778
1778
|
showMessage: l === "validate" || l === "dataPicking" || l === "required",
|
|
1779
1779
|
showMessageType: l === "dataPicking",
|
|
1780
1780
|
beforeOpen: () => this.onBeforeOpenExpression(e, l, n),
|
|
1781
|
-
onSubmitModal: (
|
|
1782
|
-
const a = this.updateExpression(e, n,
|
|
1781
|
+
onSubmitModal: (b) => {
|
|
1782
|
+
const a = this.updateExpression(e, n, b, l);
|
|
1783
1783
|
if (r) {
|
|
1784
|
-
const d = this.buildRule(h,
|
|
1784
|
+
const d = this.buildRule(h, b, l);
|
|
1785
1785
|
r(d);
|
|
1786
1786
|
}
|
|
1787
1787
|
return a;
|
|
@@ -1937,7 +1937,7 @@ class Xe {
|
|
|
1937
1937
|
* @returns
|
|
1938
1938
|
*/
|
|
1939
1939
|
getPropertyEditorParams(e, n = [], o = "visible", r = {}, i = {}, l = "") {
|
|
1940
|
-
const { getVariables: h, getControlName: c, getStateMachines: g } = mo(this.designerHostService),
|
|
1940
|
+
const { getVariables: h, getControlName: c, getStateMachines: g } = mo(this.designerHostService), b = this.getRealTargetType(e), a = n && n.length > 0 ? n : ["Const", "Variable", "StateMachine", "Expression"], d = {
|
|
1941
1941
|
type: "property-editor",
|
|
1942
1942
|
propertyTypes: a
|
|
1943
1943
|
};
|
|
@@ -1950,7 +1950,7 @@ class Xe {
|
|
|
1950
1950
|
}, r);
|
|
1951
1951
|
break;
|
|
1952
1952
|
case "Expression":
|
|
1953
|
-
d.expressionConfig = this.getExpressionOptions(e,
|
|
1953
|
+
d.expressionConfig = this.getExpressionOptions(e, b, l || o);
|
|
1954
1954
|
break;
|
|
1955
1955
|
case "StateMachine":
|
|
1956
1956
|
d.stateMachines = g();
|
|
@@ -2060,16 +2060,16 @@ class Xe {
|
|
|
2060
2060
|
const n = e.propertyValue;
|
|
2061
2061
|
if (!((n && n.type) === "Expression" && n.expressionInfo))
|
|
2062
2062
|
return;
|
|
2063
|
-
const { expressionId: i, expressionInfo: l } = n, { targetId: h, targetType: c, expressionType: g, value:
|
|
2063
|
+
const { expressionId: i, expressionInfo: l } = n, { targetId: h, targetType: c, expressionType: g, value: b, message: a } = l, d = this.formSchemaUtils.getModule();
|
|
2064
2064
|
d.expressions = d.expressions || [];
|
|
2065
2065
|
const { expressions: p } = d;
|
|
2066
2066
|
let u = p.find((T) => T.target === h);
|
|
2067
2067
|
u || (u = { target: h, rules: [], targetType: c }, p.push(u));
|
|
2068
2068
|
const s = u.rules.find((T) => T.type === g);
|
|
2069
2069
|
if (s)
|
|
2070
|
-
s.value =
|
|
2070
|
+
s.value = b, s.message = a;
|
|
2071
2071
|
else {
|
|
2072
|
-
const T = { id: i, type: g, value:
|
|
2072
|
+
const T = { id: i, type: g, value: b, message: a };
|
|
2073
2073
|
u.rules.push(T);
|
|
2074
2074
|
}
|
|
2075
2075
|
delete n.expressionInfo;
|
|
@@ -2188,7 +2188,7 @@ function bo(t, e, n) {
|
|
|
2188
2188
|
function g() {
|
|
2189
2189
|
return !1;
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function b() {
|
|
2192
2192
|
return !0;
|
|
2193
2193
|
}
|
|
2194
2194
|
function a(u) {
|
|
@@ -2225,7 +2225,7 @@ function bo(t, e, n) {
|
|
|
2225
2225
|
checkCanAddComponent: g,
|
|
2226
2226
|
checkCanDeleteComponent: c,
|
|
2227
2227
|
checkCanMoveComponent: h,
|
|
2228
|
-
hideNestedPaddingInDesginerView:
|
|
2228
|
+
hideNestedPaddingInDesginerView: b,
|
|
2229
2229
|
onResolveNewComponentSchema: l,
|
|
2230
2230
|
getPropsConfig: a,
|
|
2231
2231
|
getCustomButtons: p
|
|
@@ -2245,11 +2245,11 @@ var kt = { exports: {} };
|
|
|
2245
2245
|
})(function() {
|
|
2246
2246
|
return (/* @__PURE__ */ function() {
|
|
2247
2247
|
function n(o, r, i) {
|
|
2248
|
-
function l(g,
|
|
2248
|
+
function l(g, b) {
|
|
2249
2249
|
if (!r[g]) {
|
|
2250
2250
|
if (!o[g]) {
|
|
2251
2251
|
var a = typeof Pe == "function" && Pe;
|
|
2252
|
-
if (!
|
|
2252
|
+
if (!b && a) return a(g, !0);
|
|
2253
2253
|
if (h) return h(g, !0);
|
|
2254
2254
|
var d = new Error("Cannot find module '" + g + "'");
|
|
2255
2255
|
throw d.code = "MODULE_NOT_FOUND", d;
|
|
@@ -2277,22 +2277,22 @@ var kt = { exports: {} };
|
|
|
2277
2277
|
var p = a.className;
|
|
2278
2278
|
p.length ? c(d).test(p) || (a.className += " " + d) : a.className = d;
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function b(a, d) {
|
|
2281
2281
|
a.className = a.className.replace(c(d), " ").trim();
|
|
2282
2282
|
}
|
|
2283
2283
|
o.exports = {
|
|
2284
2284
|
add: g,
|
|
2285
|
-
rm:
|
|
2285
|
+
rm: b
|
|
2286
2286
|
};
|
|
2287
2287
|
}, {}],
|
|
2288
2288
|
2: [function(n, o, r) {
|
|
2289
2289
|
(function(i) {
|
|
2290
|
-
var l = n("contra/emitter"), h = n("crossvent"), c = n("./classes"), g = document,
|
|
2291
|
-
function a(
|
|
2290
|
+
var l = n("contra/emitter"), h = n("crossvent"), c = n("./classes"), g = document, b = g.documentElement;
|
|
2291
|
+
function a(v, E) {
|
|
2292
2292
|
var m = arguments.length;
|
|
2293
|
-
m === 1 && Array.isArray(
|
|
2294
|
-
var
|
|
2295
|
-
N.moves === void 0 && (N.moves = k), N.accepts === void 0 && (N.accepts = k), N.invalid === void 0 && (N.invalid = Ot), N.containers === void 0 && (N.containers =
|
|
2293
|
+
m === 1 && Array.isArray(v) === !1 && (E = v, v = []);
|
|
2294
|
+
var C, D, x, B, L, q, W, _, Z, X = null, J, z, te = !1, O = 0, U, N = E || {};
|
|
2295
|
+
N.moves === void 0 && (N.moves = k), N.accepts === void 0 && (N.accepts = k), N.invalid === void 0 && (N.invalid = Ot), N.containers === void 0 && (N.containers = v || []), N.isContainer === void 0 && (N.isContainer = R), N.copy === void 0 && (N.copy = !1), N.copySortSource === void 0 && (N.copySortSource = !1), N.revertOnSpill === void 0 && (N.revertOnSpill = !1), N.removeOnSpill === void 0 && (N.removeOnSpill = !1), N.direction === void 0 && (N.direction = "vertical"), N.ignoreInputTextSelection === void 0 && (N.ignoreInputTextSelection = !0), N.mirrorContainer === void 0 && (N.mirrorContainer = g.body);
|
|
2296
2296
|
var H = l({
|
|
2297
2297
|
containers: N.containers,
|
|
2298
2298
|
start: Rt,
|
|
@@ -2309,15 +2309,15 @@ var kt = { exports: {} };
|
|
|
2309
2309
|
}
|
|
2310
2310
|
function re(w) {
|
|
2311
2311
|
var j = w ? "remove" : "add";
|
|
2312
|
-
u(
|
|
2312
|
+
u(b, j, "mousedown", ye), u(b, j, "mouseup", Ne);
|
|
2313
2313
|
}
|
|
2314
2314
|
function oe(w) {
|
|
2315
2315
|
var j = w ? "remove" : "add";
|
|
2316
|
-
u(
|
|
2316
|
+
u(b, j, "mousemove", Ce);
|
|
2317
2317
|
}
|
|
2318
2318
|
function ne(w) {
|
|
2319
2319
|
var j = w ? "remove" : "add";
|
|
2320
|
-
h[j](
|
|
2320
|
+
h[j](b, "selectstart", ae), h[j](b, "click", ae);
|
|
2321
2321
|
}
|
|
2322
2322
|
function Te() {
|
|
2323
2323
|
re(!0), Ne({});
|
|
@@ -2326,11 +2326,11 @@ var kt = { exports: {} };
|
|
|
2326
2326
|
J && w.preventDefault();
|
|
2327
2327
|
}
|
|
2328
2328
|
function ye(w) {
|
|
2329
|
-
B = w.clientX,
|
|
2329
|
+
B = w.clientX, L = w.clientY;
|
|
2330
2330
|
var j = s(w) !== 1 || w.metaKey || w.ctrlKey;
|
|
2331
2331
|
if (!j) {
|
|
2332
|
-
var
|
|
2333
|
-
G && (J = G, oe(), w.type === "mousedown" && (F(
|
|
2332
|
+
var V = w.target, G = Se(V);
|
|
2333
|
+
G && (J = G, oe(), w.type === "mousedown" && (F(V) ? V.focus() : w.preventDefault()));
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
2336
|
function Ce(w) {
|
|
@@ -2339,29 +2339,29 @@ var kt = { exports: {} };
|
|
|
2339
2339
|
Ne({});
|
|
2340
2340
|
return;
|
|
2341
2341
|
}
|
|
2342
|
-
if (!(w.clientX !== void 0 && Math.abs(w.clientX - B) <= (N.slideFactorX || 0) && w.clientY !== void 0 && Math.abs(w.clientY -
|
|
2342
|
+
if (!(w.clientX !== void 0 && Math.abs(w.clientX - B) <= (N.slideFactorX || 0) && w.clientY !== void 0 && Math.abs(w.clientY - L) <= (N.slideFactorY || 0))) {
|
|
2343
2343
|
if (N.ignoreInputTextSelection) {
|
|
2344
|
-
var j =
|
|
2344
|
+
var j = y("clientX", w) || 0, V = y("clientY", w) || 0, G = g.elementFromPoint(j, V);
|
|
2345
2345
|
if (F(G))
|
|
2346
2346
|
return;
|
|
2347
2347
|
}
|
|
2348
2348
|
var K = J;
|
|
2349
|
-
oe(!0), ne(), Qe(), He(K), c.add(
|
|
2349
|
+
oe(!0), ne(), Qe(), He(K), c.add(_ || x, "gu-transit"), $t(), jt(), O = 0, Ve(w);
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
2352
|
}
|
|
2353
2353
|
function Se(w) {
|
|
2354
|
-
if (!(H.dragging &&
|
|
2355
|
-
for (var j = w;
|
|
2356
|
-
if (N.invalid(w, j) || (w =
|
|
2354
|
+
if (!(H.dragging && C) && !ie(w)) {
|
|
2355
|
+
for (var j = w; I(w) && ie(I(w)) === !1; )
|
|
2356
|
+
if (N.invalid(w, j) || (w = I(w), !w))
|
|
2357
2357
|
return;
|
|
2358
|
-
var
|
|
2359
|
-
if (
|
|
2360
|
-
var G = N.moves(w,
|
|
2358
|
+
var V = I(w);
|
|
2359
|
+
if (V && !N.invalid(w, j)) {
|
|
2360
|
+
var G = N.moves(w, V, j, f(w));
|
|
2361
2361
|
if (G)
|
|
2362
2362
|
return {
|
|
2363
2363
|
item: w,
|
|
2364
|
-
source:
|
|
2364
|
+
source: V
|
|
2365
2365
|
};
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
@@ -2374,15 +2374,15 @@ var kt = { exports: {} };
|
|
|
2374
2374
|
j && He(j);
|
|
2375
2375
|
}
|
|
2376
2376
|
function He(w) {
|
|
2377
|
-
Gt(w.item, w.source) && (
|
|
2377
|
+
Gt(w.item, w.source) && (_ = w.item.cloneNode(!0), H.emit("cloned", _, w.item, "copy")), D = w.source, x = w.item, q = W = f(w.item), H.dragging = !0, H.emit("drag", x, D);
|
|
2378
2378
|
}
|
|
2379
2379
|
function Ot() {
|
|
2380
2380
|
return !1;
|
|
2381
2381
|
}
|
|
2382
2382
|
function Qe() {
|
|
2383
2383
|
if (H.dragging) {
|
|
2384
|
-
var w =
|
|
2385
|
-
Je(w,
|
|
2384
|
+
var w = _ || x;
|
|
2385
|
+
Je(w, I(w));
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
function Ze() {
|
|
@@ -2390,66 +2390,66 @@ var kt = { exports: {} };
|
|
|
2390
2390
|
}
|
|
2391
2391
|
function Ne(w) {
|
|
2392
2392
|
if (Ze(), !!H.dragging) {
|
|
2393
|
-
var j =
|
|
2394
|
-
ee && (
|
|
2393
|
+
var j = _ || x, V = y("clientX", w) || 0, G = y("clientY", w) || 0, K = T(C, V, G), ee = tt(K, V, G);
|
|
2394
|
+
ee && (_ && N.copySortSource || !_ || ee !== D) ? Je(j, ee) : N.removeOnSpill ? Ke() : et();
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
2397
|
function Je(w, j) {
|
|
2398
|
-
var
|
|
2399
|
-
|
|
2398
|
+
var V = I(w);
|
|
2399
|
+
_ && N.copySortSource && j === D && V.removeChild(x), $e(j) ? H.emit("cancel", w, D) : H.emit("drop", w, j, D, W), je();
|
|
2400
2400
|
}
|
|
2401
2401
|
function Ke() {
|
|
2402
2402
|
if (H.dragging) {
|
|
2403
|
-
var w =
|
|
2404
|
-
j && j.removeChild(w), H.emit(
|
|
2403
|
+
var w = _ || x, j = I(w);
|
|
2404
|
+
j && j.removeChild(w), H.emit(_ ? "cancel" : "remove", w, j, D), je();
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
2407
|
function et(w) {
|
|
2408
2408
|
if (H.dragging) {
|
|
2409
|
-
var j = arguments.length > 0 ? w : N.revertOnSpill,
|
|
2410
|
-
K === !1 && j && (
|
|
2409
|
+
var j = arguments.length > 0 ? w : N.revertOnSpill, V = _ || x, G = I(V), K = $e(G);
|
|
2410
|
+
K === !1 && j && (_ ? G && G.removeChild(_) : D.insertBefore(V, q)), K || j ? H.emit("cancel", V, D, D) : H.emit("drop", V, G, D, W), je();
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
2413
|
function je() {
|
|
2414
|
-
var w =
|
|
2415
|
-
Ze(),
|
|
2414
|
+
var w = _ || x;
|
|
2415
|
+
Ze(), Vt(), _t(), w && c.rm(w, "gu-transit"), Z && clearTimeout(Z), H.dragging = !1, X && H.emit("out", w, X, D), H.emit("dragend", w, O), D = x = _ = q = W = Z = X = null;
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2418
|
-
var
|
|
2419
|
-
return j !== void 0 ?
|
|
2417
|
+
function $e(w, j) {
|
|
2418
|
+
var V;
|
|
2419
|
+
return j !== void 0 ? V = j : C ? V = W : V = f(_ || x), w === D && V === q;
|
|
2420
2420
|
}
|
|
2421
|
-
function tt(w, j,
|
|
2421
|
+
function tt(w, j, V) {
|
|
2422
2422
|
for (var G = w; G && !K(); )
|
|
2423
|
-
G =
|
|
2423
|
+
G = I(G);
|
|
2424
2424
|
return G;
|
|
2425
2425
|
function K() {
|
|
2426
2426
|
var ee = ie(G);
|
|
2427
2427
|
if (ee === !1)
|
|
2428
2428
|
return !1;
|
|
2429
|
-
var me = nt(G, w), de = ot(G, me, j,
|
|
2429
|
+
var me = nt(G, w), de = ot(G, me, j, V), ge = $e(G, de);
|
|
2430
2430
|
return ge ? !0 : N.accepts(x, G, D, de);
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2434
|
-
if (!
|
|
2433
|
+
function Ve(w) {
|
|
2434
|
+
if (!C)
|
|
2435
2435
|
return;
|
|
2436
2436
|
w.preventDefault();
|
|
2437
|
-
var j =
|
|
2438
|
-
|
|
2439
|
-
var G =
|
|
2440
|
-
(me || ee === null) && (fe(), X = ee, ve()), zt(K,
|
|
2441
|
-
var de =
|
|
2442
|
-
if (ee === D &&
|
|
2437
|
+
var j = y("clientX", w) || 0, V = y("clientY", w) || 0;
|
|
2438
|
+
C.style.left = j - 2 + "px", C.style.top = V - 2 + "px";
|
|
2439
|
+
var G = _ || x, K = T(C, j, V), ee = tt(K, j, V), me = ee !== null && ee !== X;
|
|
2440
|
+
(me || ee === null) && (fe(), X = ee, ve()), zt(K, V);
|
|
2441
|
+
var de = I(G);
|
|
2442
|
+
if (ee === D && _ && !N.copySortSource) {
|
|
2443
2443
|
de && de.removeChild(G);
|
|
2444
2444
|
return;
|
|
2445
2445
|
}
|
|
2446
2446
|
var ge, he = nt(ee, K);
|
|
2447
2447
|
if (te = Lt(he, ee), he !== null)
|
|
2448
|
-
ge = ot(ee, he, j,
|
|
2449
|
-
else if (N.revertOnSpill === !0 &&
|
|
2450
|
-
ge =
|
|
2448
|
+
ge = ot(ee, he, j, V);
|
|
2449
|
+
else if (N.revertOnSpill === !0 && !_)
|
|
2450
|
+
ge = q, ee = D;
|
|
2451
2451
|
else {
|
|
2452
|
-
|
|
2452
|
+
_ && de && de.removeChild(G), _ && z && (z.style.display = "none");
|
|
2453
2453
|
return;
|
|
2454
2454
|
}
|
|
2455
2455
|
z.style.display = "block", Ft(ge, G, me), ge ? Wt(he, ge) : Ut(ee);
|
|
@@ -2463,8 +2463,8 @@ var kt = { exports: {} };
|
|
|
2463
2463
|
X && le("out");
|
|
2464
2464
|
}
|
|
2465
2465
|
}
|
|
2466
|
-
function Ft(w, j,
|
|
2467
|
-
(w === j || w === f(j)) && (
|
|
2466
|
+
function Ft(w, j, V) {
|
|
2467
|
+
(w === j || w === f(j)) && (W = f(j)), (w === null && V || w !== j && w !== f(j)) && (W = w);
|
|
2468
2468
|
}
|
|
2469
2469
|
function At(w) {
|
|
2470
2470
|
c.rm(w, "gu-hide");
|
|
@@ -2473,31 +2473,31 @@ var kt = { exports: {} };
|
|
|
2473
2473
|
H.dragging && c.add(w, "gu-hide");
|
|
2474
2474
|
}
|
|
2475
2475
|
function jt() {
|
|
2476
|
-
|
|
2476
|
+
C || (C = document.createElement("div"), C.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;", C.innerHTML = N.getMirrorText && N.getMirrorText(x) || "控件", c.add(C, "gu-mirror"), N.mirrorContainer.appendChild(C), u(b, "add", "mousemove", Ve), c.add(N.mirrorContainer, "gu-unselectable"), H.emit("cloned", C, x, "mirror"));
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function $t() {
|
|
2479
2479
|
if (z = document.createElement("div"), c.add(z, "gu-insertion"), x) {
|
|
2480
2480
|
var w = x.getBoundingClientRect();
|
|
2481
2481
|
z.style.left = w.left + "px", z.style.top = w.top + "px";
|
|
2482
2482
|
}
|
|
2483
2483
|
te = !1, N.mirrorContainer.appendChild(z);
|
|
2484
2484
|
}
|
|
2485
|
-
function
|
|
2486
|
-
|
|
2485
|
+
function Vt() {
|
|
2486
|
+
C && (c.rm(N.mirrorContainer, "gu-unselectable"), u(b, "remove", "mousemove", Ve), I(C).removeChild(C), C = null);
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2489
|
-
z && (
|
|
2488
|
+
function _t() {
|
|
2489
|
+
z && (I(z).removeChild(z), z = null);
|
|
2490
2490
|
}
|
|
2491
2491
|
function nt(w, j) {
|
|
2492
|
-
for (var
|
|
2493
|
-
|
|
2494
|
-
return
|
|
2492
|
+
for (var V = j; V !== w && I(V) !== w; )
|
|
2493
|
+
V = I(V);
|
|
2494
|
+
return V === b ? null : V;
|
|
2495
2495
|
}
|
|
2496
2496
|
function Lt(w, j) {
|
|
2497
2497
|
if (!j)
|
|
2498
2498
|
return te;
|
|
2499
|
-
var
|
|
2500
|
-
if (!
|
|
2499
|
+
var V = w || j && j.lastElementChild;
|
|
2500
|
+
if (!V)
|
|
2501
2501
|
return !0;
|
|
2502
2502
|
var G = getComputedStyle(w), K = /^inline/.test(G.getPropertyValue("display")) || /^(left|right)$/.test(G.getPropertyValue("float"));
|
|
2503
2503
|
if (K)
|
|
@@ -2529,58 +2529,58 @@ var kt = { exports: {} };
|
|
|
2529
2529
|
return !0;
|
|
2530
2530
|
}
|
|
2531
2531
|
function Wt(w, j) {
|
|
2532
|
-
const
|
|
2533
|
-
if (z.style.left =
|
|
2534
|
-
if (z.style.height =
|
|
2532
|
+
const V = j.getBoundingClientRect();
|
|
2533
|
+
if (z.style.left = V.left + "px", z.style.top = V.top + "px", te) {
|
|
2534
|
+
if (z.style.height = V.height + "px", z.style.width = "4px", w) {
|
|
2535
2535
|
const G = w.getBoundingClientRect();
|
|
2536
|
-
G.top !==
|
|
2536
|
+
G.top !== V.top && (z.style.left = G.right + "px", z.style.top = G.top + "px", z.style.height = G.height + "px");
|
|
2537
2537
|
}
|
|
2538
|
-
} else if (z.style.height = "4px", z.style.width =
|
|
2538
|
+
} else if (z.style.height = "4px", z.style.width = V.width + "px", U) {
|
|
2539
2539
|
const G = U.getBoundingClientRect();
|
|
2540
|
-
|
|
2540
|
+
V.top < G.top && (z.style.display = "none");
|
|
2541
2541
|
}
|
|
2542
2542
|
j === x && x && (z.style.display = "none");
|
|
2543
2543
|
}
|
|
2544
2544
|
function Ut(w) {
|
|
2545
|
-
|
|
2545
|
+
W = null;
|
|
2546
2546
|
var j = w.lastElementChild;
|
|
2547
2547
|
if (j) {
|
|
2548
|
-
var
|
|
2549
|
-
te ? (z.style.left =
|
|
2548
|
+
var V = j.getBoundingClientRect();
|
|
2549
|
+
te ? (z.style.left = V.right + "px", z.style.top = V.top + "px", z.style.height = V.height + "px", z.style.width = "4px") : (z.style.left = V.left + "px", z.style.top = V.bottom + "px", z.style.height = "4px", z.style.width = V.width + "px"), j === x && x && (z.style.display = "none");
|
|
2550
2550
|
} else
|
|
2551
2551
|
z.style.display = "none";
|
|
2552
2552
|
}
|
|
2553
2553
|
function zt(w, j) {
|
|
2554
2554
|
if (!N.mirrorContainer.contains(w) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (U = d(w), !U || !U.contains(w)))
|
|
2555
2555
|
return;
|
|
2556
|
-
const
|
|
2556
|
+
const V = document.querySelector(".dgComponentSelected"), G = U.getBoundingClientRect();
|
|
2557
2557
|
if (j - 30 < G.top && U.scrollTop > 0) {
|
|
2558
2558
|
let K = U.scrollTop < 10 ? U.scrollTop : 10;
|
|
2559
|
-
U.scrollBy(0, -1 * K),
|
|
2559
|
+
U.scrollBy(0, -1 * K), V && U.contains(V) && (O = O + -1 * K);
|
|
2560
2560
|
}
|
|
2561
2561
|
if (j + 30 > G.bottom && U.scrollTop < U.scrollHeight - U.clientHeight) {
|
|
2562
2562
|
const K = U.scrollHeight - U.clientHeight - U.scrollTop;
|
|
2563
2563
|
let ee = K < 10 ? K : 10;
|
|
2564
|
-
U.scrollBy(0, ee),
|
|
2564
|
+
U.scrollBy(0, ee), V && U.contains(V) && (O = O + ee);
|
|
2565
2565
|
}
|
|
2566
2566
|
}
|
|
2567
|
-
function ot(w, j,
|
|
2567
|
+
function ot(w, j, V, G) {
|
|
2568
2568
|
var K = N.direction === "horizontal", ee = N.direction === "mixed", me = j !== w ? ge() : de();
|
|
2569
2569
|
return me;
|
|
2570
2570
|
function de() {
|
|
2571
2571
|
var le = w.children.length, ve, fe, ce;
|
|
2572
2572
|
for (ve = 0; ve < le; ve++)
|
|
2573
|
-
if (fe = w.children[ve], ce = fe.getBoundingClientRect(), K && ce.left + ce.width / 2 >
|
|
2573
|
+
if (fe = w.children[ve], ce = fe.getBoundingClientRect(), K && ce.left + ce.width / 2 > V || !ee && !K && ce.top + ce.height / 2 > G || ee && ce.left + ce.width > V && ce.top + ce.height > G)
|
|
2574
2574
|
return fe;
|
|
2575
2575
|
return null;
|
|
2576
2576
|
}
|
|
2577
2577
|
function ge() {
|
|
2578
2578
|
var le = j.getBoundingClientRect();
|
|
2579
2579
|
if (ee) {
|
|
2580
|
-
var ve = G - le.top, fe =
|
|
2581
|
-
return te ? qe =
|
|
2580
|
+
var ve = G - le.top, fe = V - le.left, ce = le.bottom - G, _e = le.right - V, Le = Math.min(fe, _e, ve, ce), qe;
|
|
2581
|
+
return te ? qe = _e < fe : qe = ce === Le || _e === Le || fe === Le, he(qe);
|
|
2582
2582
|
}
|
|
2583
|
-
return he(K ?
|
|
2583
|
+
return he(K ? V > le.left + A(le) / 2 : G > le.top + P(le) / 2);
|
|
2584
2584
|
}
|
|
2585
2585
|
function he(le) {
|
|
2586
2586
|
return le ? f(j) : j;
|
|
@@ -2590,26 +2590,26 @@ var kt = { exports: {} };
|
|
|
2590
2590
|
return typeof N.copy == "boolean" ? N.copy : N.copy(w, j);
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
|
-
function d(
|
|
2594
|
-
const
|
|
2595
|
-
if (
|
|
2596
|
-
const
|
|
2597
|
-
return document.getElementById(
|
|
2593
|
+
function d(v) {
|
|
2594
|
+
const E = Array.from(window.scrollContainerList);
|
|
2595
|
+
if (E.length === 1) {
|
|
2596
|
+
const C = Array.from(window.scrollContainerList)[0];
|
|
2597
|
+
return document.getElementById(C);
|
|
2598
2598
|
}
|
|
2599
|
-
const m = p(
|
|
2600
|
-
for (const
|
|
2601
|
-
if (
|
|
2602
|
-
return
|
|
2599
|
+
const m = p(E);
|
|
2600
|
+
for (const C of m)
|
|
2601
|
+
if (C.contains(v))
|
|
2602
|
+
return C;
|
|
2603
2603
|
return null;
|
|
2604
2604
|
}
|
|
2605
|
-
function p(
|
|
2606
|
-
const
|
|
2607
|
-
return
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2610
|
-
}),
|
|
2605
|
+
function p(v) {
|
|
2606
|
+
const E = [];
|
|
2607
|
+
return v.forEach((m) => {
|
|
2608
|
+
const C = document.getElementById(m);
|
|
2609
|
+
C && E.push(C);
|
|
2610
|
+
}), E.sort((m, C) => m.contains(C) ? 1 : C.contains(m) ? -1 : 0), E;
|
|
2611
2611
|
}
|
|
2612
|
-
function u(
|
|
2612
|
+
function u(v, E, m, C) {
|
|
2613
2613
|
var D = {
|
|
2614
2614
|
mouseup: "touchend",
|
|
2615
2615
|
mousedown: "touchstart",
|
|
@@ -2623,23 +2623,23 @@ var kt = { exports: {} };
|
|
|
2623
2623
|
mousedown: "MSPointerDown",
|
|
2624
2624
|
mousemove: "MSPointerMove"
|
|
2625
2625
|
};
|
|
2626
|
-
i.navigator.pointerEnabled ? h[
|
|
2626
|
+
i.navigator.pointerEnabled ? h[E](v, x[m], C) : i.navigator.msPointerEnabled ? h[E](v, B[m], C) : (h[E](v, D[m], C), h[E](v, m, C));
|
|
2627
2627
|
}
|
|
2628
|
-
function s(
|
|
2629
|
-
if (
|
|
2630
|
-
return
|
|
2631
|
-
if (
|
|
2632
|
-
return
|
|
2633
|
-
if (
|
|
2634
|
-
return
|
|
2635
|
-
var
|
|
2636
|
-
if (
|
|
2637
|
-
return
|
|
2628
|
+
function s(v) {
|
|
2629
|
+
if (v.touches !== void 0)
|
|
2630
|
+
return v.touches.length;
|
|
2631
|
+
if (v.which !== void 0 && v.which !== 0)
|
|
2632
|
+
return v.which;
|
|
2633
|
+
if (v.buttons !== void 0)
|
|
2634
|
+
return v.buttons;
|
|
2635
|
+
var E = v.button;
|
|
2636
|
+
if (E !== void 0)
|
|
2637
|
+
return E & 1 ? 1 : E & 2 ? 3 : E & 4 ? 2 : 0;
|
|
2638
2638
|
}
|
|
2639
|
-
function T(
|
|
2640
|
-
|
|
2641
|
-
var
|
|
2642
|
-
return
|
|
2639
|
+
function T(v, E, m) {
|
|
2640
|
+
v = v || {};
|
|
2641
|
+
var C = v.className || "", D;
|
|
2642
|
+
return v.className += " gu-hide", D = g.elementFromPoint(E, m), v.className = C, D;
|
|
2643
2643
|
}
|
|
2644
2644
|
function R() {
|
|
2645
2645
|
return !1;
|
|
@@ -2647,42 +2647,42 @@ var kt = { exports: {} };
|
|
|
2647
2647
|
function k() {
|
|
2648
2648
|
return !0;
|
|
2649
2649
|
}
|
|
2650
|
-
function A(
|
|
2651
|
-
return
|
|
2650
|
+
function A(v) {
|
|
2651
|
+
return v.width || v.right - v.left;
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2653
|
+
function P(v) {
|
|
2654
|
+
return v.height || v.bottom - v.top;
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2657
|
-
return
|
|
2656
|
+
function I(v) {
|
|
2657
|
+
return v.parentNode === g ? null : v.parentNode;
|
|
2658
2658
|
}
|
|
2659
|
-
function F(
|
|
2660
|
-
return
|
|
2659
|
+
function F(v) {
|
|
2660
|
+
return v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.tagName === "SELECT" || S(v);
|
|
2661
2661
|
}
|
|
2662
|
-
function S(
|
|
2663
|
-
return !
|
|
2662
|
+
function S(v) {
|
|
2663
|
+
return !v || v.contentEditable === "false" ? !1 : v.contentEditable === "true" ? !0 : S(I(v));
|
|
2664
2664
|
}
|
|
2665
|
-
function f(
|
|
2666
|
-
return
|
|
2667
|
-
function
|
|
2668
|
-
var m =
|
|
2665
|
+
function f(v) {
|
|
2666
|
+
return v.nextElementSibling || E();
|
|
2667
|
+
function E() {
|
|
2668
|
+
var m = v;
|
|
2669
2669
|
do
|
|
2670
2670
|
m = m.nextSibling;
|
|
2671
2671
|
while (m && m.nodeType !== 1);
|
|
2672
2672
|
return m;
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
|
-
function
|
|
2676
|
-
return
|
|
2675
|
+
function M(v) {
|
|
2676
|
+
return v.targetTouches && v.targetTouches.length ? v.targetTouches[0] : v.changedTouches && v.changedTouches.length ? v.changedTouches[0] : v;
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2679
|
-
var m =
|
|
2678
|
+
function y(v, E) {
|
|
2679
|
+
var m = M(E), C = {
|
|
2680
2680
|
pageX: "clientX",
|
|
2681
2681
|
// IE8
|
|
2682
2682
|
pageY: "clientY"
|
|
2683
2683
|
// IE8
|
|
2684
2684
|
};
|
|
2685
|
-
return
|
|
2685
|
+
return v in C && !(v in m) && C[v] in m && (v = C[v]), m[v];
|
|
2686
2686
|
}
|
|
2687
2687
|
o.exports = a;
|
|
2688
2688
|
}).call(this, typeof be < "u" ? be : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -2703,7 +2703,7 @@ var kt = { exports: {} };
|
|
|
2703
2703
|
5: [function(n, o, r) {
|
|
2704
2704
|
var i = n("atoa"), l = n("./debounce");
|
|
2705
2705
|
o.exports = function(c, g) {
|
|
2706
|
-
var
|
|
2706
|
+
var b = g || {}, a = {};
|
|
2707
2707
|
return c === void 0 && (c = {}), c.on = function(d, p) {
|
|
2708
2708
|
return a[d] ? a[d].push(p) : a[d] = [p], c;
|
|
2709
2709
|
}, c.once = function(d, p) {
|
|
@@ -2728,10 +2728,10 @@ var kt = { exports: {} };
|
|
|
2728
2728
|
var p = (a[d] || []).slice(0);
|
|
2729
2729
|
return function() {
|
|
2730
2730
|
var u = i(arguments), s = this || c;
|
|
2731
|
-
if (d === "error" &&
|
|
2731
|
+
if (d === "error" && b.throws !== !1 && !p.length)
|
|
2732
2732
|
throw u.length === 1 ? u[0] : u;
|
|
2733
2733
|
return p.forEach(function(R) {
|
|
2734
|
-
|
|
2734
|
+
b.async ? l(R, u, s) : R.apply(s, u), R._once && c.off(d, R);
|
|
2735
2735
|
}), c;
|
|
2736
2736
|
};
|
|
2737
2737
|
}, c;
|
|
@@ -2739,67 +2739,67 @@ var kt = { exports: {} };
|
|
|
2739
2739
|
}, { "./debounce": 4, atoa: 3 }],
|
|
2740
2740
|
6: [function(n, o, r) {
|
|
2741
2741
|
(function(i) {
|
|
2742
|
-
var l = n("custom-event"), h = n("./eventmap"), c = i.document, g = d,
|
|
2743
|
-
i.addEventListener || (g = p,
|
|
2742
|
+
var l = n("custom-event"), h = n("./eventmap"), c = i.document, g = d, b = u, a = [];
|
|
2743
|
+
i.addEventListener || (g = p, b = s), o.exports = {
|
|
2744
2744
|
add: g,
|
|
2745
|
-
remove:
|
|
2745
|
+
remove: b,
|
|
2746
2746
|
fabricate: T
|
|
2747
2747
|
};
|
|
2748
|
-
function d(
|
|
2749
|
-
return
|
|
2748
|
+
function d(I, F, S, f) {
|
|
2749
|
+
return I.addEventListener(F, S, f);
|
|
2750
2750
|
}
|
|
2751
|
-
function p(
|
|
2752
|
-
return
|
|
2751
|
+
function p(I, F, S) {
|
|
2752
|
+
return I.attachEvent("on" + F, k(I, F, S));
|
|
2753
2753
|
}
|
|
2754
|
-
function u(
|
|
2755
|
-
return
|
|
2754
|
+
function u(I, F, S, f) {
|
|
2755
|
+
return I.removeEventListener(F, S, f);
|
|
2756
2756
|
}
|
|
2757
|
-
function s(
|
|
2758
|
-
var f = A(
|
|
2757
|
+
function s(I, F, S) {
|
|
2758
|
+
var f = A(I, F, S);
|
|
2759
2759
|
if (f)
|
|
2760
|
-
return
|
|
2760
|
+
return I.detachEvent("on" + F, f);
|
|
2761
2761
|
}
|
|
2762
|
-
function T(
|
|
2763
|
-
var f = h.indexOf(F) === -1 ?
|
|
2764
|
-
|
|
2765
|
-
function
|
|
2766
|
-
var
|
|
2767
|
-
return c.createEvent ? (
|
|
2762
|
+
function T(I, F, S) {
|
|
2763
|
+
var f = h.indexOf(F) === -1 ? y() : M();
|
|
2764
|
+
I.dispatchEvent ? I.dispatchEvent(f) : I.fireEvent("on" + F, f);
|
|
2765
|
+
function M() {
|
|
2766
|
+
var v;
|
|
2767
|
+
return c.createEvent ? (v = c.createEvent("Event"), v.initEvent(F, !0, !0)) : c.createEventObject && (v = c.createEventObject()), v;
|
|
2768
2768
|
}
|
|
2769
|
-
function
|
|
2769
|
+
function y() {
|
|
2770
2770
|
return new l(F, { detail: S });
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
2773
|
-
function R(
|
|
2774
|
-
return function(
|
|
2775
|
-
var
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
},
|
|
2779
|
-
|
|
2780
|
-
},
|
|
2773
|
+
function R(I, F, S) {
|
|
2774
|
+
return function(M) {
|
|
2775
|
+
var y = M || i.event;
|
|
2776
|
+
y.target = y.target || y.srcElement, y.preventDefault = y.preventDefault || function() {
|
|
2777
|
+
y.returnValue = !1;
|
|
2778
|
+
}, y.stopPropagation = y.stopPropagation || function() {
|
|
2779
|
+
y.cancelBubble = !0;
|
|
2780
|
+
}, y.which = y.which || y.keyCode, S.call(I, y);
|
|
2781
2781
|
};
|
|
2782
2782
|
}
|
|
2783
|
-
function k(
|
|
2784
|
-
var f = A(
|
|
2783
|
+
function k(I, F, S) {
|
|
2784
|
+
var f = A(I, F, S) || R(I, F, S);
|
|
2785
2785
|
return a.push({
|
|
2786
2786
|
wrapper: f,
|
|
2787
|
-
element:
|
|
2787
|
+
element: I,
|
|
2788
2788
|
type: F,
|
|
2789
2789
|
fn: S
|
|
2790
2790
|
}), f;
|
|
2791
2791
|
}
|
|
2792
|
-
function A(
|
|
2793
|
-
var f =
|
|
2792
|
+
function A(I, F, S) {
|
|
2793
|
+
var f = P(I, F, S);
|
|
2794
2794
|
if (f) {
|
|
2795
|
-
var
|
|
2796
|
-
return a.splice(f, 1),
|
|
2795
|
+
var M = a[f].wrapper;
|
|
2796
|
+
return a.splice(f, 1), M;
|
|
2797
2797
|
}
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2800
|
-
var f,
|
|
2799
|
+
function P(I, F, S) {
|
|
2800
|
+
var f, M;
|
|
2801
2801
|
for (f = 0; f < a.length; f++)
|
|
2802
|
-
if (
|
|
2802
|
+
if (M = a[f], M.element === I && M.type === F && M.fn === S)
|
|
2803
2803
|
return f;
|
|
2804
2804
|
}
|
|
2805
2805
|
}).call(this, typeof be < "u" ? be : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -2825,14 +2825,14 @@ var kt = { exports: {} };
|
|
|
2825
2825
|
}
|
|
2826
2826
|
o.exports = h() ? l : (
|
|
2827
2827
|
// IE >= 9
|
|
2828
|
-
typeof document < "u" && typeof document.createEvent == "function" ? function(g,
|
|
2828
|
+
typeof document < "u" && typeof document.createEvent == "function" ? function(g, b) {
|
|
2829
2829
|
var a = document.createEvent("CustomEvent");
|
|
2830
|
-
return
|
|
2830
|
+
return b ? a.initCustomEvent(g, b.bubbles, b.cancelable, b.detail) : a.initCustomEvent(g, !1, !1, void 0), a;
|
|
2831
2831
|
} : (
|
|
2832
2832
|
// IE <= 8
|
|
2833
|
-
function(g,
|
|
2833
|
+
function(g, b) {
|
|
2834
2834
|
var a = document.createEventObject();
|
|
2835
|
-
return a.type = g,
|
|
2835
|
+
return a.type = g, b ? (a.bubbles = !!b.bubbles, a.cancelable = !!b.cancelable, a.detail = b.detail) : (a.bubbles = !1, a.cancelable = !1, a.detail = void 0), a;
|
|
2836
2836
|
}
|
|
2837
2837
|
)
|
|
2838
2838
|
);
|
|
@@ -2858,33 +2858,33 @@ var kt = { exports: {} };
|
|
|
2858
2858
|
h = g;
|
|
2859
2859
|
}
|
|
2860
2860
|
})();
|
|
2861
|
-
function
|
|
2861
|
+
function b(P) {
|
|
2862
2862
|
if (l === setTimeout)
|
|
2863
|
-
return setTimeout(
|
|
2863
|
+
return setTimeout(P, 0);
|
|
2864
2864
|
if ((l === c || !l) && setTimeout)
|
|
2865
|
-
return l = setTimeout, setTimeout(
|
|
2865
|
+
return l = setTimeout, setTimeout(P, 0);
|
|
2866
2866
|
try {
|
|
2867
|
-
return l(
|
|
2867
|
+
return l(P, 0);
|
|
2868
2868
|
} catch {
|
|
2869
2869
|
try {
|
|
2870
|
-
return l.call(null,
|
|
2870
|
+
return l.call(null, P, 0);
|
|
2871
2871
|
} catch {
|
|
2872
|
-
return l.call(this,
|
|
2872
|
+
return l.call(this, P, 0);
|
|
2873
2873
|
}
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
function a(
|
|
2876
|
+
function a(P) {
|
|
2877
2877
|
if (h === clearTimeout)
|
|
2878
|
-
return clearTimeout(
|
|
2878
|
+
return clearTimeout(P);
|
|
2879
2879
|
if ((h === g || !h) && clearTimeout)
|
|
2880
|
-
return h = clearTimeout, clearTimeout(
|
|
2880
|
+
return h = clearTimeout, clearTimeout(P);
|
|
2881
2881
|
try {
|
|
2882
|
-
return h(
|
|
2882
|
+
return h(P);
|
|
2883
2883
|
} catch {
|
|
2884
2884
|
try {
|
|
2885
|
-
return h.call(null,
|
|
2885
|
+
return h.call(null, P);
|
|
2886
2886
|
} catch {
|
|
2887
|
-
return h.call(this,
|
|
2887
|
+
return h.call(this, P);
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
}
|
|
@@ -2894,38 +2894,38 @@ var kt = { exports: {} };
|
|
|
2894
2894
|
}
|
|
2895
2895
|
function R() {
|
|
2896
2896
|
if (!p) {
|
|
2897
|
-
var
|
|
2897
|
+
var P = b(T);
|
|
2898
2898
|
p = !0;
|
|
2899
|
-
for (var
|
|
2900
|
-
for (u = d, d = []; ++s <
|
|
2899
|
+
for (var I = d.length; I; ) {
|
|
2900
|
+
for (u = d, d = []; ++s < I; )
|
|
2901
2901
|
u && u[s].run();
|
|
2902
|
-
s = -1,
|
|
2902
|
+
s = -1, I = d.length;
|
|
2903
2903
|
}
|
|
2904
|
-
u = null, p = !1, a(
|
|
2904
|
+
u = null, p = !1, a(P);
|
|
2905
2905
|
}
|
|
2906
2906
|
}
|
|
2907
|
-
i.nextTick = function(
|
|
2908
|
-
var
|
|
2907
|
+
i.nextTick = function(P) {
|
|
2908
|
+
var I = new Array(arguments.length - 1);
|
|
2909
2909
|
if (arguments.length > 1)
|
|
2910
2910
|
for (var F = 1; F < arguments.length; F++)
|
|
2911
|
-
|
|
2912
|
-
d.push(new k(
|
|
2911
|
+
I[F - 1] = arguments[F];
|
|
2912
|
+
d.push(new k(P, I)), d.length === 1 && !p && b(R);
|
|
2913
2913
|
};
|
|
2914
|
-
function k(
|
|
2915
|
-
this.fun =
|
|
2914
|
+
function k(P, I) {
|
|
2915
|
+
this.fun = P, this.array = I;
|
|
2916
2916
|
}
|
|
2917
2917
|
k.prototype.run = function() {
|
|
2918
2918
|
this.fun.apply(null, this.array);
|
|
2919
2919
|
}, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {};
|
|
2920
2920
|
function A() {
|
|
2921
2921
|
}
|
|
2922
|
-
i.on = A, i.addListener = A, i.once = A, i.off = A, i.removeListener = A, i.removeAllListeners = A, i.emit = A, i.prependListener = A, i.prependOnceListener = A, i.listeners = function(
|
|
2922
|
+
i.on = A, i.addListener = A, i.once = A, i.off = A, i.removeListener = A, i.removeAllListeners = A, i.emit = A, i.prependListener = A, i.prependOnceListener = A, i.listeners = function(P) {
|
|
2923
2923
|
return [];
|
|
2924
|
-
}, i.binding = function(
|
|
2924
|
+
}, i.binding = function(P) {
|
|
2925
2925
|
throw new Error("process.binding is not supported");
|
|
2926
2926
|
}, i.cwd = function() {
|
|
2927
2927
|
return "/";
|
|
2928
|
-
}, i.chdir = function(
|
|
2928
|
+
}, i.chdir = function(P) {
|
|
2929
2929
|
throw new Error("process.chdir is not supported");
|
|
2930
2930
|
}, i.umask = function() {
|
|
2931
2931
|
return 0;
|
|
@@ -2943,7 +2943,7 @@ var kt = { exports: {} };
|
|
|
2943
2943
|
}, { timers: 11 }],
|
|
2944
2944
|
11: [function(n, o, r) {
|
|
2945
2945
|
(function(i, l) {
|
|
2946
|
-
var h = n("process/browser.js").nextTick, c = Function.prototype.apply, g = Array.prototype.slice,
|
|
2946
|
+
var h = n("process/browser.js").nextTick, c = Function.prototype.apply, g = Array.prototype.slice, b = {}, a = 0;
|
|
2947
2947
|
r.setTimeout = function() {
|
|
2948
2948
|
return new d(c.call(setTimeout, window, arguments), clearTimeout);
|
|
2949
2949
|
}, r.setInterval = function() {
|
|
@@ -2969,11 +2969,11 @@ var kt = { exports: {} };
|
|
|
2969
2969
|
}, u));
|
|
2970
2970
|
}, r.setImmediate = typeof i == "function" ? i : function(p) {
|
|
2971
2971
|
var u = a++, s = arguments.length < 2 ? !1 : g.call(arguments, 1);
|
|
2972
|
-
return
|
|
2973
|
-
|
|
2972
|
+
return b[u] = !0, h(function() {
|
|
2973
|
+
b[u] && (s ? p.apply(null, s) : p.call(null), r.clearImmediate(u));
|
|
2974
2974
|
}), u;
|
|
2975
2975
|
}, r.clearImmediate = typeof l == "function" ? l : function(p) {
|
|
2976
|
-
delete
|
|
2976
|
+
delete b[p];
|
|
2977
2977
|
};
|
|
2978
2978
|
}).call(this, n("timers").setImmediate, n("timers").clearImmediate);
|
|
2979
2979
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
@@ -2994,7 +2994,7 @@ function wo(t) {
|
|
|
2994
2994
|
g = Array.from(i.children).findIndex((u) => u.getAttribute("id") === p);
|
|
2995
2995
|
} else
|
|
2996
2996
|
g = Array.from(i.children).length;
|
|
2997
|
-
const
|
|
2997
|
+
const b = r.getAttribute("id"), a = Array.from(i.children).findIndex((p) => p.getAttribute("id") === b), d = c.buttons[a];
|
|
2998
2998
|
a !== g && a > -1 && g > -1 && (a < g && (g = g - 1), c.buttons.splice(a, 1), c.buttons.splice(g, 0, d), h(), Ie(() => {
|
|
2999
2999
|
const p = i.querySelector(".dgComponentSelected");
|
|
3000
3000
|
p != null && p.className.includes("dgComponentSelected") && (p.classList.remove("dgComponentSelected"), p.classList.remove("dgComponentFocused"), p.click()), xe.value++;
|
|
@@ -3009,10 +3009,10 @@ function wo(t) {
|
|
|
3009
3009
|
},
|
|
3010
3010
|
// 判断是否可移动
|
|
3011
3011
|
moves(h, c, g) {
|
|
3012
|
-
let
|
|
3013
|
-
return g.classList.contains("dropdown-item") ? (
|
|
3012
|
+
let b = !0;
|
|
3013
|
+
return g.classList.contains("dropdown-item") ? (b = !1, b) : (h.classList.contains("no-drag") && (b = !1), b);
|
|
3014
3014
|
}
|
|
3015
|
-
}).on("drop", (h, c, g,
|
|
3015
|
+
}).on("drop", (h, c, g, b) => n(h, c, b, l)));
|
|
3016
3016
|
}
|
|
3017
3017
|
return {
|
|
3018
3018
|
dragulaInstance: e,
|
|
@@ -3029,38 +3029,38 @@ function xo(t, e, n) {
|
|
|
3029
3029
|
i = k;
|
|
3030
3030
|
}
|
|
3031
3031
|
function h(k, A = null) {
|
|
3032
|
-
const
|
|
3033
|
-
if (
|
|
3032
|
+
const P = e.value.find((I) => I.id === k.id);
|
|
3033
|
+
if (P.isDP)
|
|
3034
3034
|
if (document.body.click(), typeof A == "boolean")
|
|
3035
|
-
|
|
3035
|
+
P.expanded = A;
|
|
3036
3036
|
else {
|
|
3037
|
-
const
|
|
3038
|
-
|
|
3037
|
+
const I = k.expanded;
|
|
3038
|
+
P.expanded = !I;
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
3041
|
r.toggleDropdownMenu = h;
|
|
3042
3042
|
function c(k) {
|
|
3043
|
-
var
|
|
3043
|
+
var P;
|
|
3044
3044
|
const A = {
|
|
3045
3045
|
"dropdown-menu": !0
|
|
3046
3046
|
};
|
|
3047
3047
|
if (k.class) {
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3048
|
+
const I = (P = k.menuClass) == null ? void 0 : P.split(" ");
|
|
3049
|
+
I && I.length && I.reduce((F, S) => (F[S] = !0, F), A);
|
|
3050
3050
|
}
|
|
3051
3051
|
return A;
|
|
3052
3052
|
}
|
|
3053
3053
|
function g(k) {
|
|
3054
|
-
var
|
|
3054
|
+
var I;
|
|
3055
3055
|
const A = {
|
|
3056
3056
|
disabled: k.disabled === !1,
|
|
3057
3057
|
"dropdown-submenu": !0,
|
|
3058
3058
|
"f-rt-dropdown": !0,
|
|
3059
3059
|
"text-truncate": !0
|
|
3060
|
-
},
|
|
3061
|
-
return
|
|
3060
|
+
}, P = (I = k.dropdownClass) == null ? void 0 : I.split(" ");
|
|
3061
|
+
return P && P.length && P.reduce((F, S) => (F[S] = !0, F), A), A;
|
|
3062
3062
|
}
|
|
3063
|
-
function
|
|
3063
|
+
function b(k) {
|
|
3064
3064
|
const A = {
|
|
3065
3065
|
disabled: !1,
|
|
3066
3066
|
"dropdown-item": !0,
|
|
@@ -3068,125 +3068,125 @@ function xo(t, e, n) {
|
|
|
3068
3068
|
"position-relative": !0,
|
|
3069
3069
|
"farris-component": !0,
|
|
3070
3070
|
"text-truncate": !0
|
|
3071
|
-
},
|
|
3072
|
-
return
|
|
3071
|
+
}, P = (k.class || "").split(" ");
|
|
3072
|
+
return P && P.length && P.reduce((I, F) => (I[F] = !0, I), A), A;
|
|
3073
3073
|
}
|
|
3074
3074
|
let a;
|
|
3075
3075
|
const d = /* @__PURE__ */ new Map();
|
|
3076
|
-
function p(k, A,
|
|
3076
|
+
function p(k, A, P) {
|
|
3077
3077
|
k.stopPropagation();
|
|
3078
|
-
const
|
|
3078
|
+
const I = P ? P.id : "__top_item__";
|
|
3079
3079
|
if (A.children && A.children.length && (A.expanded = !A.expanded, A.expanded)) {
|
|
3080
|
-
if (d.has(
|
|
3081
|
-
const F = d.get(
|
|
3082
|
-
F && (F.expanded = !1, d.delete(
|
|
3080
|
+
if (d.has(I) && d.get(I) !== A) {
|
|
3081
|
+
const F = d.get(I);
|
|
3082
|
+
F && (F.expanded = !1, d.delete(I));
|
|
3083
3083
|
}
|
|
3084
|
-
d.set(
|
|
3084
|
+
d.set(I, A);
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
3087
3087
|
function u(k) {
|
|
3088
3088
|
var A;
|
|
3089
|
-
return (A = k.children) == null ? void 0 : A.map((
|
|
3090
|
-
class: g(
|
|
3091
|
-
id:
|
|
3092
|
-
}, [
|
|
3093
|
-
class:
|
|
3094
|
-
onClick: (F) => p(F,
|
|
3095
|
-
}, [
|
|
3089
|
+
return (A = k.children) == null ? void 0 : A.map((P, I) => P.children && P.children.length ? $("li", {
|
|
3090
|
+
class: g(P),
|
|
3091
|
+
id: P.id
|
|
3092
|
+
}, [$("span", {
|
|
3093
|
+
class: b(P),
|
|
3094
|
+
onClick: (F) => p(F, P, k)
|
|
3095
|
+
}, [P.text, $("i", {
|
|
3096
3096
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
3097
3097
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
3098
|
-
}, null)]), a(
|
|
3098
|
+
}, null)]), a(P, P)]) : o(P, I, !0));
|
|
3099
3099
|
}
|
|
3100
|
-
function s(k, A,
|
|
3100
|
+
function s(k, A, P, I) {
|
|
3101
3101
|
const {
|
|
3102
3102
|
height: f,
|
|
3103
|
-
left:
|
|
3104
|
-
top:
|
|
3105
|
-
} =
|
|
3106
|
-
width:
|
|
3107
|
-
height:
|
|
3108
|
-
} =
|
|
3103
|
+
left: M,
|
|
3104
|
+
top: y
|
|
3105
|
+
} = I[0], {
|
|
3106
|
+
width: v,
|
|
3107
|
+
height: E
|
|
3108
|
+
} = P.getBoundingClientRect(), {
|
|
3109
3109
|
marginTop: m,
|
|
3110
|
-
marginBottom:
|
|
3111
|
-
} = getComputedStyle(
|
|
3112
|
-
function
|
|
3110
|
+
marginBottom: C
|
|
3111
|
+
} = getComputedStyle(P), D = Math.ceil(parseFloat(m)) + Math.ceil(parseFloat(C)), x = y + f, B = A == null ? void 0 : A.getBoundingClientRect();
|
|
3112
|
+
function L() {
|
|
3113
3113
|
let Z = 0, X = "left";
|
|
3114
3114
|
const J = B ? B.right : window.innerWidth, z = B ? B.left : 0;
|
|
3115
|
-
return Z = J -
|
|
3115
|
+
return Z = J - M - 10, J - M < v && M - z > J - M && (X = "right", Z = M - z - 10), {
|
|
3116
3116
|
hposition: X,
|
|
3117
3117
|
maxWidth: Math.min(Z, 300)
|
|
3118
3118
|
};
|
|
3119
3119
|
}
|
|
3120
|
-
let
|
|
3120
|
+
let q = 0, W = "bottom";
|
|
3121
3121
|
if (k === "tabs" || k === "section")
|
|
3122
|
-
|
|
3122
|
+
q = A.getBoundingClientRect().bottom - x - D - 10;
|
|
3123
3123
|
else {
|
|
3124
3124
|
const Z = B ? B.bottom : window.innerHeight;
|
|
3125
|
-
|
|
3125
|
+
q = k === "page-header" ? Z - x : y, q = q - D - 10, W = k === "page-header" ? "bottom" : "top";
|
|
3126
3126
|
}
|
|
3127
|
-
const
|
|
3127
|
+
const _ = L();
|
|
3128
3128
|
return {
|
|
3129
|
-
position:
|
|
3130
|
-
maxWidth:
|
|
3131
|
-
maxHeight:
|
|
3129
|
+
position: W + "-" + _.hposition,
|
|
3130
|
+
maxWidth: _.maxWidth,
|
|
3131
|
+
maxHeight: q
|
|
3132
3132
|
};
|
|
3133
3133
|
}
|
|
3134
3134
|
function T(k) {
|
|
3135
|
-
var S, f,
|
|
3136
|
-
const A = "300px",
|
|
3135
|
+
var S, f, M;
|
|
3136
|
+
const A = "300px", P = {
|
|
3137
3137
|
display: k.expanded === !0 ? "block" : "none",
|
|
3138
3138
|
position: "absolute",
|
|
3139
3139
|
maxWidth: A,
|
|
3140
3140
|
minWidth: "120px"
|
|
3141
3141
|
};
|
|
3142
3142
|
if (!(i != null && i.value))
|
|
3143
|
-
return
|
|
3144
|
-
const
|
|
3145
|
-
if (
|
|
3146
|
-
const
|
|
3147
|
-
if (!
|
|
3148
|
-
return
|
|
3149
|
-
|
|
3150
|
-
let
|
|
3143
|
+
return P;
|
|
3144
|
+
const I = i.value.querySelector("#" + k.id), F = I == null ? void 0 : I.getClientRects();
|
|
3145
|
+
if (I && F && F.length > 0) {
|
|
3146
|
+
const y = I ? I.querySelector("#" + k.id + "_menu") : null;
|
|
3147
|
+
if (!y || k.expanded !== !0)
|
|
3148
|
+
return P;
|
|
3149
|
+
y.style.visibility = "hidden", y.style.display = "block", y.style.maxHeight = "auto", y.style.maxWidth = A;
|
|
3150
|
+
let v;
|
|
3151
3151
|
switch (r.toolbarPosition) {
|
|
3152
3152
|
case "tabs":
|
|
3153
|
-
|
|
3153
|
+
v = (S = i.value) == null ? void 0 : S.closest(".farris-tabs");
|
|
3154
3154
|
break;
|
|
3155
3155
|
case "section":
|
|
3156
|
-
|
|
3156
|
+
v = (f = i.value) == null ? void 0 : f.closest(".f-section");
|
|
3157
3157
|
break;
|
|
3158
3158
|
default:
|
|
3159
|
-
|
|
3159
|
+
v = (M = i.value) == null ? void 0 : M.closest(".f-page");
|
|
3160
3160
|
}
|
|
3161
|
-
const
|
|
3161
|
+
const E = s(r.toolbarPosition, v, y, F), {
|
|
3162
3162
|
position: m,
|
|
3163
|
-
maxHeight:
|
|
3163
|
+
maxHeight: C,
|
|
3164
3164
|
maxWidth: D
|
|
3165
|
-
} =
|
|
3166
|
-
|
|
3165
|
+
} = E;
|
|
3166
|
+
y.style.visibility = "visible";
|
|
3167
3167
|
const x = {
|
|
3168
3168
|
left: m.indexOf("left") > -1 ? 0 : "unset",
|
|
3169
3169
|
right: m.indexOf("left") > -1 ? "unset" : 0,
|
|
3170
3170
|
bottom: m.indexOf("bottom") > -1 ? "unset" : "100%",
|
|
3171
3171
|
top: m.indexOf("bottom") > -1 ? "!00%" : "unset",
|
|
3172
3172
|
maxWidth: D ? D + "px" : "300px",
|
|
3173
|
-
maxHeight:
|
|
3174
|
-
overflowY:
|
|
3173
|
+
maxHeight: C ? C + "px" : "auto",
|
|
3174
|
+
overflowY: C ? "auto" : "unset"
|
|
3175
3175
|
};
|
|
3176
|
-
Object.assign(
|
|
3176
|
+
Object.assign(P, x);
|
|
3177
3177
|
}
|
|
3178
|
-
return
|
|
3178
|
+
return P;
|
|
3179
3179
|
}
|
|
3180
3180
|
r.changeMenuPosition = T, a = function(k, A) {
|
|
3181
|
-
return
|
|
3181
|
+
return $("ul", {
|
|
3182
3182
|
class: c(k),
|
|
3183
3183
|
style: T(k),
|
|
3184
3184
|
id: k.id + "_menu"
|
|
3185
3185
|
}, [u(k)]);
|
|
3186
3186
|
};
|
|
3187
3187
|
function R(k = "") {
|
|
3188
|
-
k && d.has(k) ? d.forEach((A,
|
|
3189
|
-
|
|
3188
|
+
k && d.has(k) ? d.forEach((A, P) => {
|
|
3189
|
+
P !== k && (A.expanded = !1, d.delete(P));
|
|
3190
3190
|
}) : (d.forEach((A) => {
|
|
3191
3191
|
A.expanded = !1;
|
|
3192
3192
|
}), d.clear());
|
|
@@ -3212,7 +3212,7 @@ const To = {
|
|
|
3212
3212
|
modelValue: { type: Object }
|
|
3213
3213
|
};
|
|
3214
3214
|
function So(t, e, n) {
|
|
3215
|
-
var
|
|
3215
|
+
var M;
|
|
3216
3216
|
const o = "", r = Q();
|
|
3217
3217
|
let i;
|
|
3218
3218
|
function l() {
|
|
@@ -3227,93 +3227,96 @@ function So(t, e, n) {
|
|
|
3227
3227
|
function g() {
|
|
3228
3228
|
return !0;
|
|
3229
3229
|
}
|
|
3230
|
-
function
|
|
3230
|
+
function b() {
|
|
3231
|
+
return !0;
|
|
3232
|
+
}
|
|
3233
|
+
function a(y) {
|
|
3231
3234
|
if (!y || !y.value)
|
|
3232
3235
|
return null;
|
|
3233
|
-
const
|
|
3234
|
-
return
|
|
3236
|
+
const v = Q(y == null ? void 0 : y.value.parent), E = a(v);
|
|
3237
|
+
return E || null;
|
|
3235
3238
|
}
|
|
3236
|
-
function
|
|
3237
|
-
var
|
|
3238
|
-
const { componentInstance:
|
|
3239
|
-
if (!
|
|
3239
|
+
function d(y = e) {
|
|
3240
|
+
var C;
|
|
3241
|
+
const { componentInstance: v, designerItemElementRef: E } = y;
|
|
3242
|
+
if (!v || !v.value)
|
|
3240
3243
|
return null;
|
|
3241
|
-
const { getCustomButtons:
|
|
3242
|
-
return
|
|
3244
|
+
const { getCustomButtons: m } = v.value;
|
|
3245
|
+
return v.value.canMove || v.value.canAdd || v.value.canDelete || m && ((C = m()) != null && C.length) ? E : d(y.parent);
|
|
3243
3246
|
}
|
|
3244
|
-
function
|
|
3245
|
-
}
|
|
3246
|
-
function p(y) {
|
|
3247
|
-
return !1;
|
|
3247
|
+
function p() {
|
|
3248
3248
|
}
|
|
3249
|
-
function u() {
|
|
3250
|
-
return
|
|
3249
|
+
function u(y) {
|
|
3250
|
+
return !!n;
|
|
3251
3251
|
}
|
|
3252
3252
|
function s() {
|
|
3253
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
3253
3254
|
}
|
|
3254
|
-
function T(
|
|
3255
|
+
function T() {
|
|
3255
3256
|
}
|
|
3256
|
-
function R(y) {
|
|
3257
|
-
const { componentType: C } = y, b = pe("designer-host-service");
|
|
3258
|
-
let I = sn(C, y, b);
|
|
3259
|
-
const m = C.toLowerCase().replace(/-/g, "_");
|
|
3260
|
-
return I && !I.id && I.type === C && (I.id = `${m}_${Math.random().toString().slice(2, 6)}`), I;
|
|
3257
|
+
function R(y, v) {
|
|
3261
3258
|
}
|
|
3262
3259
|
function k(y) {
|
|
3260
|
+
const { componentType: v } = y, E = pe("designer-host-service");
|
|
3261
|
+
let m = sn(v, y, E);
|
|
3262
|
+
const C = v.toLowerCase().replace(/-/g, "_");
|
|
3263
|
+
return m && !m.id && m.type === v && (m.id = `${C}_${Math.random().toString().slice(2, 6)}`), m;
|
|
3263
3264
|
}
|
|
3264
|
-
function A(
|
|
3265
|
+
function A(y) {
|
|
3266
|
+
}
|
|
3267
|
+
function P(...y) {
|
|
3265
3268
|
return [];
|
|
3266
3269
|
}
|
|
3267
|
-
function
|
|
3270
|
+
function I() {
|
|
3268
3271
|
}
|
|
3269
|
-
function
|
|
3270
|
-
var
|
|
3272
|
+
function F(y) {
|
|
3273
|
+
var E;
|
|
3271
3274
|
if (!(e != null && e.schema))
|
|
3272
3275
|
return;
|
|
3273
|
-
let
|
|
3276
|
+
let v = "";
|
|
3274
3277
|
{
|
|
3275
|
-
const { text:
|
|
3276
|
-
|
|
3278
|
+
const { text: m, title: C, label: D, mainTitle: x, name: B, type: L } = e.schema;
|
|
3279
|
+
v = m || C || D || x || B || ((E = Re[L]) == null ? void 0 : E.name);
|
|
3277
3280
|
}
|
|
3278
|
-
|
|
3279
|
-
componentTitle:
|
|
3280
|
-
parentPathName:
|
|
3281
|
+
v && (!i && y && (i = y.formSchemaUtils), i.getControlBasicInfoMap().set(e.schema.id, {
|
|
3282
|
+
componentTitle: v,
|
|
3283
|
+
parentPathName: v
|
|
3281
3284
|
}));
|
|
3282
3285
|
}
|
|
3283
|
-
function F(y) {
|
|
3284
|
-
var m;
|
|
3285
|
-
const { changeObject: C } = y, { propertyID: b, propertyValue: I } = C;
|
|
3286
|
-
["text", "title", "label", "name", "mainTitle"].includes((m = y == null ? void 0 : y.changeObject) == null ? void 0 : m.propertyID) && b && I && P();
|
|
3287
|
-
}
|
|
3288
3286
|
function S(y) {
|
|
3289
|
-
|
|
3287
|
+
var C;
|
|
3288
|
+
const { changeObject: v } = y, { propertyID: E, propertyValue: m } = v;
|
|
3289
|
+
["text", "title", "label", "name", "mainTitle"].includes((C = y == null ? void 0 : y.changeObject) == null ? void 0 : C.propertyID) && E && m && F();
|
|
3290
|
+
}
|
|
3291
|
+
function f(y) {
|
|
3292
|
+
S(y);
|
|
3290
3293
|
}
|
|
3291
3294
|
return r.value = {
|
|
3292
3295
|
canMove: l(),
|
|
3293
3296
|
canSelectParent: h(),
|
|
3294
3297
|
canAdd: g(),
|
|
3295
3298
|
canDelete: c(),
|
|
3296
|
-
canNested: !
|
|
3299
|
+
canNested: !b(),
|
|
3297
3300
|
contents: [],
|
|
3298
3301
|
elementRef: t,
|
|
3299
|
-
parent: (
|
|
3302
|
+
parent: (M = e.parent) == null ? void 0 : M.componentInstance,
|
|
3300
3303
|
schema: e.schema,
|
|
3301
3304
|
styles: o,
|
|
3302
|
-
canAccepts:
|
|
3303
|
-
getBelongedComponentInstance:
|
|
3304
|
-
getDraggableDesignItemElement:
|
|
3305
|
-
getDraggingDisplayText:
|
|
3306
|
-
getPropConfig:
|
|
3307
|
-
getDragScopeElement:
|
|
3308
|
-
onAcceptMovedChildElement:
|
|
3309
|
-
onChildElementMovedOut:
|
|
3310
|
-
addNewChildComponentSchema:
|
|
3311
|
-
onRemoveComponent:
|
|
3305
|
+
canAccepts: u,
|
|
3306
|
+
getBelongedComponentInstance: a,
|
|
3307
|
+
getDraggableDesignItemElement: d,
|
|
3308
|
+
getDraggingDisplayText: s,
|
|
3309
|
+
getPropConfig: P,
|
|
3310
|
+
getDragScopeElement: T,
|
|
3311
|
+
onAcceptMovedChildElement: R,
|
|
3312
|
+
onChildElementMovedOut: A,
|
|
3313
|
+
addNewChildComponentSchema: k,
|
|
3314
|
+
onRemoveComponent: I,
|
|
3312
3315
|
triggerBelongedComponentToMoveWhenMoved: Q(!1),
|
|
3313
3316
|
triggerBelongedComponentToDeleteWhenDeleted: Q(!1),
|
|
3314
|
-
onPropertyChanged:
|
|
3315
|
-
getCustomButtons:
|
|
3316
|
-
setComponentBasicInfoMap:
|
|
3317
|
+
onPropertyChanged: f,
|
|
3318
|
+
getCustomButtons: p,
|
|
3319
|
+
setComponentBasicInfoMap: F
|
|
3317
3320
|
}, r;
|
|
3318
3321
|
}
|
|
3319
3322
|
const Eo = /* @__PURE__ */ Fe({
|
|
@@ -3321,7 +3324,7 @@ const Eo = /* @__PURE__ */ Fe({
|
|
|
3321
3324
|
props: To,
|
|
3322
3325
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
3323
3326
|
setup(t, e) {
|
|
3324
|
-
const n = Q(t.canMove), o = Q(t.canAdd), r = Q(t.canDelete), i = Q(!1), l = Q(t.contentKey), h = Q(t.childType), c = Q(t.childLabel), g = Q(t.modelValue),
|
|
3327
|
+
const n = Q(t.canMove), o = Q(t.canAdd), r = Q(t.canDelete), i = Q(!1), l = Q(t.contentKey), h = Q(t.childType), c = Q(t.childLabel), g = Q(t.modelValue), b = Q(""), a = Q(), d = pe("canvas-dragula"), p = Q(), u = pe("design-item-context"), s = {
|
|
3325
3328
|
designerItemElementRef: a,
|
|
3326
3329
|
componentInstance: p,
|
|
3327
3330
|
schema: g.value,
|
|
@@ -3330,8 +3333,8 @@ const Eo = /* @__PURE__ */ Fe({
|
|
|
3330
3333
|
};
|
|
3331
3334
|
ut("design-item-context", s);
|
|
3332
3335
|
const T = pe("designer-host-service"), R = pe("external-container-id"), k = ue(() => {
|
|
3333
|
-
var
|
|
3334
|
-
const x = ((
|
|
3336
|
+
var L;
|
|
3337
|
+
const x = ((L = p.value) == null ? void 0 : L.getCustomButtons) && p.value.getCustomButtons();
|
|
3335
3338
|
return {
|
|
3336
3339
|
"farris-component": !0,
|
|
3337
3340
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
@@ -3343,137 +3346,137 @@ const Eo = /* @__PURE__ */ Fe({
|
|
|
3343
3346
|
};
|
|
3344
3347
|
}), A = ue(() => {
|
|
3345
3348
|
const x = {};
|
|
3346
|
-
return
|
|
3347
|
-
const [
|
|
3348
|
-
return
|
|
3349
|
+
return b.value && b.value.split(";").reduce((B, L) => {
|
|
3350
|
+
const [q, W] = L.split(":");
|
|
3351
|
+
return q && (B[q] = W), B;
|
|
3349
3352
|
}, x), x;
|
|
3350
3353
|
});
|
|
3351
|
-
function
|
|
3354
|
+
function P(x, B) {
|
|
3352
3355
|
if (u && u.schema[l.value]) {
|
|
3353
|
-
const
|
|
3354
|
-
if (
|
|
3355
|
-
const
|
|
3356
|
-
u.designerItemElementRef.value.querySelector(`#${
|
|
3356
|
+
const L = u.schema[l.value].findIndex((q) => q.id === B.id);
|
|
3357
|
+
if (L > -1) {
|
|
3358
|
+
const q = u.schema[l.value].length, W = u.schema[l.value][L % q];
|
|
3359
|
+
u.designerItemElementRef.value.querySelector(`#${W.id}-design-item`), u.schema[l.value].splice(L, 1), xe.value++, e.emit("removeComponent"), e.emit("selectionChange");
|
|
3357
3360
|
}
|
|
3358
3361
|
}
|
|
3359
3362
|
}
|
|
3360
|
-
function
|
|
3363
|
+
function I(x) {
|
|
3361
3364
|
if (p.value.addNewChildComponentSchema) {
|
|
3362
3365
|
const B = {
|
|
3363
3366
|
componentType: h.value,
|
|
3364
3367
|
label: c.value,
|
|
3365
3368
|
parentComponentInstance: p.value,
|
|
3366
3369
|
targetPosition: -1
|
|
3367
|
-
},
|
|
3368
|
-
g.value[l.value].push(
|
|
3370
|
+
}, L = p.value.addNewChildComponentSchema(B);
|
|
3371
|
+
g.value[l.value].push(L), e.emit("addComponent");
|
|
3369
3372
|
}
|
|
3370
3373
|
}
|
|
3371
3374
|
function F() {
|
|
3372
|
-
return o.value &&
|
|
3375
|
+
return o.value && $("div", {
|
|
3373
3376
|
role: "button",
|
|
3374
3377
|
class: "btn component-settings-button",
|
|
3375
3378
|
title: "新增",
|
|
3376
3379
|
ref: "removeComponent",
|
|
3377
3380
|
onClick: (x) => {
|
|
3378
|
-
|
|
3381
|
+
I();
|
|
3379
3382
|
}
|
|
3380
|
-
}, [
|
|
3383
|
+
}, [$("i", {
|
|
3381
3384
|
class: "f-icon f-icon-plus-circle"
|
|
3382
3385
|
}, null)]);
|
|
3383
3386
|
}
|
|
3384
3387
|
function S(x) {
|
|
3385
|
-
return r.value &&
|
|
3388
|
+
return r.value && $("div", {
|
|
3386
3389
|
role: "button",
|
|
3387
3390
|
class: "btn component-settings-button",
|
|
3388
3391
|
title: "删除",
|
|
3389
3392
|
ref: "removeComponent",
|
|
3390
|
-
onClick: Jt((B) =>
|
|
3391
|
-
}, [
|
|
3393
|
+
onClick: Jt((B) => P(B, x), ["stop"])
|
|
3394
|
+
}, [$("i", {
|
|
3392
3395
|
class: "f-icon f-icon-yxs_delete"
|
|
3393
3396
|
}, null)]);
|
|
3394
3397
|
}
|
|
3395
3398
|
function f() {
|
|
3396
|
-
return n.value &&
|
|
3399
|
+
return n.value && $("div", {
|
|
3397
3400
|
role: "button",
|
|
3398
3401
|
class: "btn component-settings-button",
|
|
3399
3402
|
title: "移动",
|
|
3400
3403
|
ref: "moveComponent"
|
|
3401
|
-
}, [
|
|
3404
|
+
}, [$("i", {
|
|
3402
3405
|
"data-dragging-icon": "true",
|
|
3403
3406
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
3404
3407
|
}, null)]);
|
|
3405
3408
|
}
|
|
3406
|
-
function
|
|
3409
|
+
function M() {
|
|
3407
3410
|
var B;
|
|
3408
3411
|
const x = ((B = p.value) == null ? void 0 : B.getCustomButtons) && p.value.getCustomButtons();
|
|
3409
|
-
return x && !!x.length && x.map((
|
|
3412
|
+
return x && !!x.length && x.map((L) => $("div", {
|
|
3410
3413
|
role: "button",
|
|
3411
|
-
class: `btn component-settings-button ${
|
|
3412
|
-
title:
|
|
3413
|
-
ref:
|
|
3414
|
-
onClick: (
|
|
3415
|
-
}, [
|
|
3416
|
-
class: "f-icon " +
|
|
3417
|
-
}, null),
|
|
3414
|
+
class: `btn component-settings-button ${L.class || ""} ${L.text ? "settings-button-extend" : ""}`,
|
|
3415
|
+
title: L.title,
|
|
3416
|
+
ref: L.id,
|
|
3417
|
+
onClick: (q) => L.onClick && L.onClick(q)
|
|
3418
|
+
}, [$("i", {
|
|
3419
|
+
class: "f-icon " + L.icon
|
|
3420
|
+
}, null), L.text && $("span", {
|
|
3418
3421
|
class: "icon-text"
|
|
3419
|
-
}, [
|
|
3422
|
+
}, [L.text])]));
|
|
3420
3423
|
}
|
|
3421
|
-
function
|
|
3422
|
-
return
|
|
3424
|
+
function y(x) {
|
|
3425
|
+
return $("div", {
|
|
3423
3426
|
class: "component-btn-group",
|
|
3424
3427
|
"data-noattach": "true"
|
|
3425
|
-
}, [
|
|
3428
|
+
}, [$("div", null, [F(), f(), S(x), M()])]);
|
|
3426
3429
|
}
|
|
3427
3430
|
Ee(() => t.modelValue, (x) => {
|
|
3428
3431
|
g.value = x, s.schema = x;
|
|
3429
3432
|
});
|
|
3430
|
-
function
|
|
3433
|
+
function v(x) {
|
|
3431
3434
|
window.scrollContainerList || (window.scrollContainerList = /* @__PURE__ */ new Set());
|
|
3432
3435
|
const B = x.getAttribute("id");
|
|
3433
3436
|
B && window.scrollContainerList.add(B);
|
|
3434
3437
|
}
|
|
3435
|
-
function
|
|
3438
|
+
function E(x) {
|
|
3436
3439
|
const B = x.target;
|
|
3437
|
-
|
|
3440
|
+
v(B), go(B);
|
|
3438
3441
|
}
|
|
3439
3442
|
function m() {
|
|
3440
3443
|
var x, B;
|
|
3441
|
-
(B = (x = g.value) == null ? void 0 : x.contents) != null && B.length && a.value && a.value.addEventListener("scroll",
|
|
3444
|
+
(B = (x = g.value) == null ? void 0 : x.contents) != null && B.length && a.value && a.value.addEventListener("scroll", E);
|
|
3442
3445
|
}
|
|
3443
|
-
function
|
|
3446
|
+
function C() {
|
|
3444
3447
|
const x = a.value, B = Q(x.children[1]);
|
|
3445
3448
|
return So(B, s).value;
|
|
3446
3449
|
}
|
|
3447
3450
|
Ae(() => {
|
|
3448
3451
|
if (a.value) {
|
|
3449
3452
|
const x = a.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
3450
|
-
p.value = x && x.componentInstance ? x.componentInstance.value :
|
|
3453
|
+
p.value = x && x.componentInstance ? x.componentInstance.value : C(), d && x && d.attachComponents(x, g.value), i.value = p.value.canNested !== void 0 ? p.value.canNested : i.value, o.value = p.value.canAdd !== void 0 ? p.value.canAdd : o.value, r.value = p.value.canDelete !== void 0 ? p.value.canDelete : r.value, n.value = p.value.canMove !== void 0 ? p.value.canMove : n.value, b.value = p.value.styles || "", a.value && (a.value.componentInstance = p, a.value.designItemContext = s), p.value.setComponentBasicInfoMap(T);
|
|
3451
3454
|
}
|
|
3452
3455
|
m(), xe.value++;
|
|
3453
3456
|
}), Zt(() => {
|
|
3454
|
-
a.value && a.value.removeEventListener("scroll",
|
|
3457
|
+
a.value && a.value.removeEventListener("scroll", E);
|
|
3455
3458
|
});
|
|
3456
3459
|
function D(x) {
|
|
3457
3460
|
if (x && (x.preventDefault(), x.stopPropagation()), R) {
|
|
3458
|
-
const
|
|
3459
|
-
|
|
3461
|
+
const q = document.getElementById(`${R}-design-item`);
|
|
3462
|
+
q && q.click();
|
|
3460
3463
|
return;
|
|
3461
3464
|
}
|
|
3462
3465
|
let B = s.designerItemElementRef;
|
|
3463
|
-
const
|
|
3464
|
-
if (
|
|
3465
|
-
const
|
|
3466
|
-
|
|
3466
|
+
const L = a.value;
|
|
3467
|
+
if (L) {
|
|
3468
|
+
const q = document.getElementsByClassName("dgComponentFocused");
|
|
3469
|
+
q && q.length === 1 && q[0] === a.value && a.value.classList.contains("dgComponentSelected") || (Array.from(q).forEach((_) => _.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((_) => _.classList.remove("dgComponentSelected")), L.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, t.componentId, p.value), p.value.getDraggableDesignItemElement && (B = p.value.getDraggableDesignItemElement(s), B && B.value && B.value.classList.add("dgComponentSelected")));
|
|
3467
3470
|
}
|
|
3468
3471
|
Mt(B == null ? void 0 : B.value);
|
|
3469
3472
|
}
|
|
3470
|
-
return () =>
|
|
3473
|
+
return () => $("div", {
|
|
3471
3474
|
id: `${t.id}-design-item`,
|
|
3472
3475
|
ref: a,
|
|
3473
3476
|
class: k.value,
|
|
3474
3477
|
style: A.value,
|
|
3475
3478
|
onClick: D
|
|
3476
|
-
}, [
|
|
3479
|
+
}, [y(g.value), e.slots.default && e.slots.default()]);
|
|
3477
3480
|
}
|
|
3478
3481
|
});
|
|
3479
3482
|
class Io extends Xe {
|
|
@@ -3682,7 +3685,7 @@ function Mo(t, e) {
|
|
|
3682
3685
|
return o > -1 && n[o].children && n[o].children.length > 0 ? n[o].expanded === !0 : !1;
|
|
3683
3686
|
}
|
|
3684
3687
|
function ko(t, e, n) {
|
|
3685
|
-
function o(
|
|
3688
|
+
function o(E) {
|
|
3686
3689
|
return !1;
|
|
3687
3690
|
}
|
|
3688
3691
|
function r() {
|
|
@@ -3697,19 +3700,19 @@ function ko(t, e, n) {
|
|
|
3697
3700
|
function h() {
|
|
3698
3701
|
return n.toolbarContext.schema.buttons || [];
|
|
3699
3702
|
}
|
|
3700
|
-
function c(
|
|
3703
|
+
function c(E, m = "") {
|
|
3701
3704
|
setTimeout(() => {
|
|
3702
|
-
var B,
|
|
3703
|
-
const
|
|
3705
|
+
var B, L;
|
|
3706
|
+
const C = (B = t.parent) == null ? void 0 : B.designerItemElementRef.value;
|
|
3704
3707
|
let D;
|
|
3705
|
-
m && (D =
|
|
3706
|
-
const x = (
|
|
3708
|
+
m && (D = C == null ? void 0 : C.querySelector("#" + m));
|
|
3709
|
+
const x = (L = D || C) == null ? void 0 : L.querySelector("#" + E);
|
|
3707
3710
|
x == null || x.click();
|
|
3708
3711
|
}, 0);
|
|
3709
3712
|
}
|
|
3710
|
-
function g(
|
|
3713
|
+
function g(E, m) {
|
|
3711
3714
|
m.disabled && m.disabled.expressionId && (m.disabled.expressionId = `${m.id}_disabled`), m.visible && m.visible.expressionId && (m.visible.expressionId = `${m.id}_visible`);
|
|
3712
|
-
const
|
|
3715
|
+
const C = e.formSchemaUtils.getExpressions(), D = C.find((B) => B.target === E.id);
|
|
3713
3716
|
if (!D || !D.rules || !D.rules.length)
|
|
3714
3717
|
return;
|
|
3715
3718
|
const x = {
|
|
@@ -3718,25 +3721,25 @@ function ko(t, e, n) {
|
|
|
3718
3721
|
targetType: "Button"
|
|
3719
3722
|
};
|
|
3720
3723
|
D.rules.forEach((B) => {
|
|
3721
|
-
const
|
|
3724
|
+
const L = Object.assign(we(B), {
|
|
3722
3725
|
id: `${m.id}_${B.type}`
|
|
3723
3726
|
});
|
|
3724
|
-
x.rules.push(
|
|
3725
|
-
}),
|
|
3727
|
+
x.rules.push(L);
|
|
3728
|
+
}), C.push(x);
|
|
3726
3729
|
}
|
|
3727
|
-
function
|
|
3730
|
+
function b() {
|
|
3728
3731
|
var D;
|
|
3729
|
-
const
|
|
3730
|
-
we(
|
|
3732
|
+
const E = t.schema, m = Object.assign(
|
|
3733
|
+
we(E),
|
|
3731
3734
|
{
|
|
3732
3735
|
id: `${t.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
3733
3736
|
onClick: null
|
|
3734
3737
|
}
|
|
3735
3738
|
);
|
|
3736
3739
|
(D = e == null ? void 0 : e.designerContext) != null && D.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(m);
|
|
3737
|
-
let
|
|
3738
|
-
return m.children && m.children.length && (
|
|
3739
|
-
var
|
|
3740
|
+
let C = [];
|
|
3741
|
+
return m.children && m.children.length && (C = m.children.map((x) => {
|
|
3742
|
+
var L;
|
|
3740
3743
|
const B = we(x);
|
|
3741
3744
|
return Object.assign(
|
|
3742
3745
|
B,
|
|
@@ -3744,38 +3747,38 @@ function ko(t, e, n) {
|
|
|
3744
3747
|
id: `${t.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
3745
3748
|
onClick: null
|
|
3746
3749
|
}
|
|
3747
|
-
), (
|
|
3748
|
-
}), m.children =
|
|
3750
|
+
), (L = e == null ? void 0 : e.designerContext) != null && L.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(B), g(x, B), B;
|
|
3751
|
+
}), m.children = C), g(E, m), m;
|
|
3749
3752
|
}
|
|
3750
3753
|
function a() {
|
|
3751
|
-
const
|
|
3752
|
-
return m && !m.id && m.type ===
|
|
3754
|
+
const E = t.schema.type || "response-toolbar-item", m = Fn(E), C = E.toLowerCase().replace("-", "_");
|
|
3755
|
+
return m && !m.id && m.type === E && (m.id = `${C}_${Math.random().toString().slice(2, 6)}`, m.text = "按钮"), m;
|
|
3753
3756
|
}
|
|
3754
|
-
function d(
|
|
3755
|
-
const m = h(),
|
|
3756
|
-
return { index:
|
|
3757
|
+
function d(E) {
|
|
3758
|
+
const m = h(), C = m == null ? void 0 : m.findIndex((x) => x.id === E), D = C === -1 ? null : m[C];
|
|
3759
|
+
return { index: C, toolbarItem: D };
|
|
3757
3760
|
}
|
|
3758
3761
|
function p() {
|
|
3759
|
-
const
|
|
3760
|
-
return We(
|
|
3762
|
+
const E = t.schema.id, m = h();
|
|
3763
|
+
return We(E, m);
|
|
3761
3764
|
}
|
|
3762
|
-
function u(
|
|
3765
|
+
function u(E) {
|
|
3763
3766
|
const m = e.formSchemaUtils.getExpressions();
|
|
3764
3767
|
if (!m || !m.length)
|
|
3765
3768
|
return;
|
|
3766
|
-
const
|
|
3769
|
+
const C = (D) => {
|
|
3767
3770
|
const x = m && m.findIndex((B) => B.target === D.id);
|
|
3768
3771
|
x > -1 && m.splice(x, 1);
|
|
3769
3772
|
};
|
|
3770
|
-
E
|
|
3771
|
-
|
|
3773
|
+
C(E), E.children && E.children.length && E.children.forEach((D) => {
|
|
3774
|
+
C(D);
|
|
3772
3775
|
});
|
|
3773
3776
|
}
|
|
3774
|
-
function s(
|
|
3775
|
-
n.changeSelectedId(
|
|
3777
|
+
function s(E) {
|
|
3778
|
+
n.changeSelectedId(E);
|
|
3776
3779
|
}
|
|
3777
|
-
function T(
|
|
3778
|
-
e.formSchemaUtils.removeCommunicationInComponent(
|
|
3780
|
+
function T(E) {
|
|
3781
|
+
e.formSchemaUtils.removeCommunicationInComponent(E), E.children && E.children.length && E.children.forEach((m) => {
|
|
3779
3782
|
e.formSchemaUtils.removeCommunicationInComponent(m);
|
|
3780
3783
|
});
|
|
3781
3784
|
}
|
|
@@ -3783,62 +3786,62 @@ function ko(t, e, n) {
|
|
|
3783
3786
|
var D, x, B;
|
|
3784
3787
|
if ((D = e == null ? void 0 : e.designerContext) != null && D.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
3785
3788
|
return;
|
|
3786
|
-
const
|
|
3787
|
-
m === -1 ||
|
|
3789
|
+
const E = h(), { parentIndex: m, itemIndex: C } = lt(t.schema.id, E);
|
|
3790
|
+
m === -1 || C === -1 || (u(t.schema), T(t.schema), E[m].children.splice(C, 1), n.updateToolbarItems(), (x = t.setupContext) == null || x.emit("removeComponent"), (B = t.setupContext) == null || B.emit("selectionChange"), xe.value++);
|
|
3788
3791
|
}
|
|
3789
3792
|
function k() {
|
|
3790
3793
|
var D, x, B;
|
|
3791
3794
|
if ((D = e == null ? void 0 : e.designerContext) != null && D.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
3792
3795
|
return;
|
|
3793
|
-
const
|
|
3794
|
-
|
|
3796
|
+
const E = t.schema.id, m = h(), C = m == null ? void 0 : m.findIndex((L) => L.id === E);
|
|
3797
|
+
C !== -1 && (u(m[C]), T(m[C]), m == null || m.splice(C, 1), n.updateToolbarItems(), (x = t.setupContext) == null || x.emit("removeComponent"), (B = t.setupContext) == null || B.emit("selectionChange"), xe.value++);
|
|
3795
3798
|
}
|
|
3796
|
-
function A(
|
|
3797
|
-
var
|
|
3798
|
-
const m = h(), { parentIndex:
|
|
3799
|
-
if (
|
|
3799
|
+
function A(E = "Append") {
|
|
3800
|
+
var L;
|
|
3801
|
+
const m = h(), { parentIndex: C, itemIndex: D } = lt(t.schema.id, m);
|
|
3802
|
+
if (C === -1 || D === -1)
|
|
3800
3803
|
return;
|
|
3801
|
-
const x = a(), B =
|
|
3802
|
-
m[
|
|
3804
|
+
const x = a(), B = E === "Copy" ? b() : Object.assign({}, x);
|
|
3805
|
+
m[C].children.splice(D + 1, 0, B), n.updateToolbarItems(), s(B.id), (L = t.setupContext) == null || L.emit("addComponent");
|
|
3803
3806
|
}
|
|
3804
|
-
function
|
|
3805
|
-
const { index:
|
|
3806
|
-
if (
|
|
3807
|
-
return { index:
|
|
3808
|
-
const D = a(), x =
|
|
3809
|
-
return { index:
|
|
3807
|
+
function P(E, m) {
|
|
3808
|
+
const { index: C } = d(m);
|
|
3809
|
+
if (C === -1)
|
|
3810
|
+
return { index: C, schema: null };
|
|
3811
|
+
const D = a(), x = E === "Copy" ? b() : Object.assign({}, D);
|
|
3812
|
+
return { index: C, schema: x };
|
|
3810
3813
|
}
|
|
3811
|
-
function
|
|
3814
|
+
function I() {
|
|
3812
3815
|
var D;
|
|
3813
|
-
const
|
|
3814
|
-
|
|
3816
|
+
const E = t.schema.id, { index: m, schema: C } = P("Copy", E);
|
|
3817
|
+
C && (h().splice(m + 1, 0, C), n.updateToolbarItems(), c(C.id), (D = t.setupContext) == null || D.emit("addComponent"));
|
|
3815
3818
|
}
|
|
3816
3819
|
function F() {
|
|
3817
3820
|
var D;
|
|
3818
|
-
const
|
|
3819
|
-
if (
|
|
3821
|
+
const E = t.schema.id, { index: m, schema: C } = P("Append", E);
|
|
3822
|
+
if (C && t.parent) {
|
|
3820
3823
|
const B = h()[m].children || [];
|
|
3821
|
-
B.push(
|
|
3822
|
-
const
|
|
3823
|
-
|
|
3824
|
+
B.push(C);
|
|
3825
|
+
const L = h();
|
|
3826
|
+
L[m].children = B, n.updateToolbarItems(), s(C.id), (D = t.setupContext) == null || D.emit("addComponent");
|
|
3824
3827
|
}
|
|
3825
3828
|
}
|
|
3826
|
-
function S(
|
|
3829
|
+
function S(E) {
|
|
3827
3830
|
let m;
|
|
3828
3831
|
switch (t.schema.type) {
|
|
3829
3832
|
case "tab-toolbar-item":
|
|
3830
|
-
m = new Io(
|
|
3833
|
+
m = new Io(E, e);
|
|
3831
3834
|
break;
|
|
3832
3835
|
default:
|
|
3833
|
-
m = new Po(
|
|
3836
|
+
m = new Po(E, e, t.schema.type);
|
|
3834
3837
|
}
|
|
3835
3838
|
return m.getPropertyConfig(t.schema, p());
|
|
3836
3839
|
}
|
|
3837
|
-
function f(
|
|
3838
|
-
|
|
3840
|
+
function f(E) {
|
|
3841
|
+
E.stopPropagation(), E.stopImmediatePropagation();
|
|
3839
3842
|
}
|
|
3840
|
-
function
|
|
3841
|
-
const
|
|
3843
|
+
function M() {
|
|
3844
|
+
const E = [{
|
|
3842
3845
|
id: "delete",
|
|
3843
3846
|
title: "删除",
|
|
3844
3847
|
text: "",
|
|
@@ -3852,13 +3855,13 @@ function ko(t, e, n) {
|
|
|
3852
3855
|
icon: "f-icon-yxs_copy",
|
|
3853
3856
|
onClick: (m) => {
|
|
3854
3857
|
f(m);
|
|
3855
|
-
const { activeElement:
|
|
3856
|
-
D && D === "input" || D === "textarea" ? (
|
|
3857
|
-
p() ? A("Copy") :
|
|
3858
|
-
})) : p() ? A("Copy") :
|
|
3858
|
+
const { activeElement: C } = document, D = C ? C.tagName.toLowerCase() : "";
|
|
3859
|
+
D && D === "input" || D === "textarea" ? (C == null || C.blur(), Ie(() => {
|
|
3860
|
+
p() ? A("Copy") : I();
|
|
3861
|
+
})) : p() ? A("Copy") : I();
|
|
3859
3862
|
}
|
|
3860
3863
|
}];
|
|
3861
|
-
return
|
|
3864
|
+
return E.push(p() ? {
|
|
3862
3865
|
id: "appendSiblingButton",
|
|
3863
3866
|
title: "",
|
|
3864
3867
|
text: "新增同级",
|
|
@@ -3874,14 +3877,14 @@ function ko(t, e, n) {
|
|
|
3874
3877
|
onClick: (m) => {
|
|
3875
3878
|
f(m), F();
|
|
3876
3879
|
}
|
|
3877
|
-
}),
|
|
3880
|
+
}), E;
|
|
3878
3881
|
}
|
|
3879
|
-
function
|
|
3880
|
-
const { schema:
|
|
3881
|
-
u(
|
|
3882
|
+
function y() {
|
|
3883
|
+
const { schema: E } = t;
|
|
3884
|
+
u(E);
|
|
3882
3885
|
}
|
|
3883
|
-
function
|
|
3884
|
-
var
|
|
3886
|
+
function v() {
|
|
3887
|
+
var E, m, C, D;
|
|
3885
3888
|
if (t && e) {
|
|
3886
3889
|
const { formSchemaUtils: x } = e, { schema: B } = t;
|
|
3887
3890
|
switch (B.type) {
|
|
@@ -3894,9 +3897,9 @@ function ko(t, e, n) {
|
|
|
3894
3897
|
}
|
|
3895
3898
|
case "tab-toolbar-item":
|
|
3896
3899
|
case "section-toolbar-item": {
|
|
3897
|
-
let
|
|
3898
|
-
const
|
|
3899
|
-
(
|
|
3900
|
+
let L;
|
|
3901
|
+
const q = (E = t.parent) == null ? void 0 : E.parent;
|
|
3902
|
+
(q == null ? void 0 : q.schema.type) === "tabs" || (q == null ? void 0 : q.schema.type) === "section" ? L = (m = q.componentInstance) == null ? void 0 : m.value : L = (D = (C = q == null ? void 0 : q.parent) == null ? void 0 : C.componentInstance) == null ? void 0 : D.value, L != null && L.setComponentBasicInfoMap && L.setComponentBasicInfoMap();
|
|
3900
3903
|
}
|
|
3901
3904
|
}
|
|
3902
3905
|
}
|
|
@@ -3907,9 +3910,9 @@ function ko(t, e, n) {
|
|
|
3907
3910
|
checkCanDeleteComponent: i,
|
|
3908
3911
|
checkCanAddComponent: l,
|
|
3909
3912
|
getPropsConfig: S,
|
|
3910
|
-
getCustomButtons:
|
|
3911
|
-
onRemoveComponent:
|
|
3912
|
-
setComponentBasicInfoMap:
|
|
3913
|
+
getCustomButtons: M,
|
|
3914
|
+
onRemoveComponent: y,
|
|
3915
|
+
setComponentBasicInfoMap: v
|
|
3913
3916
|
};
|
|
3914
3917
|
}
|
|
3915
3918
|
const Dt = /* @__PURE__ */ Fe({
|
|
@@ -3921,17 +3924,17 @@ const Dt = /* @__PURE__ */ Fe({
|
|
|
3921
3924
|
Ae(() => {
|
|
3922
3925
|
r.value.componentInstance = g;
|
|
3923
3926
|
}), e.expose(g.value);
|
|
3924
|
-
function
|
|
3925
|
-
const
|
|
3927
|
+
function b() {
|
|
3928
|
+
const P = {
|
|
3926
3929
|
"f-icon": !0
|
|
3927
|
-
},
|
|
3928
|
-
return se(
|
|
3930
|
+
}, I = t.icon ? t.icon.trim() : "";
|
|
3931
|
+
return se(P, I);
|
|
3929
3932
|
}
|
|
3930
3933
|
function a() {
|
|
3931
3934
|
return !!(t.icon && t.icon.trim());
|
|
3932
3935
|
}
|
|
3933
3936
|
const d = ue(() => {
|
|
3934
|
-
const
|
|
3937
|
+
const P = {
|
|
3935
3938
|
btn: !0,
|
|
3936
3939
|
"f-rt-btn": !0,
|
|
3937
3940
|
"f-btn-ml": !t.isDP && (n.value === "right" || n.value === "center"),
|
|
@@ -3942,7 +3945,7 @@ const Dt = /* @__PURE__ */ Fe({
|
|
|
3942
3945
|
"text-truncate": !0
|
|
3943
3946
|
// 'f-rt-toggle':props.isDP&&!props.split
|
|
3944
3947
|
};
|
|
3945
|
-
return se(
|
|
3948
|
+
return se(P, t.class);
|
|
3946
3949
|
}), p = ue(() => t.split ? {
|
|
3947
3950
|
display: "flex",
|
|
3948
3951
|
"align-items": "center"
|
|
@@ -3954,16 +3957,16 @@ const Dt = /* @__PURE__ */ Fe({
|
|
|
3954
3957
|
"border-top-right-radius": "6px",
|
|
3955
3958
|
"border-bottom-right-radius": "6px"
|
|
3956
3959
|
}), u = ue(() => {
|
|
3957
|
-
const
|
|
3960
|
+
const P = {
|
|
3958
3961
|
btn: !0,
|
|
3959
3962
|
"dropdown-toggle": !0,
|
|
3960
3963
|
"f-btn-mr": n.value === "left",
|
|
3961
3964
|
"dropdown-toggle-split": !0,
|
|
3962
3965
|
"no-drag": !0
|
|
3963
3966
|
};
|
|
3964
|
-
return se(
|
|
3967
|
+
return se(P, t.class);
|
|
3965
3968
|
}), s = ue(() => {
|
|
3966
|
-
let
|
|
3969
|
+
let P = {
|
|
3967
3970
|
btn: !t.isDPItem,
|
|
3968
3971
|
// 不是下拉按钮,不是下拉项
|
|
3969
3972
|
disabled: t.disabled === !0,
|
|
@@ -3975,10 +3978,10 @@ const Dt = /* @__PURE__ */ Fe({
|
|
|
3975
3978
|
// 保证内部层级不被拖拽
|
|
3976
3979
|
"no-drag": !0
|
|
3977
3980
|
};
|
|
3978
|
-
return t.isDPItem || (
|
|
3981
|
+
return t.isDPItem || (P = se(P, t.class || "")), t.isDP && (P = se(P, t.dropdownClass || "")), P;
|
|
3979
3982
|
});
|
|
3980
|
-
function T(
|
|
3981
|
-
|
|
3983
|
+
function T(P, I) {
|
|
3984
|
+
I && I.stopPropagation(), e.emit(P, {
|
|
3982
3985
|
id: t.id,
|
|
3983
3986
|
isDP: t.isDP
|
|
3984
3987
|
});
|
|
@@ -3993,52 +3996,52 @@ const Dt = /* @__PURE__ */ Fe({
|
|
|
3993
3996
|
};
|
|
3994
3997
|
}
|
|
3995
3998
|
function k() {
|
|
3996
|
-
return
|
|
3999
|
+
return $("div", {
|
|
3997
4000
|
ref: r,
|
|
3998
4001
|
"data-dragref": `${l.schema.id}-container`,
|
|
3999
4002
|
class: "farris-component position-relative",
|
|
4000
4003
|
style: "display:inline-block!important;"
|
|
4001
|
-
}, [
|
|
4004
|
+
}, [$("div", {
|
|
4002
4005
|
class: R(),
|
|
4003
4006
|
id: t.id
|
|
4004
|
-
}, [
|
|
4007
|
+
}, [$("div", {
|
|
4005
4008
|
class: d.value,
|
|
4006
4009
|
style: p.value,
|
|
4007
4010
|
onClick: () => T("clearAll")
|
|
4008
|
-
}, [o.shouldShowIcon(t) &&
|
|
4011
|
+
}, [o.shouldShowIcon(t) && $("i", {
|
|
4009
4012
|
class: o.iconClass(t)
|
|
4010
|
-
}, null),
|
|
4013
|
+
}, null), $("span", null, [t.text]), !t.split && $("span", {
|
|
4011
4014
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
4012
4015
|
style: "margin:0 0.5rem 0 0.25rem;",
|
|
4013
|
-
onClick: (
|
|
4014
|
-
}, null)]), t.split &&
|
|
4016
|
+
onClick: (P) => T("dropdown", P)
|
|
4017
|
+
}, null)]), t.split && $("button", {
|
|
4015
4018
|
class: u.value,
|
|
4016
4019
|
style: "border-radius:0 6px 6px 0;",
|
|
4017
|
-
onClick: (
|
|
4020
|
+
onClick: (P) => T("dropdown", P)
|
|
4018
4021
|
}, null), h.renderDropdownMenu(t.item, t.item)])]);
|
|
4019
4022
|
}
|
|
4020
4023
|
function A() {
|
|
4021
|
-
return
|
|
4024
|
+
return $("li", {
|
|
4022
4025
|
ref: r,
|
|
4023
4026
|
"data-dragref": `${l.schema.id}-container`,
|
|
4024
4027
|
id: t.id,
|
|
4025
4028
|
class: s.value
|
|
4026
|
-
}, [o.shouldShowIcon(t) &&
|
|
4029
|
+
}, [o.shouldShowIcon(t) && $("i", {
|
|
4027
4030
|
class: o.iconClass(t)
|
|
4028
4031
|
}, null), t.text]);
|
|
4029
4032
|
}
|
|
4030
|
-
return () => t.isDP ? k() : t.isDPItem ? A() :
|
|
4033
|
+
return () => t.isDP ? k() : t.isDPItem ? A() : $("div", {
|
|
4031
4034
|
ref: r,
|
|
4032
4035
|
"data-dragref": `${l.schema.id}-container`,
|
|
4033
4036
|
class: "farris-component position-relative",
|
|
4034
4037
|
style: "display:inline-block!important;"
|
|
4035
|
-
}, [
|
|
4038
|
+
}, [$("button", {
|
|
4036
4039
|
type: "button",
|
|
4037
4040
|
class: d.value,
|
|
4038
4041
|
id: t.id,
|
|
4039
4042
|
onClick: () => T("clearAll")
|
|
4040
|
-
}, [a() &&
|
|
4041
|
-
class:
|
|
4043
|
+
}, [a() && $("i", {
|
|
4044
|
+
class: b()
|
|
4042
4045
|
}, null), t.text])]);
|
|
4043
4046
|
}
|
|
4044
4047
|
});
|
|
@@ -4065,7 +4068,7 @@ function Do(t, e, n, o) {
|
|
|
4065
4068
|
const u = d.target;
|
|
4066
4069
|
u != null && u.classList.contains("dgComponentFocused") && (u == null || u.classList.add("dgComponentSelected"));
|
|
4067
4070
|
}
|
|
4068
|
-
function
|
|
4071
|
+
function b(d, p = !1) {
|
|
4069
4072
|
if (!p)
|
|
4070
4073
|
return;
|
|
4071
4074
|
const u = d.target;
|
|
@@ -4073,7 +4076,7 @@ function Do(t, e, n, o) {
|
|
|
4073
4076
|
}
|
|
4074
4077
|
function a(d, p, u = !1) {
|
|
4075
4078
|
const s = c(d.id, d.parent), T = Q(s);
|
|
4076
|
-
return
|
|
4079
|
+
return $(Eo, {
|
|
4077
4080
|
key: s.id,
|
|
4078
4081
|
class: ["p-0", u ? "d-block no-drag" : "d-inline-block"],
|
|
4079
4082
|
modelValue: T.value,
|
|
@@ -4087,11 +4090,11 @@ function Do(t, e, n, o) {
|
|
|
4087
4090
|
onSelectionChange: r,
|
|
4088
4091
|
onRemoveComponent: i,
|
|
4089
4092
|
onMouseenter: (R) => g(R, u),
|
|
4090
|
-
onMouseleave: (R) =>
|
|
4093
|
+
onMouseleave: (R) => b(R, u)
|
|
4091
4094
|
}, {
|
|
4092
4095
|
default: () => {
|
|
4093
4096
|
var R;
|
|
4094
|
-
return [
|
|
4097
|
+
return [$(Dt, {
|
|
4095
4098
|
id: s.id,
|
|
4096
4099
|
disabled: s.disabled,
|
|
4097
4100
|
text: s.text,
|
|
@@ -4142,66 +4145,66 @@ const Bo = /* @__PURE__ */ Fe({
|
|
|
4142
4145
|
setup(t, e) {
|
|
4143
4146
|
const n = Q(Ue(t.items)), o = Q(), r = Q(), i = Q(), l = Q("");
|
|
4144
4147
|
let h = 0;
|
|
4145
|
-
const c = 15, g = pe("designer-host-service"),
|
|
4146
|
-
clearAllDropdown: (
|
|
4148
|
+
const c = 15, g = pe("designer-host-service"), b = pe("design-item-context"), a = {
|
|
4149
|
+
clearAllDropdown: (W) => {
|
|
4147
4150
|
},
|
|
4148
|
-
toggleDropdownMenu: (
|
|
4151
|
+
toggleDropdownMenu: (W) => {
|
|
4149
4152
|
},
|
|
4150
4153
|
updateToolbarItems: () => {
|
|
4151
4154
|
},
|
|
4152
|
-
changeSelectedId: (
|
|
4153
|
-
l.value =
|
|
4155
|
+
changeSelectedId: (W) => {
|
|
4156
|
+
l.value = W;
|
|
4154
4157
|
},
|
|
4155
|
-
renderDropdownMenu: (
|
|
4158
|
+
renderDropdownMenu: (W, _) => {
|
|
4156
4159
|
},
|
|
4157
|
-
toolbarContext:
|
|
4158
|
-
changeMenuPosition: (
|
|
4160
|
+
toolbarContext: b,
|
|
4161
|
+
changeMenuPosition: (W, _, Z) => ({}),
|
|
4159
4162
|
toolbarPosition: ""
|
|
4160
|
-
}, d = bo(
|
|
4163
|
+
}, d = bo(b, g, a), p = rn(i, b, d), u = pe("toolbar-item-handler"), {
|
|
4161
4164
|
initDragula: s,
|
|
4162
4165
|
dragulaInstance: T
|
|
4163
|
-
} = wo(
|
|
4164
|
-
renderToolbarItemDesigner:
|
|
4166
|
+
} = wo(b), R = Ye(), k = Do(t, r, b, a), A = xo(R, n, k), {
|
|
4167
|
+
renderToolbarItemDesigner: P
|
|
4165
4168
|
} = k, {
|
|
4166
|
-
clearAllDropDownMenu:
|
|
4169
|
+
clearAllDropDownMenu: I,
|
|
4167
4170
|
renderDropdownMenu: F,
|
|
4168
4171
|
setResponseToolbarRef: S
|
|
4169
4172
|
} = A;
|
|
4170
|
-
ut("toolbar-item-action", a), a.renderDropdownMenu = F, S(i), u && (u.changeSelectedId = function(
|
|
4171
|
-
l.value =
|
|
4173
|
+
ut("toolbar-item-action", a), a.renderDropdownMenu = F, S(i), u && (u.changeSelectedId = function(W) {
|
|
4174
|
+
l.value = W;
|
|
4172
4175
|
});
|
|
4173
4176
|
function f() {
|
|
4174
|
-
const
|
|
4175
|
-
|
|
4177
|
+
const W = r.value.querySelector(".dgComponentSelected");
|
|
4178
|
+
W && Pt(W);
|
|
4176
4179
|
}
|
|
4177
|
-
function
|
|
4180
|
+
function M() {
|
|
4178
4181
|
if (l.value)
|
|
4179
4182
|
if (We(l.value, n.value)) {
|
|
4180
4183
|
const {
|
|
4181
|
-
parent:
|
|
4182
|
-
item:
|
|
4184
|
+
parent: W,
|
|
4185
|
+
item: _
|
|
4183
4186
|
} = at(l.value, n.value);
|
|
4184
|
-
|
|
4187
|
+
W && (a.toggleDropdownMenu(W, !0), setTimeout(() => {
|
|
4185
4188
|
var J;
|
|
4186
|
-
const Z = i.value.querySelector("#" +
|
|
4189
|
+
const Z = i.value.querySelector("#" + W.id), X = Z == null ? void 0 : Z.querySelector("#" + _.id);
|
|
4187
4190
|
(((J = X == null ? void 0 : X.parentElement) == null ? void 0 : J.className) || "").indexOf("dgComponentFocused") < 0 && (X == null || X.click());
|
|
4188
4191
|
}, 0));
|
|
4189
4192
|
} else
|
|
4190
4193
|
f();
|
|
4191
4194
|
}
|
|
4192
|
-
function
|
|
4193
|
-
n.value.filter((
|
|
4194
|
-
|
|
4195
|
-
}),
|
|
4195
|
+
function y(W = "") {
|
|
4196
|
+
n.value.filter((_) => _.id !== W && _.children && _.children.length > 0).forEach((_) => {
|
|
4197
|
+
_.expanded = !1;
|
|
4198
|
+
}), I(W);
|
|
4196
4199
|
}
|
|
4197
|
-
a.clearAllDropdown =
|
|
4198
|
-
function
|
|
4200
|
+
a.clearAllDropdown = y;
|
|
4201
|
+
function v() {
|
|
4199
4202
|
u && u.updateToolbarItems && u.updateToolbarItems();
|
|
4200
4203
|
}
|
|
4201
|
-
a.updateToolbarItems =
|
|
4202
|
-
function
|
|
4203
|
-
if (
|
|
4204
|
-
const
|
|
4204
|
+
a.updateToolbarItems = v;
|
|
4205
|
+
function E(W) {
|
|
4206
|
+
if (W) {
|
|
4207
|
+
const _ = i.value.querySelector("#" + W.id), Z = _.querySelector("#" + W.id + "_menu"), X = a.changeMenuPosition(W, _);
|
|
4205
4208
|
Object.keys(X).forEach((J) => {
|
|
4206
4209
|
Z.style[J] = X[J];
|
|
4207
4210
|
});
|
|
@@ -4217,10 +4220,10 @@ const Bo = /* @__PURE__ */ Fe({
|
|
|
4217
4220
|
z.querySelector(".dropdown-toggle-split") ? z.querySelector(".f-rt-btn").style.maxWidth = Z - 38 + "px" : z.style.maxWidth = Z - 12 + "px";
|
|
4218
4221
|
});
|
|
4219
4222
|
}
|
|
4220
|
-
const
|
|
4221
|
-
var
|
|
4222
|
-
if (
|
|
4223
|
-
const X =
|
|
4223
|
+
const C = new ResizeObserver((W) => {
|
|
4224
|
+
var _;
|
|
4225
|
+
if (W.length) {
|
|
4226
|
+
const X = W[0].contentRect.width;
|
|
4224
4227
|
if (X === 0) {
|
|
4225
4228
|
h = 0;
|
|
4226
4229
|
return;
|
|
@@ -4231,30 +4234,30 @@ const Bo = /* @__PURE__ */ Fe({
|
|
|
4231
4234
|
parent: J,
|
|
4232
4235
|
item: z
|
|
4233
4236
|
} = at(l.value, n.value);
|
|
4234
|
-
|
|
4237
|
+
E(J);
|
|
4235
4238
|
} else if (Mo(l.value, n.value)) {
|
|
4236
|
-
const J = (
|
|
4237
|
-
|
|
4239
|
+
const J = (_ = n.value) == null ? void 0 : _.find((z) => z.id === l.value);
|
|
4240
|
+
E(J);
|
|
4238
4241
|
} else
|
|
4239
|
-
|
|
4242
|
+
y();
|
|
4240
4243
|
m();
|
|
4241
4244
|
}
|
|
4242
4245
|
}
|
|
4243
4246
|
});
|
|
4244
4247
|
Ae(() => {
|
|
4245
|
-
|
|
4248
|
+
C.observe(i.value), h = i.value.clientWidth, i.value.componentInstance = p, s(r.value, o.value, v);
|
|
4246
4249
|
}), ct(() => {
|
|
4247
|
-
|
|
4250
|
+
C.disconnect(), T && T.destroy && T.destroy();
|
|
4248
4251
|
}), e.expose(p.value);
|
|
4249
4252
|
const D = ue(() => {
|
|
4250
|
-
const
|
|
4253
|
+
const W = {
|
|
4251
4254
|
"f-toolbar": !0,
|
|
4252
4255
|
"f-response-toolbar": !0,
|
|
4253
4256
|
"position-relative": !0,
|
|
4254
4257
|
"f-response-toolbar-sm": t.buttonSize === "sm",
|
|
4255
4258
|
"f-response-toolbar-lg": t.buttonSize === "lg"
|
|
4256
4259
|
};
|
|
4257
|
-
return se(
|
|
4260
|
+
return se(W, t.customClass);
|
|
4258
4261
|
}), x = ue(() => ({
|
|
4259
4262
|
"text-left": t.alignment === "left",
|
|
4260
4263
|
"text-right": t.alignment === "right",
|
|
@@ -4266,66 +4269,66 @@ const Bo = /* @__PURE__ */ Fe({
|
|
|
4266
4269
|
}));
|
|
4267
4270
|
Ee(() => t.items, () => {
|
|
4268
4271
|
n.value = Ue(t.items), Ie(() => {
|
|
4269
|
-
|
|
4272
|
+
M(), m();
|
|
4270
4273
|
});
|
|
4271
4274
|
}, {
|
|
4272
4275
|
deep: !0
|
|
4273
4276
|
});
|
|
4274
|
-
function B(
|
|
4275
|
-
|
|
4277
|
+
function B(W) {
|
|
4278
|
+
W && (W.stopPropagation(), W.preventDefault());
|
|
4276
4279
|
const {
|
|
4277
|
-
schema:
|
|
4278
|
-
} =
|
|
4279
|
-
|
|
4280
|
+
schema: _
|
|
4281
|
+
} = b;
|
|
4282
|
+
_.buttons || (_.buttons = []);
|
|
4280
4283
|
const Z = ht("response-toolbar-item");
|
|
4281
4284
|
Z.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, Z.appearance = {
|
|
4282
4285
|
class: "btn btn-secondary"
|
|
4283
|
-
},
|
|
4286
|
+
}, _.buttons.push(Z);
|
|
4284
4287
|
}
|
|
4285
|
-
function
|
|
4286
|
-
return
|
|
4288
|
+
function L() {
|
|
4289
|
+
return $("li", {
|
|
4287
4290
|
style: "border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",
|
|
4288
4291
|
onClick: B
|
|
4289
|
-
}, [
|
|
4292
|
+
}, [$("span", {
|
|
4290
4293
|
class: "f-icon f-icon-amplification mr-1",
|
|
4291
4294
|
style: "font-size: 12px;"
|
|
4292
|
-
}, null),
|
|
4295
|
+
}, null), $("span", {
|
|
4293
4296
|
class: "farris-tag-add-text"
|
|
4294
4297
|
}, [Kt("添加按钮")])]);
|
|
4295
4298
|
}
|
|
4296
|
-
function
|
|
4297
|
-
return n.value.map((
|
|
4299
|
+
function q() {
|
|
4300
|
+
return n.value.map((W, _) => P(W, _));
|
|
4298
4301
|
}
|
|
4299
4302
|
return () => {
|
|
4300
|
-
var
|
|
4301
|
-
return
|
|
4303
|
+
var W;
|
|
4304
|
+
return $("div", {
|
|
4302
4305
|
ref: i,
|
|
4303
|
-
"data-dragref": `${
|
|
4306
|
+
"data-dragref": `${b.schema.id}-container`,
|
|
4304
4307
|
class: D.value,
|
|
4305
4308
|
id: t.id
|
|
4306
|
-
}, [
|
|
4309
|
+
}, [$("div", {
|
|
4307
4310
|
ref: o,
|
|
4308
4311
|
class: x.value,
|
|
4309
|
-
onClick: (
|
|
4310
|
-
}, [
|
|
4312
|
+
onClick: (_) => y(_)
|
|
4313
|
+
}, [$("div", {
|
|
4311
4314
|
ref: r,
|
|
4312
4315
|
class: "d-block f-response-content"
|
|
4313
|
-
}, [(
|
|
4316
|
+
}, [(W = n.value) != null && W.length ? q() : L()])])]);
|
|
4314
4317
|
};
|
|
4315
4318
|
}
|
|
4316
|
-
}),
|
|
4319
|
+
}), Uo = Ge;
|
|
4317
4320
|
Oe.register = (t, e, n, o) => {
|
|
4318
4321
|
t["response-toolbar"] = Oe, e["response-toolbar"] = Ge, o["response-toolbar"] = { eventHandlerResolver: so };
|
|
4319
4322
|
};
|
|
4320
4323
|
Oe.registerDesigner = (t, e, n) => {
|
|
4321
4324
|
t["response-toolbar"] = Bo, e["response-toolbar"] = Ge, t["response-toolbar-item"] = Dt, e["response-toolbar-item"] = io;
|
|
4322
4325
|
};
|
|
4323
|
-
const
|
|
4326
|
+
const zo = tn(Oe);
|
|
4324
4327
|
export {
|
|
4325
4328
|
Oe as FResponseToolbar,
|
|
4326
4329
|
Me as ResponseToolbarDropDownItem,
|
|
4327
|
-
|
|
4330
|
+
Vo as ResponseToolbarGroup,
|
|
4328
4331
|
ln as ResponseToolbarItem,
|
|
4329
|
-
|
|
4330
|
-
|
|
4332
|
+
zo as default,
|
|
4333
|
+
Uo as responseToolbarResolver
|
|
4331
4334
|
};
|