@farris/ui-vue 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/package.json +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/index.esm.js +1362 -1361
- package/components/border-editor/index.umd.cjs +6 -6
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +22 -21
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +1370 -1369
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +180 -179
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/package.json +1 -1
- package/components/data-grid/index.esm.js +22 -21
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +22 -21
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +2270 -2269
- package/components/designer-canvas/index.umd.cjs +7 -7
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +22 -21
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +180 -179
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +3661 -3660
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.esm.js +1365 -1364
- package/components/external-container/index.umd.cjs +7 -7
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.esm.js +182 -181
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/index.esm.js +182 -181
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +22 -21
- package/components/flow-canvas/index.umd.cjs +7 -7
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +183 -182
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.esm.js +185 -184
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.esm.js +181 -180
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +182 -181
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/plugin/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +2810 -2810
- package/components/property-editor/index.umd.cjs +7 -7
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +180 -179
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/index.esm.js +182 -181
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.esm.js +22 -21
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/index.esm.js +22 -21
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.esm.js +939 -938
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +183 -182
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/tree-grid/index.esm.js +22 -21
- package/components/tree-grid/index.umd.cjs +7 -7
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +186 -185
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +26 -26
- package/farris.all.umd.cjs +2 -2
- package/package.json +1 -1
- package/types/property-editor/src/composition/use-initialized-value.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var nt = Object.defineProperty;
|
|
2
2
|
var ot = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var U = (e, t, n) => ot(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { ref as C, nextTick as
|
|
4
|
+
import { ref as C, nextTick as oe, computed as B, createVNode as s, defineComponent as te, watch as se, onMounted as K, withDirectives as st, vModelText as at, createTextVNode as ie, Fragment as we, getCurrentInstance as Ne, onUnmounted as ue, shallowRef as re, provide as be, inject as ee, isVNode as He, Teleport as lt, h as rt, render as Oe, createApp as ct, reactive as le, mergeProps as it, onBeforeUnmount as ut } from "vue";
|
|
5
5
|
import { cloneDeep as dt } from "lodash-es";
|
|
6
6
|
const Te = {}, Le = {};
|
|
7
7
|
function xe(e) {
|
|
@@ -28,8 +28,8 @@ function ft(e, t) {
|
|
|
28
28
|
if (typeof l == "string")
|
|
29
29
|
o[l] = e[a];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(o,
|
|
31
|
+
const m = l(a, e[a], e);
|
|
32
|
+
Object.assign(o, m);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
35
|
o[a] = e[a];
|
|
@@ -41,22 +41,22 @@ function bt(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
41
41
|
return ft(o, n);
|
|
42
42
|
}
|
|
43
43
|
function mt(e = {}) {
|
|
44
|
-
function t(v, g, r,
|
|
44
|
+
function t(v, g, r, c) {
|
|
45
45
|
if (typeof r == "number")
|
|
46
|
-
return
|
|
46
|
+
return c[v].length === r;
|
|
47
47
|
if (typeof r == "object") {
|
|
48
|
-
const h = Object.keys(r)[0],
|
|
48
|
+
const h = Object.keys(r)[0], b = r[h];
|
|
49
49
|
if (h === "not")
|
|
50
|
-
return Number(
|
|
50
|
+
return Number(c[v].length) !== Number(b);
|
|
51
51
|
if (h === "moreThan")
|
|
52
|
-
return Number(
|
|
52
|
+
return Number(c[v].length) >= Number(b);
|
|
53
53
|
if (h === "lessThan")
|
|
54
|
-
return Number(
|
|
54
|
+
return Number(c[v].length) <= Number(b);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function n(v, g, r,
|
|
59
|
-
return
|
|
58
|
+
function n(v, g, r, c) {
|
|
59
|
+
return c[v] && c[v].propertyValue && String(c[v].propertyValue.value) === String(r);
|
|
60
60
|
}
|
|
61
61
|
const o = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", t],
|
|
@@ -65,20 +65,20 @@ function mt(e = {}) {
|
|
|
65
65
|
Object.keys(e).reduce((v, g) => (v.set(g, e[g]), v), o);
|
|
66
66
|
function a(v, g) {
|
|
67
67
|
const r = v;
|
|
68
|
-
return typeof g == "number" ? [{ target: r, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: r, operator: "getProperty", param: v, value: !!g }] : typeof g == "object" ? Object.keys(g).map((
|
|
69
|
-
if (
|
|
70
|
-
return { target: r, operator: "length", param: null, value: g[
|
|
71
|
-
const h =
|
|
72
|
-
return { target: r, operator: "getProperty", param: h, value:
|
|
68
|
+
return typeof g == "number" ? [{ target: r, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: r, operator: "getProperty", param: v, value: !!g }] : typeof g == "object" ? Object.keys(g).map((c) => {
|
|
69
|
+
if (c === "length")
|
|
70
|
+
return { target: r, operator: "length", param: null, value: g[c] };
|
|
71
|
+
const h = c, b = g[c];
|
|
72
|
+
return { target: r, operator: "getProperty", param: h, value: b };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
75
|
function l(v) {
|
|
76
|
-
return Object.keys(v).reduce((r,
|
|
77
|
-
const h = a(
|
|
76
|
+
return Object.keys(v).reduce((r, c) => {
|
|
77
|
+
const h = a(c, v[c]);
|
|
78
78
|
return r.push(...h), r;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function m(v, g) {
|
|
82
82
|
if (o.has(v.operator)) {
|
|
83
83
|
const r = o.get(v.operator);
|
|
84
84
|
return r && r(v.target, v.param, v.value, g) || !1;
|
|
@@ -86,19 +86,19 @@ function mt(e = {}) {
|
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
function x(v, g) {
|
|
89
|
-
return l(v).reduce((h,
|
|
89
|
+
return l(v).reduce((h, b) => h && m(b, g), !0);
|
|
90
90
|
}
|
|
91
91
|
function T(v, g) {
|
|
92
|
-
const r = Object.keys(v),
|
|
93
|
-
return
|
|
92
|
+
const r = Object.keys(v), c = r.includes("allOf"), h = r.includes("anyOf"), b = c || h, p = (b ? v[b ? c ? "allOf" : "anyOf" : "allOf"] : [v]).map((D) => x(D, g));
|
|
93
|
+
return c ? !p.includes(!1) : p.includes(!0);
|
|
94
94
|
}
|
|
95
95
|
return { parseValueSchema: T };
|
|
96
96
|
}
|
|
97
97
|
const _e = {}, ht = {};
|
|
98
98
|
mt();
|
|
99
|
-
function de(e, t, n = /* @__PURE__ */ new Map(), o = (
|
|
100
|
-
return Te[t.title] = t, Le[t.title] = o, _e[t.title] = a, ht[t.title] = l, (
|
|
101
|
-
const x = bt(
|
|
99
|
+
function de(e, t, n = /* @__PURE__ */ new Map(), o = (m, x, T) => x, a = {}, l = (m) => m) {
|
|
100
|
+
return Te[t.title] = t, Le[t.title] = o, _e[t.title] = a, ht[t.title] = l, (m = {}) => {
|
|
101
|
+
const x = bt(m, t, n), T = Object.keys(e).reduce((v, g) => (v[g] = e[g].default, v), {});
|
|
102
102
|
return Object.assign(T, x);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
@@ -300,54 +300,54 @@ const gt = "https://json-schema.org/draft/2020-12/schema", Ct = "https://farris-
|
|
|
300
300
|
justifyContent: { type: String, default: "left" }
|
|
301
301
|
}, Ee = de(Se, Bt, vt, yt, Et);
|
|
302
302
|
function $t(e, t, n) {
|
|
303
|
-
const o = C([]), a = C(e.activeId || ""), l = C(!0),
|
|
304
|
-
function x(
|
|
305
|
-
const
|
|
306
|
-
!a.value &&
|
|
303
|
+
const o = C([]), a = C(e.activeId || ""), l = C(!0), m = C([]);
|
|
304
|
+
function x(d) {
|
|
305
|
+
const f = d.value.findIndex((p) => p.props.show !== !1 && !a.value && !p.props.disabled);
|
|
306
|
+
!a.value && f !== -1 && (a.value = d.value[f].props.id);
|
|
307
307
|
}
|
|
308
|
-
function T(
|
|
309
|
-
var
|
|
308
|
+
function T(d) {
|
|
309
|
+
var p;
|
|
310
310
|
if (e.autoTitleWidth)
|
|
311
311
|
return;
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
314
|
-
for (let
|
|
315
|
-
const
|
|
316
|
-
|
|
312
|
+
const f = (p = d.value) == null ? void 0 : p.querySelectorAll(".st-tab-text");
|
|
313
|
+
if (f)
|
|
314
|
+
for (let S = 0; S < f.length; S++) {
|
|
315
|
+
const D = f[S].parentNode;
|
|
316
|
+
f[S].scrollWidth > D.offsetWidth ? f[S].classList.contains("farris-title-text-custom") || f[S].classList.add("farris-title-text-custom") : f[S].classList.remove("farris-title-text-custom");
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
const v = (
|
|
320
|
-
|
|
319
|
+
const v = (d) => {
|
|
320
|
+
d.preventDefault(), d.stopPropagation();
|
|
321
321
|
};
|
|
322
|
-
function g(
|
|
323
|
-
const
|
|
324
|
-
o.value = o.value.filter((
|
|
325
|
-
T(n),
|
|
326
|
-
removeIndex:
|
|
327
|
-
removeId:
|
|
322
|
+
function g(d, f, p = !1) {
|
|
323
|
+
const S = o.value.findIndex((D) => D.props.id === f);
|
|
324
|
+
o.value = o.value.filter((D) => D.props.id !== f), a.value === f && (a.value = "", x(o)), v(d), oe(() => {
|
|
325
|
+
T(n), p && (l.value = !0), t.emit("tabRemove", {
|
|
326
|
+
removeIndex: S,
|
|
327
|
+
removeId: f,
|
|
328
328
|
activeId: a.value
|
|
329
329
|
});
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
function r(
|
|
333
|
-
const
|
|
334
|
-
a.value =
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
prevId:
|
|
332
|
+
function r(d) {
|
|
333
|
+
const f = a.value;
|
|
334
|
+
a.value = d;
|
|
335
|
+
const p = o.value.find((S) => S.props.id === d);
|
|
336
|
+
m.value = [], p && p.props.toolbar && p.props.toolbar.contents && p.props.toolbar.contents.length && (m.value = [...p.props.toolbar.contents]), t.emit("tabChange", {
|
|
337
|
+
prevId: f,
|
|
338
338
|
nextId: a.value
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
r(
|
|
341
|
+
function c(d) {
|
|
342
|
+
r(d);
|
|
343
343
|
}
|
|
344
|
-
function h(
|
|
345
|
-
o.value.findIndex((
|
|
344
|
+
function h(d) {
|
|
345
|
+
o.value.findIndex((p) => p.props.id === d.props.id) === -1 && o.value.push(d);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
o.value.findIndex((
|
|
349
|
-
|
|
350
|
-
}),
|
|
347
|
+
function b(d) {
|
|
348
|
+
o.value.findIndex((p) => p.props.id === d.props.id) !== -1 && (o.value.forEach((p) => {
|
|
349
|
+
p.props.id === d.props.id && (p = d);
|
|
350
|
+
}), oe(() => {
|
|
351
351
|
T(n);
|
|
352
352
|
}));
|
|
353
353
|
}
|
|
@@ -356,17 +356,17 @@ function $t(e, t, n) {
|
|
|
356
356
|
addTab: h,
|
|
357
357
|
changeTitleStyle: T,
|
|
358
358
|
removeTab: g,
|
|
359
|
-
selectTab:
|
|
359
|
+
selectTab: c,
|
|
360
360
|
selectTabByTabId: r,
|
|
361
361
|
tabPages: o,
|
|
362
|
-
updateTab:
|
|
363
|
-
toolbarItems:
|
|
362
|
+
updateTab: b,
|
|
363
|
+
toolbarItems: m
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function At(e, t, n, o, a) {
|
|
367
367
|
const {
|
|
368
368
|
activeId: l,
|
|
369
|
-
removeTab:
|
|
369
|
+
removeTab: m,
|
|
370
370
|
selectTab: x
|
|
371
371
|
} = a, T = B(() => ({
|
|
372
372
|
"st-tab-text": !0,
|
|
@@ -384,25 +384,25 @@ function At(e, t, n, o, a) {
|
|
|
384
384
|
active: t.id === l.value,
|
|
385
385
|
disabled: t.disabled
|
|
386
386
|
}));
|
|
387
|
-
function
|
|
387
|
+
function c(S) {
|
|
388
388
|
return s("span", {
|
|
389
389
|
class: T.value,
|
|
390
|
-
title:
|
|
391
|
-
}, [
|
|
390
|
+
title: S.title
|
|
391
|
+
}, [S.title]);
|
|
392
392
|
}
|
|
393
|
-
function h(
|
|
394
|
-
return
|
|
393
|
+
function h(S) {
|
|
394
|
+
return S.slots.title ? S.slots.title : c;
|
|
395
395
|
}
|
|
396
|
-
const
|
|
397
|
-
function
|
|
396
|
+
const b = h(n), d = C(t.removeable);
|
|
397
|
+
function f() {
|
|
398
398
|
return s("span", {
|
|
399
399
|
class: "st-drop-close",
|
|
400
|
-
onClick: (
|
|
400
|
+
onClick: (S) => m(S, t.id)
|
|
401
401
|
}, [s("i", {
|
|
402
402
|
class: "f-icon f-icon-close"
|
|
403
403
|
}, null)]);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function p(S) {
|
|
406
406
|
x(t.id), e.tabType === "one-page" && o.scrollToByPaggId(t.id);
|
|
407
407
|
}
|
|
408
408
|
return s("li", {
|
|
@@ -410,14 +410,14 @@ function At(e, t, n, o, a) {
|
|
|
410
410
|
style: g.value
|
|
411
411
|
}, [s("a", {
|
|
412
412
|
class: r.value,
|
|
413
|
-
onClick:
|
|
414
|
-
}, [
|
|
413
|
+
onClick: p
|
|
414
|
+
}, [b(t), d.value && f()])]);
|
|
415
415
|
}
|
|
416
416
|
function It(e, t, n, o, a) {
|
|
417
417
|
const {
|
|
418
418
|
shouldShowNavigationButtons: l
|
|
419
419
|
} = n, {
|
|
420
|
-
tabPages:
|
|
420
|
+
tabPages: m
|
|
421
421
|
} = a, x = B(() => ({
|
|
422
422
|
spacer: !0,
|
|
423
423
|
"f-utils-fill": !0,
|
|
@@ -440,7 +440,7 @@ function It(e, t, n, o, a) {
|
|
|
440
440
|
}, [s("ul", {
|
|
441
441
|
class: v.value,
|
|
442
442
|
ref: t
|
|
443
|
-
}, [
|
|
443
|
+
}, [m.value.map((g) => At(e, g.props, g, o, a))])]);
|
|
444
444
|
}
|
|
445
445
|
const Pt = "https://json-schema.org/draft/2020-12/schema", Rt = "https://farris-design.gitee.io/capsule.schema.json", Ft = "capsule", Nt = "A Farris Component", Ht = "object", Lt = {
|
|
446
446
|
id: {
|
|
@@ -575,8 +575,8 @@ const Xt = /* @__PURE__ */ te({
|
|
|
575
575
|
emits: ["mounted", "active"],
|
|
576
576
|
setup(e, t) {
|
|
577
577
|
const n = C(), o = C(e.isActive);
|
|
578
|
-
|
|
579
|
-
o.value =
|
|
578
|
+
se(() => e.isActive, (m) => {
|
|
579
|
+
o.value = m;
|
|
580
580
|
});
|
|
581
581
|
const a = B(() => ({
|
|
582
582
|
"f-capsule-item": !0,
|
|
@@ -585,8 +585,8 @@ const Xt = /* @__PURE__ */ te({
|
|
|
585
585
|
K(() => {
|
|
586
586
|
t.emit("mounted", n, e.value);
|
|
587
587
|
});
|
|
588
|
-
function l(
|
|
589
|
-
t.emit("active",
|
|
588
|
+
function l(m) {
|
|
589
|
+
t.emit("active", m, {
|
|
590
590
|
name: e.name,
|
|
591
591
|
value: e.value
|
|
592
592
|
});
|
|
@@ -594,7 +594,7 @@ const Xt = /* @__PURE__ */ te({
|
|
|
594
594
|
return () => s("div", {
|
|
595
595
|
ref: n,
|
|
596
596
|
class: a.value,
|
|
597
|
-
onClick: (
|
|
597
|
+
onClick: (m) => l(m)
|
|
598
598
|
}, [e.icon && s("i", {
|
|
599
599
|
class: e.icon
|
|
600
600
|
}, null), e.name]);
|
|
@@ -604,50 +604,50 @@ const Xt = /* @__PURE__ */ te({
|
|
|
604
604
|
props: Ve,
|
|
605
605
|
emits: ["change", "update:modelValue"],
|
|
606
606
|
setup(e, t) {
|
|
607
|
-
const n = C(e.items), o = C(), a = 2, l = C(e.modelValue),
|
|
607
|
+
const n = C(e.items), o = C(), a = 2, l = C(e.modelValue), m = C("none"), x = C(e.type), T = B(() => {
|
|
608
608
|
const w = {
|
|
609
609
|
"f-capsule-container": !0
|
|
610
610
|
};
|
|
611
611
|
return x.value && (w[x.value] = !0), w;
|
|
612
612
|
}), v = B(() => ({})), g = B(() => ({
|
|
613
613
|
"f-capsule": !0
|
|
614
|
-
})), r = C(a),
|
|
614
|
+
})), r = C(a), c = C(0), h = C(0), b = B(() => ({
|
|
615
615
|
left: `${r.value}px`,
|
|
616
|
-
width: `${
|
|
617
|
-
transition:
|
|
618
|
-
})),
|
|
616
|
+
width: `${c.value}px`,
|
|
617
|
+
transition: m.value
|
|
618
|
+
})), d = B(() => ({
|
|
619
619
|
width: `${h.value}px`
|
|
620
|
-
})),
|
|
621
|
-
function
|
|
620
|
+
})), f = /* @__PURE__ */ new Map();
|
|
621
|
+
function p(w) {
|
|
622
622
|
var k;
|
|
623
|
-
if (
|
|
624
|
-
const F = (k =
|
|
623
|
+
if (f.has(w.value)) {
|
|
624
|
+
const F = (k = f.get(w.value)) == null ? void 0 : k.value;
|
|
625
625
|
if (F) {
|
|
626
|
-
const
|
|
627
|
-
r.value =
|
|
626
|
+
const M = F.getBoundingClientRect(), i = o.value.getBoundingClientRect();
|
|
627
|
+
r.value = M.left - i.left + a + o.value.scrollLeft, c.value = M.width - 2 * a;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function S(w, k) {
|
|
632
632
|
const F = w.value;
|
|
633
|
-
l.value = F, t.emit("update:modelValue", F),
|
|
633
|
+
l.value = F, t.emit("update:modelValue", F), p(w), k && t.emit("change", F);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function D(w) {
|
|
636
636
|
const k = n.value.findIndex((F) => F.value === w);
|
|
637
|
-
k > -1 &&
|
|
637
|
+
k > -1 && S(n.value[k], !1);
|
|
638
638
|
}
|
|
639
|
-
|
|
640
|
-
l.value = w,
|
|
641
|
-
}),
|
|
642
|
-
n.value = w, await
|
|
639
|
+
se(() => e.modelValue, (w) => {
|
|
640
|
+
l.value = w, D(l.value);
|
|
641
|
+
}), se(() => e.items, async (w) => {
|
|
642
|
+
n.value = w, await oe(), D(l.value), h.value = Array.from(f.values()).reduce((k, F) => (k += F.value.clientWidth, k), 0);
|
|
643
643
|
}), K(async () => {
|
|
644
|
-
|
|
644
|
+
D(l.value), await oe(), m.value = "0.1s ease-out all", h.value = Array.from(f.values()).reduce((w, k) => (w += k.value.clientWidth, w), 0);
|
|
645
645
|
});
|
|
646
646
|
function R(w, k) {
|
|
647
|
-
|
|
647
|
+
S(k, !0);
|
|
648
648
|
}
|
|
649
649
|
function P(w, k) {
|
|
650
|
-
|
|
650
|
+
f.set(k, w);
|
|
651
651
|
}
|
|
652
652
|
function E(w, k) {
|
|
653
653
|
return s(Xt, {
|
|
@@ -667,16 +667,16 @@ const Xt = /* @__PURE__ */ te({
|
|
|
667
667
|
class: "f-capsule-pane"
|
|
668
668
|
}, [n.value.map((w, k) => E(w, k))]), s("small", {
|
|
669
669
|
class: g.value,
|
|
670
|
-
style:
|
|
670
|
+
style: b.value
|
|
671
671
|
}, null), s("div", {
|
|
672
672
|
class: "f-capsule-board",
|
|
673
|
-
style:
|
|
673
|
+
style: d.value
|
|
674
674
|
}, null)]);
|
|
675
675
|
}
|
|
676
676
|
});
|
|
677
677
|
function We(e, t, n, o, a) {
|
|
678
678
|
const l = C(), {
|
|
679
|
-
shouldShowNavigationButtons:
|
|
679
|
+
shouldShowNavigationButtons: m
|
|
680
680
|
} = n, {
|
|
681
681
|
activeId: x,
|
|
682
682
|
tabPages: T
|
|
@@ -686,7 +686,7 @@ function We(e, t, n, o, a) {
|
|
|
686
686
|
}))), g = B(() => ({
|
|
687
687
|
spacer: !0,
|
|
688
688
|
"f-utils-fill": !0,
|
|
689
|
-
"spacer-sides-dropdown":
|
|
689
|
+
"spacer-sides-dropdown": m.value
|
|
690
690
|
})), r = B(() => ({
|
|
691
691
|
width: "100%",
|
|
692
692
|
display: "flex",
|
|
@@ -695,7 +695,7 @@ function We(e, t, n, o, a) {
|
|
|
695
695
|
K(() => {
|
|
696
696
|
l.value && (t.value = l.value.$el);
|
|
697
697
|
});
|
|
698
|
-
function
|
|
698
|
+
function c() {
|
|
699
699
|
}
|
|
700
700
|
return () => s("div", {
|
|
701
701
|
class: g.value,
|
|
@@ -704,7 +704,7 @@ function We(e, t, n, o, a) {
|
|
|
704
704
|
items: v.value,
|
|
705
705
|
modelValue: x.value,
|
|
706
706
|
"onUpdate:modelValue": (h) => x.value = h,
|
|
707
|
-
onChange:
|
|
707
|
+
onChange: c,
|
|
708
708
|
ref: l
|
|
709
709
|
}, null)]);
|
|
710
710
|
}
|
|
@@ -712,69 +712,69 @@ function Kt(e, t, n, o) {
|
|
|
712
712
|
const {
|
|
713
713
|
activeId: a,
|
|
714
714
|
removeTab: l,
|
|
715
|
-
tabPages:
|
|
715
|
+
tabPages: m
|
|
716
716
|
} = o, {
|
|
717
717
|
selectAndScrollToTab: x
|
|
718
718
|
} = n, {
|
|
719
719
|
hideDropDown: T,
|
|
720
720
|
searchTabText: v
|
|
721
721
|
} = t, g = C("auto"), r = B(() => {
|
|
722
|
-
var
|
|
723
|
-
let
|
|
724
|
-
return e.searchBoxVisible ?
|
|
725
|
-
}),
|
|
722
|
+
var S, D;
|
|
723
|
+
let p = [];
|
|
724
|
+
return e.searchBoxVisible ? p = (S = m.value) == null ? void 0 : S.filter((R) => R.props.title.includes(v.value)) : p = (D = m.value) == null ? void 0 : D.slice(), p;
|
|
725
|
+
}), c = B(() => ({
|
|
726
726
|
"dropdown-menu": !0,
|
|
727
727
|
"tabs-pt28": e.searchBoxVisible,
|
|
728
728
|
show: !T.value
|
|
729
729
|
}));
|
|
730
|
-
function h(
|
|
730
|
+
function h(p) {
|
|
731
731
|
return {
|
|
732
732
|
"dropdown-item": !0,
|
|
733
733
|
"text-truncate": !0,
|
|
734
734
|
"px-2": !0,
|
|
735
|
-
disabled:
|
|
736
|
-
active:
|
|
737
|
-
"d-none":
|
|
735
|
+
disabled: p.props.disabled,
|
|
736
|
+
active: p.props.id === a.value,
|
|
737
|
+
"d-none": p.props.show !== !0
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
|
|
740
|
+
function b(p) {
|
|
741
|
+
p.preventDefault(), p.stopPropagation();
|
|
742
742
|
}
|
|
743
|
-
const
|
|
743
|
+
const d = () => ({
|
|
744
744
|
width: g.value
|
|
745
745
|
});
|
|
746
|
-
function
|
|
746
|
+
function f() {
|
|
747
747
|
return s("div", {
|
|
748
|
-
class:
|
|
748
|
+
class: c.value
|
|
749
749
|
}, [e.searchBoxVisible && s("div", {
|
|
750
|
-
onClick: (
|
|
750
|
+
onClick: (p) => b(p),
|
|
751
751
|
class: "pb-1 tabs-li-absolute"
|
|
752
752
|
}, [st(s("input", {
|
|
753
753
|
title: "search-box",
|
|
754
754
|
type: "text",
|
|
755
755
|
class: "form-control k-textbox",
|
|
756
|
-
"onUpdate:modelValue": (
|
|
756
|
+
"onUpdate:modelValue": (p) => v.value = p
|
|
757
757
|
}, null), [[at, v.value]]), s("span", {
|
|
758
758
|
class: "f-icon f-icon-page-title-query tabs-icon-search"
|
|
759
759
|
}, null)]), r.value.length ? s("ul", {
|
|
760
760
|
class: "tab-dropdown-menu--items",
|
|
761
|
-
style:
|
|
762
|
-
}, [r.value.map((
|
|
763
|
-
class: h(
|
|
764
|
-
onClick: (
|
|
765
|
-
}, [
|
|
761
|
+
style: d()
|
|
762
|
+
}, [r.value.map((p) => s("li", {
|
|
763
|
+
class: h(p),
|
|
764
|
+
onClick: (S) => x(S, p.props)
|
|
765
|
+
}, [p.props.removeable && s("span", {
|
|
766
766
|
class: "float-right st-drop-close",
|
|
767
|
-
onClick: (
|
|
767
|
+
onClick: (S) => l(S, p.props.id, !0)
|
|
768
768
|
}, [s("i", {
|
|
769
769
|
class: "f-icon f-icon-close"
|
|
770
770
|
}, null)]), s("a", {
|
|
771
771
|
class: "dropdown-title"
|
|
772
|
-
}, [
|
|
772
|
+
}, [p.props.title])]))]) : s("div", {
|
|
773
773
|
class: "dropdown-no-data"
|
|
774
774
|
}, [ie("没有相关数据")])]);
|
|
775
775
|
}
|
|
776
776
|
return {
|
|
777
|
-
renderDropdownMenu:
|
|
777
|
+
renderDropdownMenu: f
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
780
|
function ze(e, t, n, o) {
|
|
@@ -782,9 +782,9 @@ function ze(e, t, n, o) {
|
|
|
782
782
|
hideDropDown: a
|
|
783
783
|
} = t, {
|
|
784
784
|
renderDropdownMenu: l
|
|
785
|
-
} = Kt(e, t, n, o),
|
|
785
|
+
} = Kt(e, t, n, o), m = C(e.showDropdown);
|
|
786
786
|
function x() {
|
|
787
|
-
return
|
|
787
|
+
return m.value && s(we, null, [s("button", {
|
|
788
788
|
title: "toggle-button",
|
|
789
789
|
class: "btn dropdown-toggle-split dropdown-toggle",
|
|
790
790
|
onClick: () => {
|
|
@@ -797,11 +797,11 @@ function ze(e, t, n, o) {
|
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
799
|
function qe(e, t, n, o) {
|
|
800
|
-
const a = C(!1), { selectTabByTabId: l, tabPages:
|
|
800
|
+
const a = C(!1), { selectTabByTabId: l, tabPages: m } = o, x = 4;
|
|
801
801
|
function T() {
|
|
802
|
-
var
|
|
803
|
-
const
|
|
804
|
-
a.value =
|
|
802
|
+
var p;
|
|
803
|
+
const d = t.value, f = (p = t.value) == null ? void 0 : p.parentElement;
|
|
804
|
+
a.value = f && d && f.offsetWidth < d.scrollWidth - x;
|
|
805
805
|
}
|
|
806
806
|
const v = B(() => ({
|
|
807
807
|
btn: !0,
|
|
@@ -819,55 +819,55 @@ function qe(e, t, n, o) {
|
|
|
819
819
|
"sc-nav-rg": !0,
|
|
820
820
|
"d-none": !a.value
|
|
821
821
|
}));
|
|
822
|
-
function
|
|
822
|
+
function c(d, f) {
|
|
823
823
|
if (!t.value)
|
|
824
824
|
return;
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
827
|
-
if (t.value.scrollLeft >=
|
|
825
|
+
const p = t.value.scrollLeft, S = t.value.scrollWidth - t.value.offsetWidth;
|
|
826
|
+
if (f > 0) {
|
|
827
|
+
if (t.value.scrollLeft >= S)
|
|
828
828
|
return;
|
|
829
|
-
t.value.scrollLeft =
|
|
830
|
-
} else if (
|
|
829
|
+
t.value.scrollLeft = p + e.scrollStep + d;
|
|
830
|
+
} else if (f < 0) {
|
|
831
831
|
if (t.value.scrollLeft <= 0)
|
|
832
832
|
return;
|
|
833
|
-
t.value.scrollLeft =
|
|
833
|
+
t.value.scrollLeft = p - e.scrollStep - d;
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
function h(
|
|
836
|
+
function h(d) {
|
|
837
837
|
if (!a.value || !t.value)
|
|
838
838
|
return;
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
841
|
-
const R =
|
|
842
|
-
E < R ?
|
|
839
|
+
const f = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", p = t.value.querySelectorAll(f), { parentElement: S } = t.value, D = p[d];
|
|
840
|
+
if (D && S) {
|
|
841
|
+
const R = S.getBoundingClientRect().left, P = S.getBoundingClientRect().right, E = D.getBoundingClientRect().left, w = D.getBoundingClientRect().right;
|
|
842
|
+
E < R ? c(R - E, -1) : P < w && c(w - P, 1), e.tabType === "one-page" && n.scrollTo(d);
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
if (
|
|
845
|
+
function b(d, f) {
|
|
846
|
+
if (f.disabled)
|
|
847
847
|
return;
|
|
848
|
-
l(
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
h(
|
|
848
|
+
l(f.id);
|
|
849
|
+
const p = m.value.findIndex((S) => S.props.id === f.id);
|
|
850
|
+
oe(() => {
|
|
851
|
+
h(p);
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
return {
|
|
855
855
|
previousButtonClass: v,
|
|
856
856
|
nextButtonGroupClass: g,
|
|
857
857
|
nextButtonClass: r,
|
|
858
|
-
scrollTab:
|
|
859
|
-
selectAndScrollToTab:
|
|
858
|
+
scrollTab: c,
|
|
859
|
+
selectAndScrollToTab: b,
|
|
860
860
|
shouldShowNavigationButtons: a,
|
|
861
861
|
updateNavigationLayout: T
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
864
|
function Ue(e, t) {
|
|
865
|
-
const { tabPages: n } = t, o = C(""), a = C(!0), l = B(() => e.searchBoxVisible),
|
|
865
|
+
const { tabPages: n } = t, o = C(""), a = C(!0), l = B(() => e.searchBoxVisible), m = B(() => l.value ? n.value.filter((T) => T.props.title.includes(o.value)) : n.value.slice());
|
|
866
866
|
return {
|
|
867
867
|
searchTabText: o,
|
|
868
868
|
hideDropDown: a,
|
|
869
869
|
shouldShowSearchBox: l,
|
|
870
|
-
tabsInDropdownMenu:
|
|
870
|
+
tabsInDropdownMenu: m
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
function Ge(e, t, n) {
|
|
@@ -877,16 +877,16 @@ function Ge(e, t, n) {
|
|
|
877
877
|
if (T) {
|
|
878
878
|
const v = t.value.querySelectorAll(o);
|
|
879
879
|
if (v.length > 0) {
|
|
880
|
-
const g = v[x], { offsetTop: r } = g,
|
|
881
|
-
T.scrollTop =
|
|
880
|
+
const g = v[x], { offsetTop: r } = g, c = r - 32 > 0 ? r - 32 : 0;
|
|
881
|
+
T.scrollTop = c;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function m(x) {
|
|
886
886
|
const T = a.value.findIndex((v) => v.props.id === x);
|
|
887
887
|
T > -1 && l(T);
|
|
888
888
|
}
|
|
889
|
-
return { scrollTo: l, scrollToByPaggId:
|
|
889
|
+
return { scrollTo: l, scrollToByPaggId: m };
|
|
890
890
|
}
|
|
891
891
|
const en = /* @__PURE__ */ new Map([
|
|
892
892
|
["buttons", "items"]
|
|
@@ -1200,7 +1200,7 @@ function Ze() {
|
|
|
1200
1200
|
};
|
|
1201
1201
|
if (n.icon) {
|
|
1202
1202
|
const a = n.icon.trim().split(" ");
|
|
1203
|
-
a && a.length && a.reduce((l,
|
|
1203
|
+
a && a.length && a.reduce((l, m) => (l[m] = !0, l), o);
|
|
1204
1204
|
}
|
|
1205
1205
|
return o;
|
|
1206
1206
|
}
|
|
@@ -1211,103 +1211,103 @@ function Ze() {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
function Mn(e) {
|
|
1213
1213
|
function t(r) {
|
|
1214
|
-
const
|
|
1214
|
+
const c = {
|
|
1215
1215
|
"dropdown-menu": !0
|
|
1216
1216
|
};
|
|
1217
1217
|
if (r.class) {
|
|
1218
1218
|
const h = r.menuClass.split(" ");
|
|
1219
|
-
h && h.length && h.reduce((
|
|
1219
|
+
h && h.length && h.reduce((b, d) => (b[d] = !0, b), c);
|
|
1220
1220
|
}
|
|
1221
|
-
return
|
|
1221
|
+
return c;
|
|
1222
1222
|
}
|
|
1223
1223
|
function n(r) {
|
|
1224
|
-
const
|
|
1224
|
+
const c = {
|
|
1225
1225
|
disabled: !r.enable,
|
|
1226
1226
|
"dropdown-submenu": !0,
|
|
1227
1227
|
"f-rt-dropdown": !0
|
|
1228
1228
|
}, h = r.dropdownClass.split(" ");
|
|
1229
|
-
return h && h.length && h.reduce((
|
|
1229
|
+
return h && h.length && h.reduce((b, d) => (b[d] = !0, b), c), c;
|
|
1230
1230
|
}
|
|
1231
1231
|
function o(r) {
|
|
1232
|
-
const
|
|
1232
|
+
const c = {
|
|
1233
1233
|
disabled: !r.enable,
|
|
1234
1234
|
"dropdown-item": !0,
|
|
1235
1235
|
"f-rt-btn": !0
|
|
1236
1236
|
}, h = r.class.split(" ");
|
|
1237
|
-
return h && h.length && h.reduce((
|
|
1237
|
+
return h && h.length && h.reduce((b, d) => (b[d] = !0, b), c), c;
|
|
1238
1238
|
}
|
|
1239
1239
|
let a;
|
|
1240
1240
|
const l = /* @__PURE__ */ new Map();
|
|
1241
|
-
function
|
|
1242
|
-
var
|
|
1243
|
-
((
|
|
1244
|
-
const
|
|
1245
|
-
if (
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1241
|
+
function m(r, c, h) {
|
|
1242
|
+
var d;
|
|
1243
|
+
((d = r.target) == null ? void 0 : d.id) === c.id && r.stopPropagation();
|
|
1244
|
+
const b = h ? h.id : "__top_item__";
|
|
1245
|
+
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? l.set(b, c) : l.delete(b)), l.has(b) && l.get(b) !== c) {
|
|
1246
|
+
const f = l.get(b);
|
|
1247
|
+
f && (f.expanded = !1);
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
function x(r,
|
|
1251
|
-
document.body.click(),
|
|
1250
|
+
function x(r, c) {
|
|
1251
|
+
document.body.click(), c.enable && c.onClick(r, c.id);
|
|
1252
1252
|
}
|
|
1253
1253
|
function T(r) {
|
|
1254
|
-
return r.children.map((
|
|
1255
|
-
class: n(
|
|
1256
|
-
id:
|
|
1257
|
-
onClick: (h) =>
|
|
1254
|
+
return r.children.map((c) => c.children && c.children.length ? s("li", {
|
|
1255
|
+
class: n(c),
|
|
1256
|
+
id: c.id,
|
|
1257
|
+
onClick: (h) => c.enable && m(h, c, r)
|
|
1258
1258
|
}, [s("span", {
|
|
1259
|
-
id:
|
|
1260
|
-
class: o(
|
|
1261
|
-
onMouseover: (h) =>
|
|
1262
|
-
}, [
|
|
1259
|
+
id: c.id,
|
|
1260
|
+
class: o(c),
|
|
1261
|
+
onMouseover: (h) => c.enable && m(h, c, r)
|
|
1262
|
+
}, [c.text, s("i", {
|
|
1263
1263
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1264
1264
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1265
|
-
}, null)]), a(
|
|
1266
|
-
class: o(
|
|
1267
|
-
id:
|
|
1268
|
-
onClick: (h) => x(h,
|
|
1269
|
-
onMouseover: (h) =>
|
|
1270
|
-
}, [e.shouldShowIcon(
|
|
1271
|
-
class: e.iconClass(
|
|
1272
|
-
}, null),
|
|
1273
|
-
}
|
|
1274
|
-
function v(r,
|
|
1275
|
-
const
|
|
1265
|
+
}, null)]), a(c, c)]) : s("li", {
|
|
1266
|
+
class: o(c),
|
|
1267
|
+
id: c.id,
|
|
1268
|
+
onClick: (h) => x(h, c),
|
|
1269
|
+
onMouseover: (h) => c.enable && m(h, c, r)
|
|
1270
|
+
}, [e.shouldShowIcon(c) && s("i", {
|
|
1271
|
+
class: e.iconClass(c)
|
|
1272
|
+
}, null), c.text]));
|
|
1273
|
+
}
|
|
1274
|
+
function v(r, c, h) {
|
|
1275
|
+
const b = {
|
|
1276
1276
|
display: r.expanded ? "block" : "none",
|
|
1277
1277
|
position: "fixed",
|
|
1278
1278
|
maxWidth: "300px",
|
|
1279
1279
|
width: "auto",
|
|
1280
1280
|
minWidth: "120px"
|
|
1281
|
-
},
|
|
1282
|
-
if (
|
|
1281
|
+
}, d = document.getElementsByTagName("body")[0].getClientRects()[0].width, f = c, p = f == null ? void 0 : f.getClientRects();
|
|
1282
|
+
if (f && p && p.length) {
|
|
1283
1283
|
const {
|
|
1284
|
-
top:
|
|
1285
|
-
width:
|
|
1284
|
+
top: S,
|
|
1285
|
+
width: D,
|
|
1286
1286
|
left: R,
|
|
1287
1287
|
right: P,
|
|
1288
1288
|
height: E
|
|
1289
|
-
} =
|
|
1290
|
-
|
|
1291
|
-
const k = r.id + "_menu", F =
|
|
1289
|
+
} = p[0], w = Math.ceil(E + S);
|
|
1290
|
+
b.top = `${w}px`, b.left = `${R}px`;
|
|
1291
|
+
const k = r.id + "_menu", F = c ? c.querySelector("#" + k) : null;
|
|
1292
1292
|
if (F) {
|
|
1293
|
-
|
|
1294
|
-
const
|
|
1293
|
+
b.display === "block" && (F.style.display = "block");
|
|
1294
|
+
const M = F.getBoundingClientRect();
|
|
1295
1295
|
if (h) {
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1296
|
+
b.top = `${S - 6}px`;
|
|
1297
|
+
const i = Math.ceil(D + R);
|
|
1298
|
+
b.left = `${i}px`;
|
|
1299
1299
|
}
|
|
1300
|
-
|
|
1300
|
+
d - R - D < M.width && (b.left = `${(h ? R : P) - M.width}px`);
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
return
|
|
1303
|
+
return b;
|
|
1304
1304
|
}
|
|
1305
|
-
a = function(r,
|
|
1306
|
-
var
|
|
1307
|
-
const h = Ne(),
|
|
1305
|
+
a = function(r, c) {
|
|
1306
|
+
var f, p;
|
|
1307
|
+
const h = Ne(), b = c ? c.id : r.id, d = (p = (f = h == null ? void 0 : h.exposed) == null ? void 0 : f.elementRef.value) == null ? void 0 : p.querySelector("#" + b);
|
|
1308
1308
|
return s("ul", {
|
|
1309
1309
|
class: t(r),
|
|
1310
|
-
style: v(r,
|
|
1310
|
+
style: v(r, d, c),
|
|
1311
1311
|
id: r.id + "_menu"
|
|
1312
1312
|
}, [T(r)]);
|
|
1313
1313
|
};
|
|
@@ -1332,10 +1332,10 @@ function On(e, t) {
|
|
|
1332
1332
|
"f-rt-dropdown": !0,
|
|
1333
1333
|
"f-btn-ml": n.value === "right",
|
|
1334
1334
|
"f-btn-mr": n.value === "left"
|
|
1335
|
-
},
|
|
1336
|
-
return
|
|
1335
|
+
}, c = g.dropdownClass.split(" ");
|
|
1336
|
+
return c && c.length && c.reduce((h, b) => (h[b] = !0, h), r), r;
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function m(g) {
|
|
1339
1339
|
const r = {
|
|
1340
1340
|
btn: !0,
|
|
1341
1341
|
disabled: !g.enable,
|
|
@@ -1343,22 +1343,22 @@ function On(e, t) {
|
|
|
1343
1343
|
"btn-icontext": !!(g.icon && g.icon.trim())
|
|
1344
1344
|
};
|
|
1345
1345
|
if (g.class) {
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1346
|
+
const c = g.class.split(" ");
|
|
1347
|
+
c && c.length && c.reduce((h, b) => (h[b] = !0, h), r);
|
|
1348
1348
|
}
|
|
1349
1349
|
return r;
|
|
1350
1350
|
}
|
|
1351
1351
|
function x(g, r) {
|
|
1352
1352
|
g.stopPropagation();
|
|
1353
|
-
const
|
|
1354
|
-
document.body.click(), r.expanded = !
|
|
1353
|
+
const c = r.expanded;
|
|
1354
|
+
document.body.click(), r.expanded = !c;
|
|
1355
1355
|
}
|
|
1356
1356
|
function T(g) {
|
|
1357
1357
|
return s("div", {
|
|
1358
1358
|
id: g.id,
|
|
1359
1359
|
class: l(g)
|
|
1360
1360
|
}, [s("div", {
|
|
1361
|
-
class:
|
|
1361
|
+
class: m(g),
|
|
1362
1362
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1363
1363
|
onClick: (r) => g.enable && x(r, g)
|
|
1364
1364
|
}, [t.shouldShowIcon(g) && s("i", {
|
|
@@ -1383,7 +1383,7 @@ const {
|
|
|
1383
1383
|
props: je,
|
|
1384
1384
|
emits: [],
|
|
1385
1385
|
setup(e, t) {
|
|
1386
|
-
const n = C(Ie(e.items)), o = C(), a = C(), l = C(),
|
|
1386
|
+
const n = C(Ie(e.items)), o = C(), a = C(), l = C(), m = C(e.alignment), x = {
|
|
1387
1387
|
id: "__more_buttons__",
|
|
1388
1388
|
text: "更多"
|
|
1389
1389
|
}, T = C(new ce(x)), v = Ze(), g = B(() => T.value.children.length > 0), r = B(() => {
|
|
@@ -1394,64 +1394,64 @@ const {
|
|
|
1394
1394
|
};
|
|
1395
1395
|
if (e.customClass) {
|
|
1396
1396
|
const k = e.customClass.split(" ");
|
|
1397
|
-
k && k.length && k.reduce((F,
|
|
1397
|
+
k && k.length && k.reduce((F, M) => (F[M] = !0, F), w);
|
|
1398
1398
|
}
|
|
1399
1399
|
return w;
|
|
1400
|
-
}),
|
|
1400
|
+
}), c = B(() => ({
|
|
1401
1401
|
"d-flex": !0,
|
|
1402
1402
|
"flex-nowrap": !0,
|
|
1403
|
-
"justify-content-end":
|
|
1404
|
-
"justify-content-start":
|
|
1403
|
+
"justify-content-end": m.value === "right",
|
|
1404
|
+
"justify-content-start": m.value === "left"
|
|
1405
1405
|
})), {
|
|
1406
1406
|
renderToolbarDropdown: h,
|
|
1407
|
-
clearAllDropDown:
|
|
1407
|
+
clearAllDropDown: b
|
|
1408
1408
|
} = On(e, v);
|
|
1409
|
-
function
|
|
1409
|
+
function d() {
|
|
1410
1410
|
n.value.filter((w) => w.children && w.children.length > 0).forEach((w) => {
|
|
1411
1411
|
w.expanded = !1;
|
|
1412
|
-
}), T.value.expanded = !1,
|
|
1412
|
+
}), T.value.expanded = !1, b();
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1414
|
+
function f(w) {
|
|
1415
1415
|
const k = {
|
|
1416
1416
|
btn: !0,
|
|
1417
1417
|
"f-rt-btn": !0,
|
|
1418
|
-
"f-btn-ml":
|
|
1419
|
-
"f-btn-mr":
|
|
1418
|
+
"f-btn-ml": m.value === "right",
|
|
1419
|
+
"f-btn-mr": m.value === "left",
|
|
1420
1420
|
"btn-icontext": !!(w.icon && w.icon.trim())
|
|
1421
1421
|
};
|
|
1422
1422
|
if (w.class) {
|
|
1423
1423
|
const F = w.class.split(" ");
|
|
1424
|
-
F && F.length && F.reduce((
|
|
1424
|
+
F && F.length && F.reduce((M, i) => (M[i] = !0, M), k);
|
|
1425
1425
|
}
|
|
1426
1426
|
return k;
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1428
|
+
function p(w, k) {
|
|
1429
1429
|
document.body.click(), k.onClick(w, k.id);
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function S(w) {
|
|
1432
1432
|
return s("button", {
|
|
1433
1433
|
type: "button",
|
|
1434
|
-
class:
|
|
1434
|
+
class: f(w),
|
|
1435
1435
|
id: w.id,
|
|
1436
1436
|
disabled: !w.enable,
|
|
1437
|
-
onClick: (k) =>
|
|
1437
|
+
onClick: (k) => p(k, w)
|
|
1438
1438
|
}, [v.shouldShowIcon(w) && s("i", {
|
|
1439
1439
|
class: v.iconClass(w)
|
|
1440
1440
|
}, null), w.text]);
|
|
1441
1441
|
}
|
|
1442
|
-
const
|
|
1442
|
+
const D = /* @__PURE__ */ new Map(), R = [];
|
|
1443
1443
|
function P(w) {
|
|
1444
1444
|
const k = l.value;
|
|
1445
1445
|
let F = w;
|
|
1446
|
-
const
|
|
1447
|
-
if (
|
|
1448
|
-
const A =
|
|
1446
|
+
const M = Array.from(k.children), i = M[M.length - 1].id === "__more_buttons__" ? M[M.length - 1] : null;
|
|
1447
|
+
if (i) {
|
|
1448
|
+
const A = i.computedStyleMap().get("margin-left"), L = i.computedStyleMap().get("margin-right"), q = (A ? A.value : 0) + i.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1449
1449
|
F -= q;
|
|
1450
1450
|
}
|
|
1451
|
-
const y =
|
|
1451
|
+
const y = M.filter((A) => A.id !== "__more_buttons__");
|
|
1452
1452
|
for (const A of y) {
|
|
1453
1453
|
const L = A.computedStyleMap().get("margin-left"), q = A.computedStyleMap().get("margin-right"), X = (L ? L.value : 0) + A.getBoundingClientRect().width + (q ? q.value : 0);
|
|
1454
|
-
F < X ? (
|
|
1454
|
+
F < X ? (D.set(A.id, !0), R.push({
|
|
1455
1455
|
id: A.id,
|
|
1456
1456
|
width: X
|
|
1457
1457
|
})) : F -= X;
|
|
@@ -1460,27 +1460,27 @@ const {
|
|
|
1460
1460
|
for (let A = R.length - 1; A >= 0; A--) {
|
|
1461
1461
|
const L = R[A].width;
|
|
1462
1462
|
if (F >= L)
|
|
1463
|
-
F -= L,
|
|
1463
|
+
F -= L, D.delete(R[A].id), R.pop();
|
|
1464
1464
|
else
|
|
1465
1465
|
break;
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1470
|
-
T.value =
|
|
1467
|
+
const u = Object.assign({}, T.value);
|
|
1468
|
+
u.children = [];
|
|
1469
|
+
const j = new ce(u), $ = n.value.reduce((A, L) => (D.has(L.id) && j.children.push(L), L.visible = !D.has(L.id), A.push(L), A), []);
|
|
1470
|
+
T.value = j, n.value = $;
|
|
1471
1471
|
}
|
|
1472
1472
|
const E = new ResizeObserver((w) => {
|
|
1473
1473
|
if (w.length) {
|
|
1474
|
-
const F = w[0].contentRect.width,
|
|
1475
|
-
(F <
|
|
1474
|
+
const F = w[0].contentRect.width, i = l.value.getBoundingClientRect().width;
|
|
1475
|
+
(F < i || R.length) && (P(F), d());
|
|
1476
1476
|
}
|
|
1477
1477
|
});
|
|
1478
1478
|
return K(() => {
|
|
1479
1479
|
const w = a.value;
|
|
1480
|
-
E.observe(w), document.body.addEventListener("click",
|
|
1480
|
+
E.observe(w), document.body.addEventListener("click", d), document.body.addEventListener("wheel", d);
|
|
1481
1481
|
}), ue(() => {
|
|
1482
|
-
E.disconnect(), document.body.removeEventListener("click",
|
|
1483
|
-
}),
|
|
1482
|
+
E.disconnect(), document.body.removeEventListener("click", d), document.body.removeEventListener("wheel", d);
|
|
1483
|
+
}), se(() => e.items, () => {
|
|
1484
1484
|
n.value = Ie(e.items);
|
|
1485
1485
|
}), t.expose({
|
|
1486
1486
|
elementRef: o
|
|
@@ -1489,35 +1489,35 @@ const {
|
|
|
1489
1489
|
ref: o
|
|
1490
1490
|
}, [s("div", {
|
|
1491
1491
|
ref: a,
|
|
1492
|
-
class:
|
|
1492
|
+
class: c.value
|
|
1493
1493
|
}, [s("div", {
|
|
1494
1494
|
ref: l,
|
|
1495
1495
|
class: "d-inline-block f-response-content",
|
|
1496
1496
|
style: "white-space: nowrap;"
|
|
1497
|
-
}, [n.value.filter((w) => w.visible).map((w) => w.children && w.children.length > 0 ? h(w) :
|
|
1497
|
+
}, [n.value.filter((w) => w.visible).map((w) => w.children && w.children.length > 0 ? h(w) : S(w)), g.value && h(T.value)])])]);
|
|
1498
1498
|
}
|
|
1499
1499
|
}), ve = /* @__PURE__ */ te({
|
|
1500
1500
|
name: "FTabs",
|
|
1501
1501
|
props: Se,
|
|
1502
1502
|
emits: ["tabChange", "tabRemove"],
|
|
1503
1503
|
setup(e, t) {
|
|
1504
|
-
const n = C(e.tabType), o = re(), a = C(e.customClass), l = re(),
|
|
1504
|
+
const n = C(e.tabType), o = re(), a = C(e.customClass), l = re(), m = re(), x = $t(e, t, l), {
|
|
1505
1505
|
activeId: T,
|
|
1506
1506
|
changeTitleStyle: v,
|
|
1507
1507
|
tabPages: g,
|
|
1508
1508
|
addTab: r,
|
|
1509
|
-
updateTab:
|
|
1509
|
+
updateTab: c,
|
|
1510
1510
|
selectTabByTabId: h,
|
|
1511
|
-
toolbarItems:
|
|
1512
|
-
} = x,
|
|
1513
|
-
previousButtonClass:
|
|
1514
|
-
nextButtonClass:
|
|
1515
|
-
nextButtonGroupClass:
|
|
1511
|
+
toolbarItems: b
|
|
1512
|
+
} = x, d = Ge(e, m, x), f = qe(e, l, d, x), {
|
|
1513
|
+
previousButtonClass: p,
|
|
1514
|
+
nextButtonClass: S,
|
|
1515
|
+
nextButtonGroupClass: D,
|
|
1516
1516
|
scrollTab: R,
|
|
1517
1517
|
updateNavigationLayout: P
|
|
1518
|
-
} =
|
|
1518
|
+
} = f, E = Ue(e, x), {
|
|
1519
1519
|
hideDropDown: w
|
|
1520
|
-
} = E, k = It(e, l,
|
|
1520
|
+
} = E, k = It(e, l, f, d, x), F = k, M = We(e, l, f, d, x), i = /* @__PURE__ */ new Map([["default", k], ["one-page", F], ["pills", M]]);
|
|
1521
1521
|
B(() => {
|
|
1522
1522
|
const H = g.value.find((V) => V.props.id === T.value);
|
|
1523
1523
|
return H == null ? void 0 : H.slots;
|
|
@@ -1525,27 +1525,27 @@ const {
|
|
|
1525
1525
|
const y = B(() => {
|
|
1526
1526
|
const H = g.value.find((W) => W.props.id === T.value);
|
|
1527
1527
|
return (H == null ? void 0 : H.props.toolbarPosition) === "inHead";
|
|
1528
|
-
}),
|
|
1528
|
+
}), u = B(() => e.fill || e.tabType === "fill");
|
|
1529
1529
|
be("tabs", {
|
|
1530
1530
|
activeId: T,
|
|
1531
1531
|
addTab: r,
|
|
1532
|
-
updateTab:
|
|
1532
|
+
updateTab: c,
|
|
1533
1533
|
tabPages: g,
|
|
1534
1534
|
tabType: n,
|
|
1535
|
-
shouldFillParentContaner:
|
|
1535
|
+
shouldFillParentContaner: u
|
|
1536
1536
|
});
|
|
1537
|
-
const
|
|
1537
|
+
const j = B(() => e.tabType === "pills"), $ = B(() => ({
|
|
1538
1538
|
"farris-tabs-header": !0,
|
|
1539
1539
|
"farris-tabs-inHead": y.value,
|
|
1540
1540
|
"farris-tabs-inContent": !y.value,
|
|
1541
|
-
"farris-tabs-nav-fill":
|
|
1542
|
-
"farris-tabs-nav-pills":
|
|
1541
|
+
"farris-tabs-nav-fill": u.value,
|
|
1542
|
+
"farris-tabs-nav-pills": j.value
|
|
1543
1543
|
})), A = B(() => ({
|
|
1544
1544
|
width: y.value && e.titleWidth ? `${e.titleWidth}%` : ""
|
|
1545
1545
|
})), L = B(() => {
|
|
1546
1546
|
const H = {
|
|
1547
1547
|
"farris-tabs": !0,
|
|
1548
|
-
"f-utils-fill-flex-column":
|
|
1548
|
+
"f-utils-fill-flex-column": u.value,
|
|
1549
1549
|
"flex-column": e.position === "top",
|
|
1550
1550
|
"flex-column-reverse": e.position === "bottom",
|
|
1551
1551
|
"flex-row": e.position === "left",
|
|
@@ -1555,7 +1555,7 @@ const {
|
|
|
1555
1555
|
return a.value && a.value.split(" ").reduce((V, W) => (V[W] = !0, V), H), H;
|
|
1556
1556
|
});
|
|
1557
1557
|
K(() => {
|
|
1558
|
-
g.value.length && (T.value = e.activeId || g.value[0].props.id, h(T.value)),
|
|
1558
|
+
g.value.length && (T.value = e.activeId || g.value[0].props.id, h(T.value)), oe(() => {
|
|
1559
1559
|
P();
|
|
1560
1560
|
}), v(l), window.addEventListener("click", (H) => {
|
|
1561
1561
|
var V;
|
|
@@ -1568,7 +1568,7 @@ const {
|
|
|
1568
1568
|
return s("button", {
|
|
1569
1569
|
title: "left-arrow-button",
|
|
1570
1570
|
type: "button",
|
|
1571
|
-
class:
|
|
1571
|
+
class: p.value,
|
|
1572
1572
|
onClick: () => {
|
|
1573
1573
|
R(0, -1);
|
|
1574
1574
|
}
|
|
@@ -1578,7 +1578,7 @@ const {
|
|
|
1578
1578
|
return s("button", {
|
|
1579
1579
|
title: "right-arrow-button",
|
|
1580
1580
|
type: "button",
|
|
1581
|
-
class:
|
|
1581
|
+
class: S.value,
|
|
1582
1582
|
onClick: () => {
|
|
1583
1583
|
R(0, 1);
|
|
1584
1584
|
}
|
|
@@ -1586,16 +1586,16 @@ const {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
const {
|
|
1588
1588
|
renderMorePagesButtton: J
|
|
1589
|
-
} = ze(e, E,
|
|
1589
|
+
} = ze(e, E, f, x), Z = (H) => {
|
|
1590
1590
|
t.emit("Click", H);
|
|
1591
1591
|
};
|
|
1592
|
-
function
|
|
1593
|
-
return
|
|
1594
|
-
items:
|
|
1592
|
+
function ne() {
|
|
1593
|
+
return b.value.length ? s(Qe, {
|
|
1594
|
+
items: b.value,
|
|
1595
1595
|
onClick: Z
|
|
1596
1596
|
}, null) : null;
|
|
1597
1597
|
}
|
|
1598
|
-
const _ =
|
|
1598
|
+
const _ = i.get(e.tabType) || i.get("default");
|
|
1599
1599
|
function O() {
|
|
1600
1600
|
var H, V, W, z;
|
|
1601
1601
|
return s("div", {
|
|
@@ -1606,20 +1606,20 @@ const {
|
|
|
1606
1606
|
class: "farris-tabs-title scroll-tabs",
|
|
1607
1607
|
style: A.value
|
|
1608
1608
|
}, [q(), _ && _(), s("div", {
|
|
1609
|
-
class:
|
|
1610
|
-
}, [X(), J()])]),
|
|
1609
|
+
class: D.value
|
|
1610
|
+
}, [X(), J()])]), ne(), s("div", {
|
|
1611
1611
|
class: "farris-tabs-header-post"
|
|
1612
1612
|
}, [(z = (W = t.slots).headerSuffix) == null ? void 0 : z.call(W)])]);
|
|
1613
1613
|
}
|
|
1614
1614
|
const I = B(() => ({
|
|
1615
1615
|
"farris-tabs-content": !0,
|
|
1616
|
-
"f-utils-fill-flex-column":
|
|
1616
|
+
"f-utils-fill-flex-column": u.value
|
|
1617
1617
|
}));
|
|
1618
1618
|
function N() {
|
|
1619
1619
|
var H, V;
|
|
1620
1620
|
return s("div", {
|
|
1621
1621
|
class: I.value,
|
|
1622
|
-
ref:
|
|
1622
|
+
ref: m
|
|
1623
1623
|
}, [(V = (H = t.slots).default) == null ? void 0 : V.call(H)]);
|
|
1624
1624
|
}
|
|
1625
1625
|
return () => s("div", {
|
|
@@ -2254,14 +2254,14 @@ de(Xe, oo, Jn, Zn, co);
|
|
|
2254
2254
|
function io(e, t, n) {
|
|
2255
2255
|
let o;
|
|
2256
2256
|
function a() {
|
|
2257
|
-
!e || !t.value || (n.value = !n.value, n.value ? l() :
|
|
2257
|
+
!e || !t.value || (n.value = !n.value, n.value ? l() : m());
|
|
2258
2258
|
}
|
|
2259
2259
|
function l() {
|
|
2260
2260
|
o = e.value.nextElementSibling;
|
|
2261
2261
|
const T = document && document.querySelector("body");
|
|
2262
2262
|
T && (T.appendChild(e.value), e.value.style.zIndex = x());
|
|
2263
2263
|
}
|
|
2264
|
-
function
|
|
2264
|
+
function m() {
|
|
2265
2265
|
o ? t.value.insertBefore(
|
|
2266
2266
|
e.value,
|
|
2267
2267
|
o
|
|
@@ -2278,10 +2278,10 @@ function io(e, t, n) {
|
|
|
2278
2278
|
"body>.popover.show",
|
|
2279
2279
|
"body>filter-row-panel>.f-datagrid-filter-panel",
|
|
2280
2280
|
"body>.f-section-maximize"
|
|
2281
|
-
], g = Array.from(document.body.querySelectorAll(v.join(","))).filter((
|
|
2282
|
-
const { display: h, zIndex:
|
|
2283
|
-
return h === "none" ? 0 : parseInt(
|
|
2284
|
-
}).filter((
|
|
2281
|
+
], g = Array.from(document.body.querySelectorAll(v.join(","))).filter((c) => c).map((c) => {
|
|
2282
|
+
const { display: h, zIndex: b } = window.getComputedStyle(c);
|
|
2283
|
+
return h === "none" ? 0 : parseInt(b, 10);
|
|
2284
|
+
}).filter((c) => c);
|
|
2285
2285
|
let r = Math.max(...g);
|
|
2286
2286
|
return r < 1040 && (r = 1040), r + T;
|
|
2287
2287
|
}
|
|
@@ -2291,29 +2291,29 @@ function Ye(e, t) {
|
|
|
2291
2291
|
const n = C(e.buttons), o = B(() => e.buttonPosition === "inHead" ? "right" : "left"), a = B(() => "f-section-toolbar" + (e.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), l = B(() => {
|
|
2292
2292
|
e.buttons && e.buttons.length > 0 && e.buttonPosition;
|
|
2293
2293
|
});
|
|
2294
|
-
function
|
|
2294
|
+
function m(x) {
|
|
2295
2295
|
t.emit("Click", x);
|
|
2296
2296
|
}
|
|
2297
2297
|
return () => l && s(Qe, {
|
|
2298
2298
|
customClass: a.value,
|
|
2299
2299
|
items: n.value,
|
|
2300
|
-
onClick:
|
|
2300
|
+
onClick: m,
|
|
2301
2301
|
alignment: o.value
|
|
2302
2302
|
}, null);
|
|
2303
2303
|
}
|
|
2304
2304
|
function uo(e, t, n, o, a, l) {
|
|
2305
|
-
const
|
|
2305
|
+
const m = C(e.mainTitle), x = C(e.subTitle), T = B(() => e.buttonPosition), v = Ye(e, t), {
|
|
2306
2306
|
onClickMaxMinIcon: g
|
|
2307
|
-
} = io(o, a, l), r = B(() => !!e.subTitle),
|
|
2307
|
+
} = io(o, a, l), r = B(() => !!e.subTitle), c = B(() => e.enableMaximize), h = B(() => e.enableAccordion != ""), b = B(() => {
|
|
2308
2308
|
const P = {
|
|
2309
2309
|
"f-section-header": !0
|
|
2310
2310
|
};
|
|
2311
2311
|
return t.slots.header && e.headerClass.split(" ").reduce((w, k) => (w[k] = !0, w), P), P;
|
|
2312
2312
|
});
|
|
2313
|
-
function
|
|
2313
|
+
function d(P) {
|
|
2314
2314
|
P.stopPropagation(), e.enableAccordion !== "" && (n.value = !n.value);
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function f() {
|
|
2317
2317
|
const P = B(() => ({
|
|
2318
2318
|
btn: !0,
|
|
2319
2319
|
"f-btn-collapse-expand": !0,
|
|
@@ -2326,28 +2326,28 @@ function uo(e, t, n, o, a, l) {
|
|
|
2326
2326
|
}));
|
|
2327
2327
|
return s("div", {
|
|
2328
2328
|
class: "f-max-accordion"
|
|
2329
|
-
}, [
|
|
2329
|
+
}, [c.value ? s("span", {
|
|
2330
2330
|
class: E.value,
|
|
2331
2331
|
onClick: g
|
|
2332
2332
|
}, null) : "", h.value ? s("button", {
|
|
2333
2333
|
class: P.value,
|
|
2334
|
-
onClick:
|
|
2334
|
+
onClick: d
|
|
2335
2335
|
}, [s("span", null, [n.value ? e.collapseLabel : e.expandLabel])]) : ""]);
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function p() {
|
|
2338
2338
|
return t.slots.header ? s("div", {
|
|
2339
|
-
class:
|
|
2339
|
+
class: b.value
|
|
2340
2340
|
}, [t.slots.header()]) : "";
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function S() {
|
|
2343
2343
|
return s("div", {
|
|
2344
2344
|
class: "f-title",
|
|
2345
|
-
onClick:
|
|
2345
|
+
onClick: d
|
|
2346
2346
|
}, [s("h4", {
|
|
2347
2347
|
class: "f-title-text"
|
|
2348
|
-
}, [
|
|
2348
|
+
}, [m.value]), r.value && s("span", null, [x.value])]);
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function D() {
|
|
2351
2351
|
const P = B(() => {
|
|
2352
2352
|
const E = {
|
|
2353
2353
|
"f-content": !0
|
|
@@ -2360,10 +2360,10 @@ function uo(e, t, n, o, a, l) {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
function R() {
|
|
2362
2362
|
return s("div", {
|
|
2363
|
-
class:
|
|
2364
|
-
}, [t.slots.headerTitle ? t.slots.headerTitle() :
|
|
2363
|
+
class: b.value
|
|
2364
|
+
}, [t.slots.headerTitle ? t.slots.headerTitle() : S(), D(), T.value === "inHead" && v(), (c.value || h.value) && f()]);
|
|
2365
2365
|
}
|
|
2366
|
-
return () => e.showHeader && (t.slots.header ?
|
|
2366
|
+
return () => e.showHeader && (t.slots.header ? p() : R());
|
|
2367
2367
|
}
|
|
2368
2368
|
const Ke = /* @__PURE__ */ te({
|
|
2369
2369
|
name: "FSection",
|
|
@@ -2372,35 +2372,35 @@ const Ke = /* @__PURE__ */ te({
|
|
|
2372
2372
|
setup(e, t) {
|
|
2373
2373
|
const n = C();
|
|
2374
2374
|
let o = C();
|
|
2375
|
-
const a = C(e.customClass), l = B(() => e.enableAccordion),
|
|
2376
|
-
const
|
|
2375
|
+
const a = C(e.customClass), l = B(() => e.enableAccordion), m = C(e.expandStatus), x = B(() => e.buttonPosition), T = C(!1), v = uo(e, t, m, n, o, T), g = Ye(e, t), r = B(() => {
|
|
2376
|
+
const f = {
|
|
2377
2377
|
"f-section": !0,
|
|
2378
2378
|
"f-section-accordion": l.value === "default",
|
|
2379
|
-
"f-state-collapse": (l.value === "default" || l.value === "custom") && !
|
|
2379
|
+
"f-state-collapse": (l.value === "default" || l.value === "custom") && !m.value,
|
|
2380
2380
|
"f-section-custom-accordion": l.value === "custom",
|
|
2381
2381
|
"f-section-fill": e.fill,
|
|
2382
2382
|
"f-section-maximize": T.value
|
|
2383
2383
|
};
|
|
2384
|
-
return a.value && a.value.split(" ").reduce((
|
|
2385
|
-
}),
|
|
2386
|
-
const
|
|
2384
|
+
return a.value && a.value.split(" ").reduce((p, S) => (p[S] = !0, p), f), f;
|
|
2385
|
+
}), c = B(() => {
|
|
2386
|
+
const f = e.contentClass.split(" "), p = {
|
|
2387
2387
|
"f-section-content": !0
|
|
2388
2388
|
};
|
|
2389
|
-
return
|
|
2389
|
+
return f.reduce((S, D) => (S[D] = !0, S), p), p;
|
|
2390
2390
|
}), h = B(() => {
|
|
2391
|
-
const
|
|
2391
|
+
const f = e.extendClass.split(" "), p = {
|
|
2392
2392
|
"f-section-extend": !0
|
|
2393
2393
|
};
|
|
2394
|
-
return
|
|
2394
|
+
return f.reduce((S, D) => (S[D] = !0, S), p), p;
|
|
2395
2395
|
});
|
|
2396
|
-
function
|
|
2396
|
+
function b() {
|
|
2397
2397
|
return t.slots.extend && s("div", {
|
|
2398
2398
|
class: h.value
|
|
2399
2399
|
}, [t.slots.extend()]);
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2401
|
+
function d() {
|
|
2402
2402
|
return s("div", {
|
|
2403
|
-
class:
|
|
2403
|
+
class: c.value
|
|
2404
2404
|
}, [x.value === "inContent" && g(), t.slots.default && t.slots.default()]);
|
|
2405
2405
|
}
|
|
2406
2406
|
return K(() => {
|
|
@@ -2408,7 +2408,7 @@ const Ke = /* @__PURE__ */ te({
|
|
|
2408
2408
|
}), () => s("div", {
|
|
2409
2409
|
class: r.value,
|
|
2410
2410
|
ref: n
|
|
2411
|
-
}, [v(),
|
|
2411
|
+
}, [v(), b(), d()]);
|
|
2412
2412
|
}
|
|
2413
2413
|
});
|
|
2414
2414
|
function po(e) {
|
|
@@ -2424,14 +2424,14 @@ const ye = /* @__PURE__ */ te({
|
|
|
2424
2424
|
props: e
|
|
2425
2425
|
}, l = C((n == null ? void 0 : n.tabType.value) || "default");
|
|
2426
2426
|
K(() => {
|
|
2427
|
-
const h = n == null ? void 0 : n.tabPages.value.findIndex((
|
|
2427
|
+
const h = n == null ? void 0 : n.tabPages.value.findIndex((b) => b.props.id === e.id);
|
|
2428
2428
|
!h || h === -1 ? n == null || n.addTab(a) : h > -1 && (o.value = !1, console.warn(`已经存在id为${e.id}的页签啦`));
|
|
2429
2429
|
}), ue(() => {
|
|
2430
2430
|
});
|
|
2431
|
-
const
|
|
2432
|
-
display:
|
|
2431
|
+
const m = B(() => (e == null ? void 0 : e.id) === (n == null ? void 0 : n.activeId.value)), x = B(() => ({
|
|
2432
|
+
display: m.value ? "" : "none"
|
|
2433
2433
|
}));
|
|
2434
|
-
|
|
2434
|
+
se(() => e, (h) => {
|
|
2435
2435
|
n == null || n.updateTab({
|
|
2436
2436
|
props: h,
|
|
2437
2437
|
slots: t.slots
|
|
@@ -2441,8 +2441,8 @@ const ye = /* @__PURE__ */ te({
|
|
|
2441
2441
|
deep: !0
|
|
2442
2442
|
});
|
|
2443
2443
|
function T() {
|
|
2444
|
-
var
|
|
2445
|
-
const h = (
|
|
2444
|
+
var b, d;
|
|
2445
|
+
const h = (d = (b = t.slots).default) == null ? void 0 : d.call(b);
|
|
2446
2446
|
return s(Ke, {
|
|
2447
2447
|
"main-title": e.title,
|
|
2448
2448
|
class: "farris-tab-page"
|
|
@@ -2451,22 +2451,22 @@ const ye = /* @__PURE__ */ te({
|
|
|
2451
2451
|
});
|
|
2452
2452
|
}
|
|
2453
2453
|
const v = B(() => {
|
|
2454
|
-
var
|
|
2454
|
+
var b;
|
|
2455
2455
|
return {
|
|
2456
2456
|
"farris-tab-page": !0,
|
|
2457
|
-
"f-utils-fill-flex-column":
|
|
2457
|
+
"f-utils-fill-flex-column": m.value && n && ((b = n.shouldFillParentContaner) == null ? void 0 : b.value)
|
|
2458
2458
|
};
|
|
2459
2459
|
});
|
|
2460
2460
|
function g() {
|
|
2461
|
-
var
|
|
2462
|
-
const h = (
|
|
2461
|
+
var b, d;
|
|
2462
|
+
const h = (d = (b = t.slots).default) == null ? void 0 : d.call(b);
|
|
2463
2463
|
return s("div", {
|
|
2464
2464
|
class: v.value,
|
|
2465
2465
|
style: x.value
|
|
2466
2466
|
}, [h]);
|
|
2467
2467
|
}
|
|
2468
|
-
const
|
|
2469
|
-
return () => o.value ?
|
|
2468
|
+
const c = (/* @__PURE__ */ new Map([["default", g], ["one-page", T]])).get(l.value) || g;
|
|
2469
|
+
return () => o.value ? c() : null;
|
|
2470
2470
|
}
|
|
2471
2471
|
}), fo = {
|
|
2472
2472
|
type: { Type: String, default: "info" },
|
|
@@ -2516,14 +2516,14 @@ function vo() {
|
|
|
2516
2516
|
return { onCopy: e };
|
|
2517
2517
|
}
|
|
2518
2518
|
function yo(e, t, n, o) {
|
|
2519
|
-
const a = C(14), l = C(140),
|
|
2519
|
+
const a = C(14), l = C(140), m = C(""), x = C(o.value.length), T = B(() => o.value), v = B(() => ({
|
|
2520
2520
|
"font-size": `${a.value}px`,
|
|
2521
2521
|
height: "100%"
|
|
2522
2522
|
}));
|
|
2523
2523
|
function g(r) {
|
|
2524
2524
|
if (r.currentTarget) {
|
|
2525
|
-
const
|
|
2526
|
-
x.value =
|
|
2525
|
+
const c = r.currentTarget.value || "";
|
|
2526
|
+
x.value = c.length;
|
|
2527
2527
|
}
|
|
2528
2528
|
}
|
|
2529
2529
|
return () => s(we, null, [s("textarea", {
|
|
@@ -2536,16 +2536,16 @@ function yo(e, t, n, o) {
|
|
|
2536
2536
|
onInput: (r) => g(r)
|
|
2537
2537
|
}, [T.value]), s("span", {
|
|
2538
2538
|
class: "textarea-wordcount",
|
|
2539
|
-
title:
|
|
2539
|
+
title: m.value,
|
|
2540
2540
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2541
2541
|
}, [x.value + " / " + l.value])]);
|
|
2542
2542
|
}
|
|
2543
2543
|
function go(e, t, n, o) {
|
|
2544
2544
|
const a = yo(e, t, n, o), l = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
2545
|
-
function
|
|
2545
|
+
function m(x) {
|
|
2546
2546
|
return l.get(x) || null;
|
|
2547
2547
|
}
|
|
2548
|
-
return { getEditorRender:
|
|
2548
|
+
return { getEditorRender: m };
|
|
2549
2549
|
}
|
|
2550
2550
|
function Co() {
|
|
2551
2551
|
const e = C(!1), t = C("复制成功");
|
|
@@ -2578,30 +2578,30 @@ function wo(e, t) {
|
|
|
2578
2578
|
return () => n && n();
|
|
2579
2579
|
}
|
|
2580
2580
|
function To(e) {
|
|
2581
|
-
const t = C(3), n = C(480), o = B(() => !!e.value && !!e.value.date), a = B(() => `发生时间 : ${e.value && e.value.date || ""}`), l = B(() => !!e.value && !!e.value.detail),
|
|
2582
|
-
const
|
|
2581
|
+
const t = C(3), n = C(480), o = B(() => !!e.value && !!e.value.date), a = B(() => `发生时间 : ${e.value && e.value.date || ""}`), l = B(() => !!e.value && !!e.value.detail), m = B(() => {
|
|
2582
|
+
const f = `${n.value}px`;
|
|
2583
2583
|
return {
|
|
2584
2584
|
overflow: "hidden",
|
|
2585
2585
|
"text-overflow": "ellipsis",
|
|
2586
2586
|
display: "-webkit-box",
|
|
2587
2587
|
"-webkit-box-orient": "vertical",
|
|
2588
2588
|
"-webkit-line-clamp": t.value,
|
|
2589
|
-
"max-height":
|
|
2589
|
+
"max-height": f
|
|
2590
2590
|
};
|
|
2591
|
-
}), x = B(() => e.value && e.value.detail || ""), T = B(() => !0), v = C(!1), g = C("展开"), r = C("收起"),
|
|
2592
|
-
const
|
|
2591
|
+
}), x = B(() => e.value && e.value.detail || ""), T = B(() => !0), v = C(!1), g = C("展开"), r = C("收起"), c = B(() => {
|
|
2592
|
+
const f = {
|
|
2593
2593
|
display: "block",
|
|
2594
2594
|
color: "#2A87FF"
|
|
2595
2595
|
};
|
|
2596
|
-
return
|
|
2596
|
+
return f["text-align"] = v.value ? "" : "right", f;
|
|
2597
2597
|
});
|
|
2598
|
-
function h(
|
|
2598
|
+
function h(f, p) {
|
|
2599
2599
|
v.value = !v.value, t.value = v.value ? 20 : 3;
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2601
|
+
function b(f) {
|
|
2602
2602
|
return h();
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2604
|
+
function d(f) {
|
|
2605
2605
|
return h();
|
|
2606
2606
|
}
|
|
2607
2607
|
return () => s("div", {
|
|
@@ -2609,16 +2609,16 @@ function To(e) {
|
|
|
2609
2609
|
}, [o.value && s("div", null, [a.value]), l.value && s("div", {
|
|
2610
2610
|
id: "exception_error_msg",
|
|
2611
2611
|
ref: "exceptionMessageRef",
|
|
2612
|
-
style:
|
|
2612
|
+
style: m.value
|
|
2613
2613
|
}, [ie("详细信息 : "), s("span", {
|
|
2614
2614
|
innerHTML: x.value
|
|
2615
2615
|
}, null)]), T.value && s("span", {
|
|
2616
|
-
style:
|
|
2616
|
+
style: c.value
|
|
2617
2617
|
}, [v.value && s("span", {
|
|
2618
|
-
onClick:
|
|
2618
|
+
onClick: b,
|
|
2619
2619
|
style: "cursor: pointer;"
|
|
2620
2620
|
}, [r.value]), !v.value && s("span", {
|
|
2621
|
-
onClick:
|
|
2621
|
+
onClick: d,
|
|
2622
2622
|
style: "cursor: pointer;"
|
|
2623
2623
|
}, [g.value])])]);
|
|
2624
2624
|
}
|
|
@@ -2630,11 +2630,11 @@ function xo(e) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
function So(e, t, n, o) {
|
|
2632
2632
|
const a = C(e.exceptionInfo), l = B(() => {
|
|
2633
|
-
const
|
|
2633
|
+
const c = {
|
|
2634
2634
|
"f-icon": !0
|
|
2635
2635
|
}, h = `f-icon-${t.value}`;
|
|
2636
|
-
return
|
|
2637
|
-
}),
|
|
2636
|
+
return c[h] = !0, c;
|
|
2637
|
+
}), m = B(() => n.value || a.value && a.value.message), x = B(() => o.value), T = B(() => !!o.value), v = B(() => !!a.value);
|
|
2638
2638
|
function g() {
|
|
2639
2639
|
return v.value ? To(a) : T.value ? xo(x) : () => null;
|
|
2640
2640
|
}
|
|
@@ -2647,7 +2647,7 @@ function So(e, t, n, o) {
|
|
|
2647
2647
|
class: "modal-tips-content"
|
|
2648
2648
|
}, [s("p", {
|
|
2649
2649
|
class: "toast-msg-title",
|
|
2650
|
-
innerHTML:
|
|
2650
|
+
innerHTML: m.value
|
|
2651
2651
|
}, null), r()])]);
|
|
2652
2652
|
}
|
|
2653
2653
|
function jo(e, t, n) {
|
|
@@ -2655,7 +2655,7 @@ function jo(e, t, n) {
|
|
|
2655
2655
|
onCopy: o
|
|
2656
2656
|
} = t, {
|
|
2657
2657
|
toShowFeedback: a
|
|
2658
|
-
} = n, l = C("复制成功"),
|
|
2658
|
+
} = n, l = C("复制成功"), m = C("复制详细信息"), x = C(e.exceptionInfo || {
|
|
2659
2659
|
date: "",
|
|
2660
2660
|
message: "",
|
|
2661
2661
|
detail: ""
|
|
@@ -2674,33 +2674,33 @@ function jo(e, t, n) {
|
|
|
2674
2674
|
}, [s("span", {
|
|
2675
2675
|
onClick: v,
|
|
2676
2676
|
style: "cursor: pointer;"
|
|
2677
|
-
}, [
|
|
2677
|
+
}, [m.value])]);
|
|
2678
2678
|
}
|
|
2679
2679
|
function Bo(e, t, n, o) {
|
|
2680
|
-
const a = C(e.type), l = C([]),
|
|
2681
|
-
function
|
|
2680
|
+
const a = C(e.type), l = C([]), m = C(e.exceptionInfo), x = C(e.okButtonText), T = C(e.cancelButtonText), v = C(!0), g = C(!0), r = B(() => !!(l.value && l.value.length)), c = B(() => m.value && m.value.date && m.value.message && m.value.detail), h = B(() => !(l.value && l.value.length) && (x.value || T.value)), b = B(() => g.value && x.value), d = B(() => v.value && T.value), f = jo(e, n, o);
|
|
2681
|
+
function p(D) {
|
|
2682
2682
|
a.value === "question" && t.emit("reject"), t.emit("close");
|
|
2683
2683
|
}
|
|
2684
|
-
function
|
|
2684
|
+
function S(D) {
|
|
2685
2685
|
a.value === "question" && t.emit("accept"), t.emit("close");
|
|
2686
2686
|
}
|
|
2687
2687
|
return () => s("div", {
|
|
2688
2688
|
class: "modal-footer"
|
|
2689
|
-
}, [
|
|
2689
|
+
}, [c.value && f(), h.value && d.value && s("button", {
|
|
2690
2690
|
type: "button",
|
|
2691
2691
|
class: "btn btn-secondary btn-lg",
|
|
2692
|
-
onClick:
|
|
2693
|
-
}, [T.value]), h.value &&
|
|
2692
|
+
onClick: p
|
|
2693
|
+
}, [T.value]), h.value && b.value && s("button", {
|
|
2694
2694
|
type: "button",
|
|
2695
2695
|
class: "btn btn-primary btn-lg",
|
|
2696
|
-
onClick:
|
|
2697
|
-
}, [x.value]), r.value && l.value.length && l.value.map((
|
|
2696
|
+
onClick: S
|
|
2697
|
+
}, [x.value]), r.value && l.value.length && l.value.map((D) => s("button", {
|
|
2698
2698
|
type: "button",
|
|
2699
|
-
onClick:
|
|
2700
|
-
class:
|
|
2701
|
-
}, [
|
|
2702
|
-
class:
|
|
2703
|
-
}, null),
|
|
2699
|
+
onClick: D.handle,
|
|
2700
|
+
class: D.class
|
|
2701
|
+
}, [D.iconClass && s("span", {
|
|
2702
|
+
class: D.iconClass
|
|
2703
|
+
}, null), D.text]))]);
|
|
2704
2704
|
}
|
|
2705
2705
|
const ko = /* @__PURE__ */ te({
|
|
2706
2706
|
name: "FMessageBox",
|
|
@@ -2708,20 +2708,20 @@ const ko = /* @__PURE__ */ te({
|
|
|
2708
2708
|
emits: ["accept", "reject", "close"],
|
|
2709
2709
|
setup(e, t) {
|
|
2710
2710
|
const n = C(e.type), o = C(e.title), a = C(e.detail), l = B(() => {
|
|
2711
|
-
const
|
|
2711
|
+
const f = {
|
|
2712
2712
|
"modal-tips": !0,
|
|
2713
2713
|
"d-flex": !0,
|
|
2714
2714
|
"flex-row": !0
|
|
2715
|
-
},
|
|
2716
|
-
return
|
|
2717
|
-
}),
|
|
2718
|
-
const
|
|
2719
|
-
return n.value === "prompt" ?
|
|
2715
|
+
}, p = `messager-type-${n.value}`;
|
|
2716
|
+
return f[p] = !0, f;
|
|
2717
|
+
}), m = B(() => {
|
|
2718
|
+
const f = {};
|
|
2719
|
+
return n.value === "prompt" ? f.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (f.padding = "0.5rem 1.5rem 1rem 1.5rem"), f;
|
|
2720
2720
|
}), x = vo(), T = go(e, n, o, a), v = Co(), {
|
|
2721
2721
|
feedbackStyle: g,
|
|
2722
2722
|
feedbackMessage: r
|
|
2723
2723
|
} = v;
|
|
2724
|
-
function
|
|
2724
|
+
function c() {
|
|
2725
2725
|
return s("div", {
|
|
2726
2726
|
style: g.value
|
|
2727
2727
|
}, [r.value]);
|
|
@@ -2734,13 +2734,13 @@ const ko = /* @__PURE__ */ te({
|
|
|
2734
2734
|
return So(e, n, o, a);
|
|
2735
2735
|
}
|
|
2736
2736
|
}
|
|
2737
|
-
const
|
|
2737
|
+
const b = h(), d = Bo(e, t, x, v);
|
|
2738
2738
|
return () => s("div", {
|
|
2739
2739
|
class: "farris-messager"
|
|
2740
2740
|
}, [s("section", {
|
|
2741
2741
|
class: l.value,
|
|
2742
|
-
style:
|
|
2743
|
-
}, [
|
|
2742
|
+
style: m.value
|
|
2743
|
+
}, [b()]), d(), c()]);
|
|
2744
2744
|
}
|
|
2745
2745
|
}), Do = {
|
|
2746
2746
|
class: { type: String, default: "" },
|
|
@@ -2761,26 +2761,26 @@ const ko = /* @__PURE__ */ te({
|
|
|
2761
2761
|
props: Do,
|
|
2762
2762
|
emits: ["update:modelValue", "accept", "cancel", "closed"],
|
|
2763
2763
|
setup(e, t) {
|
|
2764
|
-
const n = C(e.width), o = C(e.height), a = C(e.modelValue), l = C(""),
|
|
2765
|
-
function
|
|
2764
|
+
const n = C(e.width), o = C(e.height), a = C(e.modelValue), l = C(""), m = C(e.class), x = C(e.fitContent), T = C(e.showHeader), v = C(""), g = C(!0), r = C(!1), c = C(!1), h = C(""), b = C(""), d = C(""), f = C(e.showButtons), p = C(e.title);
|
|
2765
|
+
function S(_, O) {
|
|
2766
2766
|
a.value = !1, t.emit("update:modelValue", !1), O != null && t.emit(O ? "accept" : "cancel"), t.emit("closed", _);
|
|
2767
2767
|
}
|
|
2768
|
-
const
|
|
2768
|
+
const D = [{
|
|
2769
2769
|
name: "cancel",
|
|
2770
2770
|
text: "取消",
|
|
2771
2771
|
class: "btn btn-light",
|
|
2772
2772
|
handle: (_) => {
|
|
2773
|
-
|
|
2773
|
+
S(_, !1);
|
|
2774
2774
|
}
|
|
2775
2775
|
}, {
|
|
2776
2776
|
name: "accept",
|
|
2777
2777
|
text: "确定",
|
|
2778
2778
|
class: "btn btn-primary",
|
|
2779
2779
|
handle: (_) => {
|
|
2780
|
-
|
|
2780
|
+
S(_, !0);
|
|
2781
2781
|
}
|
|
2782
|
-
}], R = C(e.buttons && e.buttons.length ? e.buttons :
|
|
2783
|
-
C(), C(),
|
|
2782
|
+
}], R = C(e.buttons && e.buttons.length ? e.buttons : D), P = B(() => !!v.value), E = B(() => !!f.value && !!R.value);
|
|
2783
|
+
C(), C(), se(() => e.modelValue, () => {
|
|
2784
2784
|
a.value = e.modelValue;
|
|
2785
2785
|
});
|
|
2786
2786
|
const w = C(!1), k = B(() => a.value), F = B(() => {
|
|
@@ -2790,13 +2790,13 @@ const ko = /* @__PURE__ */ te({
|
|
|
2790
2790
|
"fe-cmp-page-modal": e.showFloatingClose
|
|
2791
2791
|
};
|
|
2792
2792
|
return _["f-modal-fitContent"] = x.value, _;
|
|
2793
|
-
}),
|
|
2793
|
+
}), M = B(() => ({
|
|
2794
2794
|
display: k.value ? "block" : "none !important"
|
|
2795
|
-
})),
|
|
2795
|
+
})), i = B(() => {
|
|
2796
2796
|
const _ = {
|
|
2797
2797
|
"modal-dialog": !0
|
|
2798
2798
|
};
|
|
2799
|
-
return
|
|
2799
|
+
return m.value.split(" ").reduce((I, N) => (I[N] = !0, I), _), _;
|
|
2800
2800
|
}), y = B(() => ({
|
|
2801
2801
|
position: "absolute",
|
|
2802
2802
|
top: "50%",
|
|
@@ -2805,10 +2805,10 @@ const ko = /* @__PURE__ */ te({
|
|
|
2805
2805
|
height: x.value ? "auto" : `${o.value}px`,
|
|
2806
2806
|
"margin-left": `${0 - n.value / 2}px`,
|
|
2807
2807
|
"margin-top": x.value ? "auto" : `${0 - o.value / 2}px`
|
|
2808
|
-
})),
|
|
2808
|
+
})), u = B(() => ({
|
|
2809
2809
|
"modal-content": !0,
|
|
2810
2810
|
"modal-content-has-header": T.value
|
|
2811
|
-
})),
|
|
2811
|
+
})), j = B(() => ({
|
|
2812
2812
|
display: T.value ? "" : "none"
|
|
2813
2813
|
})), $ = B(() => ({
|
|
2814
2814
|
"f-icon": !0,
|
|
@@ -2827,7 +2827,7 @@ const ko = /* @__PURE__ */ te({
|
|
|
2827
2827
|
}
|
|
2828
2828
|
const X = B(() => {
|
|
2829
2829
|
const _ = {
|
|
2830
|
-
textAlgin:
|
|
2830
|
+
textAlgin: d.value
|
|
2831
2831
|
}, O = q();
|
|
2832
2832
|
return Object.assign(_, O);
|
|
2833
2833
|
});
|
|
@@ -2836,13 +2836,13 @@ const ko = /* @__PURE__ */ te({
|
|
|
2836
2836
|
async function Z(_, O) {
|
|
2837
2837
|
if (_.handle) {
|
|
2838
2838
|
const I = await _.handle(O, _);
|
|
2839
|
-
I &&
|
|
2839
|
+
I && S(O, I);
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
|
-
function
|
|
2842
|
+
function ne() {
|
|
2843
2843
|
return s("div", {
|
|
2844
2844
|
class: "action-wrapper",
|
|
2845
|
-
onClick: (_) =>
|
|
2845
|
+
onClick: (_) => S(_, !1)
|
|
2846
2846
|
}, [s("span", {
|
|
2847
2847
|
class: "close-icon"
|
|
2848
2848
|
}, [s("i", {
|
|
@@ -2856,17 +2856,17 @@ const ko = /* @__PURE__ */ te({
|
|
|
2856
2856
|
var _, O;
|
|
2857
2857
|
return [s("div", {
|
|
2858
2858
|
class: F.value,
|
|
2859
|
-
style:
|
|
2859
|
+
style: M.value
|
|
2860
2860
|
}, [s("div", {
|
|
2861
2861
|
id: l.value,
|
|
2862
|
-
class:
|
|
2862
|
+
class: i.value,
|
|
2863
2863
|
style: y.value
|
|
2864
|
-
}, [e.showFloatingClose &&
|
|
2865
|
-
class:
|
|
2864
|
+
}, [e.showFloatingClose && ne(), s("div", {
|
|
2865
|
+
class: u.value
|
|
2866
2866
|
}, [s("div", {
|
|
2867
2867
|
ref: "modalHeaderRef",
|
|
2868
2868
|
class: "modal-header",
|
|
2869
|
-
style:
|
|
2869
|
+
style: j.value
|
|
2870
2870
|
}, [s("div", {
|
|
2871
2871
|
class: "modal-title"
|
|
2872
2872
|
}, [P.value && s("span", {
|
|
@@ -2874,9 +2874,9 @@ const ko = /* @__PURE__ */ te({
|
|
|
2874
2874
|
style: "margin-right: 8px"
|
|
2875
2875
|
}, null), s("span", {
|
|
2876
2876
|
class: "modal-title-label"
|
|
2877
|
-
}, [
|
|
2877
|
+
}, [p.value])]), s("div", {
|
|
2878
2878
|
class: "actions"
|
|
2879
|
-
}, [s("ul", null, [
|
|
2879
|
+
}, [s("ul", null, [c.value && s("li", {
|
|
2880
2880
|
class: "f-btn-icon f-bare"
|
|
2881
2881
|
}, [s("span", {
|
|
2882
2882
|
class: "f-icon modal_minimize"
|
|
@@ -2887,7 +2887,7 @@ const ko = /* @__PURE__ */ te({
|
|
|
2887
2887
|
class: $.value
|
|
2888
2888
|
}, null)]), g.value && s("li", {
|
|
2889
2889
|
class: "f-btn-icon f-bare",
|
|
2890
|
-
onClick: (I) =>
|
|
2890
|
+
onClick: (I) => S(I, !1)
|
|
2891
2891
|
}, [s("span", {
|
|
2892
2892
|
class: "f-icon modal_close"
|
|
2893
2893
|
}, null)])])])]), s("div", {
|
|
@@ -2901,7 +2901,7 @@ const ko = /* @__PURE__ */ te({
|
|
|
2901
2901
|
class: "f-utils-fill",
|
|
2902
2902
|
width: "100%",
|
|
2903
2903
|
frameborder: "0",
|
|
2904
|
-
src:
|
|
2904
|
+
src: b.value
|
|
2905
2905
|
}, null)]), E.value && s("div", {
|
|
2906
2906
|
class: "modal-footer",
|
|
2907
2907
|
style: X.value
|
|
@@ -2936,29 +2936,29 @@ function Mo(e) {
|
|
|
2936
2936
|
ue(() => {
|
|
2937
2937
|
document.body.removeChild(t);
|
|
2938
2938
|
});
|
|
2939
|
-
const o = C(), a = C(e.class || ""), l = C(!!e.showButtons),
|
|
2939
|
+
const o = C(), a = C(e.class || ""), l = C(!!e.showButtons), m = C(!!e.showHeader), x = C(!!e.showFloatingClose), T = C(!0), v = C(e.title || ""), g = e.acceptCallback || (() => {
|
|
2940
2940
|
}), r = e.rejectCallback || (() => {
|
|
2941
|
-
}),
|
|
2942
|
-
}), h = tt(e),
|
|
2943
|
-
T.value = !1, n.unmount(),
|
|
2941
|
+
}), c = e.closedCallback || ((d) => {
|
|
2942
|
+
}), h = tt(e), b = (d) => {
|
|
2943
|
+
T.value = !1, n.unmount(), c(d);
|
|
2944
2944
|
};
|
|
2945
2945
|
return K(() => {
|
|
2946
2946
|
}), () => s(et, {
|
|
2947
2947
|
ref: o,
|
|
2948
2948
|
class: a.value,
|
|
2949
2949
|
modelValue: T.value,
|
|
2950
|
-
"onUpdate:modelValue": (
|
|
2950
|
+
"onUpdate:modelValue": (d) => T.value = d,
|
|
2951
2951
|
title: v.value,
|
|
2952
2952
|
width: e.width,
|
|
2953
2953
|
height: e.height,
|
|
2954
2954
|
buttons: e.buttons,
|
|
2955
|
-
"show-header":
|
|
2955
|
+
"show-header": m.value,
|
|
2956
2956
|
"show-buttons": l.value,
|
|
2957
2957
|
showFloatingClose: x.value,
|
|
2958
2958
|
onAccept: g,
|
|
2959
2959
|
onCancel: r,
|
|
2960
2960
|
fitContent: e.fitContent,
|
|
2961
|
-
onClosed:
|
|
2961
|
+
onClosed: b
|
|
2962
2962
|
}, {
|
|
2963
2963
|
default: () => [h && h(n)]
|
|
2964
2964
|
});
|
|
@@ -2991,25 +2991,25 @@ class Oo {
|
|
|
2991
2991
|
title: "",
|
|
2992
2992
|
showButtons: !0,
|
|
2993
2993
|
showHeader: !0
|
|
2994
|
-
}, t), a = C(o.class || ""), l = C(!!o.showButtons),
|
|
2994
|
+
}, t), a = C(o.class || ""), l = C(!!o.showButtons), m = C(!!o.showHeader), x = C(!!o.showFloatingClose), T = C(!0), v = C(o.title || ""), g = o.acceptCallback || (() => {
|
|
2995
2995
|
}), r = o.rejectCallback || (() => {
|
|
2996
|
-
}),
|
|
2996
|
+
}), c = o.closedCallback || ((f) => {
|
|
2997
2997
|
});
|
|
2998
2998
|
tt(o);
|
|
2999
|
-
const h = (
|
|
3000
|
-
T.value = !1,
|
|
2999
|
+
const h = (f) => {
|
|
3000
|
+
T.value = !1, c(f);
|
|
3001
3001
|
};
|
|
3002
|
-
function
|
|
3003
|
-
T.value =
|
|
3002
|
+
function b(f) {
|
|
3003
|
+
T.value = f;
|
|
3004
3004
|
}
|
|
3005
|
-
const
|
|
3005
|
+
const d = {
|
|
3006
3006
|
class: a.value,
|
|
3007
3007
|
modelValue: T.value,
|
|
3008
3008
|
title: v.value,
|
|
3009
3009
|
width: o.width,
|
|
3010
3010
|
height: o.height,
|
|
3011
3011
|
buttons: o.buttons,
|
|
3012
|
-
showHeader:
|
|
3012
|
+
showHeader: m.value,
|
|
3013
3013
|
showButtons: l.value,
|
|
3014
3014
|
showFloatingClose: x.value,
|
|
3015
3015
|
onAccept: g,
|
|
@@ -3018,8 +3018,8 @@ class Oo {
|
|
|
3018
3018
|
onClosed: h
|
|
3019
3019
|
};
|
|
3020
3020
|
this.renderModal(n, {
|
|
3021
|
-
...
|
|
3022
|
-
"onUpdate:modelValue":
|
|
3021
|
+
...d,
|
|
3022
|
+
"onUpdate:modelValue": b
|
|
3023
3023
|
});
|
|
3024
3024
|
}
|
|
3025
3025
|
}
|
|
@@ -3027,7 +3027,7 @@ class Eo {
|
|
|
3027
3027
|
static show(t) {
|
|
3028
3028
|
const n = le({
|
|
3029
3029
|
...t
|
|
3030
|
-
}), o = !1, a = n.type === "error" || n.type === "prompt", l = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "",
|
|
3030
|
+
}), o = !1, a = n.type === "error" || n.type === "prompt", l = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", m = n.acceptCallback || (() => {
|
|
3031
3031
|
}), x = n.rejectCallback || (() => {
|
|
3032
3032
|
});
|
|
3033
3033
|
let T;
|
|
@@ -3040,7 +3040,7 @@ class Eo {
|
|
|
3040
3040
|
showButtons: o,
|
|
3041
3041
|
showHeader: a,
|
|
3042
3042
|
render: () => s(ko, it(n, {
|
|
3043
|
-
onAccept:
|
|
3043
|
+
onAccept: m,
|
|
3044
3044
|
onReject: x,
|
|
3045
3045
|
onClose: v
|
|
3046
3046
|
}), null)
|
|
@@ -3115,7 +3115,7 @@ class Eo {
|
|
|
3115
3115
|
function $o(e, t, n, o, a) {
|
|
3116
3116
|
const {
|
|
3117
3117
|
activeId: l,
|
|
3118
|
-
removeTab:
|
|
3118
|
+
removeTab: m,
|
|
3119
3119
|
selectTab: x,
|
|
3120
3120
|
removeDesignTab: T,
|
|
3121
3121
|
selectDesignTab: v
|
|
@@ -3131,7 +3131,7 @@ function $o(e, t, n, o, a) {
|
|
|
3131
3131
|
"f-state-disable": t.disabled
|
|
3132
3132
|
};
|
|
3133
3133
|
return k[`${t.id}-design-item`] = !0, k;
|
|
3134
|
-
}),
|
|
3134
|
+
}), c = B(() => ({
|
|
3135
3135
|
width: `${t.tabWidth}px`
|
|
3136
3136
|
})), h = B(() => ({
|
|
3137
3137
|
"nav-link": !0,
|
|
@@ -3139,25 +3139,25 @@ function $o(e, t, n, o, a) {
|
|
|
3139
3139
|
active: t.id === l.value,
|
|
3140
3140
|
disabled: t.disabled
|
|
3141
3141
|
}));
|
|
3142
|
-
function
|
|
3142
|
+
function b(k) {
|
|
3143
3143
|
return s("span", {
|
|
3144
3144
|
class: g.value,
|
|
3145
3145
|
title: k.title
|
|
3146
3146
|
}, [k.title]);
|
|
3147
3147
|
}
|
|
3148
|
-
function
|
|
3149
|
-
return k.slots.title ? k.slots.title :
|
|
3148
|
+
function d(k) {
|
|
3149
|
+
return k.slots.title ? k.slots.title : b;
|
|
3150
3150
|
}
|
|
3151
|
-
const
|
|
3152
|
-
function
|
|
3151
|
+
const f = d(n), p = C(t.removeable);
|
|
3152
|
+
function S() {
|
|
3153
3153
|
return s("span", {
|
|
3154
3154
|
class: "st-drop-close",
|
|
3155
|
-
onClick: (k) =>
|
|
3155
|
+
onClick: (k) => m(k, t.id)
|
|
3156
3156
|
}, [s("i", {
|
|
3157
3157
|
class: "f-icon f-icon-close"
|
|
3158
3158
|
}, null)]);
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3160
|
+
function D(k) {
|
|
3161
3161
|
x(t.id), e.tabType === "one-page" && o.scrollToByPaggId(t.id);
|
|
3162
3162
|
}
|
|
3163
3163
|
function R(k) {
|
|
@@ -3187,14 +3187,14 @@ function $o(e, t, n, o, a) {
|
|
|
3187
3187
|
return s("li", {
|
|
3188
3188
|
onClick: (k) => R(k),
|
|
3189
3189
|
class: r.value,
|
|
3190
|
-
style:
|
|
3190
|
+
style: c.value,
|
|
3191
3191
|
id: `${t.id}-design-item`
|
|
3192
3192
|
}, [w(), s("a", {
|
|
3193
3193
|
class: h.value,
|
|
3194
|
-
onClick:
|
|
3195
|
-
}, [
|
|
3194
|
+
onClick: D
|
|
3195
|
+
}, [f(t), p.value && S()])]);
|
|
3196
3196
|
}
|
|
3197
|
-
function Ao(e, t, n, o, a, l,
|
|
3197
|
+
function Ao(e, t, n, o, a, l, m) {
|
|
3198
3198
|
const {
|
|
3199
3199
|
shouldShowNavigationButtons: x
|
|
3200
3200
|
} = n, {
|
|
@@ -3214,45 +3214,45 @@ function Ao(e, t, n, o, a, l, b) {
|
|
|
3214
3214
|
"nav-pills": e.tabType === "pills",
|
|
3215
3215
|
"flex-row": e.position === "top" || e.position === "bottom",
|
|
3216
3216
|
"flex-column": e.position === "left" || e.position === "right"
|
|
3217
|
-
})),
|
|
3217
|
+
})), c = B(() => ({
|
|
3218
3218
|
overflow: "auto"
|
|
3219
3219
|
}));
|
|
3220
|
-
function h(
|
|
3220
|
+
function h(d) {
|
|
3221
3221
|
const {
|
|
3222
|
-
componentType:
|
|
3223
|
-
} =
|
|
3224
|
-
let
|
|
3225
|
-
|
|
3226
|
-
const
|
|
3227
|
-
return
|
|
3228
|
-
}
|
|
3229
|
-
const
|
|
3230
|
-
var
|
|
3231
|
-
const
|
|
3222
|
+
componentType: f
|
|
3223
|
+
} = d;
|
|
3224
|
+
let p = ae(f, d);
|
|
3225
|
+
m && m.onResolveNewComponentSchema && (p = m.onResolveNewComponentSchema(d, p));
|
|
3226
|
+
const S = f.toLowerCase().replace("-", "_");
|
|
3227
|
+
return p && !p.id && p.type === f && (p.id = `${S}_${Math.random().toString().slice(2, 6)}`), p;
|
|
3228
|
+
}
|
|
3229
|
+
const b = function(d) {
|
|
3230
|
+
var D;
|
|
3231
|
+
const f = {
|
|
3232
3232
|
componentType: "tab-page",
|
|
3233
3233
|
label: "Tab1",
|
|
3234
3234
|
parentComponentInstance: l.value,
|
|
3235
3235
|
targetPosition: -1
|
|
3236
|
-
},
|
|
3237
|
-
(
|
|
3236
|
+
}, p = h(f);
|
|
3237
|
+
(D = l.value.schema.contents) == null || D.push(p);
|
|
3238
3238
|
const {
|
|
3239
|
-
selectTabByTabId:
|
|
3239
|
+
selectTabByTabId: S
|
|
3240
3240
|
} = a;
|
|
3241
|
-
|
|
3241
|
+
S(p.id);
|
|
3242
3242
|
};
|
|
3243
3243
|
return () => s("div", {
|
|
3244
3244
|
class: v.value,
|
|
3245
3245
|
style: g.value
|
|
3246
3246
|
}, [s("ul", {
|
|
3247
3247
|
class: r.value,
|
|
3248
|
-
style:
|
|
3248
|
+
style: c.value,
|
|
3249
3249
|
ref: t
|
|
3250
|
-
}, [T.value.map((
|
|
3250
|
+
}, [T.value.map((d) => $o(e, d.props, d, o, a)), s("li", {
|
|
3251
3251
|
class: "nav-item"
|
|
3252
3252
|
}, [s("a", {
|
|
3253
3253
|
class: "nav-link tabs-text-truncate",
|
|
3254
3254
|
title: "添加页签",
|
|
3255
|
-
onClick: (
|
|
3255
|
+
onClick: (d) => b()
|
|
3256
3256
|
}, [s("i", {
|
|
3257
3257
|
class: "f-icon f-icon-plus",
|
|
3258
3258
|
style: "font-size: 20px;margin: 0 auto;line-height: 24px;"
|
|
@@ -3264,7 +3264,7 @@ function Me(e, t, n) {
|
|
|
3264
3264
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
3265
3265
|
}
|
|
3266
3266
|
o();
|
|
3267
|
-
const a = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "",
|
|
3267
|
+
const a = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", m = C();
|
|
3268
3268
|
function x() {
|
|
3269
3269
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
3270
3270
|
}
|
|
@@ -3285,42 +3285,42 @@ function Me(e, t, n) {
|
|
|
3285
3285
|
const w = C(E == null ? void 0 : E.value.parent), k = r(w);
|
|
3286
3286
|
return k || null;
|
|
3287
3287
|
}
|
|
3288
|
-
function
|
|
3288
|
+
function c(E = t) {
|
|
3289
3289
|
const { componentInstance: w, designerItemElementRef: k } = E;
|
|
3290
|
-
return !w || !w.value ? null : w.value.canMove ? k :
|
|
3290
|
+
return !w || !w.value ? null : w.value.canMove ? k : c(E.parent);
|
|
3291
3291
|
}
|
|
3292
3292
|
function h(E) {
|
|
3293
3293
|
return !!n && n.canAccepts(E);
|
|
3294
3294
|
}
|
|
3295
|
-
function
|
|
3295
|
+
function b() {
|
|
3296
3296
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
3297
3297
|
}
|
|
3298
|
-
function
|
|
3298
|
+
function d() {
|
|
3299
3299
|
}
|
|
3300
|
-
function
|
|
3300
|
+
function f(E, w) {
|
|
3301
3301
|
w && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(w);
|
|
3302
3302
|
}
|
|
3303
|
-
function
|
|
3303
|
+
function p(E) {
|
|
3304
3304
|
const { componentType: w } = E;
|
|
3305
3305
|
let k = ae(w, E);
|
|
3306
3306
|
n && n.onResolveNewComponentSchema && (k = n.onResolveNewComponentSchema(E, k));
|
|
3307
3307
|
const F = w.toLowerCase().replace("-", "_");
|
|
3308
3308
|
return k && !k.id && k.type === w && (k.id = `${F}_${Math.random().toString().slice(2, 6)}`), k;
|
|
3309
3309
|
}
|
|
3310
|
-
function
|
|
3311
|
-
const k = String(E.getAttribute("data-controltype")), F = E.getAttribute("data-feature"),
|
|
3312
|
-
|
|
3313
|
-
let
|
|
3314
|
-
n && n.onAcceptNewChildElement && (
|
|
3310
|
+
function S(E, w) {
|
|
3311
|
+
const k = String(E.getAttribute("data-controltype")), F = E.getAttribute("data-feature"), M = F ? JSON.parse(F) : {};
|
|
3312
|
+
M.parentComponentInstance = m.value;
|
|
3313
|
+
let i = ae(k, M);
|
|
3314
|
+
n && n.onAcceptNewChildElement && (i = n.onAcceptNewChildElement(E, w, i));
|
|
3315
3315
|
const y = k.toLowerCase().replace("-", "_");
|
|
3316
|
-
return
|
|
3316
|
+
return i && !i.id && i.type === k && (i.id = `${y}_${Math.random().toString().slice(2, 6)}`), i;
|
|
3317
3317
|
}
|
|
3318
|
-
function
|
|
3318
|
+
function D(E) {
|
|
3319
3319
|
}
|
|
3320
3320
|
function R() {
|
|
3321
3321
|
return n && n.getPropsConfig ? n.getPropsConfig() : [];
|
|
3322
3322
|
}
|
|
3323
|
-
return
|
|
3323
|
+
return m.value = {
|
|
3324
3324
|
canMove: x(),
|
|
3325
3325
|
canSelectParent: T(),
|
|
3326
3326
|
canDelete: v(),
|
|
@@ -3333,18 +3333,18 @@ function Me(e, t, n) {
|
|
|
3333
3333
|
designerClass: l,
|
|
3334
3334
|
canAccepts: h,
|
|
3335
3335
|
getBelongedComponentInstance: r,
|
|
3336
|
-
getDraggableDesignItemElement:
|
|
3337
|
-
getDraggingDisplayText:
|
|
3336
|
+
getDraggableDesignItemElement: c,
|
|
3337
|
+
getDraggingDisplayText: b,
|
|
3338
3338
|
getPropConfig: R,
|
|
3339
|
-
getDragScopeElement:
|
|
3340
|
-
onAcceptMovedChildElement:
|
|
3341
|
-
onAcceptNewChildElement:
|
|
3342
|
-
onChildElementMovedOut:
|
|
3343
|
-
addNewChildComponentSchema:
|
|
3339
|
+
getDragScopeElement: d,
|
|
3340
|
+
onAcceptMovedChildElement: f,
|
|
3341
|
+
onAcceptNewChildElement: S,
|
|
3342
|
+
onChildElementMovedOut: D,
|
|
3343
|
+
addNewChildComponentSchema: p,
|
|
3344
3344
|
updateDragAndDropRules: o,
|
|
3345
3345
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
3346
3346
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
3347
|
-
},
|
|
3347
|
+
}, m;
|
|
3348
3348
|
}
|
|
3349
3349
|
const Io = "https://json-schema.org/draft/2020-12/schema", Po = "https://farris-design.gitee.io/dragging-rules.schema.json", Ro = "Dragging Rules", Fo = "The rules of designer canvas", No = "object", Ho = {
|
|
3350
3350
|
"f-page": {
|
|
@@ -3920,29 +3920,29 @@ const Io = "https://json-schema.org/draft/2020-12/schema", Po = "https://farris-
|
|
|
3920
3920
|
required: Lo
|
|
3921
3921
|
}, Ce = /* @__PURE__ */ new Map();
|
|
3922
3922
|
function Vo() {
|
|
3923
|
-
function e(
|
|
3924
|
-
var
|
|
3925
|
-
if (typeof
|
|
3926
|
-
return ((
|
|
3927
|
-
if (typeof
|
|
3928
|
-
const
|
|
3929
|
-
if (
|
|
3930
|
-
return Number(
|
|
3931
|
-
if (
|
|
3932
|
-
return Number(
|
|
3933
|
-
if (
|
|
3934
|
-
return Number(
|
|
3923
|
+
function e(b, d, f, p) {
|
|
3924
|
+
var S;
|
|
3925
|
+
if (typeof f == "number")
|
|
3926
|
+
return ((S = p[b]) == null ? void 0 : S.length) === f;
|
|
3927
|
+
if (typeof f == "object") {
|
|
3928
|
+
const D = Object.keys(f)[0], R = f[D];
|
|
3929
|
+
if (D === "not")
|
|
3930
|
+
return Number(p[b].length) !== Number(R);
|
|
3931
|
+
if (D === "moreThan")
|
|
3932
|
+
return Number(p[b].length) >= Number(R);
|
|
3933
|
+
if (D === "lessThan")
|
|
3934
|
+
return Number(p[b].length) <= Number(R);
|
|
3935
3935
|
}
|
|
3936
3936
|
return !1;
|
|
3937
3937
|
}
|
|
3938
|
-
function t(
|
|
3939
|
-
return typeof
|
|
3938
|
+
function t(b, d, f, p) {
|
|
3939
|
+
return typeof f == "boolean" ? p.childrenClassList.includes(d) === !!f : !1;
|
|
3940
3940
|
}
|
|
3941
|
-
function n(
|
|
3942
|
-
return typeof
|
|
3941
|
+
function n(b, d, f, p) {
|
|
3942
|
+
return typeof f == "boolean" ? p.parentClassList.includes(d) === !!f : !1;
|
|
3943
3943
|
}
|
|
3944
|
-
function o(
|
|
3945
|
-
return typeof
|
|
3944
|
+
function o(b, d, f, p) {
|
|
3945
|
+
return typeof f == "boolean" ? p.parentClassList.includes(d) === !!f : !1;
|
|
3946
3946
|
}
|
|
3947
3947
|
const a = /* @__PURE__ */ new Map([
|
|
3948
3948
|
["length", e],
|
|
@@ -3950,69 +3950,69 @@ function Vo() {
|
|
|
3950
3950
|
["hasSibling", o],
|
|
3951
3951
|
["hasParent", n]
|
|
3952
3952
|
]);
|
|
3953
|
-
function l(
|
|
3954
|
-
const
|
|
3955
|
-
return typeof
|
|
3956
|
-
if (
|
|
3957
|
-
return { target:
|
|
3958
|
-
const
|
|
3959
|
-
return { target:
|
|
3953
|
+
function l(b, d) {
|
|
3954
|
+
const f = b;
|
|
3955
|
+
return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "object" ? Object.keys(d).map((p) => {
|
|
3956
|
+
if (p === "length")
|
|
3957
|
+
return { target: f, operator: "length", param: null, value: d[p] };
|
|
3958
|
+
const S = p, D = d[p];
|
|
3959
|
+
return { target: f, operator: b === "children" ? "hasChildren" : b === "parent" ? "hasParent" : "hasSibling", param: S, value: D };
|
|
3960
3960
|
}) : [];
|
|
3961
3961
|
}
|
|
3962
|
-
function b
|
|
3963
|
-
if (a.has(
|
|
3964
|
-
const
|
|
3965
|
-
return
|
|
3962
|
+
function m(b, d) {
|
|
3963
|
+
if (a.has(b.operator)) {
|
|
3964
|
+
const f = a.get(b.operator);
|
|
3965
|
+
return f && f(b.target, b.param, b.value, d) || !1;
|
|
3966
3966
|
}
|
|
3967
3967
|
return !1;
|
|
3968
3968
|
}
|
|
3969
|
-
function x(
|
|
3970
|
-
return Object.keys(
|
|
3971
|
-
const P = l(R,
|
|
3972
|
-
return
|
|
3973
|
-
}, []).reduce((
|
|
3974
|
-
}
|
|
3975
|
-
function T(
|
|
3976
|
-
const
|
|
3977
|
-
return
|
|
3978
|
-
}
|
|
3979
|
-
function v(
|
|
3980
|
-
const
|
|
3981
|
-
return
|
|
3982
|
-
}
|
|
3983
|
-
function g(
|
|
3984
|
-
return (
|
|
3985
|
-
const
|
|
3986
|
-
return
|
|
3987
|
-
const
|
|
3988
|
-
return
|
|
3989
|
-
},
|
|
3969
|
+
function x(b, d) {
|
|
3970
|
+
return Object.keys(b).reduce((D, R) => {
|
|
3971
|
+
const P = l(R, b[R]);
|
|
3972
|
+
return D.push(...P), D;
|
|
3973
|
+
}, []).reduce((D, R) => D && m(R, d), !0);
|
|
3974
|
+
}
|
|
3975
|
+
function T(b, d) {
|
|
3976
|
+
const f = Object.keys(b), p = f.includes("allOf"), S = f.includes("anyOf"), D = p || S, E = (D ? b[D ? p ? "allOf" : "anyOf" : "allOf"] : [b]).map((k) => x(k, d));
|
|
3977
|
+
return p ? !E.includes(!1) : E.includes(!0);
|
|
3978
|
+
}
|
|
3979
|
+
function v(b, d) {
|
|
3980
|
+
const f = b.const;
|
|
3981
|
+
return f ? typeof f == "boolean" ? f : typeof f == "object" ? T(f, d) : !1 : !1;
|
|
3982
|
+
}
|
|
3983
|
+
function g(b) {
|
|
3984
|
+
return (d) => {
|
|
3985
|
+
const f = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
3986
|
+
return b && b.properties && Object.keys(b.properties).reduce((p, S) => {
|
|
3987
|
+
const D = b.properties[S];
|
|
3988
|
+
return p[S] = v(D, d), p;
|
|
3989
|
+
}, f), f;
|
|
3990
3990
|
};
|
|
3991
3991
|
}
|
|
3992
|
-
function r(
|
|
3993
|
-
if (
|
|
3994
|
-
const { rules:
|
|
3995
|
-
|
|
3996
|
-
(
|
|
3992
|
+
function r(b, d, f) {
|
|
3993
|
+
if (d.type === "object" && d.properties) {
|
|
3994
|
+
const { rules: p, contents: S } = d.properties;
|
|
3995
|
+
f.set(b, g(p)), S && Object.keys(S.properties).forEach(
|
|
3996
|
+
(D) => r(D, S.properties[D], f)
|
|
3997
3997
|
);
|
|
3998
3998
|
}
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4001
|
-
const { properties:
|
|
4002
|
-
Object.keys(
|
|
4003
|
-
r(
|
|
4000
|
+
function c() {
|
|
4001
|
+
const { properties: b } = _o;
|
|
4002
|
+
Object.keys(b).forEach((d) => {
|
|
4003
|
+
r(d, b[d], Ce);
|
|
4004
4004
|
});
|
|
4005
4005
|
}
|
|
4006
|
-
function h(
|
|
4007
|
-
const
|
|
4008
|
-
return Ce.has(
|
|
4006
|
+
function h(b, d) {
|
|
4007
|
+
const f = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
4008
|
+
return Ce.has(b) ? Ce.get(b)(d) : f;
|
|
4009
4009
|
}
|
|
4010
|
-
return
|
|
4010
|
+
return c(), { getRuleValue: h };
|
|
4011
4011
|
}
|
|
4012
4012
|
function Wo(e, t) {
|
|
4013
4013
|
const n = Vo();
|
|
4014
4014
|
let o = !1, a, l = !1;
|
|
4015
|
-
function
|
|
4015
|
+
function m(r) {
|
|
4016
4016
|
return !1;
|
|
4017
4017
|
}
|
|
4018
4018
|
function x() {
|
|
@@ -4025,28 +4025,28 @@ function Wo(e, t) {
|
|
|
4025
4025
|
return o;
|
|
4026
4026
|
}
|
|
4027
4027
|
function g() {
|
|
4028
|
-
const r = e,
|
|
4029
|
-
const
|
|
4030
|
-
return
|
|
4028
|
+
const r = e, c = r.appearance && r.appearance.class || "", h = c ? c.split(" ") : [], b = t == null ? void 0 : t.schema, d = b && b.appearance && b.appearance.class || "", f = d ? d.split(" ") : [], p = r.contents || [], S = p.length ? p[0] : null, D = S && S.appearance && S.appearance.class || "", R = D ? D.split(" ") : [], P = p.length ? p.reduce((i, y) => {
|
|
4029
|
+
const u = y && y.appearance ? y.appearance.class : "", j = u ? u.split(" ") : [];
|
|
4030
|
+
return i.push(...j), i;
|
|
4031
4031
|
}, []) : [], E = (t == null ? void 0 : t.parent) && t.parent.schema, w = E && E.appearance && E.appearance.class || "";
|
|
4032
4032
|
w && w.split(" "), a = {
|
|
4033
|
-
componentClass:
|
|
4033
|
+
componentClass: c,
|
|
4034
4034
|
componentClassList: h,
|
|
4035
|
-
childContents:
|
|
4036
|
-
firstChildContent:
|
|
4037
|
-
firstChildClass:
|
|
4035
|
+
childContents: p,
|
|
4036
|
+
firstChildContent: S,
|
|
4037
|
+
firstChildClass: D,
|
|
4038
4038
|
firstChildClassList: R,
|
|
4039
4039
|
parent,
|
|
4040
|
-
parentClass:
|
|
4041
|
-
parentClassList:
|
|
4042
|
-
children:
|
|
4040
|
+
parentClass: d,
|
|
4041
|
+
parentClassList: f,
|
|
4042
|
+
children: p,
|
|
4043
4043
|
childrenClassList: P
|
|
4044
4044
|
};
|
|
4045
|
-
const { canAccept: k, fixed: F, hidePadding:
|
|
4046
|
-
return o =
|
|
4045
|
+
const { canAccept: k, fixed: F, hidePadding: M } = n.getRuleValue(h[0], a);
|
|
4046
|
+
return o = M, l = F, !0;
|
|
4047
4047
|
}
|
|
4048
4048
|
return {
|
|
4049
|
-
canAccepts:
|
|
4049
|
+
canAccepts: m,
|
|
4050
4050
|
checkCanDeleteComponent: x,
|
|
4051
4051
|
checkCanMoveComponent: T,
|
|
4052
4052
|
hideNestedPaddingInDesginerView: v,
|
|
@@ -4054,111 +4054,111 @@ function Wo(e, t) {
|
|
|
4054
4054
|
};
|
|
4055
4055
|
}
|
|
4056
4056
|
function zo(e, t, n, o) {
|
|
4057
|
-
const a = C([]), l = C(e.activeId || ""),
|
|
4058
|
-
function v(
|
|
4059
|
-
const
|
|
4060
|
-
!l.value &&
|
|
4057
|
+
const a = C([]), l = C(e.activeId || ""), m = C(!0), x = C(), T = C([]);
|
|
4058
|
+
function v(u) {
|
|
4059
|
+
const j = u.value.findIndex(($) => $.props.show !== !1 && !l.value && !$.props.disabled);
|
|
4060
|
+
!l.value && j !== -1 && (l.value = u.value[j].props.id);
|
|
4061
4061
|
}
|
|
4062
|
-
function g(
|
|
4063
|
-
|
|
4062
|
+
function g(u, j) {
|
|
4063
|
+
u.classList.contains(j) || u.classList.add(j);
|
|
4064
4064
|
}
|
|
4065
|
-
function r(
|
|
4066
|
-
|
|
4065
|
+
function r(u, j) {
|
|
4066
|
+
u.classList.remove(j);
|
|
4067
4067
|
}
|
|
4068
|
-
function
|
|
4069
|
-
const { parentElement:
|
|
4070
|
-
|
|
4068
|
+
function c(u) {
|
|
4069
|
+
const { parentElement: j } = u;
|
|
4070
|
+
j && (u.scrollWidth > j.offsetWidth ? g(u, "farris-title-text-custom") : r(u, "farris-title-text-custom"));
|
|
4071
4071
|
}
|
|
4072
|
-
function h(
|
|
4072
|
+
function h(u) {
|
|
4073
4073
|
var $;
|
|
4074
4074
|
if (e.autoTitleWidth)
|
|
4075
4075
|
return;
|
|
4076
|
-
const
|
|
4077
|
-
|
|
4076
|
+
const j = ($ = u.value) == null ? void 0 : $.querySelectorAll(".st-tab-text");
|
|
4077
|
+
j && j.forEach((A) => c(A));
|
|
4078
4078
|
}
|
|
4079
|
-
const
|
|
4080
|
-
|
|
4079
|
+
const b = (u) => {
|
|
4080
|
+
u.preventDefault(), u.stopPropagation();
|
|
4081
4081
|
};
|
|
4082
|
-
function
|
|
4083
|
-
a.value = a.value.filter((
|
|
4082
|
+
function d(u) {
|
|
4083
|
+
a.value = a.value.filter((j) => j.props.id !== u), l.value === u && (l.value = "", v(a));
|
|
4084
4084
|
}
|
|
4085
|
-
function
|
|
4086
|
-
const A = a.value.findIndex((L) => L.props.id ===
|
|
4087
|
-
|
|
4088
|
-
h(n), $ && (
|
|
4085
|
+
function f(u, j, $ = !1) {
|
|
4086
|
+
const A = a.value.findIndex((L) => L.props.id === j);
|
|
4087
|
+
d(j), b(u), oe(() => {
|
|
4088
|
+
h(n), $ && (m.value = !0), t.emit("tabRemove", {
|
|
4089
4089
|
removeIndex: A,
|
|
4090
|
-
removeId:
|
|
4090
|
+
removeId: j,
|
|
4091
4091
|
activeId: l.value
|
|
4092
4092
|
});
|
|
4093
4093
|
});
|
|
4094
4094
|
}
|
|
4095
|
-
function
|
|
4096
|
-
const
|
|
4097
|
-
T.value = [],
|
|
4098
|
-
const
|
|
4095
|
+
function p() {
|
|
4096
|
+
const u = a.value.find((A) => A.props.id === l.value);
|
|
4097
|
+
T.value = [], u && u.props.toolbar && u.props.toolbar.buttons && u.props.toolbar.buttons.length && (T.value = [...u.props.toolbar.buttons]);
|
|
4098
|
+
const j = o.schema.contents, $ = j == null ? void 0 : j.find((A) => A.id === l.value);
|
|
4099
4099
|
x.value = $ == null ? void 0 : $.toolbar;
|
|
4100
4100
|
}
|
|
4101
|
-
function
|
|
4102
|
-
const
|
|
4103
|
-
l.value =
|
|
4104
|
-
prevId:
|
|
4101
|
+
function S(u) {
|
|
4102
|
+
const j = l.value;
|
|
4103
|
+
l.value = u, p(), t.emit("tabChange", {
|
|
4104
|
+
prevId: j,
|
|
4105
4105
|
nextId: l.value
|
|
4106
4106
|
});
|
|
4107
4107
|
}
|
|
4108
|
-
function
|
|
4109
|
-
|
|
4108
|
+
function D(u) {
|
|
4109
|
+
S(u);
|
|
4110
4110
|
}
|
|
4111
|
-
function R(
|
|
4112
|
-
a.value.findIndex(($) => $.props.id ===
|
|
4111
|
+
function R(u) {
|
|
4112
|
+
a.value.findIndex(($) => $.props.id === u.props.id) === -1 && a.value.push(u);
|
|
4113
4113
|
}
|
|
4114
|
-
function P(
|
|
4115
|
-
a.value.findIndex(($) => $.props.id ===
|
|
4116
|
-
$.props.id ===
|
|
4117
|
-
}),
|
|
4114
|
+
function P(u) {
|
|
4115
|
+
a.value.findIndex(($) => $.props.id === u.props.id) !== -1 && (a.value.forEach(($) => {
|
|
4116
|
+
$.props.id === u.props.id && ($ = u);
|
|
4117
|
+
}), oe(() => {
|
|
4118
4118
|
h(n);
|
|
4119
4119
|
}));
|
|
4120
4120
|
}
|
|
4121
|
-
function E(
|
|
4122
|
-
|
|
4121
|
+
function E(u) {
|
|
4122
|
+
u && (u.stopPropagation(), u.preventDefault());
|
|
4123
4123
|
}
|
|
4124
|
-
function w(
|
|
4125
|
-
E(
|
|
4126
|
-
const $ = o.schema.contents, A = $ == null ? void 0 : $.findIndex((L) => L.id ===
|
|
4127
|
-
A === -1 || A === void 0 || ($ == null || $.splice(A, 1),
|
|
4124
|
+
function w(u, j) {
|
|
4125
|
+
E(u);
|
|
4126
|
+
const $ = o.schema.contents, A = $ == null ? void 0 : $.findIndex((L) => L.id === j);
|
|
4127
|
+
A === -1 || A === void 0 || ($ == null || $.splice(A, 1), d(j));
|
|
4128
4128
|
}
|
|
4129
4129
|
function k() {
|
|
4130
4130
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
4131
|
-
(
|
|
4131
|
+
(j) => j.classList.remove("dgComponentFocused")
|
|
4132
4132
|
);
|
|
4133
|
-
const
|
|
4134
|
-
Array.from(
|
|
4133
|
+
const u = document.getElementsByClassName("dgComponentSelected");
|
|
4134
|
+
Array.from(u).forEach((j) => j.classList.remove("dgComponentSelected"));
|
|
4135
4135
|
}
|
|
4136
|
-
function F(
|
|
4137
|
-
|
|
4136
|
+
function F(u) {
|
|
4137
|
+
u.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
4138
4138
|
}
|
|
4139
|
-
function
|
|
4139
|
+
function M(u) {
|
|
4140
4140
|
var L;
|
|
4141
|
-
const { contents:
|
|
4141
|
+
const { contents: j = [] } = o.schema, $ = j == null ? void 0 : j.findIndex((q) => q.id === u), A = j[$];
|
|
4142
4142
|
(L = o == null ? void 0 : o.setupContext) == null || L.emit("selectionChange", A.type, A);
|
|
4143
4143
|
}
|
|
4144
|
-
function u
|
|
4145
|
-
k(), E(
|
|
4144
|
+
function i(u, j) {
|
|
4145
|
+
k(), E(u), F(u), M(j);
|
|
4146
4146
|
}
|
|
4147
|
-
function y(
|
|
4148
|
-
k(), E(
|
|
4147
|
+
function y(u, j) {
|
|
4148
|
+
k(), E(u), F(u);
|
|
4149
4149
|
}
|
|
4150
4150
|
return {
|
|
4151
4151
|
activeId: l,
|
|
4152
4152
|
addTab: R,
|
|
4153
4153
|
changeTitleStyle: h,
|
|
4154
|
-
removeTab:
|
|
4155
|
-
selectTab:
|
|
4156
|
-
selectTabByTabId:
|
|
4154
|
+
removeTab: f,
|
|
4155
|
+
selectTab: D,
|
|
4156
|
+
selectTabByTabId: S,
|
|
4157
4157
|
tabPages: a,
|
|
4158
4158
|
updateTab: P,
|
|
4159
4159
|
toolbarItems: T,
|
|
4160
4160
|
removeDesignTab: w,
|
|
4161
|
-
selectDesignTab:
|
|
4161
|
+
selectDesignTab: i,
|
|
4162
4162
|
selectDesignTabToolbar: y,
|
|
4163
4163
|
toolbarSchema: x
|
|
4164
4164
|
};
|
|
@@ -4169,156 +4169,156 @@ function qo(e, t) {
|
|
|
4169
4169
|
function a() {
|
|
4170
4170
|
o && o();
|
|
4171
4171
|
}
|
|
4172
|
-
function l(
|
|
4172
|
+
function l(i) {
|
|
4173
4173
|
const y = {
|
|
4174
4174
|
"dropdown-menu": !0
|
|
4175
4175
|
};
|
|
4176
|
-
if (
|
|
4177
|
-
const
|
|
4178
|
-
|
|
4176
|
+
if (i.class) {
|
|
4177
|
+
const u = i.menuClass.split(" ");
|
|
4178
|
+
u && u.length && u.reduce((j, $) => (j[$] = !0, j), y);
|
|
4179
4179
|
}
|
|
4180
4180
|
return y;
|
|
4181
4181
|
}
|
|
4182
|
-
function
|
|
4182
|
+
function m(i) {
|
|
4183
4183
|
const y = {
|
|
4184
|
-
disabled: !
|
|
4184
|
+
disabled: !i.enable,
|
|
4185
4185
|
"dropdown-submenu": !0,
|
|
4186
4186
|
"f-rt-dropdown": !0
|
|
4187
|
-
},
|
|
4188
|
-
return
|
|
4187
|
+
}, u = i.dropdownClass.split(" ");
|
|
4188
|
+
return u && u.length && u.reduce((j, $) => (j[$] = !0, j), y), y;
|
|
4189
4189
|
}
|
|
4190
|
-
function x(
|
|
4190
|
+
function x(i) {
|
|
4191
4191
|
const y = {
|
|
4192
|
-
disabled: !
|
|
4192
|
+
disabled: !i.enable,
|
|
4193
4193
|
"dropdown-item": !0,
|
|
4194
4194
|
"f-rt-btn": !0,
|
|
4195
4195
|
"position-relative": !0,
|
|
4196
4196
|
"farris-component": !0
|
|
4197
|
-
},
|
|
4198
|
-
return
|
|
4197
|
+
}, u = i.class.split(" ");
|
|
4198
|
+
return u && u.length && u.reduce((j, $) => (j[$] = !0, j), y), y;
|
|
4199
4199
|
}
|
|
4200
4200
|
let T;
|
|
4201
4201
|
const v = /* @__PURE__ */ new Map();
|
|
4202
|
-
function g(
|
|
4202
|
+
function g(i, y, u) {
|
|
4203
4203
|
var $;
|
|
4204
|
-
(($ =
|
|
4205
|
-
const
|
|
4206
|
-
if (y.children && y.children.length && (y.expanded = !y.expanded, y.expanded ? v.set(
|
|
4207
|
-
const A = v.get(
|
|
4204
|
+
(($ = i.target) == null ? void 0 : $.id) === y.id && i.stopPropagation();
|
|
4205
|
+
const j = u ? u.id : "__top_item__";
|
|
4206
|
+
if (y.children && y.children.length && (y.expanded = !y.expanded, y.expanded ? v.set(j, y) : v.delete(j)), v.has(j) && v.get(j) !== y) {
|
|
4207
|
+
const A = v.get(j);
|
|
4208
4208
|
A && (A.expanded = !1);
|
|
4209
4209
|
}
|
|
4210
4210
|
}
|
|
4211
|
-
function r(
|
|
4212
|
-
|
|
4211
|
+
function r(i) {
|
|
4212
|
+
i && (i.stopPropagation(), i.preventDefault());
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4214
|
+
function c() {
|
|
4215
4215
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused"));
|
|
4216
|
-
const
|
|
4217
|
-
Array.from(
|
|
4216
|
+
const i = document.getElementsByClassName("dgComponentSelected");
|
|
4217
|
+
Array.from(i).forEach((y) => y.classList.remove("dgComponentSelected"));
|
|
4218
4218
|
}
|
|
4219
|
-
function h(
|
|
4220
|
-
|
|
4219
|
+
function h(i) {
|
|
4220
|
+
i.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function b(i) {
|
|
4223
4223
|
const {
|
|
4224
4224
|
buttons: y = []
|
|
4225
4225
|
} = n.schema;
|
|
4226
|
-
let
|
|
4226
|
+
let u = [];
|
|
4227
4227
|
y.forEach((A) => {
|
|
4228
|
-
|
|
4228
|
+
u = u.concat(A.children || []);
|
|
4229
4229
|
});
|
|
4230
|
-
const
|
|
4230
|
+
const j = u.findIndex((A) => A.id === i), $ = j === -1 ? null : u[j];
|
|
4231
4231
|
return {
|
|
4232
|
-
index:
|
|
4232
|
+
index: j,
|
|
4233
4233
|
item: $
|
|
4234
4234
|
};
|
|
4235
4235
|
}
|
|
4236
|
-
function
|
|
4236
|
+
function d(i) {
|
|
4237
4237
|
const {
|
|
4238
4238
|
buttons: y = []
|
|
4239
|
-
} = n.schema,
|
|
4239
|
+
} = n.schema, u = y.findIndex(($) => $.id === i), j = u === -1 ? null : y[u];
|
|
4240
4240
|
return {
|
|
4241
|
-
index:
|
|
4242
|
-
item:
|
|
4241
|
+
index: u,
|
|
4242
|
+
item: j
|
|
4243
4243
|
};
|
|
4244
4244
|
}
|
|
4245
|
-
function
|
|
4246
|
-
var
|
|
4245
|
+
function f(i) {
|
|
4246
|
+
var j;
|
|
4247
4247
|
n.schema;
|
|
4248
4248
|
const {
|
|
4249
4249
|
index: y,
|
|
4250
|
-
item:
|
|
4251
|
-
} =
|
|
4252
|
-
(
|
|
4250
|
+
item: u
|
|
4251
|
+
} = b(i);
|
|
4252
|
+
(j = n == null ? void 0 : n.setupContext) == null || j.emit("selectionChange", u == null ? void 0 : u.type, u);
|
|
4253
4253
|
}
|
|
4254
|
-
const
|
|
4254
|
+
const p = function(i) {
|
|
4255
4255
|
const {
|
|
4256
4256
|
componentType: y
|
|
4257
|
-
} =
|
|
4258
|
-
return
|
|
4259
|
-
},
|
|
4260
|
-
const
|
|
4257
|
+
} = i, u = ae(y, i), j = y.toLowerCase().replace("-", "_");
|
|
4258
|
+
return u && !u.id && u.type === y && (u.id = `${j}_${Math.random().toString().slice(2, 6)}`), u;
|
|
4259
|
+
}, S = function() {
|
|
4260
|
+
const i = {
|
|
4261
4261
|
componentType: "response-toolbar-item",
|
|
4262
4262
|
parentComponentInstance: t.value,
|
|
4263
4263
|
targetPosition: -1
|
|
4264
4264
|
};
|
|
4265
|
-
return
|
|
4265
|
+
return p(i);
|
|
4266
4266
|
};
|
|
4267
|
-
function
|
|
4268
|
-
r(
|
|
4267
|
+
function D(i, y) {
|
|
4268
|
+
r(i), c(), h(i), f(y.id);
|
|
4269
4269
|
}
|
|
4270
|
-
function R(
|
|
4271
|
-
r(
|
|
4272
|
-
const
|
|
4270
|
+
function R(i, y, u) {
|
|
4271
|
+
r(i);
|
|
4272
|
+
const j = y.id, $ = u && u.id, {
|
|
4273
4273
|
buttons: A = []
|
|
4274
4274
|
} = n.schema;
|
|
4275
4275
|
if (!$)
|
|
4276
4276
|
return;
|
|
4277
4277
|
const {
|
|
4278
4278
|
index: L
|
|
4279
|
-
} =
|
|
4279
|
+
} = d($);
|
|
4280
4280
|
if (L === -1)
|
|
4281
4281
|
return;
|
|
4282
4282
|
const {
|
|
4283
4283
|
index: q
|
|
4284
|
-
} =
|
|
4284
|
+
} = b(j);
|
|
4285
4285
|
q !== -1 && (A[L].children.splice(q, 1), a());
|
|
4286
4286
|
}
|
|
4287
|
-
function P(
|
|
4288
|
-
r(
|
|
4289
|
-
const
|
|
4287
|
+
function P(i, y, u) {
|
|
4288
|
+
r(i);
|
|
4289
|
+
const j = u && u.id, {
|
|
4290
4290
|
buttons: $ = []
|
|
4291
4291
|
} = n.schema;
|
|
4292
|
-
if (!
|
|
4292
|
+
if (!j)
|
|
4293
4293
|
return;
|
|
4294
4294
|
const {
|
|
4295
4295
|
index: A
|
|
4296
|
-
} =
|
|
4296
|
+
} = d(j);
|
|
4297
4297
|
if (A === -1)
|
|
4298
4298
|
return;
|
|
4299
|
-
const L =
|
|
4299
|
+
const L = S(), q = Object.assign({}, L, {
|
|
4300
4300
|
text: y.text
|
|
4301
4301
|
});
|
|
4302
4302
|
$[A].children.push(q), a();
|
|
4303
4303
|
}
|
|
4304
|
-
function E(
|
|
4305
|
-
r(
|
|
4306
|
-
const
|
|
4304
|
+
function E(i, y, u) {
|
|
4305
|
+
r(i);
|
|
4306
|
+
const j = u && u.id, {
|
|
4307
4307
|
buttons: $ = []
|
|
4308
4308
|
} = n.schema;
|
|
4309
|
-
if (!
|
|
4309
|
+
if (!j)
|
|
4310
4310
|
return;
|
|
4311
4311
|
const {
|
|
4312
4312
|
index: A
|
|
4313
|
-
} =
|
|
4313
|
+
} = d(j);
|
|
4314
4314
|
if (A === -1)
|
|
4315
4315
|
return;
|
|
4316
|
-
const L =
|
|
4316
|
+
const L = S(), q = Object.assign({}, L, {
|
|
4317
4317
|
text: "按钮"
|
|
4318
4318
|
});
|
|
4319
4319
|
$[A].children.push(q), a();
|
|
4320
4320
|
}
|
|
4321
|
-
function w(
|
|
4321
|
+
function w(i, y) {
|
|
4322
4322
|
return s("div", {
|
|
4323
4323
|
class: "component-btn-group"
|
|
4324
4324
|
}, [s("div", null, [s("div", {
|
|
@@ -4327,7 +4327,7 @@ function qo(e, t) {
|
|
|
4327
4327
|
title: "删除",
|
|
4328
4328
|
ref: "removeButton",
|
|
4329
4329
|
style: "position:static;",
|
|
4330
|
-
onClick: (
|
|
4330
|
+
onClick: (u) => R(u, i, y)
|
|
4331
4331
|
}, [s("i", {
|
|
4332
4332
|
class: "f-icon f-icon-yxs_delete"
|
|
4333
4333
|
}, null)]), s("div", {
|
|
@@ -4336,7 +4336,7 @@ function qo(e, t) {
|
|
|
4336
4336
|
title: "复制",
|
|
4337
4337
|
ref: "copyButton",
|
|
4338
4338
|
style: "position:static;",
|
|
4339
|
-
onClick: (
|
|
4339
|
+
onClick: (u) => P(u, i, y)
|
|
4340
4340
|
}, [s("i", {
|
|
4341
4341
|
class: "f-icon f-icon-yxs_copy"
|
|
4342
4342
|
}, null)]), s("div", {
|
|
@@ -4345,36 +4345,36 @@ function qo(e, t) {
|
|
|
4345
4345
|
title: "新增同级",
|
|
4346
4346
|
ref: "appendSame",
|
|
4347
4347
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
4348
|
-
onClick: (
|
|
4348
|
+
onClick: (u) => E(u, i, y)
|
|
4349
4349
|
}, [s("i", {
|
|
4350
4350
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
4351
4351
|
}, null), s("span", {
|
|
4352
4352
|
style: "font-size:13px;margin:auto"
|
|
4353
4353
|
}, [ie("新增同级")])])])]);
|
|
4354
4354
|
}
|
|
4355
|
-
function k(
|
|
4356
|
-
return
|
|
4357
|
-
class:
|
|
4355
|
+
function k(i) {
|
|
4356
|
+
return i.children.map((y) => y.children && y.children.length ? s("li", {
|
|
4357
|
+
class: m(y),
|
|
4358
4358
|
id: y.id,
|
|
4359
|
-
onClick: (
|
|
4359
|
+
onClick: (u) => y.enable && g(u, y, i)
|
|
4360
4360
|
}, [s("span", {
|
|
4361
4361
|
id: y.id,
|
|
4362
4362
|
class: x(y),
|
|
4363
|
-
onMouseover: (
|
|
4363
|
+
onMouseover: (u) => y.enable && g(u, y, i)
|
|
4364
4364
|
}, [y.text, s("i", {
|
|
4365
4365
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
4366
4366
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
4367
4367
|
}, null)]), T(y, y)]) : s("li", {
|
|
4368
4368
|
class: x(y),
|
|
4369
4369
|
id: y.id,
|
|
4370
|
-
onClick: (
|
|
4371
|
-
}, [w(y,
|
|
4370
|
+
onClick: (u) => D(u, y)
|
|
4371
|
+
}, [w(y, i), e.shouldShowIcon(y) && s("i", {
|
|
4372
4372
|
class: e.iconClass(y)
|
|
4373
4373
|
}, null), y.text]));
|
|
4374
4374
|
}
|
|
4375
|
-
function F(
|
|
4376
|
-
const
|
|
4377
|
-
display:
|
|
4375
|
+
function F(i, y, u) {
|
|
4376
|
+
const j = {
|
|
4377
|
+
display: i.expanded ? "block" : "none",
|
|
4378
4378
|
position: "fixed",
|
|
4379
4379
|
maxWidth: "300px",
|
|
4380
4380
|
width: "auto",
|
|
@@ -4386,133 +4386,133 @@ function qo(e, t) {
|
|
|
4386
4386
|
width: X,
|
|
4387
4387
|
left: J,
|
|
4388
4388
|
right: Z,
|
|
4389
|
-
height:
|
|
4390
|
-
} = L[0], _ = Math.ceil(
|
|
4391
|
-
|
|
4392
|
-
const O =
|
|
4389
|
+
height: ne
|
|
4390
|
+
} = L[0], _ = Math.ceil(ne + q);
|
|
4391
|
+
j.top = `${_}px`, j.left = `${J}px`;
|
|
4392
|
+
const O = i.id + "_menu", I = y ? y.querySelector("#" + O) : null;
|
|
4393
4393
|
if (I) {
|
|
4394
|
-
|
|
4394
|
+
j.display === "block" && (I.style.display = "block");
|
|
4395
4395
|
const N = I.getBoundingClientRect();
|
|
4396
|
-
if (
|
|
4397
|
-
|
|
4396
|
+
if (u) {
|
|
4397
|
+
j.top = `${q - 6}px`;
|
|
4398
4398
|
const H = Math.ceil(X + J);
|
|
4399
|
-
|
|
4399
|
+
j.left = `${H}px`;
|
|
4400
4400
|
}
|
|
4401
|
-
$ - J - X < N.width && (
|
|
4401
|
+
$ - J - X < N.width && (j.left = `${(u ? J : Z) - N.width}px`);
|
|
4402
4402
|
}
|
|
4403
4403
|
}
|
|
4404
|
-
return
|
|
4404
|
+
return j;
|
|
4405
4405
|
}
|
|
4406
|
-
T = function(
|
|
4406
|
+
T = function(i, y) {
|
|
4407
4407
|
var A, L;
|
|
4408
|
-
const
|
|
4408
|
+
const u = Ne(), j = y ? y.id : i.id, $ = (L = (A = u == null ? void 0 : u.exposed) == null ? void 0 : A.elementRef.value) == null ? void 0 : L.querySelector("#" + j);
|
|
4409
4409
|
return s("ul", {
|
|
4410
|
-
class: l(
|
|
4411
|
-
style: F(
|
|
4412
|
-
id:
|
|
4413
|
-
}, [k(
|
|
4410
|
+
class: l(i),
|
|
4411
|
+
style: F(i, $, y),
|
|
4412
|
+
id: i.id + "_menu"
|
|
4413
|
+
}, [k(i)]);
|
|
4414
4414
|
};
|
|
4415
|
-
function
|
|
4416
|
-
v.forEach((
|
|
4417
|
-
|
|
4415
|
+
function M() {
|
|
4416
|
+
v.forEach((i) => {
|
|
4417
|
+
i.expanded = !1;
|
|
4418
4418
|
}), v.clear();
|
|
4419
4419
|
}
|
|
4420
4420
|
return {
|
|
4421
4421
|
renderDropdownMenu: T,
|
|
4422
|
-
clearAllDropDownMenu:
|
|
4422
|
+
clearAllDropDownMenu: M
|
|
4423
4423
|
};
|
|
4424
4424
|
}
|
|
4425
4425
|
function Uo(e, t, n) {
|
|
4426
4426
|
const o = C(e.alignment), {
|
|
4427
4427
|
renderDropdownMenu: a,
|
|
4428
4428
|
clearAllDropDownMenu: l
|
|
4429
|
-
} = qo(t, n),
|
|
4429
|
+
} = qo(t, n), m = ee("design-item-context"), x = ee("toolbar-item-handler", () => {
|
|
4430
4430
|
});
|
|
4431
4431
|
function T() {
|
|
4432
4432
|
x && x();
|
|
4433
4433
|
}
|
|
4434
|
-
function v(
|
|
4435
|
-
const
|
|
4434
|
+
function v(M) {
|
|
4435
|
+
const i = {
|
|
4436
4436
|
"btn-group": !0,
|
|
4437
4437
|
"f-rt-dropdown": !0,
|
|
4438
4438
|
"f-btn-ml": o.value === "right",
|
|
4439
4439
|
"f-btn-mr": o.value === "left"
|
|
4440
|
-
}, y =
|
|
4441
|
-
return y && y.length && y.reduce((
|
|
4440
|
+
}, y = M.dropdownClass.split(" ");
|
|
4441
|
+
return y && y.length && y.reduce((u, j) => (u[j] = !0, u), i), i;
|
|
4442
4442
|
}
|
|
4443
|
-
function g(
|
|
4444
|
-
const
|
|
4443
|
+
function g(M) {
|
|
4444
|
+
const i = {
|
|
4445
4445
|
btn: !0,
|
|
4446
|
-
disabled: !
|
|
4446
|
+
disabled: !M.enable,
|
|
4447
4447
|
"position-relative": !0,
|
|
4448
4448
|
"farris-component": !0,
|
|
4449
4449
|
"f-rt-btn": !0,
|
|
4450
|
-
"btn-icontext": !!(
|
|
4450
|
+
"btn-icontext": !!(M.icon && M.icon.trim())
|
|
4451
4451
|
};
|
|
4452
|
-
if (
|
|
4453
|
-
const y =
|
|
4454
|
-
y && y.length && y.reduce((
|
|
4452
|
+
if (M.class) {
|
|
4453
|
+
const y = M.class.split(" ");
|
|
4454
|
+
y && y.length && y.reduce((u, j) => (u[j] = !0, u), i);
|
|
4455
4455
|
}
|
|
4456
|
-
return
|
|
4456
|
+
return i;
|
|
4457
4457
|
}
|
|
4458
|
-
function r(
|
|
4459
|
-
|
|
4458
|
+
function r(M) {
|
|
4459
|
+
M && (M.stopPropagation(), M.preventDefault());
|
|
4460
4460
|
}
|
|
4461
|
-
function
|
|
4462
|
-
r(
|
|
4463
|
-
const y =
|
|
4464
|
-
document.body.click(),
|
|
4461
|
+
function c(M, i) {
|
|
4462
|
+
r(M);
|
|
4463
|
+
const y = i.expanded;
|
|
4464
|
+
document.body.click(), i.expanded = !y;
|
|
4465
4465
|
}
|
|
4466
|
-
const h = function(
|
|
4466
|
+
const h = function(M) {
|
|
4467
4467
|
const {
|
|
4468
|
-
componentType:
|
|
4469
|
-
} =
|
|
4470
|
-
return y && !y.id && y.type ===
|
|
4471
|
-
},
|
|
4472
|
-
const
|
|
4468
|
+
componentType: i
|
|
4469
|
+
} = M, y = ae(i, M), u = i.toLowerCase().replace("-", "_");
|
|
4470
|
+
return y && !y.id && y.type === i && (y.id = `${u}_${Math.random().toString().slice(2, 6)}`), y;
|
|
4471
|
+
}, b = function() {
|
|
4472
|
+
const M = {
|
|
4473
4473
|
componentType: "response-toolbar-item",
|
|
4474
4474
|
parentComponentInstance: n.value,
|
|
4475
4475
|
targetPosition: -1
|
|
4476
4476
|
};
|
|
4477
|
-
return h(
|
|
4477
|
+
return h(M);
|
|
4478
4478
|
};
|
|
4479
|
-
function
|
|
4480
|
-
const
|
|
4479
|
+
function d(M) {
|
|
4480
|
+
const i = m.schema.buttons || m.schema.contents, y = i == null ? void 0 : i.findIndex((j) => j.id === M), u = y === -1 ? null : i[y];
|
|
4481
4481
|
return {
|
|
4482
4482
|
index: y,
|
|
4483
|
-
toolbarItem:
|
|
4483
|
+
toolbarItem: u
|
|
4484
4484
|
};
|
|
4485
4485
|
}
|
|
4486
|
-
function
|
|
4486
|
+
function f(M, i) {
|
|
4487
4487
|
var L;
|
|
4488
4488
|
const {
|
|
4489
4489
|
index: y,
|
|
4490
|
-
toolbarItem:
|
|
4491
|
-
} =
|
|
4490
|
+
toolbarItem: u
|
|
4491
|
+
} = d(i);
|
|
4492
4492
|
if (y === -1)
|
|
4493
4493
|
return;
|
|
4494
|
-
const
|
|
4495
|
-
text:
|
|
4494
|
+
const j = u.text || "按钮", $ = b(), A = Object.assign({}, $, {
|
|
4495
|
+
text: j
|
|
4496
4496
|
});
|
|
4497
|
-
(L =
|
|
4497
|
+
(L = m.schema.buttons) == null || L.push(A), T();
|
|
4498
4498
|
}
|
|
4499
|
-
function
|
|
4499
|
+
function p(M, i) {
|
|
4500
4500
|
const {
|
|
4501
4501
|
index: y,
|
|
4502
|
-
toolbarItem:
|
|
4503
|
-
} =
|
|
4502
|
+
toolbarItem: u
|
|
4503
|
+
} = d(i);
|
|
4504
4504
|
if (y === -1)
|
|
4505
4505
|
return;
|
|
4506
|
-
const
|
|
4507
|
-
text:
|
|
4508
|
-
}), L =
|
|
4509
|
-
L.push(A),
|
|
4506
|
+
const j = u.text || "按钮", $ = b(), A = Object.assign({}, $, {
|
|
4507
|
+
text: j
|
|
4508
|
+
}), L = m.schema.buttons[y].children || [];
|
|
4509
|
+
L.push(A), m.schema.buttons[y].children = L, T();
|
|
4510
4510
|
}
|
|
4511
|
-
function
|
|
4512
|
-
const y =
|
|
4513
|
-
|
|
4511
|
+
function S(M, i) {
|
|
4512
|
+
const y = m.schema.buttons || m.schema.contents, u = y == null ? void 0 : y.findIndex((j) => j.id === i);
|
|
4513
|
+
u !== -1 && (y.splice(u, 1), T());
|
|
4514
4514
|
}
|
|
4515
|
-
function M
|
|
4515
|
+
function D(M) {
|
|
4516
4516
|
return s("div", {
|
|
4517
4517
|
class: "component-btn-group"
|
|
4518
4518
|
}, [s("div", null, [s("div", {
|
|
@@ -4521,7 +4521,7 @@ function Uo(e, t, n) {
|
|
|
4521
4521
|
title: "删除",
|
|
4522
4522
|
ref: "removeButton",
|
|
4523
4523
|
style: "position:static;",
|
|
4524
|
-
onClick: (
|
|
4524
|
+
onClick: (i) => S(i, M)
|
|
4525
4525
|
}, [s("i", {
|
|
4526
4526
|
class: "f-icon f-icon-yxs_delete"
|
|
4527
4527
|
}, null)]), s("div", {
|
|
@@ -4530,7 +4530,7 @@ function Uo(e, t, n) {
|
|
|
4530
4530
|
title: "复制",
|
|
4531
4531
|
ref: "copyButton",
|
|
4532
4532
|
style: "position:static;",
|
|
4533
|
-
onClick: (
|
|
4533
|
+
onClick: (i) => f(i, M)
|
|
4534
4534
|
}, [s("i", {
|
|
4535
4535
|
class: "f-icon f-icon-yxs_copy"
|
|
4536
4536
|
}, null)]), s("div", {
|
|
@@ -4539,7 +4539,7 @@ function Uo(e, t, n) {
|
|
|
4539
4539
|
title: "新增子级",
|
|
4540
4540
|
ref: "appendChildButton",
|
|
4541
4541
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
4542
|
-
onClick: (
|
|
4542
|
+
onClick: (i) => p(i, M)
|
|
4543
4543
|
}, [s("i", {
|
|
4544
4544
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
4545
4545
|
}, null), s("span", {
|
|
@@ -4547,38 +4547,38 @@ function Uo(e, t, n) {
|
|
|
4547
4547
|
}, [ie("新增子级")])])])]);
|
|
4548
4548
|
}
|
|
4549
4549
|
function R() {
|
|
4550
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
4551
|
-
const
|
|
4552
|
-
Array.from(
|
|
4550
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((i) => i.classList.remove("dgComponentFocused"));
|
|
4551
|
+
const M = document.getElementsByClassName("dgComponentSelected");
|
|
4552
|
+
Array.from(M).forEach((i) => i.classList.remove("dgComponentSelected"));
|
|
4553
4553
|
}
|
|
4554
|
-
function P(
|
|
4555
|
-
|
|
4554
|
+
function P(M) {
|
|
4555
|
+
M.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
4556
4556
|
}
|
|
4557
|
-
function E(
|
|
4558
|
-
var
|
|
4559
|
-
const
|
|
4557
|
+
function E(M) {
|
|
4558
|
+
var j;
|
|
4559
|
+
const i = m.schema.buttons || m.schema.contents, y = i == null ? void 0 : i.findIndex(($) => $.id === M);
|
|
4560
4560
|
if (y === -1)
|
|
4561
4561
|
return;
|
|
4562
|
-
const
|
|
4563
|
-
(
|
|
4562
|
+
const u = i[y];
|
|
4563
|
+
(j = m == null ? void 0 : m.setupContext) == null || j.emit("selectionChange", "response-toolbar-item", u);
|
|
4564
4564
|
}
|
|
4565
|
-
function w(
|
|
4566
|
-
r(
|
|
4565
|
+
function w(M, i) {
|
|
4566
|
+
r(M), R(), P(M), r(M), c(M, i), E(i.id);
|
|
4567
4567
|
}
|
|
4568
|
-
function k(
|
|
4568
|
+
function k(M) {
|
|
4569
4569
|
return s("div", {
|
|
4570
|
-
id:
|
|
4571
|
-
class: v(
|
|
4570
|
+
id: M.id,
|
|
4571
|
+
class: v(M)
|
|
4572
4572
|
}, [s("div", {
|
|
4573
|
-
class: g(
|
|
4573
|
+
class: g(M),
|
|
4574
4574
|
style: "display: flex;padding-right: 0.1rem;",
|
|
4575
|
-
onClick: (
|
|
4576
|
-
}, [M
|
|
4577
|
-
class: t.iconClass(
|
|
4578
|
-
}, null), s("span", null, [
|
|
4575
|
+
onClick: (i) => M.enable && w(i, M)
|
|
4576
|
+
}, [D(M.id), t.shouldShowIcon(M) && s("i", {
|
|
4577
|
+
class: t.iconClass(M)
|
|
4578
|
+
}, null), s("span", null, [M.text]), s("i", {
|
|
4579
4579
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
4580
4580
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
4581
|
-
}, null)]), a(
|
|
4581
|
+
}, null)]), a(M)]);
|
|
4582
4582
|
}
|
|
4583
4583
|
function F() {
|
|
4584
4584
|
l();
|
|
@@ -4595,34 +4595,34 @@ const {
|
|
|
4595
4595
|
props: je,
|
|
4596
4596
|
emits: ["Click"],
|
|
4597
4597
|
setup(e, t) {
|
|
4598
|
-
const n = C(Re(e.items)), o = C(), a = C(), l = C(e.alignment),
|
|
4598
|
+
const n = C(Re(e.items)), o = C(), a = C(), l = C(e.alignment), m = {
|
|
4599
4599
|
id: "__more_buttons__",
|
|
4600
4600
|
text: "More"
|
|
4601
|
-
}, x = C(new ce(
|
|
4601
|
+
}, x = C(new ce(m)), T = Ze(), v = B(() => x.value.children.length > 0), g = C(), r = ee("design-item-context"), c = Me(g, r), h = ee("toolbar-item-handler", () => {
|
|
4602
4602
|
});
|
|
4603
4603
|
K(() => {
|
|
4604
|
-
g.value.componentInstance =
|
|
4605
|
-
}), t.expose(
|
|
4606
|
-
function
|
|
4604
|
+
g.value.componentInstance = c;
|
|
4605
|
+
}), t.expose(c.value);
|
|
4606
|
+
function b() {
|
|
4607
4607
|
h && h();
|
|
4608
4608
|
}
|
|
4609
|
-
const
|
|
4609
|
+
const d = B(() => ({
|
|
4610
4610
|
"f-toolbar": !0,
|
|
4611
4611
|
"f-response-toolbar": !0,
|
|
4612
4612
|
"position-relative": !0
|
|
4613
|
-
})),
|
|
4613
|
+
})), f = B(() => ({
|
|
4614
4614
|
"d-flex": !0,
|
|
4615
4615
|
"flex-nowrap": !0,
|
|
4616
4616
|
"justify-content-end": l.value === "right",
|
|
4617
4617
|
"justify-content-start": l.value === "left"
|
|
4618
4618
|
})), {
|
|
4619
|
-
renderToolbarDropdown:
|
|
4620
|
-
clearAllDropDown:
|
|
4621
|
-
} = Uo(e, T,
|
|
4622
|
-
function
|
|
4619
|
+
renderToolbarDropdown: p,
|
|
4620
|
+
clearAllDropDown: S
|
|
4621
|
+
} = Uo(e, T, c);
|
|
4622
|
+
function D() {
|
|
4623
4623
|
n.value.filter((O) => O.children && O.children.length > 0).forEach((O) => {
|
|
4624
4624
|
O.expanded = !1;
|
|
4625
|
-
}), x.value.expanded = !1,
|
|
4625
|
+
}), x.value.expanded = !1, S();
|
|
4626
4626
|
}
|
|
4627
4627
|
function R(O) {
|
|
4628
4628
|
const I = {
|
|
@@ -4662,7 +4662,7 @@ const {
|
|
|
4662
4662
|
function F(O) {
|
|
4663
4663
|
O.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
4664
4664
|
}
|
|
4665
|
-
function
|
|
4665
|
+
function M(O) {
|
|
4666
4666
|
var V;
|
|
4667
4667
|
const I = r.schema.buttons || r.schema.contents, N = I == null ? void 0 : I.findIndex((W) => W.id === O);
|
|
4668
4668
|
if (N === -1)
|
|
@@ -4670,7 +4670,7 @@ const {
|
|
|
4670
4670
|
const H = I[N];
|
|
4671
4671
|
(V = r == null ? void 0 : r.setupContext) == null || V.emit("selectionChange", "response-toolbar-item", H);
|
|
4672
4672
|
}
|
|
4673
|
-
const
|
|
4673
|
+
const i = function(O) {
|
|
4674
4674
|
const {
|
|
4675
4675
|
componentType: I
|
|
4676
4676
|
} = O, N = ae(I, O), H = I.toLowerCase().replace("-", "_");
|
|
@@ -4678,17 +4678,17 @@ const {
|
|
|
4678
4678
|
}, y = function() {
|
|
4679
4679
|
const O = {
|
|
4680
4680
|
componentType: "response-toolbar-item",
|
|
4681
|
-
parentComponentInstance:
|
|
4681
|
+
parentComponentInstance: c.value,
|
|
4682
4682
|
targetPosition: -1
|
|
4683
4683
|
};
|
|
4684
|
-
return
|
|
4684
|
+
return i(O);
|
|
4685
4685
|
};
|
|
4686
|
-
function
|
|
4687
|
-
k(), F(O), w(O),
|
|
4686
|
+
function u(O, I) {
|
|
4687
|
+
k(), F(O), w(O), M(I);
|
|
4688
4688
|
}
|
|
4689
|
-
function
|
|
4689
|
+
function j(O, I) {
|
|
4690
4690
|
const N = r.schema.buttons || r.schema.contents, H = N == null ? void 0 : N.findIndex((V) => V.id === I);
|
|
4691
|
-
H !== -1 && (N.splice(H, 1),
|
|
4691
|
+
H !== -1 && (N.splice(H, 1), b());
|
|
4692
4692
|
}
|
|
4693
4693
|
function $(O) {
|
|
4694
4694
|
const I = r.schema.buttons || r.schema.contents, N = I == null ? void 0 : I.findIndex((V) => V.id === O), H = N === -1 ? null : I[N];
|
|
@@ -4708,7 +4708,7 @@ const {
|
|
|
4708
4708
|
const V = H.text || "按钮", W = y(), z = Object.assign({}, W, {
|
|
4709
4709
|
text: V
|
|
4710
4710
|
});
|
|
4711
|
-
(Q = r.schema.buttons) == null || Q.push(z),
|
|
4711
|
+
(Q = r.schema.buttons) == null || Q.push(z), b();
|
|
4712
4712
|
}
|
|
4713
4713
|
function L(O, I) {
|
|
4714
4714
|
const {
|
|
@@ -4720,7 +4720,7 @@ const {
|
|
|
4720
4720
|
const V = H.text || "按钮", W = y(), z = Object.assign({}, W, {
|
|
4721
4721
|
text: V
|
|
4722
4722
|
}), Q = r.schema.buttons[N].items || [];
|
|
4723
|
-
Q.push(z), r.schema.buttons[N].children = Q,
|
|
4723
|
+
Q.push(z), r.schema.buttons[N].children = Q, b();
|
|
4724
4724
|
}
|
|
4725
4725
|
function q(O) {
|
|
4726
4726
|
return s("div", {
|
|
@@ -4731,7 +4731,7 @@ const {
|
|
|
4731
4731
|
title: "删除",
|
|
4732
4732
|
ref: "removeButton",
|
|
4733
4733
|
style: "position:static;",
|
|
4734
|
-
onClick: (I) =>
|
|
4734
|
+
onClick: (I) => j(I, O)
|
|
4735
4735
|
}, [s("i", {
|
|
4736
4736
|
class: "f-icon f-icon-yxs_delete"
|
|
4737
4737
|
}, null)]), s("div", {
|
|
@@ -4760,7 +4760,7 @@ const {
|
|
|
4760
4760
|
return s("div", {
|
|
4761
4761
|
class: "farris-component position-relative",
|
|
4762
4762
|
style: "display:inline-block!important;",
|
|
4763
|
-
onClick: (I) =>
|
|
4763
|
+
onClick: (I) => u(I, O.id)
|
|
4764
4764
|
}, [q(O.id), s("button", {
|
|
4765
4765
|
type: "button",
|
|
4766
4766
|
class: E(O),
|
|
@@ -4771,7 +4771,7 @@ const {
|
|
|
4771
4771
|
}, null), O.text])]);
|
|
4772
4772
|
}
|
|
4773
4773
|
const J = /* @__PURE__ */ new Map(), Z = [];
|
|
4774
|
-
function
|
|
4774
|
+
function ne(O) {
|
|
4775
4775
|
const I = a.value;
|
|
4776
4776
|
let N = O;
|
|
4777
4777
|
const H = Array.from(I.children), V = H[H.length - 1].id === "__more_buttons__" ? H[H.length - 1] : null;
|
|
@@ -4803,27 +4803,27 @@ const {
|
|
|
4803
4803
|
const _ = new ResizeObserver((O) => {
|
|
4804
4804
|
if (O.length) {
|
|
4805
4805
|
const N = O[0].contentRect.width, V = a.value.getBoundingClientRect().width;
|
|
4806
|
-
(N < V || Z.length) &&
|
|
4806
|
+
(N < V || Z.length) && ne(N);
|
|
4807
4807
|
}
|
|
4808
4808
|
});
|
|
4809
4809
|
return K(() => {
|
|
4810
4810
|
const O = o.value;
|
|
4811
|
-
_.observe(O), document.body.addEventListener("click",
|
|
4811
|
+
_.observe(O), document.body.addEventListener("click", D);
|
|
4812
4812
|
}), ue(() => {
|
|
4813
|
-
_.disconnect(), document.body.removeEventListener("click",
|
|
4814
|
-
}),
|
|
4813
|
+
_.disconnect(), document.body.removeEventListener("click", D);
|
|
4814
|
+
}), se(() => e.items, () => {
|
|
4815
4815
|
n.value = Re(e.items);
|
|
4816
4816
|
}), () => s("div", {
|
|
4817
4817
|
ref: g,
|
|
4818
|
-
class:
|
|
4818
|
+
class: d.value
|
|
4819
4819
|
}, [s("div", {
|
|
4820
4820
|
ref: o,
|
|
4821
|
-
class:
|
|
4821
|
+
class: f.value
|
|
4822
4822
|
}, [s("div", {
|
|
4823
4823
|
ref: a,
|
|
4824
4824
|
class: "d-inline-block f-response-content",
|
|
4825
4825
|
style: "white-space: nowrap;"
|
|
4826
|
-
}, [n.value.filter((O) => O.visible).map((O) => O.children && O.children.length > 0 ?
|
|
4826
|
+
}, [n.value.filter((O) => O.visible).map((O) => O.children && O.children.length > 0 ? p(O) : X(O)), v.value && p(x.value)])])]);
|
|
4827
4827
|
}
|
|
4828
4828
|
}), Jo = {
|
|
4829
4829
|
id: { type: String, default: "" },
|
|
@@ -4858,10 +4858,10 @@ function Qo(e) {
|
|
|
4858
4858
|
return;
|
|
4859
4859
|
}
|
|
4860
4860
|
o.style.display = "";
|
|
4861
|
-
const l = o.getBoundingClientRect(),
|
|
4862
|
-
if (
|
|
4863
|
-
const x =
|
|
4864
|
-
|
|
4861
|
+
const l = o.getBoundingClientRect(), m = o.querySelector("div");
|
|
4862
|
+
if (m) {
|
|
4863
|
+
const x = m.getBoundingClientRect();
|
|
4864
|
+
m.style.top = l.top + "px", m.style.left = l.left - x.width + "px";
|
|
4865
4865
|
}
|
|
4866
4866
|
}
|
|
4867
4867
|
}
|
|
@@ -4870,7 +4870,7 @@ function Xo(e, t, n) {
|
|
|
4870
4870
|
function o() {
|
|
4871
4871
|
}
|
|
4872
4872
|
const a = "", l = C();
|
|
4873
|
-
function
|
|
4873
|
+
function m() {
|
|
4874
4874
|
return !0;
|
|
4875
4875
|
}
|
|
4876
4876
|
function x() {
|
|
@@ -4892,36 +4892,36 @@ function Xo(e, t, n) {
|
|
|
4892
4892
|
const { componentInstance: E, designerItemElementRef: w } = P;
|
|
4893
4893
|
return !E || !E.value ? null : E.value.canMove ? w : r(P.parent);
|
|
4894
4894
|
}
|
|
4895
|
-
function
|
|
4895
|
+
function c(P) {
|
|
4896
4896
|
return !!n;
|
|
4897
4897
|
}
|
|
4898
4898
|
function h() {
|
|
4899
4899
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
4900
4900
|
}
|
|
4901
|
-
function
|
|
4901
|
+
function b() {
|
|
4902
4902
|
}
|
|
4903
|
-
function
|
|
4903
|
+
function d(P, E) {
|
|
4904
4904
|
}
|
|
4905
|
-
function
|
|
4905
|
+
function f(P) {
|
|
4906
4906
|
const { componentType: E } = P;
|
|
4907
4907
|
let w = ae(E, P);
|
|
4908
4908
|
const k = E.toLowerCase().replace("-", "_");
|
|
4909
4909
|
return w && !w.id && w.type === E && (w.id = `${k}_${Math.random().toString().slice(2, 6)}`), w;
|
|
4910
4910
|
}
|
|
4911
|
-
function
|
|
4911
|
+
function p(P, E) {
|
|
4912
4912
|
const w = String(P.getAttribute("data-controltype")), k = P.getAttribute("data-feature"), F = k ? JSON.parse(k) : {};
|
|
4913
4913
|
F.parentComponentInstance = l.value;
|
|
4914
|
-
let
|
|
4915
|
-
const
|
|
4916
|
-
return
|
|
4914
|
+
let M = ae(w, F);
|
|
4915
|
+
const i = w.toLowerCase().replace("-", "_");
|
|
4916
|
+
return M && !M.id && M.type === w && (M.id = `${i}_${Math.random().toString().slice(2, 6)}`), M;
|
|
4917
4917
|
}
|
|
4918
|
-
function
|
|
4918
|
+
function S(P) {
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function D() {
|
|
4921
4921
|
return [];
|
|
4922
4922
|
}
|
|
4923
4923
|
return l.value = {
|
|
4924
|
-
canMove:
|
|
4924
|
+
canMove: m(),
|
|
4925
4925
|
canSelectParent: x(),
|
|
4926
4926
|
canDelete: T(),
|
|
4927
4927
|
canNested: !v(),
|
|
@@ -4930,16 +4930,16 @@ function Xo(e, t, n) {
|
|
|
4930
4930
|
parent: (R = t.parent) == null ? void 0 : R.componentInstance,
|
|
4931
4931
|
schema: t.schema,
|
|
4932
4932
|
styles: a,
|
|
4933
|
-
canAccepts:
|
|
4933
|
+
canAccepts: c,
|
|
4934
4934
|
getBelongedComponentInstance: g,
|
|
4935
4935
|
getDraggableDesignItemElement: r,
|
|
4936
4936
|
getDraggingDisplayText: h,
|
|
4937
|
-
getPropConfig:
|
|
4938
|
-
getDragScopeElement:
|
|
4939
|
-
onAcceptMovedChildElement:
|
|
4940
|
-
onAcceptNewChildElement:
|
|
4941
|
-
onChildElementMovedOut:
|
|
4942
|
-
addNewChildComponentSchema:
|
|
4937
|
+
getPropConfig: D,
|
|
4938
|
+
getDragScopeElement: b,
|
|
4939
|
+
onAcceptMovedChildElement: d,
|
|
4940
|
+
onAcceptNewChildElement: p,
|
|
4941
|
+
onChildElementMovedOut: S,
|
|
4942
|
+
addNewChildComponentSchema: f,
|
|
4943
4943
|
updateDragAndDropRules: o,
|
|
4944
4944
|
triggerBelongedComponentToMoveWhenMoved: C(!1),
|
|
4945
4945
|
triggerBelongedComponentToDeleteWhenDeleted: C(!1)
|
|
@@ -4950,42 +4950,42 @@ const Yo = /* @__PURE__ */ te({
|
|
|
4950
4950
|
props: Jo,
|
|
4951
4951
|
emits: ["selectionChange", "addComponent"],
|
|
4952
4952
|
setup(e, t) {
|
|
4953
|
-
const n = C(e.canMove), o = C(e.canAdd), a = C(e.canDelete), l = C(!1),
|
|
4953
|
+
const n = C(e.canMove), o = C(e.canAdd), a = C(e.canDelete), l = C(!1), m = C(e.contentKey), x = C(e.childType), T = C(e.childLabel), v = C(e.modelValue), g = C(""), r = C(), c = ee("canvas-dragula"), h = C(), b = ee("design-item-context"), d = {
|
|
4954
4954
|
designerItemElementRef: r,
|
|
4955
4955
|
componentInstance: h,
|
|
4956
4956
|
schema: v.value,
|
|
4957
|
-
parent:
|
|
4957
|
+
parent: b,
|
|
4958
4958
|
setupContext: t
|
|
4959
4959
|
};
|
|
4960
|
-
be("design-item-context",
|
|
4961
|
-
const
|
|
4960
|
+
be("design-item-context", d);
|
|
4961
|
+
const f = B(() => ({
|
|
4962
4962
|
"farris-component": !0,
|
|
4963
4963
|
"position-relative": n.value && a.value,
|
|
4964
4964
|
"farris-nested": l.value,
|
|
4965
4965
|
"can-move": n.value,
|
|
4966
4966
|
"d-none": r.value && r.value.classList.contains("d-none")
|
|
4967
|
-
})),
|
|
4968
|
-
const
|
|
4969
|
-
return g.value && g.value.split(";").reduce((y,
|
|
4970
|
-
const [
|
|
4971
|
-
return
|
|
4972
|
-
},
|
|
4967
|
+
})), p = B(() => {
|
|
4968
|
+
const i = {};
|
|
4969
|
+
return g.value && g.value.split(";").reduce((y, u) => {
|
|
4970
|
+
const [j, $] = u.split(":");
|
|
4971
|
+
return j && (y[j] = $), y;
|
|
4972
|
+
}, i), i;
|
|
4973
4973
|
});
|
|
4974
|
-
function
|
|
4975
|
-
if (
|
|
4976
|
-
const
|
|
4977
|
-
|
|
4974
|
+
function S(i, y) {
|
|
4975
|
+
if (b && b.schema[m.value]) {
|
|
4976
|
+
const u = b.schema[m.value].findIndex((j) => j.id === y.id);
|
|
4977
|
+
b.schema[m.value].splice(u, 1), b.componentInstance.value.updateDragAndDropRules();
|
|
4978
4978
|
}
|
|
4979
4979
|
}
|
|
4980
|
-
function
|
|
4980
|
+
function D(i) {
|
|
4981
4981
|
if (h.value.addNewChildComponentSchema) {
|
|
4982
4982
|
const y = {
|
|
4983
4983
|
componentType: x.value,
|
|
4984
4984
|
label: T.value,
|
|
4985
4985
|
parentComponentInstance: h.value,
|
|
4986
4986
|
targetPosition: -1
|
|
4987
|
-
},
|
|
4988
|
-
v.value[
|
|
4987
|
+
}, u = h.value.addNewChildComponentSchema(y);
|
|
4988
|
+
v.value[m.value].push(u), t.emit("addComponent");
|
|
4989
4989
|
}
|
|
4990
4990
|
}
|
|
4991
4991
|
function R() {
|
|
@@ -4994,64 +4994,64 @@ const Yo = /* @__PURE__ */ te({
|
|
|
4994
4994
|
class: "btn component-settings-button",
|
|
4995
4995
|
title: "新增",
|
|
4996
4996
|
ref: "removeComponent",
|
|
4997
|
-
onClick: (
|
|
4998
|
-
|
|
4997
|
+
onClick: (i) => {
|
|
4998
|
+
D();
|
|
4999
4999
|
}
|
|
5000
5000
|
}, [s("i", {
|
|
5001
5001
|
class: "f-icon f-icon-plus-circle"
|
|
5002
5002
|
}, null)]);
|
|
5003
5003
|
}
|
|
5004
|
-
function P(
|
|
5004
|
+
function P(i) {
|
|
5005
5005
|
return a.value && s("div", {
|
|
5006
5006
|
role: "button",
|
|
5007
5007
|
class: "btn component-settings-button",
|
|
5008
5008
|
title: "删除",
|
|
5009
5009
|
ref: "removeComponent",
|
|
5010
5010
|
onClick: (y) => {
|
|
5011
|
-
|
|
5011
|
+
S(y, i);
|
|
5012
5012
|
}
|
|
5013
5013
|
}, [s("i", {
|
|
5014
5014
|
class: "f-icon f-icon-yxs_delete"
|
|
5015
5015
|
}, null)]);
|
|
5016
5016
|
}
|
|
5017
|
-
function E(
|
|
5017
|
+
function E(i) {
|
|
5018
5018
|
return s("div", {
|
|
5019
5019
|
class: "component-btn-group",
|
|
5020
5020
|
"data-noattach": "true"
|
|
5021
|
-
}, [s("div", null, [R(), P(
|
|
5021
|
+
}, [s("div", null, [R(), P(i)])]);
|
|
5022
5022
|
}
|
|
5023
|
-
|
|
5024
|
-
v.value =
|
|
5023
|
+
se(() => e.modelValue, (i) => {
|
|
5024
|
+
v.value = i, d.schema = i;
|
|
5025
5025
|
});
|
|
5026
|
-
function w(
|
|
5027
|
-
const y =
|
|
5026
|
+
function w(i) {
|
|
5027
|
+
const y = i.target;
|
|
5028
5028
|
Qo(y);
|
|
5029
5029
|
}
|
|
5030
5030
|
function k() {
|
|
5031
|
-
var
|
|
5032
|
-
(y = (
|
|
5031
|
+
var i, y;
|
|
5032
|
+
(y = (i = v.value) == null ? void 0 : i.contents) != null && y.length && r.value && r.value.addEventListener("scroll", w);
|
|
5033
5033
|
}
|
|
5034
5034
|
function F() {
|
|
5035
|
-
const
|
|
5036
|
-
return Xo(y,
|
|
5035
|
+
const i = r.value, y = C(i.children[1]);
|
|
5036
|
+
return Xo(y, d).value;
|
|
5037
5037
|
}
|
|
5038
5038
|
K(() => {
|
|
5039
5039
|
if (r.value) {
|
|
5040
|
-
const
|
|
5041
|
-
h.value =
|
|
5040
|
+
const i = r.value.querySelector(`[data-dragref='${v.value.id}-container']`);
|
|
5041
|
+
h.value = i && i.componentInstance ? i.componentInstance.value : F(), c && i && c.attachComponents(i, v.value), l.value = h.value.canNested !== void 0 ? h.value.canNested : l.value, n.value = h.value.canMove !== void 0 ? h.value.canMove : n.value, g.value = h.value.styles || "", r.value && (r.value.componentInstance = h, r.value.designItemContext = d);
|
|
5042
5042
|
}
|
|
5043
5043
|
k(), Fe.value++;
|
|
5044
5044
|
}), ut(() => {
|
|
5045
5045
|
r.value && r.value.removeEventListener("scroll", w);
|
|
5046
5046
|
});
|
|
5047
|
-
function
|
|
5048
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
5047
|
+
function M(i) {
|
|
5048
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), i && (i.preventDefault(), i.stopPropagation());
|
|
5049
5049
|
const y = r.value;
|
|
5050
5050
|
if (y) {
|
|
5051
|
-
const
|
|
5052
|
-
if (!(
|
|
5053
|
-
Array.from(
|
|
5054
|
-
const $ = h.value.getDraggableDesignItemElement(
|
|
5051
|
+
const u = document.getElementsByClassName("dgComponentSelected");
|
|
5052
|
+
if (!(u && u.length === 1 && u[0] === r.value)) {
|
|
5053
|
+
Array.from(u).forEach((A) => A.classList.remove("dgComponentSelected")), y.classList.add("dgComponentFocused"), t.emit("selectionChange", v.value.type, v.value);
|
|
5054
|
+
const $ = h.value.getDraggableDesignItemElement(d);
|
|
5055
5055
|
$ && $.value && $.value.classList.add("dgComponentSelected");
|
|
5056
5056
|
}
|
|
5057
5057
|
}
|
|
@@ -5060,9 +5060,9 @@ const Yo = /* @__PURE__ */ te({
|
|
|
5060
5060
|
return () => s("div", {
|
|
5061
5061
|
id: `${e.id}-design-item`,
|
|
5062
5062
|
ref: r,
|
|
5063
|
-
class:
|
|
5064
|
-
style:
|
|
5065
|
-
onClick:
|
|
5063
|
+
class: f.value,
|
|
5064
|
+
style: p.value,
|
|
5065
|
+
onClick: M
|
|
5066
5066
|
}, [E(v.value), t.slots.default && t.slots.default()]);
|
|
5067
5067
|
}
|
|
5068
5068
|
});
|
|
@@ -5070,7 +5070,7 @@ function Ko(e, t, n, o) {
|
|
|
5070
5070
|
const {
|
|
5071
5071
|
toolbarItems: a,
|
|
5072
5072
|
toolbarSchema: l
|
|
5073
|
-
} = e,
|
|
5073
|
+
} = e, m = (T) => {
|
|
5074
5074
|
};
|
|
5075
5075
|
function x(T, v) {
|
|
5076
5076
|
var g;
|
|
@@ -5091,7 +5091,7 @@ function Ko(e, t, n, o) {
|
|
|
5091
5091
|
}, {
|
|
5092
5092
|
default: () => [s(Go, {
|
|
5093
5093
|
items: a.value,
|
|
5094
|
-
onClick:
|
|
5094
|
+
onClick: m
|
|
5095
5095
|
}, null)]
|
|
5096
5096
|
})])]);
|
|
5097
5097
|
}
|
|
@@ -5100,37 +5100,37 @@ const es = /* @__PURE__ */ te({
|
|
|
5100
5100
|
props: Se,
|
|
5101
5101
|
emits: ["tabChange", "tabRemove"],
|
|
5102
5102
|
setup(e, t) {
|
|
5103
|
-
const n = C(), o = ee("design-item-context"), a = Wo(o.schema, o.parent), l = Me(n, o, a),
|
|
5103
|
+
const n = C(), o = ee("design-item-context"), a = Wo(o.schema, o.parent), l = Me(n, o, a), m = C(e.tabType), x = re(), T = re(), v = zo(e, t, x, o), {
|
|
5104
5104
|
activeId: g,
|
|
5105
5105
|
changeTitleStyle: r,
|
|
5106
|
-
tabPages:
|
|
5106
|
+
tabPages: c,
|
|
5107
5107
|
addTab: h,
|
|
5108
|
-
updateTab:
|
|
5109
|
-
selectTabByTabId:
|
|
5110
|
-
toolbarItems:
|
|
5111
|
-
} = v,
|
|
5112
|
-
previousButtonClass:
|
|
5108
|
+
updateTab: b,
|
|
5109
|
+
selectTabByTabId: d,
|
|
5110
|
+
toolbarItems: f
|
|
5111
|
+
} = v, p = Ge(e, T, v), S = qe(e, x, p, v), {
|
|
5112
|
+
previousButtonClass: D,
|
|
5113
5113
|
nextButtonClass: R,
|
|
5114
5114
|
nextButtonGroupClass: P,
|
|
5115
5115
|
scrollTab: E,
|
|
5116
5116
|
updateNavigationLayout: w
|
|
5117
|
-
} =
|
|
5117
|
+
} = S, k = Ue(e, v), {
|
|
5118
5118
|
hideDropDown: F
|
|
5119
|
-
} = k,
|
|
5119
|
+
} = k, M = Ao(e, x, S, p, v, l, a), i = M, y = We(e, x, S, p, v), u = /* @__PURE__ */ new Map([["default", M], ["one-page", i], ["pills", y]]);
|
|
5120
5120
|
B(() => {
|
|
5121
|
-
const W =
|
|
5121
|
+
const W = c.value.find((z) => z.props.id === g.value);
|
|
5122
5122
|
return W == null ? void 0 : W.slots;
|
|
5123
5123
|
});
|
|
5124
|
-
const
|
|
5125
|
-
const W =
|
|
5124
|
+
const j = B(() => {
|
|
5125
|
+
const W = c.value.find((Q) => Q.props.id === g.value);
|
|
5126
5126
|
return (W == null ? void 0 : W.props.toolbarPosition) === "inHead";
|
|
5127
5127
|
});
|
|
5128
5128
|
be("tabs", {
|
|
5129
5129
|
activeId: g,
|
|
5130
5130
|
addTab: h,
|
|
5131
|
-
updateTab:
|
|
5132
|
-
tabPages:
|
|
5133
|
-
tabType:
|
|
5131
|
+
updateTab: b,
|
|
5132
|
+
tabPages: c,
|
|
5133
|
+
tabType: m
|
|
5134
5134
|
});
|
|
5135
5135
|
function $() {
|
|
5136
5136
|
const W = l.value.schema.contents || [];
|
|
@@ -5139,17 +5139,17 @@ const es = /* @__PURE__ */ te({
|
|
|
5139
5139
|
function A() {
|
|
5140
5140
|
var z;
|
|
5141
5141
|
const W = $();
|
|
5142
|
-
|
|
5142
|
+
f.value = [...(z = W == null ? void 0 : W.toolbar) == null ? void 0 : z.buttons];
|
|
5143
5143
|
}
|
|
5144
5144
|
be("toolbar-item-handler", A);
|
|
5145
5145
|
const L = B(() => e.fill || e.tabType === "fill"), q = B(() => e.tabType === "pills"), X = B(() => ({
|
|
5146
5146
|
"farris-tabs-header": !0,
|
|
5147
|
-
"farris-tabs-inHead":
|
|
5148
|
-
"farris-tabs-inContent": !
|
|
5147
|
+
"farris-tabs-inHead": j.value,
|
|
5148
|
+
"farris-tabs-inContent": !j.value,
|
|
5149
5149
|
"farris-tabs-nav-fill": L.value,
|
|
5150
5150
|
"farris-tabs-nav-pills": q.value
|
|
5151
5151
|
})), J = B(() => ({
|
|
5152
|
-
width:
|
|
5152
|
+
width: j.value && e.titleWidth ? `${e.titleWidth}%` : ""
|
|
5153
5153
|
})), Z = B(() => ({
|
|
5154
5154
|
"farris-tabs": !0,
|
|
5155
5155
|
"flex-column": e.position === "top",
|
|
@@ -5159,7 +5159,7 @@ const es = /* @__PURE__ */ te({
|
|
|
5159
5159
|
"one-page": e.tabType === "one-page"
|
|
5160
5160
|
}));
|
|
5161
5161
|
K(() => {
|
|
5162
|
-
|
|
5162
|
+
c.value.length && (g.value = e.activeId || c.value[0].props.id, d(g.value)), oe(() => {
|
|
5163
5163
|
w();
|
|
5164
5164
|
}), r(x), window.addEventListener("click", (W) => {
|
|
5165
5165
|
var z;
|
|
@@ -5168,11 +5168,11 @@ const es = /* @__PURE__ */ te({
|
|
|
5168
5168
|
w();
|
|
5169
5169
|
}), n.value.componentInstance = l;
|
|
5170
5170
|
});
|
|
5171
|
-
function
|
|
5171
|
+
function ne() {
|
|
5172
5172
|
return s("button", {
|
|
5173
5173
|
title: "left-arrow-button",
|
|
5174
5174
|
type: "button",
|
|
5175
|
-
class:
|
|
5175
|
+
class: D.value,
|
|
5176
5176
|
onClick: () => {
|
|
5177
5177
|
E(0, -1);
|
|
5178
5178
|
}
|
|
@@ -5190,11 +5190,11 @@ const es = /* @__PURE__ */ te({
|
|
|
5190
5190
|
}
|
|
5191
5191
|
const {
|
|
5192
5192
|
renderMorePagesButtton: O
|
|
5193
|
-
} = ze(e, k,
|
|
5193
|
+
} = ze(e, k, S, v);
|
|
5194
5194
|
function I() {
|
|
5195
|
-
return !!
|
|
5195
|
+
return !!f.value.length && Ko(v, l, a, o);
|
|
5196
5196
|
}
|
|
5197
|
-
const N =
|
|
5197
|
+
const N = u.get(e.tabType) || u.get("default");
|
|
5198
5198
|
function H() {
|
|
5199
5199
|
var W, z, Q, pe;
|
|
5200
5200
|
return s("div", {
|
|
@@ -5204,7 +5204,7 @@ const es = /* @__PURE__ */ te({
|
|
|
5204
5204
|
}, [(z = (W = t.slots).headerPrefix) == null ? void 0 : z.call(W)]), s("div", {
|
|
5205
5205
|
class: "farris-tabs-title scroll-tabs",
|
|
5206
5206
|
style: J.value
|
|
5207
|
-
}, [
|
|
5207
|
+
}, [ne(), N && N(), s("div", {
|
|
5208
5208
|
class: P.value
|
|
5209
5209
|
}, [_(), O()])]), I(), s("div", {
|
|
5210
5210
|
class: "farris-tabs-header-post"
|
|
@@ -5233,7 +5233,7 @@ function ts() {
|
|
|
5233
5233
|
return !1;
|
|
5234
5234
|
const o = (l = n.schema.appearance) == null ? void 0 : l.class;
|
|
5235
5235
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
5236
|
-
const
|
|
5236
|
+
const m = n.schema.type, x = (m === "response-form" || m === "content-container") && o && o.includes("farris-form");
|
|
5237
5237
|
if (n.schema.type !== "response-layout-item" && !x)
|
|
5238
5238
|
return !1;
|
|
5239
5239
|
}
|
|
@@ -5261,53 +5261,54 @@ const ss = /* @__PURE__ */ te({
|
|
|
5261
5261
|
setup(e, t) {
|
|
5262
5262
|
const n = C(), o = ee("design-item-context"), a = ns(o.schema, o.parent), l = Me(n, o, a);
|
|
5263
5263
|
l.value.canNested = !1, l.value.canDelete = !1, l.value.canMove = !1, t.expose(l.value);
|
|
5264
|
-
const
|
|
5264
|
+
const m = ee("tabs"), x = C(!0), T = {
|
|
5265
5265
|
slots: t.slots,
|
|
5266
5266
|
props: e
|
|
5267
|
-
}, v = C((
|
|
5268
|
-
function g() {
|
|
5269
|
-
e.id === b.activeId.value ? o.designerItemElementRef.value.classList.remove("d-none") : o.designerItemElementRef.value.classList.add("d-none");
|
|
5270
|
-
}
|
|
5267
|
+
}, v = C((m == null ? void 0 : m.tabType.value) || "default");
|
|
5271
5268
|
K(() => {
|
|
5272
5269
|
n.value.componentInstance = l;
|
|
5273
|
-
const
|
|
5274
|
-
!
|
|
5270
|
+
const p = m.tabPages.value.findIndex((S) => S.props.id === e.id);
|
|
5271
|
+
!p || p === -1 ? m == null || m.addTab(T) : p > -1 && (x.value = !1, console.warn(`已经存在id为${e.id}的页签啦`));
|
|
5275
5272
|
}), ue(() => {
|
|
5276
5273
|
});
|
|
5277
|
-
const r = B(() => ({
|
|
5278
|
-
display:
|
|
5274
|
+
const g = B(() => (e == null ? void 0 : e.id) === (m == null ? void 0 : m.activeId.value)), r = B(() => ({
|
|
5275
|
+
display: g.value ? "" : "none"
|
|
5279
5276
|
}));
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
props:
|
|
5277
|
+
se(() => e, (p) => {
|
|
5278
|
+
m == null || m.updateTab({
|
|
5279
|
+
props: p,
|
|
5283
5280
|
slots: t.slots
|
|
5284
5281
|
});
|
|
5285
5282
|
}, {
|
|
5286
5283
|
immediate: !0,
|
|
5287
5284
|
deep: !0
|
|
5288
|
-
})
|
|
5289
|
-
function
|
|
5290
|
-
var
|
|
5291
|
-
const
|
|
5285
|
+
});
|
|
5286
|
+
function c() {
|
|
5287
|
+
var S, D;
|
|
5288
|
+
const p = (D = (S = t.slots).default) == null ? void 0 : D.call(S);
|
|
5292
5289
|
return s(Ke, {
|
|
5293
5290
|
"main-title": e.title,
|
|
5294
5291
|
class: "farris-tab-page"
|
|
5295
|
-
}, os(
|
|
5296
|
-
default: () => [
|
|
5292
|
+
}, os(p) ? p : {
|
|
5293
|
+
default: () => [p]
|
|
5297
5294
|
});
|
|
5298
5295
|
}
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5296
|
+
const h = B(() => ({
|
|
5297
|
+
"farris-tab-page": !0,
|
|
5298
|
+
"drag-container": !0
|
|
5299
|
+
}));
|
|
5300
|
+
function b() {
|
|
5301
|
+
var S, D;
|
|
5302
|
+
const p = (D = (S = t.slots).default) == null ? void 0 : D.call(S);
|
|
5302
5303
|
return s("div", {
|
|
5303
5304
|
ref: n,
|
|
5304
|
-
class:
|
|
5305
|
+
class: h.value,
|
|
5305
5306
|
"data-dragref": `${o.schema.id}-container`,
|
|
5306
5307
|
style: r.value
|
|
5307
|
-
}, [
|
|
5308
|
+
}, [p]);
|
|
5308
5309
|
}
|
|
5309
|
-
const
|
|
5310
|
-
return () => x.value ?
|
|
5310
|
+
const f = (/* @__PURE__ */ new Map([["default", b], ["one-page", c]])).get(v.value) || b;
|
|
5311
|
+
return () => x.value ? f() : null;
|
|
5311
5312
|
}
|
|
5312
5313
|
}), cs = {
|
|
5313
5314
|
install(e) {
|