@farris/ui-vue 1.7.0-beta.3 → 1.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +10 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +178 -176
- package/components/calendar/index.umd.cjs +2 -2
- package/components/collection-property-editor/index.esm.js +48 -46
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +319 -300
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +2287 -1161
- package/components/comment/index.umd.cjs +7 -7
- package/components/component/index.esm.js +3 -1
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +926 -901
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +898 -899
- package/components/data-view/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +3 -1
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +239 -221
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +11 -9
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/expression-editor/index.esm.js +1299 -1279
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +731 -678
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +1792 -1772
- package/components/filter-condition-editor/index.umd.cjs +4 -4
- package/components/image/index.esm.js +246 -240
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +9 -7
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +1 -1
- package/components/list-view/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +2009 -886
- package/components/locale/index.umd.cjs +6 -6
- package/components/number-range/index.esm.js +190 -181
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +734 -714
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +60 -49
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +2461 -2500
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +238 -238
- package/components/schema-selector/index.umd.cjs +4 -4
- package/components/section/index.esm.js +217 -302
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +1793 -1773
- package/components/sort-condition-editor/index.umd.cjs +4 -4
- package/components/transfer/index.esm.js +155 -155
- package/components/transfer/index.umd.cjs +3 -3
- package/designer/data-grid/index.esm.js +895 -867
- package/designer/data-grid/index.umd.cjs +5 -5
- package/designer/data-view/index.esm.js +145 -144
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/drawer/index.esm.js +73 -71
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +87 -65
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +14 -3
- package/designer/farris-designer.all.umd.cjs +3 -3
- package/designer/input-group/index.esm.js +34 -14
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1 -1
- package/designer/list-view/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +15 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +129 -119
- package/designer/section/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +140 -131
- package/designer/time-picker/index.umd.cjs +1 -1
- package/farris.all.esm.js +13578 -12394
- package/farris.all.umd.cjs +26 -26
- package/index.css +1 -1
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +12 -10
- package/locales/designer/zh-CHS.json +19 -17
- package/locales/designer/zh-CHT.json +19 -17
- package/locales/ui/en.json +4 -2
- package/locales/ui/zh-CHS.json +11 -9
- package/locales/ui/zh-CHT.json +11 -9
- package/package.json +1 -1
- package/package.zip +0 -0
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/types/condition/src/composition/condition-value/number-spinner-value.d.ts +1 -1
- package/types/condition/src/composition/use-field-config.d.ts +1 -1
- package/types/condition/src/condition.props.d.ts +1 -1
- package/types/data-view/designer/property-config/use-command-option.d.ts +12 -0
- package/types/image/src/property-config/image.property-config.d.ts +5 -5
- package/types/locale/src/lib/locale.service.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +7 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +0 -20
- package/types/section/src/designer/section.design.props.d.ts +17 -0
- package/types/section/src/section.props.d.ts +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var It = Object.defineProperty;
|
|
2
2
|
var jt = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var J = (e, t, n) => jt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { ref as
|
|
4
|
+
import { ref as c, computed as D, defineComponent as G, provide as We, createVNode as y, watch as W, inject as _, onMounted as K, onBeforeUnmount as Ye, nextTick as oe, createTextVNode as me, withDirectives as qe, vModelText as Rt, Teleport as Ge, createApp as Be, onUnmounted as ve, Fragment as re, onBeforeMount as Lt, Transition as Ue, shallowRef as zt, render as we, h as Vt, cloneVNode as Ht, mergeProps as Ee, vShow as At, onUpdated as $t, reactive as Wt } from "vue";
|
|
5
5
|
import { resolveAppearance as Xe, createPropsResolver as he } from "../dynamic-resolver/index.esm.js";
|
|
6
6
|
import { getCustomClass as Yt, getCustomStyle as qt, FormSchemaEntityFieldType$Type as Gt, withInstall as Ut, getMaxZIndex as Xt, useGuid as Kt } from "../common/index.esm.js";
|
|
7
7
|
import { useDesignerComponent as De, useDragulaCommonRule as _t } from "../designer-canvas/index.esm.js";
|
|
@@ -169,85 +169,85 @@ const rn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
|
|
|
169
169
|
customClass: { type: String, defaut: "" }
|
|
170
170
|
}, Ze = he(Pe, pn, _e, Je, kn);
|
|
171
171
|
function Qe(e) {
|
|
172
|
-
const t =
|
|
172
|
+
const t = c(-1), n = c(-1), a = c(0), o = c(0), l = c(!1), i = c(!1), s = D(() => ({
|
|
173
173
|
display: l.value ? "block" : "none",
|
|
174
174
|
left: `${a.value}px`,
|
|
175
175
|
cursor: "e-resize"
|
|
176
|
-
})),
|
|
176
|
+
})), u = D(() => ({
|
|
177
177
|
display: i.value ? "block" : "none",
|
|
178
178
|
top: `${o.value}px`,
|
|
179
179
|
cursor: "n-resize"
|
|
180
|
-
})),
|
|
181
|
-
const
|
|
180
|
+
})), f = D(() => {
|
|
181
|
+
const r = {
|
|
182
182
|
display: i.value || l.value ? "block" : "none"
|
|
183
183
|
};
|
|
184
|
-
return o.value > 0 && (
|
|
184
|
+
return o.value > 0 && (r.cursor = "n-resize"), r;
|
|
185
185
|
});
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
const { left:
|
|
190
|
-
let
|
|
191
|
-
|
|
186
|
+
function k(r, p, v, x) {
|
|
187
|
+
const M = e.value;
|
|
188
|
+
if (M) {
|
|
189
|
+
const { left: d, right: g, width: C } = M.getBoundingClientRect();
|
|
190
|
+
let O = r.clientX - d;
|
|
191
|
+
x === "right" && (O = g - r.clientX), O > p && (O = p), O < v && (O = v), x === "right" && (O = C - O), a.value = O;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const { top:
|
|
198
|
-
let
|
|
199
|
-
|
|
194
|
+
function b(r, p, v, x) {
|
|
195
|
+
const M = e.value;
|
|
196
|
+
if (M) {
|
|
197
|
+
const { top: d, bottom: g, height: C } = M.getBoundingClientRect();
|
|
198
|
+
let O = r.clientY - d;
|
|
199
|
+
x === "bottom" && (O = g - r.clientY), O > p && (O = p), O < v && (O = v), x === "bottom" && (O = C - O), o.value = O;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
const { width:
|
|
206
|
-
return { width:
|
|
202
|
+
function h() {
|
|
203
|
+
const r = e.value;
|
|
204
|
+
if (r) {
|
|
205
|
+
const { width: p, height: v } = r.getBoundingClientRect();
|
|
206
|
+
return { width: p, height: v };
|
|
207
207
|
}
|
|
208
208
|
return null;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
212
|
-
return
|
|
213
|
-
const
|
|
214
|
-
return
|
|
210
|
+
function F() {
|
|
211
|
+
const r = e.value;
|
|
212
|
+
return r ? Array.from(r.querySelectorAll("[data-position]")).reduce((p, v) => {
|
|
213
|
+
const x = v.getAttribute("data-position");
|
|
214
|
+
return p = Object.assign(p, { [x]: v }), p;
|
|
215
215
|
}, {}) : null;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
return
|
|
223
|
-
if (
|
|
224
|
-
return
|
|
217
|
+
function w(r, p) {
|
|
218
|
+
const v = h(), x = F();
|
|
219
|
+
if (v && x) {
|
|
220
|
+
const M = x == null ? void 0 : x.right, d = x == null ? void 0 : x.left;
|
|
221
|
+
if (r === "left" && d)
|
|
222
|
+
return M ? v.width - M.clientWidth - p : v.width - p;
|
|
223
|
+
if (r === "right" && M)
|
|
224
|
+
return d ? v.width - d.clientWidth - p : v.width - p;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
return
|
|
233
|
-
if (
|
|
234
|
-
return
|
|
227
|
+
function m(r, p) {
|
|
228
|
+
const v = h(), x = F();
|
|
229
|
+
if (v && x) {
|
|
230
|
+
const M = x == null ? void 0 : x.bottom, d = x == null ? void 0 : x.top;
|
|
231
|
+
if (r === "top" && d)
|
|
232
|
+
return M ? v.height - M.clientHeight - p : v.height - p;
|
|
233
|
+
if (r === "bottom" && M)
|
|
234
|
+
return d ? v.height - d.clientHeight - p : v.height - p;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
return {
|
|
238
238
|
horizontalResizeHandleStyle: s,
|
|
239
|
-
verticalResizeHandleStyle:
|
|
240
|
-
resizeOverlayStyle:
|
|
239
|
+
verticalResizeHandleStyle: u,
|
|
240
|
+
resizeOverlayStyle: f,
|
|
241
241
|
showHorizontalResizeHandle: l,
|
|
242
242
|
showVerticalResizeHandle: i,
|
|
243
243
|
horizontalResizeBarPosition: t,
|
|
244
244
|
verticalResizeBarPosition: n,
|
|
245
245
|
verticalResizeHandleOffset: o,
|
|
246
246
|
horizontalResizeHandleOffset: a,
|
|
247
|
-
draggingHorizontalResizeHandle:
|
|
248
|
-
draggingVerticalResizeHandle:
|
|
249
|
-
getPanelMaxHeight:
|
|
250
|
-
getPanelMaxWidth:
|
|
247
|
+
draggingHorizontalResizeHandle: k,
|
|
248
|
+
draggingVerticalResizeHandle: b,
|
|
249
|
+
getPanelMaxHeight: m,
|
|
250
|
+
getPanelMaxWidth: w
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
const ee = /* @__PURE__ */ G({
|
|
@@ -255,7 +255,7 @@ const ee = /* @__PURE__ */ G({
|
|
|
255
255
|
props: Pe,
|
|
256
256
|
emits: [],
|
|
257
257
|
setup(e, t) {
|
|
258
|
-
const n =
|
|
258
|
+
const n = c(), a = Qe(n), {
|
|
259
259
|
horizontalResizeHandleStyle: o,
|
|
260
260
|
verticalResizeHandleStyle: l,
|
|
261
261
|
resizeOverlayStyle: i
|
|
@@ -265,18 +265,18 @@ const ee = /* @__PURE__ */ G({
|
|
|
265
265
|
});
|
|
266
266
|
const s = D(() => Yt({
|
|
267
267
|
"f-layout": !0
|
|
268
|
-
}, e == null ? void 0 : e.customClass)),
|
|
269
|
-
return () =>
|
|
268
|
+
}, e == null ? void 0 : e.customClass)), u = D(() => qt({}, e == null ? void 0 : e.customStyle));
|
|
269
|
+
return () => y("div", {
|
|
270
270
|
class: s.value,
|
|
271
|
-
style:
|
|
271
|
+
style: u.value,
|
|
272
272
|
ref: n
|
|
273
|
-
}, [t.slots.default && t.slots.default(),
|
|
273
|
+
}, [t.slots.default && t.slots.default(), y("div", {
|
|
274
274
|
class: "f-layout-resize-overlay",
|
|
275
275
|
style: i.value
|
|
276
|
-
}, null),
|
|
276
|
+
}, null), y("div", {
|
|
277
277
|
class: "f-layout-horizontal-resize-proxy",
|
|
278
278
|
style: o.value
|
|
279
|
-
}, null),
|
|
279
|
+
}, null), y("div", {
|
|
280
280
|
class: "f-layout-vertical-resize-proxy",
|
|
281
281
|
style: l.value
|
|
282
282
|
}, null)]);
|
|
@@ -481,93 +481,93 @@ function tt(e, t, n, a, o) {
|
|
|
481
481
|
horizontalResizeBarPosition: l,
|
|
482
482
|
horizontalResizeHandleOffset: i,
|
|
483
483
|
showHorizontalResizeHandle: s,
|
|
484
|
-
showVerticalResizeHandle:
|
|
485
|
-
verticalResizeBarPosition:
|
|
486
|
-
verticalResizeHandleOffset:
|
|
487
|
-
draggingHorizontalResizeHandle:
|
|
488
|
-
draggingVerticalResizeHandle:
|
|
489
|
-
getPanelMaxHeight:
|
|
490
|
-
getPanelMaxWidth:
|
|
484
|
+
showVerticalResizeHandle: u,
|
|
485
|
+
verticalResizeBarPosition: f,
|
|
486
|
+
verticalResizeHandleOffset: k,
|
|
487
|
+
draggingHorizontalResizeHandle: b,
|
|
488
|
+
draggingVerticalResizeHandle: h,
|
|
489
|
+
getPanelMaxHeight: F,
|
|
490
|
+
getPanelMaxWidth: w
|
|
491
491
|
} = o;
|
|
492
|
-
let
|
|
493
|
-
function
|
|
494
|
-
if ((
|
|
495
|
-
const { left:
|
|
496
|
-
let L =
|
|
492
|
+
let m = "", r, p, v;
|
|
493
|
+
function x(g) {
|
|
494
|
+
if ((m === "left" || m === "right") && p) {
|
|
495
|
+
const { left: C } = p.getBoundingClientRect(), { width: O } = r.getBoundingClientRect(), z = g.clientX - C;
|
|
496
|
+
let L = m === "left" ? (O || 0) + (z - l.value) : (O || 0) - (z - l.value);
|
|
497
497
|
L = n.value > 0 ? Math.max(n.value, L) : L;
|
|
498
|
-
const E =
|
|
498
|
+
const E = w(m, n.value);
|
|
499
499
|
E != null && (L = E > L ? L : E), e.value = L;
|
|
500
500
|
}
|
|
501
|
-
if ((
|
|
502
|
-
const { top:
|
|
503
|
-
let L =
|
|
501
|
+
if ((m === "top" || m === "bottom") && p) {
|
|
502
|
+
const { top: C } = p.getBoundingClientRect(), { height: O } = r.getBoundingClientRect(), z = g.clientY - C;
|
|
503
|
+
let L = m === "top" ? (O || 0) + (z - f.value) : (O || 0) - (z - f.value);
|
|
504
504
|
L = a.value > 0 ? Math.max(a.value, L) : L;
|
|
505
|
-
const E =
|
|
505
|
+
const E = F(m, a.value);
|
|
506
506
|
E != null && (L = E > L ? L : E), t.value = L;
|
|
507
507
|
}
|
|
508
|
-
i.value = 0,
|
|
508
|
+
i.value = 0, k.value = 0, l.value = -1, f.value = -1, s.value = !1, u.value = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", x), document.body.style.userSelect = "", m = "", r = null, p = null;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
if (
|
|
512
|
-
const { left: L } =
|
|
510
|
+
function M(g, C, O) {
|
|
511
|
+
if (m = C, r = O, s.value = !0, p = g.composedPath().find((L) => (L.className || "").split(" ")[0] === "f-layout"), p) {
|
|
512
|
+
const { left: L } = p.getBoundingClientRect(), E = g.clientX - L;
|
|
513
513
|
i.value = E, l.value = E;
|
|
514
|
-
const R =
|
|
515
|
-
|
|
514
|
+
const R = w(m, n.value) || 0;
|
|
515
|
+
v = (T) => b(T, R, n.value, m), document.addEventListener("mousemove", v), document.addEventListener("mouseup", x), document.body.style.userSelect = "none";
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
if (
|
|
520
|
-
const { top: L } =
|
|
521
|
-
|
|
522
|
-
const E =
|
|
523
|
-
|
|
518
|
+
function d(g, C, O) {
|
|
519
|
+
if (m = C, r = O, u.value = !0, p = g.composedPath().find((L) => (L.className || "").split(" ")[0] === "f-layout"), p) {
|
|
520
|
+
const { top: L } = p.getBoundingClientRect();
|
|
521
|
+
k.value = g.clientY - L, f.value = g.clientY - L;
|
|
522
|
+
const E = F(m, a.value) || 0;
|
|
523
|
+
v = (R) => h(R, E, a.value, m), document.addEventListener("mousemove", v), document.addEventListener("mouseup", x), document.body.style.userSelect = "none";
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
return { onClickHorizontalResizeBar:
|
|
526
|
+
return { onClickHorizontalResizeBar: M, onClickVerticalResizeBar: d };
|
|
527
527
|
}
|
|
528
528
|
const Q = /* @__PURE__ */ G({
|
|
529
529
|
name: "FLayoutPane",
|
|
530
530
|
props: Ne,
|
|
531
531
|
emits: [],
|
|
532
532
|
setup(e, t) {
|
|
533
|
-
const n =
|
|
534
|
-
W(() => e.resizable, (
|
|
535
|
-
|
|
533
|
+
const n = c(e.minHeight <= 0 ? 100 : e.minHeight), a = c(e.minWidth <= 0 ? 100 : e.minWidth), o = c(e.width <= 0 ? 100 : e.width), l = c(e.height <= 0 ? 100 : e.height), i = c(Math.max(n.value, l.value)), s = c(Math.max(a.value, o.value)), u = c(), f = c(e.position), k = c(e.resizable);
|
|
534
|
+
W(() => e.resizable, (d) => {
|
|
535
|
+
k.value = d;
|
|
536
536
|
});
|
|
537
|
-
const
|
|
538
|
-
useResizeHandleComposition:
|
|
539
|
-
} =
|
|
540
|
-
onClickHorizontalResizeBar:
|
|
541
|
-
onClickVerticalResizeBar:
|
|
542
|
-
} =
|
|
537
|
+
const b = _("layout"), {
|
|
538
|
+
useResizeHandleComposition: h
|
|
539
|
+
} = b, F = tt(s, i, a, n, h), {
|
|
540
|
+
onClickHorizontalResizeBar: w,
|
|
541
|
+
onClickVerticalResizeBar: m
|
|
542
|
+
} = F, r = D(() => ({
|
|
543
543
|
"f-layout-resize-bar": !0,
|
|
544
|
-
"f-layout-resize-bar-e":
|
|
545
|
-
"f-layout-resize-bar-n":
|
|
546
|
-
"f-layout-resize-bar-s":
|
|
547
|
-
"f-layout-resize-bar-w":
|
|
548
|
-
})),
|
|
549
|
-
function
|
|
550
|
-
(
|
|
551
|
-
}
|
|
552
|
-
const
|
|
553
|
-
const
|
|
544
|
+
"f-layout-resize-bar-e": f.value === "left",
|
|
545
|
+
"f-layout-resize-bar-n": f.value === "bottom",
|
|
546
|
+
"f-layout-resize-bar-s": f.value === "top",
|
|
547
|
+
"f-layout-resize-bar-w": f.value === "right"
|
|
548
|
+
})), p = D(() => f.value !== "center" && k.value);
|
|
549
|
+
function v(d, g) {
|
|
550
|
+
(g === "left" || g === "right") && w(d, g, u.value), (g === "top" || g === "bottom") && m(d, g, u.value);
|
|
551
|
+
}
|
|
552
|
+
const x = D(() => {
|
|
553
|
+
const d = {
|
|
554
554
|
"f-layout-pane": !0,
|
|
555
|
-
"f-page-content-nav":
|
|
556
|
-
"f-page-content-main":
|
|
555
|
+
"f-page-content-nav": f.value === "left" || f.value === "right",
|
|
556
|
+
"f-page-content-main": f.value === "center"
|
|
557
557
|
};
|
|
558
|
-
return e.customClass && String(e.customClass).split(" ").reduce((
|
|
559
|
-
}),
|
|
560
|
-
const
|
|
561
|
-
return (s.value &&
|
|
558
|
+
return e.customClass && String(e.customClass).split(" ").reduce((g, C) => (g[C] = !0, g), d), d;
|
|
559
|
+
}), M = D(() => {
|
|
560
|
+
const d = {};
|
|
561
|
+
return (s.value && f.value === "left" || f.value === "right") && (d.width = `${s.value}px`), (i.value && f.value === "bottom" || f.value === "top") && (d.height = `${i.value}px`), e.visible || (d.display = "none"), d;
|
|
562
562
|
});
|
|
563
|
-
return () =>
|
|
564
|
-
ref:
|
|
565
|
-
class:
|
|
566
|
-
style:
|
|
567
|
-
"data-position":
|
|
568
|
-
}, [t.slots.default && t.slots.default(),
|
|
569
|
-
class:
|
|
570
|
-
onMousedown: (
|
|
563
|
+
return () => y("div", {
|
|
564
|
+
ref: u,
|
|
565
|
+
class: x.value,
|
|
566
|
+
style: M.value,
|
|
567
|
+
"data-position": f.value
|
|
568
|
+
}, [t.slots.default && t.slots.default(), p.value && y("span", {
|
|
569
|
+
class: r.value,
|
|
570
|
+
onMousedown: (d) => v(d, f.value)
|
|
571
571
|
}, null)]);
|
|
572
572
|
}
|
|
573
573
|
});
|
|
@@ -582,30 +582,30 @@ const jn = /* @__PURE__ */ G({
|
|
|
582
582
|
props: Pe,
|
|
583
583
|
emits: [],
|
|
584
584
|
setup(e, t) {
|
|
585
|
-
var
|
|
586
|
-
const n =
|
|
585
|
+
var k;
|
|
586
|
+
const n = c(), a = _("design-item-context"), o = In(a.schema, (k = a.parent) == null ? void 0 : k.schema), l = De(n, a, o);
|
|
587
587
|
l.value.canNested = !1;
|
|
588
588
|
const i = Qe(n), {
|
|
589
589
|
horizontalResizeHandleStyle: s,
|
|
590
|
-
verticalResizeHandleStyle:
|
|
591
|
-
resizeOverlayStyle:
|
|
590
|
+
verticalResizeHandleStyle: u,
|
|
591
|
+
resizeOverlayStyle: f
|
|
592
592
|
} = i;
|
|
593
593
|
return We("layout", {
|
|
594
594
|
useResizeHandleComposition: i
|
|
595
595
|
}), K(() => {
|
|
596
596
|
n.value.componentInstance = l;
|
|
597
|
-
}), t.expose(l.value), () =>
|
|
597
|
+
}), t.expose(l.value), () => y("div", {
|
|
598
598
|
class: "f-layout f-page-content",
|
|
599
599
|
ref: n
|
|
600
|
-
}, [t.slots.default && t.slots.default(),
|
|
600
|
+
}, [t.slots.default && t.slots.default(), y("div", {
|
|
601
601
|
class: "f-layout-resize-overlay",
|
|
602
|
-
style:
|
|
603
|
-
}, null),
|
|
602
|
+
style: f.value
|
|
603
|
+
}, null), y("div", {
|
|
604
604
|
class: "f-layout-horizontal-resize-proxy",
|
|
605
605
|
style: s.value
|
|
606
|
-
}, null),
|
|
606
|
+
}, null), y("div", {
|
|
607
607
|
class: "f-layout-vertical-resize-proxy",
|
|
608
|
-
style:
|
|
608
|
+
style: u.value
|
|
609
609
|
}, null)]);
|
|
610
610
|
}
|
|
611
611
|
});
|
|
@@ -625,51 +625,51 @@ const Ln = /* @__PURE__ */ G({
|
|
|
625
625
|
props: Ne,
|
|
626
626
|
emits: [],
|
|
627
627
|
setup(e, t) {
|
|
628
|
-
const n =
|
|
628
|
+
const n = c(), a = c();
|
|
629
629
|
_("designer-host-service");
|
|
630
630
|
const o = _("design-item-context"), l = Rn(o), i = De(a, o, l);
|
|
631
631
|
i.value.canNested = !1, i.value.canMove = !1, i.value.canDelete = !1, K(() => {
|
|
632
632
|
a.value.componentInstance = i;
|
|
633
633
|
}), t.expose(i.value);
|
|
634
|
-
const s =
|
|
635
|
-
useResizeHandleComposition:
|
|
636
|
-
} =
|
|
637
|
-
onClickHorizontalResizeBar:
|
|
638
|
-
onClickVerticalResizeBar:
|
|
639
|
-
} =
|
|
634
|
+
const s = c(Math.max(e.minHeight, e.height)), u = c(Math.max(e.minWidth, e.width)), f = c(e.minHeight), k = c(e.minWidth), b = c(e.position), h = _("layout"), {
|
|
635
|
+
useResizeHandleComposition: F
|
|
636
|
+
} = h, w = tt(u, s, k, f, F), {
|
|
637
|
+
onClickHorizontalResizeBar: m,
|
|
638
|
+
onClickVerticalResizeBar: r
|
|
639
|
+
} = w, p = D(() => ({
|
|
640
640
|
"f-layout-resize-bar": !0,
|
|
641
|
-
"f-layout-resize-bar-e":
|
|
642
|
-
"f-layout-resize-bar-n":
|
|
643
|
-
"f-layout-resize-bar-s":
|
|
644
|
-
"f-layout-resize-bar-w":
|
|
641
|
+
"f-layout-resize-bar-e": b.value === "left",
|
|
642
|
+
"f-layout-resize-bar-n": b.value === "bottom",
|
|
643
|
+
"f-layout-resize-bar-s": b.value === "top",
|
|
644
|
+
"f-layout-resize-bar-w": b.value === "right"
|
|
645
645
|
}));
|
|
646
|
-
function
|
|
647
|
-
(
|
|
646
|
+
function v(d, g) {
|
|
647
|
+
(g === "left" || g === "right") && m(d, g, n.value), (g === "top" || g === "bottom") && r(d, g, n.value);
|
|
648
648
|
}
|
|
649
|
-
const
|
|
650
|
-
const
|
|
649
|
+
const x = D(() => {
|
|
650
|
+
const d = {
|
|
651
651
|
"f-layout-pane": !0,
|
|
652
|
-
"f-page-content-nav":
|
|
653
|
-
"f-page-content-main":
|
|
652
|
+
"f-page-content-nav": b.value === "left" || b.value === "right",
|
|
653
|
+
"f-page-content-main": b.value === "center"
|
|
654
654
|
};
|
|
655
|
-
return e.customClass && String(e.customClass).split(" ").reduce((
|
|
656
|
-
}),
|
|
657
|
-
const
|
|
655
|
+
return e.customClass && String(e.customClass).split(" ").reduce((g, C) => (g[C] = !0, g), d), d;
|
|
656
|
+
}), M = D(() => {
|
|
657
|
+
const d = {
|
|
658
658
|
flex: "1"
|
|
659
659
|
};
|
|
660
|
-
return (
|
|
660
|
+
return (u.value && b.value === "left" || b.value === "right") && (d.width = `${u.value}px`), (s.value && b.value === "bottom" || b.value === "top") && (d.height = `${s.value}px`), d;
|
|
661
661
|
});
|
|
662
|
-
return () =>
|
|
662
|
+
return () => y("div", {
|
|
663
663
|
ref: n,
|
|
664
|
-
class:
|
|
665
|
-
style:
|
|
666
|
-
}, [
|
|
664
|
+
class: x.value,
|
|
665
|
+
style: M.value
|
|
666
|
+
}, [y("div", {
|
|
667
667
|
ref: a,
|
|
668
668
|
class: "drag-container",
|
|
669
669
|
"data-dragref": `${o.schema.id}-container`
|
|
670
|
-
}, [t.slots.default && t.slots.default()]),
|
|
671
|
-
class:
|
|
672
|
-
onMousedown: (
|
|
670
|
+
}, [t.slots.default && t.slots.default()]), y("span", {
|
|
671
|
+
class: p.value,
|
|
672
|
+
onMousedown: (d) => v(d, b.value)
|
|
673
673
|
}, null)]);
|
|
674
674
|
}
|
|
675
675
|
});
|
|
@@ -1109,59 +1109,60 @@ const Ie = {
|
|
|
1109
1109
|
props: Zn,
|
|
1110
1110
|
emits: ["selectionChange"],
|
|
1111
1111
|
setup(e, t) {
|
|
1112
|
-
const n =
|
|
1112
|
+
const n = c(), a = c(e.dataSource), o = c([]), l = c(e.separator), i = c(e.width), s = c(e.maxHeight), u = D(() => e.multiSelect), f = c(e.multiSelect ? String(e.selectedValues).split(l.value) : [e.selectedValues]), k = D(() => ({
|
|
1113
1113
|
enableSelectRow: !0,
|
|
1114
1114
|
multiSelect: e.multiSelect,
|
|
1115
1115
|
multiSelectMode: "OnCheckAndClick",
|
|
1116
|
-
showCheckbox:
|
|
1116
|
+
showCheckbox: u.value,
|
|
1117
1117
|
showSelectAll: !1,
|
|
1118
1118
|
showSelection: !0
|
|
1119
1119
|
}));
|
|
1120
1120
|
W(e.dataSource, () => {
|
|
1121
1121
|
a.value = e.dataSource;
|
|
1122
1122
|
}), D(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1123
|
-
const
|
|
1124
|
-
const
|
|
1125
|
-
return i.value !== void 0 && (
|
|
1123
|
+
const b = D(() => {
|
|
1124
|
+
const r = {};
|
|
1125
|
+
return i.value !== void 0 && (r.width = `${i.value}px`), s.value !== void 0 && s.value > 0 && (r.maxHeight = `${s.value}px`), r;
|
|
1126
1126
|
});
|
|
1127
|
-
function
|
|
1128
|
-
n.value.search(
|
|
1127
|
+
function h(r) {
|
|
1128
|
+
n.value.search(r);
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
o.value =
|
|
1130
|
+
function F(r) {
|
|
1131
|
+
o.value = r.map((p) => Object.assign({}, p)), f.value = r.map((p) => p[e.idField]), t.emit("selectionChange", o.value);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function w(r) {
|
|
1134
1134
|
if (e.enableHighlightSearch)
|
|
1135
1135
|
return;
|
|
1136
|
-
let
|
|
1136
|
+
let p = [];
|
|
1137
1137
|
const {
|
|
1138
|
-
searchOption:
|
|
1138
|
+
searchOption: v
|
|
1139
1139
|
} = e;
|
|
1140
|
-
typeof
|
|
1140
|
+
typeof v == "function" ? p = a.value.filter((x) => v(r, x)) : p = a.value.filter((x) => x[e.valueField].indexOf(r) > -1 || x[e.textField].indexOf(r) > -1), n.value.updateDataSource(p);
|
|
1141
1141
|
}
|
|
1142
|
-
W([() => e.selectedValues], ([
|
|
1143
|
-
e.multiSelect ?
|
|
1142
|
+
W([() => e.selectedValues], ([r]) => {
|
|
1143
|
+
e.multiSelect ? f.value = r.split(l.value) : f.value = [r];
|
|
1144
1144
|
});
|
|
1145
|
-
function
|
|
1146
|
-
n.value.activeRowById(
|
|
1145
|
+
function m(r) {
|
|
1146
|
+
n.value.activeRowById(r);
|
|
1147
1147
|
}
|
|
1148
1148
|
return K(() => {
|
|
1149
|
-
var
|
|
1149
|
+
var r, p;
|
|
1150
1150
|
if (!e.multiSelect) {
|
|
1151
|
-
const
|
|
1152
|
-
let
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1151
|
+
const v = (r = f.value) == null ? void 0 : r[0];
|
|
1152
|
+
let x = v;
|
|
1153
|
+
const M = a.value.map((d) => d[e.valueField || e.idField]);
|
|
1154
|
+
if (!Zt(v) && M.includes(v)) {
|
|
1155
|
+
const d = typeof v, g = typeof ((p = a.value[0]) == null ? void 0 : p[e.valueField || e.idField]);
|
|
1156
|
+
g === "number" && d !== g && (x = Number(v)), g === "boolean" && d !== g && (x = v === "true" ? !0 : v === "false" ? !1 : v), m(x);
|
|
1156
1157
|
}
|
|
1157
1158
|
}
|
|
1158
1159
|
}), t.expose({
|
|
1159
|
-
search:
|
|
1160
|
-
activeRowById:
|
|
1161
|
-
}), () =>
|
|
1160
|
+
search: h,
|
|
1161
|
+
activeRowById: m
|
|
1162
|
+
}), () => y("div", {
|
|
1162
1163
|
class: "f-combo-list-container",
|
|
1163
|
-
style:
|
|
1164
|
-
}, [
|
|
1164
|
+
style: b.value
|
|
1165
|
+
}, [y(en, {
|
|
1165
1166
|
ref: n,
|
|
1166
1167
|
size: "small",
|
|
1167
1168
|
itemClass: "f-combo-list-item",
|
|
@@ -1173,162 +1174,181 @@ const Ie = {
|
|
|
1173
1174
|
textField: e.textField,
|
|
1174
1175
|
titleField: e.titleField,
|
|
1175
1176
|
multiSelect: e.multiSelect,
|
|
1176
|
-
selection:
|
|
1177
|
+
selection: k.value,
|
|
1177
1178
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1178
|
-
selectionValues:
|
|
1179
|
-
onSelectionUpdate:
|
|
1180
|
-
onAfterSearch:
|
|
1179
|
+
selectionValues: f.value,
|
|
1180
|
+
onSelectionUpdate: F,
|
|
1181
|
+
onAfterSearch: w
|
|
1181
1182
|
}, null)]);
|
|
1182
1183
|
}
|
|
1183
1184
|
});
|
|
1184
1185
|
function ea(e) {
|
|
1185
|
-
const t =
|
|
1186
|
-
function l(
|
|
1187
|
-
const
|
|
1188
|
-
return a.value.filter((
|
|
1189
|
-
const g =
|
|
1190
|
-
return g -
|
|
1186
|
+
const t = c(""), n = c(e.modelValue), a = c(e.data || []), o = c(e.editable);
|
|
1187
|
+
function l(m) {
|
|
1188
|
+
const r = e.multiSelect ? String(m).split(e.separator) : [String(m)], p = r.map((M) => [M, !0]), v = new Map(p);
|
|
1189
|
+
return a.value.filter((M) => v.has(String(M[e.valueField]))).sort((M, d) => {
|
|
1190
|
+
const g = r.indexOf(M[e.valueField]), C = r.indexOf(d[e.valueField]);
|
|
1191
|
+
return g - C;
|
|
1191
1192
|
});
|
|
1192
1193
|
}
|
|
1193
|
-
function i(
|
|
1194
|
-
const
|
|
1195
|
-
t.value = o.value ?
|
|
1194
|
+
function i(m) {
|
|
1195
|
+
const r = l(m).map((p) => p[e.textField]).join(e.separator);
|
|
1196
|
+
t.value = o.value ? r || m : r;
|
|
1196
1197
|
}
|
|
1197
|
-
function s(
|
|
1198
|
+
function s(m) {
|
|
1198
1199
|
if (e.multiSelect) {
|
|
1199
|
-
const
|
|
1200
|
-
return a.value.filter((
|
|
1200
|
+
const r = m.split(e.separator).map((v) => [v, !0]), p = new Map(r);
|
|
1201
|
+
return a.value.filter((v) => p.has(v[e.textField]));
|
|
1201
1202
|
}
|
|
1202
|
-
return a.value.filter((
|
|
1203
|
+
return a.value.filter((r) => "" + r[e.textField] === m);
|
|
1203
1204
|
}
|
|
1204
|
-
function
|
|
1205
|
-
const
|
|
1206
|
-
return
|
|
1205
|
+
function u(m) {
|
|
1206
|
+
const r = {};
|
|
1207
|
+
return r[e.idField] = m, r[e.textField] = m, [r];
|
|
1207
1208
|
}
|
|
1208
|
-
function
|
|
1209
|
-
let
|
|
1210
|
-
const
|
|
1211
|
-
return o.value && !
|
|
1209
|
+
function f(m) {
|
|
1210
|
+
let r = s(m);
|
|
1211
|
+
const p = r && r.length > 0;
|
|
1212
|
+
return o.value && !p && (r = u(m)), r;
|
|
1212
1213
|
}
|
|
1213
|
-
function
|
|
1214
|
-
const { url:
|
|
1215
|
-
if (!
|
|
1214
|
+
function k() {
|
|
1215
|
+
const { url: m, method: r = "GET", headers: p = { "Content-Type": "application/json;charset=utf-8;" }, body: v = null } = e.remote;
|
|
1216
|
+
if (!m)
|
|
1216
1217
|
return;
|
|
1217
|
-
const x =
|
|
1218
|
-
let
|
|
1219
|
-
fetch(new Request(
|
|
1220
|
-
var
|
|
1221
|
-
if (
|
|
1222
|
-
return
|
|
1223
|
-
throw
|
|
1224
|
-
}).then((
|
|
1225
|
-
|
|
1226
|
-
}).catch((
|
|
1227
|
-
console.warn(
|
|
1218
|
+
const x = r.toLowerCase() === "get" ? { method: r, headers: p } : { method: r, headers: p, body: v };
|
|
1219
|
+
let M = !1;
|
|
1220
|
+
fetch(new Request(m, x)).then((d) => {
|
|
1221
|
+
var C, O;
|
|
1222
|
+
if (d.status === 200)
|
|
1223
|
+
return M = !!((O = (C = d.headers) == null ? void 0 : C.get("content-type")) != null && O.includes("application/json")), M ? d.text() : d.json();
|
|
1224
|
+
throw d.status === 405 ? new Error(Z.getLocaleValue("comboList.remoteError")) : new Error(d.statusText);
|
|
1225
|
+
}).then((d) => {
|
|
1226
|
+
d.length && (a.value = M ? JSON.parse(d) : d);
|
|
1227
|
+
}).catch((d) => {
|
|
1228
|
+
console.warn(d);
|
|
1228
1229
|
});
|
|
1229
1230
|
}
|
|
1230
|
-
|
|
1231
|
-
a.value =
|
|
1232
|
-
}).catch((
|
|
1233
|
-
console.log(
|
|
1234
|
-
}) :
|
|
1231
|
+
e.remote && (e.load ? e.load().then((m) => {
|
|
1232
|
+
a.value = m;
|
|
1233
|
+
}).catch((m) => {
|
|
1234
|
+
console.log(m);
|
|
1235
|
+
}) : k()), W(() => e.data, () => {
|
|
1235
1236
|
a.value = e.data;
|
|
1236
|
-
}), W([a], ([
|
|
1237
|
+
}), W([a], ([m]) => {
|
|
1237
1238
|
if (e.modelValue != null) {
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1239
|
+
const r = m.find((p) => p[e.valueField] === e.modelValue);
|
|
1240
|
+
r && (t.value = r[e.textField]);
|
|
1240
1241
|
}
|
|
1241
|
-
}), W(() => e.modelValue, (
|
|
1242
|
-
n.value =
|
|
1243
|
-
})
|
|
1242
|
+
}), W(() => e.modelValue, (m) => {
|
|
1243
|
+
n.value = m, i(m);
|
|
1244
|
+
});
|
|
1245
|
+
function b(m) {
|
|
1246
|
+
a.value = m;
|
|
1247
|
+
}
|
|
1248
|
+
function h() {
|
|
1249
|
+
return a.value;
|
|
1250
|
+
}
|
|
1251
|
+
function F() {
|
|
1252
|
+
return t.value;
|
|
1253
|
+
}
|
|
1254
|
+
function w() {
|
|
1255
|
+
const m = typeof e.beforeOpen == "function";
|
|
1256
|
+
return !e.beforeOpen || !m ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({ instance: { updateDataSource: b, getData: h, getDisplayText: F } })).then((r) => typeof (r == null ? void 0 : r.canOpen) == "boolean" ? r == null ? void 0 : r.canOpen : !0);
|
|
1257
|
+
}
|
|
1258
|
+
return e.beforeOpen ? w().then((m) => {
|
|
1259
|
+
m && i(e.modelValue);
|
|
1260
|
+
}) : i(e.modelValue), {
|
|
1261
|
+
dataSource: a,
|
|
1262
|
+
displayText: t,
|
|
1263
|
+
editable: o,
|
|
1264
|
+
modelValue: n,
|
|
1265
|
+
beforeOpenList: w,
|
|
1266
|
+
getItemsByDisplayText: s,
|
|
1267
|
+
getItemsByValue: l,
|
|
1268
|
+
getSelectedItemsByDisplayText: f
|
|
1269
|
+
};
|
|
1244
1270
|
}
|
|
1245
1271
|
const ue = /* @__PURE__ */ G({
|
|
1246
1272
|
name: "FComboList",
|
|
1247
1273
|
props: Ie,
|
|
1248
1274
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1249
1275
|
setup(e, t) {
|
|
1250
|
-
const n =
|
|
1251
|
-
dataSource:
|
|
1252
|
-
displayText:
|
|
1253
|
-
editable:
|
|
1254
|
-
modelValue:
|
|
1255
|
-
getItemsByDisplayText:
|
|
1256
|
-
getItemsByValue:
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1276
|
+
const n = c(), a = c(), o = c(e.disabled || e.readonly), l = c(e.enableClear), i = c(e.enableSearch), s = c(e.readonly), {
|
|
1277
|
+
dataSource: u,
|
|
1278
|
+
displayText: f,
|
|
1279
|
+
editable: k,
|
|
1280
|
+
modelValue: b,
|
|
1281
|
+
getItemsByDisplayText: h,
|
|
1282
|
+
getItemsByValue: F,
|
|
1283
|
+
beforeOpenList: w
|
|
1284
|
+
} = ea(e), m = c(e.dropDownIcon);
|
|
1285
|
+
m.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (m.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
1286
|
+
const r = D(() => e.multiSelect), p = D(() => a.value ? a.value.elementRef.getBoundingClientRect().width : 0);
|
|
1260
1287
|
function v() {
|
|
1261
|
-
!
|
|
1288
|
+
!r.value && a.value && a.value.hidePopup();
|
|
1262
1289
|
}
|
|
1263
|
-
function
|
|
1264
|
-
|
|
1290
|
+
function x(N) {
|
|
1291
|
+
f.value = N.map((H) => H[e.textField]).join(e.separator);
|
|
1265
1292
|
let j = "";
|
|
1266
|
-
N.length === 1 ? j = N[0][e.valueField] : j = N.map((
|
|
1293
|
+
N.length === 1 ? j = N[0][e.valueField] : j = N.map((H) => H[e.valueField]).join(e.separator), b.value !== j && (b.value = j, t.emit("update:modelValue", b.value), t.emit("change", N, b.value));
|
|
1267
1294
|
}
|
|
1268
|
-
function
|
|
1269
|
-
const N =
|
|
1270
|
-
|
|
1295
|
+
function M() {
|
|
1296
|
+
const N = F(b.value);
|
|
1297
|
+
x(N);
|
|
1271
1298
|
}
|
|
1272
|
-
function
|
|
1273
|
-
s.value ||
|
|
1299
|
+
function d() {
|
|
1300
|
+
s.value || f.value;
|
|
1274
1301
|
}
|
|
1275
|
-
function
|
|
1302
|
+
function g(N) {
|
|
1276
1303
|
var j;
|
|
1277
|
-
|
|
1304
|
+
b.value = "", (j = n.value) == null || j.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
|
|
1278
1305
|
}
|
|
1279
|
-
function
|
|
1280
|
-
var j,
|
|
1281
|
-
e.enableSearch && e.enableHighlightSearch && ((j = n.value) == null || j.search(N)), (
|
|
1306
|
+
function C(N) {
|
|
1307
|
+
var j, H;
|
|
1308
|
+
e.enableSearch && e.enableHighlightSearch && ((j = n.value) == null || j.search(N)), (H = n.value) == null || H.activeRowById(N), t.emit("change", [b.value], b.value);
|
|
1282
1309
|
}
|
|
1283
|
-
function
|
|
1310
|
+
function O(N) {
|
|
1284
1311
|
if (e.multiSelect) {
|
|
1285
|
-
const j =
|
|
1312
|
+
const j = h(N);
|
|
1286
1313
|
e.viewType;
|
|
1287
1314
|
const B = j.map((I) => I[e.idField || e.valueField]).join(e.separator);
|
|
1288
|
-
|
|
1315
|
+
b.value !== B && (b.value = B, t.emit("update:modelValue", b.value), t.emit("change", j, b.value));
|
|
1289
1316
|
}
|
|
1290
1317
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return
|
|
1318
|
+
function z() {
|
|
1319
|
+
return f.value;
|
|
1293
1320
|
}
|
|
1294
|
-
function
|
|
1321
|
+
function L(N) {
|
|
1295
1322
|
const {
|
|
1296
1323
|
value: j
|
|
1297
1324
|
} = N.target;
|
|
1298
|
-
|
|
1325
|
+
C(j), t.emit("input", j);
|
|
1299
1326
|
}
|
|
1300
|
-
function
|
|
1327
|
+
function E() {
|
|
1301
1328
|
a.value.hidePopup();
|
|
1302
1329
|
}
|
|
1303
|
-
function
|
|
1304
|
-
|
|
1330
|
+
function R(N) {
|
|
1331
|
+
u.value = N;
|
|
1305
1332
|
}
|
|
1306
|
-
function
|
|
1307
|
-
return
|
|
1333
|
+
function T() {
|
|
1334
|
+
return u.value;
|
|
1308
1335
|
}
|
|
1309
|
-
const
|
|
1310
|
-
getDisplayText:
|
|
1311
|
-
hidePopup:
|
|
1312
|
-
updateDataSource:
|
|
1313
|
-
getData:
|
|
1336
|
+
const P = {
|
|
1337
|
+
getDisplayText: z,
|
|
1338
|
+
hidePopup: E,
|
|
1339
|
+
updateDataSource: R,
|
|
1340
|
+
getData: T
|
|
1314
1341
|
};
|
|
1315
|
-
t.expose(
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
return !e.beforeOpen || !j ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({
|
|
1319
|
-
instance: T
|
|
1320
|
-
})).then((V) => typeof (V == null ? void 0 : V.canOpen) == "boolean" ? V == null ? void 0 : V.canOpen : !0);
|
|
1321
|
-
}
|
|
1322
|
-
return W([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([N, j, V, B, I]) => {
|
|
1323
|
-
o.value = N, h.value = j, l.value = V, i.value = B, s.value = I;
|
|
1324
|
-
}), () => p(Jt, {
|
|
1342
|
+
return t.expose(P), W([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([N, j, H, B, I]) => {
|
|
1343
|
+
o.value = N, k.value = j, l.value = H, i.value = B, s.value = I;
|
|
1344
|
+
}), () => y(Jt, {
|
|
1325
1345
|
ref: a,
|
|
1326
1346
|
id: e.id,
|
|
1327
1347
|
disable: o.value,
|
|
1328
1348
|
readonly: s.value,
|
|
1329
1349
|
forcePlaceholder: e.forcePlaceholder,
|
|
1330
|
-
editable:
|
|
1331
|
-
buttonContent:
|
|
1350
|
+
editable: k.value,
|
|
1351
|
+
buttonContent: m.value,
|
|
1332
1352
|
placeholder: e.placeholder === "请选择" ? Z.getLocaleValue("comboList.placeholder") : e.placeholder,
|
|
1333
1353
|
enableClear: l.value,
|
|
1334
1354
|
maxLength: e.maxLength,
|
|
@@ -1336,38 +1356,38 @@ const ue = /* @__PURE__ */ G({
|
|
|
1336
1356
|
enableTitle: e.enableTitle,
|
|
1337
1357
|
multiSelect: e.multiSelect,
|
|
1338
1358
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1339
|
-
modelValue:
|
|
1340
|
-
"onUpdate:modelValue": (N) =>
|
|
1359
|
+
modelValue: f.value,
|
|
1360
|
+
"onUpdate:modelValue": (N) => f.value = N,
|
|
1341
1361
|
focusOnCreated: e.focusOnCreated,
|
|
1342
1362
|
selectOnCreated: e.selectOnCreated,
|
|
1343
|
-
onClear:
|
|
1344
|
-
onClick:
|
|
1345
|
-
onChange:
|
|
1346
|
-
onBlur:
|
|
1347
|
-
onInput:
|
|
1348
|
-
beforeOpen:
|
|
1363
|
+
onClear: g,
|
|
1364
|
+
onClick: d,
|
|
1365
|
+
onChange: O,
|
|
1366
|
+
onBlur: M,
|
|
1367
|
+
onInput: L,
|
|
1368
|
+
beforeOpen: w,
|
|
1349
1369
|
placement: e.placement,
|
|
1350
1370
|
popupMinWidth: e.minPanelWidth,
|
|
1351
1371
|
popupClass: "f-combo-list-wrapper",
|
|
1352
1372
|
popupOnClick: e.popupOnClick,
|
|
1353
1373
|
limitContentBySpace: !0
|
|
1354
1374
|
}, {
|
|
1355
|
-
default: () => [
|
|
1375
|
+
default: () => [y(Qn, {
|
|
1356
1376
|
ref: n,
|
|
1357
1377
|
idField: e.idField,
|
|
1358
1378
|
valueField: e.valueField,
|
|
1359
1379
|
textField: e.textField,
|
|
1360
1380
|
titleField: e.titleField,
|
|
1361
|
-
dataSource:
|
|
1362
|
-
selectedValues:
|
|
1381
|
+
dataSource: u.value,
|
|
1382
|
+
selectedValues: b.value,
|
|
1363
1383
|
separator: e.separator,
|
|
1364
1384
|
multiSelect: e.multiSelect,
|
|
1365
1385
|
enableSearch: i.value,
|
|
1366
1386
|
maxHeight: e.maxHeight,
|
|
1367
1387
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1368
|
-
width: e.fitEditor ?
|
|
1388
|
+
width: e.fitEditor ? p.value : void 0,
|
|
1369
1389
|
onSelectionChange: (N) => {
|
|
1370
|
-
|
|
1390
|
+
x(N), v();
|
|
1371
1391
|
}
|
|
1372
1392
|
}, null)]
|
|
1373
1393
|
});
|
|
@@ -1529,31 +1549,31 @@ class ta extends nn {
|
|
|
1529
1549
|
}
|
|
1530
1550
|
},
|
|
1531
1551
|
...this.getCommonEditorProperties(t)
|
|
1532
|
-
}, (s,
|
|
1533
|
-
if (!s || !
|
|
1552
|
+
}, (s, u) => {
|
|
1553
|
+
if (!s || !u.editor)
|
|
1534
1554
|
return;
|
|
1535
|
-
const
|
|
1555
|
+
const f = this;
|
|
1536
1556
|
switch (s.propertyID) {
|
|
1537
1557
|
case "dataSourceType": {
|
|
1538
|
-
s.propertyValue === "static" ? (
|
|
1558
|
+
s.propertyValue === "static" ? (u.editor.valueField = "value", u.editor.textField = "name", u.editor.remote = null) : s.propertyValue === "dynamic" && (u.editor.remote = { method: "GET" }, u.editor.valueField = "value", u.editor.textField = "name");
|
|
1539
1559
|
break;
|
|
1540
1560
|
}
|
|
1541
1561
|
case "data": {
|
|
1542
|
-
!
|
|
1562
|
+
!f.checkEnumDataReadonly(u) && u.formatter && (u.formatter.data = [...s.propertyValue]);
|
|
1543
1563
|
break;
|
|
1544
1564
|
}
|
|
1545
1565
|
case "viewType":
|
|
1546
|
-
s.propertyValue === "tag" && (
|
|
1566
|
+
s.propertyValue === "tag" && (u.editor.editable = !1);
|
|
1547
1567
|
}
|
|
1548
1568
|
});
|
|
1549
1569
|
}
|
|
1550
1570
|
getGridFieldEdtiorProperties(t, n) {
|
|
1551
|
-
var i, s,
|
|
1571
|
+
var i, s, u, f, k, b;
|
|
1552
1572
|
const a = this;
|
|
1553
1573
|
let o = "";
|
|
1554
1574
|
if (((i = t == null ? void 0 : t.binding) == null ? void 0 : i.type) === "Form") {
|
|
1555
|
-
const
|
|
1556
|
-
(s =
|
|
1575
|
+
const h = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1576
|
+
(s = h == null ? void 0 : h.schemaField) != null && s.type && (o = h.schemaField.type.$type);
|
|
1557
1577
|
}
|
|
1558
1578
|
return a.getComponentConfig(t, { type: "combo-list" }, {
|
|
1559
1579
|
// editable: {
|
|
@@ -1567,25 +1587,25 @@ class ta extends nn {
|
|
|
1567
1587
|
title: "启用清空",
|
|
1568
1588
|
type: "boolean"
|
|
1569
1589
|
},
|
|
1570
|
-
dataSourceType: {
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
},
|
|
1590
|
+
// dataSourceType: {
|
|
1591
|
+
// description: "",
|
|
1592
|
+
// title: "数据源类型",
|
|
1593
|
+
// type: "enum",
|
|
1594
|
+
// editor: {
|
|
1595
|
+
// default: "static",
|
|
1596
|
+
// data: [
|
|
1597
|
+
// { id: "static", name: "静态" },
|
|
1598
|
+
// { id: "dynamic", name: "动态" }
|
|
1599
|
+
// ]
|
|
1600
|
+
// },
|
|
1601
|
+
// refreshPanelAfterChanged: true
|
|
1602
|
+
// },
|
|
1583
1603
|
data: {
|
|
1584
1604
|
description: "",
|
|
1585
1605
|
title: "数据",
|
|
1586
1606
|
type: "array",
|
|
1587
|
-
visible: !((
|
|
1588
|
-
...a.getItemCollectionEditor(t, (
|
|
1607
|
+
visible: !((u = t.editor) != null && u.dataSourceType) || ((f = t.editor) == null ? void 0 : f.dataSourceType) === "static",
|
|
1608
|
+
...a.getItemCollectionEditor(t, (k = t.editor) == null ? void 0 : k.valueField, (b = t.editor) == null ? void 0 : b.textField),
|
|
1589
1609
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1590
1610
|
refreshPanelAfterChanged: !0
|
|
1591
1611
|
},
|
|
@@ -1620,17 +1640,17 @@ class ta extends nn {
|
|
|
1620
1640
|
}
|
|
1621
1641
|
},
|
|
1622
1642
|
...this.getCommonEditorProperties(t)
|
|
1623
|
-
}, (
|
|
1624
|
-
if (!
|
|
1643
|
+
}, (h, F) => {
|
|
1644
|
+
if (!h || !F.editor)
|
|
1625
1645
|
return;
|
|
1626
|
-
const
|
|
1627
|
-
switch (
|
|
1646
|
+
const w = this;
|
|
1647
|
+
switch (h.propertyID) {
|
|
1628
1648
|
case "dataSourceType": {
|
|
1629
|
-
|
|
1649
|
+
h.propertyValue === "static" ? (F.editor.valueField = "value", F.editor.textField = "name", F.editor.remote = null) : h.propertyValue === "dynamic" && (F.editor.remote = { method: "GET" }, F.editor.valueField = "value", F.editor.textField = "name");
|
|
1630
1650
|
break;
|
|
1631
1651
|
}
|
|
1632
1652
|
case "data": {
|
|
1633
|
-
!
|
|
1653
|
+
!w.checkEnumDataReadonly(F) && F.formatter && (F.formatter.data = [...h.propertyValue]);
|
|
1634
1654
|
break;
|
|
1635
1655
|
}
|
|
1636
1656
|
}
|
|
@@ -1674,13 +1694,13 @@ class ta extends nn {
|
|
|
1674
1694
|
label: "onChange",
|
|
1675
1695
|
name: "值变化事件"
|
|
1676
1696
|
},
|
|
1677
|
-
{
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
},
|
|
1697
|
+
// {
|
|
1698
|
+
// label: 'onClear',
|
|
1699
|
+
// name: '清空事件'
|
|
1700
|
+
// },
|
|
1681
1701
|
{
|
|
1682
1702
|
label: "beforeOpen",
|
|
1683
|
-
name: "
|
|
1703
|
+
name: "下拉面板前事件"
|
|
1684
1704
|
}
|
|
1685
1705
|
];
|
|
1686
1706
|
a && (i = i.concat(a)), this.appendFieldValueChangeEvents(t, i);
|
|
@@ -1691,11 +1711,11 @@ class ta extends nn {
|
|
|
1691
1711
|
properties: l.createBaseEventProperty(s),
|
|
1692
1712
|
tabId: "commands",
|
|
1693
1713
|
tabName: "交互",
|
|
1694
|
-
setPropertyRelates(
|
|
1695
|
-
const
|
|
1696
|
-
delete t[l.viewModelId],
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1714
|
+
setPropertyRelates(k, b) {
|
|
1715
|
+
const h = k.propertyValue;
|
|
1716
|
+
delete t[l.viewModelId], h && (h.setPropertyRelates = this.setPropertyRelates, l.eventsEditorUtils.saveRelatedParameters(t, l.viewModelId, h.events, h)), o && o(k, b, h);
|
|
1717
|
+
const F = l.designViewModelUtils.getDgViewModel(l.viewModelId);
|
|
1718
|
+
F && l.designViewModelField && F.changeField(l.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged }), t.editor.beforeOpen !== t.beforeOpen && (t.editor.beforeOpen = t.beforeOpen), t.editor.onChange !== t.onChange && (t.editor.onChange = t.onChange), t.editor.onClear !== t.onClear && (t.editor.onClear = t.onClear);
|
|
1699
1719
|
}
|
|
1700
1720
|
};
|
|
1701
1721
|
}
|
|
@@ -1714,10 +1734,10 @@ const aa = /* @__PURE__ */ G({
|
|
|
1714
1734
|
props: _n,
|
|
1715
1735
|
emits: ["clear", "update:modelValue", "change"],
|
|
1716
1736
|
setup(e, t) {
|
|
1717
|
-
const n =
|
|
1737
|
+
const n = c(), a = _("designer-host-service"), o = _("design-item-context"), l = na(o, a), i = De(n, o, l);
|
|
1718
1738
|
return K(() => {
|
|
1719
1739
|
n.value.componentInstance = i;
|
|
1720
|
-
}), t.expose(i.value), () =>
|
|
1740
|
+
}), t.expose(i.value), () => y(tn, {
|
|
1721
1741
|
ref: n,
|
|
1722
1742
|
buttonContent: e.dropDownIcon,
|
|
1723
1743
|
readonly: !0,
|
|
@@ -3910,8 +3930,8 @@ function va(e, t) {
|
|
|
3910
3930
|
try {
|
|
3911
3931
|
for (var i = e[Symbol.iterator](), s; !(a = (s = i.next()).done) && (n.push(s.value), !(t && n.length === t)); a = !0)
|
|
3912
3932
|
;
|
|
3913
|
-
} catch (
|
|
3914
|
-
o = !0, l =
|
|
3933
|
+
} catch (u) {
|
|
3934
|
+
o = !0, l = u;
|
|
3915
3935
|
} finally {
|
|
3916
3936
|
try {
|
|
3917
3937
|
!a && i.return != null && i.return();
|
|
@@ -3982,8 +4002,8 @@ function ie(e) {
|
|
|
3982
4002
|
for (var n = this, a = arguments.length, o = new Array(a), l = 0; l < a; l++)
|
|
3983
4003
|
o[l] = arguments[l];
|
|
3984
4004
|
return o.length >= e.length ? e.apply(this, o) : function() {
|
|
3985
|
-
for (var i = arguments.length, s = new Array(i),
|
|
3986
|
-
s[
|
|
4005
|
+
for (var i = arguments.length, s = new Array(i), u = 0; u < i; u++)
|
|
4006
|
+
s[u] = arguments[u];
|
|
3987
4007
|
return t.apply(n, [].concat(o, s));
|
|
3988
4008
|
};
|
|
3989
4009
|
};
|
|
@@ -4042,15 +4062,15 @@ function Ba(e) {
|
|
|
4042
4062
|
current: e
|
|
4043
4063
|
}, a = ie(Pa)(n, t), o = ie(Da)(n), l = ie(fe.changes)(e), i = ie(Ea)(n);
|
|
4044
4064
|
function s() {
|
|
4045
|
-
var
|
|
4046
|
-
return
|
|
4065
|
+
var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(k) {
|
|
4066
|
+
return k;
|
|
4047
4067
|
};
|
|
4048
|
-
return fe.selector(
|
|
4068
|
+
return fe.selector(f), f(n.current);
|
|
4049
4069
|
}
|
|
4050
|
-
function
|
|
4051
|
-
ka(a, o, l, i)(
|
|
4070
|
+
function u(f) {
|
|
4071
|
+
ka(a, o, l, i)(f);
|
|
4052
4072
|
}
|
|
4053
|
-
return [s,
|
|
4073
|
+
return [s, u];
|
|
4054
4074
|
}
|
|
4055
4075
|
function Ea(e, t) {
|
|
4056
4076
|
return ce(t) ? t(e.current) : t;
|
|
@@ -4076,8 +4096,8 @@ function ja(e) {
|
|
|
4076
4096
|
for (var n = this, a = arguments.length, o = new Array(a), l = 0; l < a; l++)
|
|
4077
4097
|
o[l] = arguments[l];
|
|
4078
4098
|
return o.length >= e.length ? e.apply(this, o) : function() {
|
|
4079
|
-
for (var i = arguments.length, s = new Array(i),
|
|
4080
|
-
s[
|
|
4099
|
+
for (var i = arguments.length, s = new Array(i), u = 0; u < i; u++)
|
|
4100
|
+
s[u] = arguments[u];
|
|
4081
4101
|
return t.apply(n, [].concat(o, s));
|
|
4082
4102
|
};
|
|
4083
4103
|
};
|
|
@@ -4259,20 +4279,20 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4259
4279
|
},
|
|
4260
4280
|
emits: [],
|
|
4261
4281
|
setup(e, t) {
|
|
4262
|
-
const n =
|
|
4282
|
+
const n = c(), a = c();
|
|
4263
4283
|
let o = null;
|
|
4264
|
-
const l =
|
|
4284
|
+
const l = c(e.modelValue);
|
|
4265
4285
|
async function i() {
|
|
4266
|
-
return fetch(e.configPath).then((
|
|
4286
|
+
return fetch(e.configPath).then((w) => w.json());
|
|
4267
4287
|
}
|
|
4268
4288
|
async function s() {
|
|
4269
4289
|
if (n.value && !o) {
|
|
4270
|
-
const
|
|
4271
|
-
vsPath:
|
|
4272
|
-
} =
|
|
4290
|
+
const w = await i(), {
|
|
4291
|
+
vsPath: m
|
|
4292
|
+
} = w;
|
|
4273
4293
|
Te.config({
|
|
4274
4294
|
paths: {
|
|
4275
|
-
vs: window.location.origin +
|
|
4295
|
+
vs: window.location.origin + m
|
|
4276
4296
|
}
|
|
4277
4297
|
}), Te.config({
|
|
4278
4298
|
"vs/nls": {
|
|
@@ -4280,8 +4300,8 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4280
4300
|
"*": "zh-cn"
|
|
4281
4301
|
}
|
|
4282
4302
|
}
|
|
4283
|
-
}), Te.init().then((
|
|
4284
|
-
a.value =
|
|
4303
|
+
}), Te.init().then((r) => {
|
|
4304
|
+
a.value = r, o = r.editor.create(n.value, {
|
|
4285
4305
|
value: l.value,
|
|
4286
4306
|
automaticLayout: !0,
|
|
4287
4307
|
// 自动调整布局
|
|
@@ -4307,51 +4327,51 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4307
4327
|
});
|
|
4308
4328
|
}
|
|
4309
4329
|
}
|
|
4310
|
-
W(() => e.modelValue, (
|
|
4311
|
-
l.value =
|
|
4330
|
+
W(() => e.modelValue, (w) => {
|
|
4331
|
+
l.value = w, o == null || o.setValue(w);
|
|
4312
4332
|
});
|
|
4313
|
-
const
|
|
4333
|
+
const u = c(), f = new ResizeObserver((w) => {
|
|
4314
4334
|
o == null || o.layout();
|
|
4315
4335
|
const {
|
|
4316
|
-
width:
|
|
4317
|
-
height:
|
|
4318
|
-
} =
|
|
4319
|
-
|
|
4320
|
-
width: `${
|
|
4321
|
-
height: `${
|
|
4336
|
+
width: m,
|
|
4337
|
+
height: r
|
|
4338
|
+
} = w[0].contentRect;
|
|
4339
|
+
u.value = {
|
|
4340
|
+
width: `${m - 1}px`,
|
|
4341
|
+
height: `${r}px`
|
|
4322
4342
|
};
|
|
4323
4343
|
});
|
|
4324
|
-
function
|
|
4344
|
+
function k() {
|
|
4325
4345
|
return o == null ? void 0 : o.getValue();
|
|
4326
4346
|
}
|
|
4327
|
-
function
|
|
4328
|
-
const
|
|
4347
|
+
function b(w) {
|
|
4348
|
+
const m = o.getSelection(), r = new a.value.Range(m.startLineNumber, m.startColumn, m.endLineNumber, m.endColumn);
|
|
4329
4349
|
o.executeEdits("insert-text", [{
|
|
4330
|
-
range:
|
|
4331
|
-
text:
|
|
4350
|
+
range: r,
|
|
4351
|
+
text: w,
|
|
4332
4352
|
forceMoveMarkers: !0
|
|
4333
4353
|
// 移动光标到插入后的位置
|
|
4334
4354
|
}]);
|
|
4335
4355
|
}
|
|
4336
4356
|
K(() => {
|
|
4337
|
-
s(), n.value &&
|
|
4357
|
+
s(), n.value && f.observe(n.value.parentElement);
|
|
4338
4358
|
}), Ye(() => {
|
|
4339
|
-
o && o.dispose(),
|
|
4359
|
+
o && o.dispose(), f && n.value && (f.unobserve(n.value), f.disconnect());
|
|
4340
4360
|
});
|
|
4341
|
-
function
|
|
4342
|
-
o.setValue(
|
|
4361
|
+
function h(w) {
|
|
4362
|
+
o.setValue(w);
|
|
4343
4363
|
}
|
|
4344
|
-
function
|
|
4345
|
-
|
|
4364
|
+
function F() {
|
|
4365
|
+
h("");
|
|
4346
4366
|
}
|
|
4347
4367
|
return t.expose({
|
|
4348
|
-
getContent:
|
|
4349
|
-
insertText:
|
|
4350
|
-
clearText:
|
|
4351
|
-
setContent:
|
|
4352
|
-
}), () =>
|
|
4368
|
+
getContent: k,
|
|
4369
|
+
insertText: b,
|
|
4370
|
+
clearText: F,
|
|
4371
|
+
setContent: h
|
|
4372
|
+
}), () => y("div", {
|
|
4353
4373
|
class: "expression-code-editor",
|
|
4354
|
-
style:
|
|
4374
|
+
style: u.value,
|
|
4355
4375
|
ref: n
|
|
4356
4376
|
}, null);
|
|
4357
4377
|
}
|
|
@@ -4371,18 +4391,18 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4371
4391
|
props: Qa,
|
|
4372
4392
|
emits: ["dblclickNode"],
|
|
4373
4393
|
setup(e, t) {
|
|
4374
|
-
const n =
|
|
4394
|
+
const n = c(e.data), a = c(), o = c();
|
|
4375
4395
|
function l() {
|
|
4376
|
-
let
|
|
4377
|
-
return document.querySelectorAll(".entity-variable .fv-grid-hierarchy-cell").forEach((
|
|
4378
|
-
|
|
4379
|
-
const
|
|
4380
|
-
|
|
4381
|
-
}),
|
|
4382
|
-
}
|
|
4383
|
-
W(() => e.data, (
|
|
4384
|
-
var
|
|
4385
|
-
n.value =
|
|
4396
|
+
let b = 0;
|
|
4397
|
+
return document.querySelectorAll(".entity-variable .fv-grid-hierarchy-cell").forEach((F) => {
|
|
4398
|
+
F.style.width = "auto";
|
|
4399
|
+
const w = F.scrollWidth;
|
|
4400
|
+
w > b && (b = w);
|
|
4401
|
+
}), b;
|
|
4402
|
+
}
|
|
4403
|
+
W(() => e.data, (b) => {
|
|
4404
|
+
var h;
|
|
4405
|
+
n.value = b, (h = a.value) == null || h.updateDataSource(b);
|
|
4386
4406
|
});
|
|
4387
4407
|
const i = {
|
|
4388
4408
|
customRowStatus: e.customRowStatus
|
|
@@ -4392,33 +4412,33 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4392
4412
|
dataType: "string",
|
|
4393
4413
|
formatter: e.formatter
|
|
4394
4414
|
}]);
|
|
4395
|
-
function
|
|
4396
|
-
$event:
|
|
4397
|
-
node:
|
|
4415
|
+
function u({
|
|
4416
|
+
$event: b,
|
|
4417
|
+
node: h
|
|
4398
4418
|
}) {
|
|
4399
4419
|
t.emit("dblclickNode", {
|
|
4400
|
-
$event:
|
|
4401
|
-
node:
|
|
4420
|
+
$event: b,
|
|
4421
|
+
node: h
|
|
4402
4422
|
});
|
|
4403
4423
|
}
|
|
4404
|
-
function
|
|
4405
|
-
const
|
|
4424
|
+
function f() {
|
|
4425
|
+
const b = l();
|
|
4406
4426
|
o.value = {
|
|
4407
|
-
minWidth: `${
|
|
4427
|
+
minWidth: `${b + 10}px`
|
|
4408
4428
|
};
|
|
4409
4429
|
}
|
|
4410
|
-
function
|
|
4411
|
-
row:
|
|
4430
|
+
function k({
|
|
4431
|
+
row: b
|
|
4412
4432
|
}) {
|
|
4413
|
-
oe(
|
|
4433
|
+
oe(f);
|
|
4414
4434
|
}
|
|
4415
4435
|
return K(() => {
|
|
4416
|
-
oe(
|
|
4417
|
-
}), () =>
|
|
4436
|
+
oe(f);
|
|
4437
|
+
}), () => y("div", {
|
|
4418
4438
|
class: "h-100 f-utils-fill",
|
|
4419
4439
|
style: "overflow:auto",
|
|
4420
4440
|
id: "entity-tree-view"
|
|
4421
|
-
}, [
|
|
4441
|
+
}, [y(an, {
|
|
4422
4442
|
ref: a,
|
|
4423
4443
|
fit: !1,
|
|
4424
4444
|
rowNumber: {
|
|
@@ -4432,10 +4452,10 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4432
4452
|
fitColumns: !0,
|
|
4433
4453
|
fitMode: "percentage"
|
|
4434
4454
|
},
|
|
4435
|
-
onDblclickNode:
|
|
4455
|
+
onDblclickNode: u,
|
|
4436
4456
|
style: o.value,
|
|
4437
4457
|
autoHeight: !0,
|
|
4438
|
-
onExpandNode:
|
|
4458
|
+
onExpandNode: k
|
|
4439
4459
|
}, null)]);
|
|
4440
4460
|
}
|
|
4441
4461
|
}), to = /* @__PURE__ */ G({
|
|
@@ -4443,67 +4463,67 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4443
4463
|
props: Za,
|
|
4444
4464
|
emits: ["variableItemDblClick", "entityItemDblClick", "fieldClick"],
|
|
4445
4465
|
setup(e, t) {
|
|
4446
|
-
const n =
|
|
4466
|
+
const n = c("dataEntity"), a = c(e.dataSource), {
|
|
4447
4467
|
entities: o,
|
|
4448
4468
|
variables: l
|
|
4449
|
-
} = a.value, i =
|
|
4469
|
+
} = a.value, i = c(""), s = c((o == null ? void 0 : o.fields) || []), u = (T, P) => {
|
|
4450
4470
|
T.stopPropagation(), t.emit("fieldClick", {
|
|
4451
4471
|
$event: T,
|
|
4452
4472
|
item: P.raw
|
|
4453
4473
|
});
|
|
4454
|
-
},
|
|
4474
|
+
}, f = (T, P) => {
|
|
4455
4475
|
const N = `${P.raw.name} [${P.raw.bindingPath}]`;
|
|
4456
|
-
return
|
|
4476
|
+
return y("div", {
|
|
4457
4477
|
class: "d-flex align-items-center w-100 entity-field",
|
|
4458
4478
|
style: "justify-content: space-between;"
|
|
4459
|
-
}, [
|
|
4479
|
+
}, [y("span", {
|
|
4460
4480
|
title: N,
|
|
4461
4481
|
class: "f-utils-fill text-truncate"
|
|
4462
|
-
}, [N]),
|
|
4482
|
+
}, [N]), y("button", {
|
|
4463
4483
|
title: "插入属性名称",
|
|
4464
4484
|
class: "btn btn-link d-none",
|
|
4465
4485
|
style: "width:24px;height:24px",
|
|
4466
|
-
onClick: (j) =>
|
|
4486
|
+
onClick: (j) => u(j, P),
|
|
4467
4487
|
onDblclick: (j) => j.stopPropagation()
|
|
4468
|
-
}, [
|
|
4488
|
+
}, [y("span", {
|
|
4469
4489
|
class: "f-icon f-icon-new-edit",
|
|
4470
4490
|
style: "font-size: 12px;"
|
|
4471
4491
|
}, null)])]);
|
|
4472
|
-
},
|
|
4492
|
+
}, k = c({}), b = c(), h = D(() => (T) => ({
|
|
4473
4493
|
"list-group d-flex flex-column": !0,
|
|
4474
4494
|
"f-utils-fill": n.value === T,
|
|
4475
4495
|
expand: n.value === T,
|
|
4476
4496
|
collapse: n.value !== T
|
|
4477
|
-
})),
|
|
4497
|
+
})), F = D(() => (T) => ({
|
|
4478
4498
|
"f-icon f-icon-arrow-chevron-up": n.value !== T,
|
|
4479
4499
|
"f-icon f-icon-arrow-chevron-down": n.value === T
|
|
4480
|
-
})),
|
|
4500
|
+
})), w = D(() => (T) => ({
|
|
4481
4501
|
"functions-type d-flex flex-column": !0,
|
|
4482
|
-
open:
|
|
4483
|
-
closed: !
|
|
4484
|
-
})),
|
|
4485
|
-
"f-icon f-icon-arrow-chevron-down":
|
|
4486
|
-
"f-icon f-icon-arrow-chevron-right": !
|
|
4487
|
-
})),
|
|
4502
|
+
open: k.value[T],
|
|
4503
|
+
closed: !k.value[T]
|
|
4504
|
+
})), m = D(() => (T) => ({
|
|
4505
|
+
"f-icon f-icon-arrow-chevron-down": k.value[T],
|
|
4506
|
+
"f-icon f-icon-arrow-chevron-right": !k.value[T]
|
|
4507
|
+
})), r = D(() => (T) => {
|
|
4488
4508
|
var P;
|
|
4489
4509
|
return {
|
|
4490
4510
|
"functions-item pl-2": !0,
|
|
4491
|
-
selected: ((P =
|
|
4511
|
+
selected: ((P = b.value) == null ? void 0 : P.key) === T.key
|
|
4492
4512
|
};
|
|
4493
4513
|
});
|
|
4494
|
-
function
|
|
4495
|
-
T.stopPropagation(),
|
|
4514
|
+
function p(T, P) {
|
|
4515
|
+
T.stopPropagation(), k.value = k.value || {}, k.value[P] = !k.value[P];
|
|
4496
4516
|
}
|
|
4497
|
-
function
|
|
4498
|
-
T.stopPropagation(),
|
|
4517
|
+
function v(T, P) {
|
|
4518
|
+
T.stopPropagation(), b.value = P;
|
|
4499
4519
|
}
|
|
4500
|
-
function
|
|
4520
|
+
function x(T, P) {
|
|
4501
4521
|
t.emit("variableItemDblClick", {
|
|
4502
4522
|
$event: T,
|
|
4503
4523
|
item: P
|
|
4504
4524
|
});
|
|
4505
4525
|
}
|
|
4506
|
-
function
|
|
4526
|
+
function M({
|
|
4507
4527
|
$event: T,
|
|
4508
4528
|
node: P
|
|
4509
4529
|
}) {
|
|
@@ -4514,37 +4534,37 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4514
4534
|
parentCodes: P.data.parents.join(".")
|
|
4515
4535
|
});
|
|
4516
4536
|
}
|
|
4517
|
-
function
|
|
4518
|
-
return
|
|
4537
|
+
function d() {
|
|
4538
|
+
return y(eo, {
|
|
4519
4539
|
data: s.value,
|
|
4520
|
-
formatter:
|
|
4521
|
-
onDblclickNode:
|
|
4540
|
+
formatter: f,
|
|
4541
|
+
onDblclickNode: M
|
|
4522
4542
|
}, null);
|
|
4523
4543
|
}
|
|
4524
|
-
function
|
|
4544
|
+
function g() {
|
|
4525
4545
|
if (l)
|
|
4526
|
-
return
|
|
4546
|
+
return y("ul", {
|
|
4527
4547
|
class: "w-100 functions-list"
|
|
4528
|
-
}, [Object.keys(l).map((T) => l[T].visible &&
|
|
4548
|
+
}, [Object.keys(l).map((T) => l[T].visible && y("li", {
|
|
4529
4549
|
"variable-type": T,
|
|
4530
|
-
class:
|
|
4531
|
-
}, [
|
|
4550
|
+
class: w.value(T)
|
|
4551
|
+
}, [y("div", {
|
|
4532
4552
|
class: "functions-type-name pl-2 d-flex align-items-center",
|
|
4533
4553
|
onClick: (P) => {
|
|
4534
|
-
|
|
4554
|
+
p(P, T);
|
|
4535
4555
|
}
|
|
4536
|
-
}, [
|
|
4537
|
-
class:
|
|
4538
|
-
}, null), l[T].name]),
|
|
4556
|
+
}, [y("span", {
|
|
4557
|
+
class: m.value(T)
|
|
4558
|
+
}, null), l[T].name]), y("ul", {
|
|
4539
4559
|
class: "pl-3 mr-2"
|
|
4540
|
-
}, [l[T].items.map((P) =>
|
|
4541
|
-
class:
|
|
4542
|
-
onClick: (N) =>
|
|
4543
|
-
onDblclick: (N) =>
|
|
4560
|
+
}, [l[T].items.map((P) => y("li", {
|
|
4561
|
+
class: r.value(P),
|
|
4562
|
+
onClick: (N) => v(N, P),
|
|
4563
|
+
onDblclick: (N) => x(N, P),
|
|
4544
4564
|
title: `${P.name} [${P.key}]`
|
|
4545
4565
|
}, [P.name]))])]))]);
|
|
4546
4566
|
}
|
|
4547
|
-
function
|
|
4567
|
+
function C(T, P) {
|
|
4548
4568
|
if (T.stopPropagation(), n.value === P) {
|
|
4549
4569
|
n.value = "";
|
|
4550
4570
|
return;
|
|
@@ -4554,11 +4574,11 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4554
4574
|
K(() => {
|
|
4555
4575
|
if (l) {
|
|
4556
4576
|
const T = Object.keys(l)[0];
|
|
4557
|
-
|
|
4577
|
+
k.value[T] = !0;
|
|
4558
4578
|
}
|
|
4559
4579
|
});
|
|
4560
|
-
function
|
|
4561
|
-
const N = T.children.map((
|
|
4580
|
+
function O(T, P) {
|
|
4581
|
+
const N = T.children.map((H) => O(H, P)).filter((H) => H !== null);
|
|
4562
4582
|
return T.data.name.toLowerCase().includes(P.toLowerCase()) || T.data.bindingPath.toLowerCase().includes(P.toLowerCase()) ? {
|
|
4563
4583
|
data: {
|
|
4564
4584
|
...T.data
|
|
@@ -4573,7 +4593,7 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4573
4593
|
} : null;
|
|
4574
4594
|
}
|
|
4575
4595
|
function z(T, P) {
|
|
4576
|
-
return T.map((N) =>
|
|
4596
|
+
return T.map((N) => O(N, P)).filter((N) => N !== null);
|
|
4577
4597
|
}
|
|
4578
4598
|
function L() {
|
|
4579
4599
|
const T = z((o == null ? void 0 : o.fields) || [], i.value);
|
|
@@ -4585,22 +4605,22 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4585
4605
|
function R(T) {
|
|
4586
4606
|
T.key === "Enter" && L();
|
|
4587
4607
|
}
|
|
4588
|
-
return () =>
|
|
4608
|
+
return () => y("div", {
|
|
4589
4609
|
class: "f-utils-fill entity-variable"
|
|
4590
|
-
}, [
|
|
4610
|
+
}, [y("ul", {
|
|
4591
4611
|
class: "d-flex flex-column h-100"
|
|
4592
|
-
}, [
|
|
4593
|
-
class:
|
|
4594
|
-
}, [
|
|
4612
|
+
}, [y("li", {
|
|
4613
|
+
class: h.value("dataEntity")
|
|
4614
|
+
}, [y("div", {
|
|
4595
4615
|
class: "title px-2 d-flex align-items-center",
|
|
4596
|
-
onClick: (T) =>
|
|
4597
|
-
}, [me("数据实体"),
|
|
4598
|
-
class:
|
|
4599
|
-
}, null)]),
|
|
4616
|
+
onClick: (T) => C(T, "dataEntity")
|
|
4617
|
+
}, [me("数据实体"), y("span", {
|
|
4618
|
+
class: F.value("dataEntity")
|
|
4619
|
+
}, null)]), y("div", {
|
|
4600
4620
|
class: "data-area f-utils-fill d-flex flex-column"
|
|
4601
|
-
}, [
|
|
4621
|
+
}, [y("div", {
|
|
4602
4622
|
class: "w-100"
|
|
4603
|
-
}, [
|
|
4623
|
+
}, [y(Ke, {
|
|
4604
4624
|
class: "m-2",
|
|
4605
4625
|
buttonContent: '<i class="f-icon f-icon-search"></i>',
|
|
4606
4626
|
enableClear: !0,
|
|
@@ -4611,16 +4631,16 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4611
4631
|
onClickButton: L,
|
|
4612
4632
|
onClear: E,
|
|
4613
4633
|
onKeyup: R
|
|
4614
|
-
}, null)]),
|
|
4615
|
-
class:
|
|
4616
|
-
}, [
|
|
4634
|
+
}, null)]), d()])]), y("li", {
|
|
4635
|
+
class: h.value("variables")
|
|
4636
|
+
}, [y("div", {
|
|
4617
4637
|
class: "title px-2 d-flex align-items-center",
|
|
4618
|
-
onClick: (T) =>
|
|
4619
|
-
}, [me("变量"),
|
|
4620
|
-
class:
|
|
4621
|
-
}, null)]),
|
|
4638
|
+
onClick: (T) => C(T, "variables")
|
|
4639
|
+
}, [me("变量"), y("span", {
|
|
4640
|
+
class: F.value("variables")
|
|
4641
|
+
}, null)]), y("div", {
|
|
4622
4642
|
class: "data-area f-utils-fill"
|
|
4623
|
-
}, [
|
|
4643
|
+
}, [g()])])])]);
|
|
4624
4644
|
}
|
|
4625
4645
|
}), no = {
|
|
4626
4646
|
functionItems: {
|
|
@@ -4636,145 +4656,145 @@ const Ja = /* @__PURE__ */ G({
|
|
|
4636
4656
|
props: no,
|
|
4637
4657
|
emits: ["insertFunction", "search"],
|
|
4638
4658
|
setup(e, t) {
|
|
4639
|
-
const n =
|
|
4659
|
+
const n = c(), a = c(""), o = c(), l = c({}), i = c(""), s = "没有与搜索条件匹配的项", u = c(e.functionItems), f = D(() => (d) => e.singleExpand ? {
|
|
4640
4660
|
"functions-type d-flex flex-column": !0,
|
|
4641
|
-
open: a.value ===
|
|
4642
|
-
closed: a.value !==
|
|
4661
|
+
open: a.value === d,
|
|
4662
|
+
closed: a.value !== d
|
|
4643
4663
|
} : {
|
|
4644
4664
|
"functions-type d-flex flex-column": !0,
|
|
4645
|
-
open: l.value[
|
|
4646
|
-
closed: !l.value[
|
|
4647
|
-
}),
|
|
4648
|
-
"f-icon f-icon-arrow-chevron-down": a.value ===
|
|
4649
|
-
"f-icon f-icon-arrow-chevron-right": a.value !==
|
|
4665
|
+
open: l.value[d],
|
|
4666
|
+
closed: !l.value[d]
|
|
4667
|
+
}), k = D(() => (d) => e.singleExpand ? {
|
|
4668
|
+
"f-icon f-icon-arrow-chevron-down": a.value === d,
|
|
4669
|
+
"f-icon f-icon-arrow-chevron-right": a.value !== d
|
|
4650
4670
|
} : {
|
|
4651
|
-
"f-icon f-icon-arrow-chevron-down": l.value[
|
|
4652
|
-
"f-icon f-icon-arrow-chevron-right": !l.value[
|
|
4653
|
-
}),
|
|
4654
|
-
var
|
|
4671
|
+
"f-icon f-icon-arrow-chevron-down": l.value[d],
|
|
4672
|
+
"f-icon f-icon-arrow-chevron-right": !l.value[d]
|
|
4673
|
+
}), b = D(() => (d) => {
|
|
4674
|
+
var g;
|
|
4655
4675
|
return {
|
|
4656
4676
|
"functions-item pl-2": !0,
|
|
4657
|
-
selected: ((
|
|
4677
|
+
selected: ((g = o.value) == null ? void 0 : g.key) === d.key
|
|
4658
4678
|
};
|
|
4659
|
-
}),
|
|
4660
|
-
W(() => e.functionItems, (
|
|
4661
|
-
|
|
4679
|
+
}), h = c(Object.keys(u.value));
|
|
4680
|
+
W(() => e.functionItems, (d) => {
|
|
4681
|
+
u.value = d, h.value = Object.keys(u.value), i.value && (l.value = h.value.reduce((g, C) => (g[C] = !0, g), {}));
|
|
4662
4682
|
});
|
|
4663
|
-
function
|
|
4664
|
-
|
|
4665
|
-
const
|
|
4666
|
-
|
|
4683
|
+
function F(d) {
|
|
4684
|
+
d || (d = a.value);
|
|
4685
|
+
const g = n.value.querySelector('li[function-type="' + d + '"] > div.functions-type-name');
|
|
4686
|
+
g && (n.value.querySelector(".expression-left").scrollTop = 0, g.scrollIntoViewIfNeeded ? g.scrollIntoViewIfNeeded(!0) : g.scrollIntoView({
|
|
4667
4687
|
behavior: "smooth",
|
|
4668
4688
|
block: "nearest"
|
|
4669
4689
|
}));
|
|
4670
4690
|
}
|
|
4671
|
-
function
|
|
4691
|
+
function w(d) {
|
|
4672
4692
|
if (e.singleExpand) {
|
|
4673
|
-
if (a.value ===
|
|
4693
|
+
if (a.value === d) {
|
|
4674
4694
|
a.value = "";
|
|
4675
4695
|
return;
|
|
4676
4696
|
}
|
|
4677
|
-
a.value =
|
|
4697
|
+
a.value = d;
|
|
4678
4698
|
} else
|
|
4679
|
-
l.value = l.value || {}, l.value[
|
|
4699
|
+
l.value = l.value || {}, l.value[d] = !l.value[d];
|
|
4680
4700
|
}
|
|
4681
|
-
function
|
|
4682
|
-
|
|
4701
|
+
function m(d, g) {
|
|
4702
|
+
d.stopPropagation(), o.value = g;
|
|
4683
4703
|
}
|
|
4684
|
-
function
|
|
4685
|
-
|
|
4686
|
-
$event:
|
|
4687
|
-
item:
|
|
4704
|
+
function r(d, g) {
|
|
4705
|
+
d.stopPropagation(), t.emit("insertFunction", {
|
|
4706
|
+
$event: d,
|
|
4707
|
+
item: g
|
|
4688
4708
|
});
|
|
4689
4709
|
}
|
|
4690
|
-
W(() => a.value, (
|
|
4691
|
-
if (
|
|
4692
|
-
const
|
|
4693
|
-
|
|
4710
|
+
W(() => a.value, (d, g, C) => {
|
|
4711
|
+
if (d) {
|
|
4712
|
+
const O = setTimeout(() => {
|
|
4713
|
+
F(d);
|
|
4694
4714
|
}, 200);
|
|
4695
|
-
|
|
4715
|
+
C(() => clearTimeout(O));
|
|
4696
4716
|
}
|
|
4697
4717
|
});
|
|
4698
|
-
function
|
|
4718
|
+
function p() {
|
|
4699
4719
|
t.emit("search", i.value);
|
|
4700
4720
|
}
|
|
4701
|
-
function
|
|
4721
|
+
function v() {
|
|
4702
4722
|
t.emit("search", "");
|
|
4703
4723
|
}
|
|
4704
|
-
function
|
|
4705
|
-
|
|
4724
|
+
function x(d) {
|
|
4725
|
+
d.key === "Enter" && p();
|
|
4706
4726
|
}
|
|
4707
|
-
function
|
|
4708
|
-
return
|
|
4709
|
-
"function-type":
|
|
4710
|
-
class:
|
|
4711
|
-
}, [
|
|
4727
|
+
function M() {
|
|
4728
|
+
return h.value.length ? h.value.map((d) => y("li", {
|
|
4729
|
+
"function-type": d,
|
|
4730
|
+
class: f.value(d)
|
|
4731
|
+
}, [y("div", {
|
|
4712
4732
|
class: "functions-type-name pl-2 d-flex align-items-center",
|
|
4713
4733
|
onClick: () => {
|
|
4714
|
-
|
|
4734
|
+
w(d);
|
|
4715
4735
|
}
|
|
4716
|
-
}, [
|
|
4717
|
-
class:
|
|
4718
|
-
}, null),
|
|
4736
|
+
}, [y("span", {
|
|
4737
|
+
class: k.value(d)
|
|
4738
|
+
}, null), u.value[d].name]), y("ul", {
|
|
4719
4739
|
class: "pl-3 mr-2"
|
|
4720
|
-
}, [
|
|
4721
|
-
if (
|
|
4722
|
-
return
|
|
4723
|
-
class:
|
|
4724
|
-
onClick: (
|
|
4725
|
-
onDblclick: (
|
|
4726
|
-
}, [
|
|
4727
|
-
})])])) :
|
|
4740
|
+
}, [u.value[d].items.map((g) => {
|
|
4741
|
+
if (g.visible !== !1)
|
|
4742
|
+
return y("li", {
|
|
4743
|
+
class: b.value(g),
|
|
4744
|
+
onClick: (C) => m(C, g),
|
|
4745
|
+
onDblclick: (C) => r(C, g)
|
|
4746
|
+
}, [d === "advanced" ? g.key : g.name]);
|
|
4747
|
+
})])])) : y("li", {
|
|
4728
4748
|
class: "empty-message"
|
|
4729
4749
|
}, [s]);
|
|
4730
4750
|
}
|
|
4731
4751
|
return K(() => {
|
|
4732
|
-
a.value =
|
|
4733
|
-
}), () =>
|
|
4752
|
+
a.value = h.value[0], l.value = h.value.reduce((d, g) => (d[g] = a.value === g, d), {});
|
|
4753
|
+
}), () => y("div", {
|
|
4734
4754
|
class: "d-flex f-utils-fill flex-column",
|
|
4735
4755
|
ref: n
|
|
4736
|
-
}, [
|
|
4756
|
+
}, [y(ee, {
|
|
4737
4757
|
class: "flex-column expression-left"
|
|
4738
4758
|
}, {
|
|
4739
|
-
default: () => [
|
|
4759
|
+
default: () => [y(Q, {
|
|
4740
4760
|
position: "top",
|
|
4741
4761
|
minHeight: 50,
|
|
4742
4762
|
height: 50,
|
|
4743
4763
|
"custom-class": "position-relative d-flex align-items-center search-bar",
|
|
4744
4764
|
resizable: !1
|
|
4745
4765
|
}, {
|
|
4746
|
-
default: () => [
|
|
4766
|
+
default: () => [y(Ke, {
|
|
4747
4767
|
class: "w-100 mx-2",
|
|
4748
4768
|
buttonContent: '<i class="f-icon f-icon-search"></i>',
|
|
4749
4769
|
enableClear: !0,
|
|
4750
4770
|
popupOnClick: !0,
|
|
4751
4771
|
placeholder: "请输入函数名称,按回车查询",
|
|
4752
4772
|
modelValue: i.value,
|
|
4753
|
-
"onUpdate:modelValue": (
|
|
4754
|
-
onClickButton:
|
|
4755
|
-
onClear:
|
|
4756
|
-
onKeyup:
|
|
4773
|
+
"onUpdate:modelValue": (d) => i.value = d,
|
|
4774
|
+
onClickButton: p,
|
|
4775
|
+
onClear: v,
|
|
4776
|
+
onKeyup: x
|
|
4757
4777
|
}, null)]
|
|
4758
|
-
}),
|
|
4778
|
+
}), y(Q, {
|
|
4759
4779
|
position: "center",
|
|
4760
4780
|
"custom-class": "layout-border"
|
|
4761
4781
|
}, {
|
|
4762
|
-
default: () => [
|
|
4782
|
+
default: () => [y("ul", {
|
|
4763
4783
|
class: "w-100 functions-list",
|
|
4764
4784
|
style: "user-select: none"
|
|
4765
|
-
}, [
|
|
4766
|
-
}),
|
|
4785
|
+
}, [M()])]
|
|
4786
|
+
}), y(Q, {
|
|
4767
4787
|
"custom-class": "position-relative",
|
|
4768
4788
|
position: "bottom",
|
|
4769
4789
|
minHeight: 80
|
|
4770
4790
|
}, {
|
|
4771
4791
|
default: () => {
|
|
4772
|
-
var
|
|
4773
|
-
return [
|
|
4792
|
+
var d;
|
|
4793
|
+
return [y("textarea", {
|
|
4774
4794
|
title: "函数说明",
|
|
4775
4795
|
class: "h-100 w-100 function-remark p-1",
|
|
4776
4796
|
disabled: !0
|
|
4777
|
-
}, [(
|
|
4797
|
+
}, [(d = o.value) == null ? void 0 : d.description])];
|
|
4778
4798
|
}
|
|
4779
4799
|
})]
|
|
4780
4800
|
})]);
|
|
@@ -4787,38 +4807,38 @@ function oo(e) {
|
|
|
4787
4807
|
async function n() {
|
|
4788
4808
|
if (window.esprima == null) {
|
|
4789
4809
|
const i = await t(), { path: s } = i;
|
|
4790
|
-
return new Promise((
|
|
4791
|
-
const
|
|
4792
|
-
|
|
4810
|
+
return new Promise((u, f) => {
|
|
4811
|
+
const k = document.createElement("script");
|
|
4812
|
+
k.type = "text/javascript", k.src = s + "?v=" + Date.now(), k.onload = u, k.onerror = f, document.head.appendChild(k);
|
|
4793
4813
|
});
|
|
4794
4814
|
}
|
|
4795
4815
|
}
|
|
4796
4816
|
function a(i) {
|
|
4797
|
-
const s = [],
|
|
4798
|
-
for (let
|
|
4799
|
-
s.push(
|
|
4800
|
-
const
|
|
4801
|
-
for (let
|
|
4802
|
-
const
|
|
4803
|
-
|
|
4804
|
-
}
|
|
4805
|
-
const
|
|
4806
|
-
for (let
|
|
4807
|
-
|
|
4808
|
-
return
|
|
4817
|
+
const s = [], u = window.esprima.tokenize(i);
|
|
4818
|
+
for (let h = 0; h < u.length; h++)
|
|
4819
|
+
s.push(u[h].value);
|
|
4820
|
+
const f = [];
|
|
4821
|
+
for (let h = 0; h < s.length; h++) {
|
|
4822
|
+
const F = i.indexOf(s[h]);
|
|
4823
|
+
F !== -1 ? f.push(i.substring(0, F)) : f.push(""), i = i.slice(F + s[h].length), h === s.length - 1 && f.push(i);
|
|
4824
|
+
}
|
|
4825
|
+
const k = [], b = s.length;
|
|
4826
|
+
for (let h = 0; h < b; h++)
|
|
4827
|
+
f[h] !== "" && k.push(f[h]), s[h] !== "" && k.push(s[h]), h === b - 1 && f[h + 1] !== "" && k.push(f[h + 1]);
|
|
4828
|
+
return k;
|
|
4809
4829
|
}
|
|
4810
4830
|
function o(i, s = "key2name") {
|
|
4811
|
-
const
|
|
4831
|
+
const u = /* @__PURE__ */ new Map();
|
|
4812
4832
|
if (!i)
|
|
4813
|
-
return
|
|
4814
|
-
let
|
|
4815
|
-
for (;
|
|
4816
|
-
const
|
|
4817
|
-
|
|
4818
|
-
s === "key2name" ?
|
|
4819
|
-
}) : s === "key2name" ?
|
|
4833
|
+
return u;
|
|
4834
|
+
let k = Object.values(i).map((b) => b.items).flat();
|
|
4835
|
+
for (; k.length > 0; ) {
|
|
4836
|
+
const b = k.filter((h) => h.name === k[0].name);
|
|
4837
|
+
b.length > 1 ? k.filter((h) => h.name === k[0].name).forEach((h) => {
|
|
4838
|
+
s === "key2name" ? u.set(h.key, h.key + "_" + h.name) : s === "name2key" && u.set(h.key + "_" + h.name, h.key);
|
|
4839
|
+
}) : s === "key2name" ? u.set(b[0].key, b[0].name) : s === "name2key" && u.set(b[0].name, b[0].key), k = k.filter((h) => h.name !== k[0].name);
|
|
4820
4840
|
}
|
|
4821
|
-
return
|
|
4841
|
+
return u;
|
|
4822
4842
|
}
|
|
4823
4843
|
n();
|
|
4824
4844
|
async function l(i) {
|
|
@@ -4832,140 +4852,140 @@ function oo(e) {
|
|
|
4832
4852
|
};
|
|
4833
4853
|
}
|
|
4834
4854
|
function lo(e, t, n) {
|
|
4835
|
-
const a =
|
|
4855
|
+
const a = c(e.disabledFunctions), { getTokens: o, getVariableMaps: l, runWithEsprima: i } = oo(e);
|
|
4836
4856
|
function s() {
|
|
4837
|
-
const
|
|
4857
|
+
const r = Me(t);
|
|
4838
4858
|
if (a.value) {
|
|
4839
|
-
let
|
|
4840
|
-
const { types:
|
|
4841
|
-
return
|
|
4842
|
-
|
|
4843
|
-
|
|
4859
|
+
let p = Object.keys(r);
|
|
4860
|
+
const { types: v, functions: x } = a.value;
|
|
4861
|
+
return v && v.length && (p = p.filter((M) => v.includes(M))), x && x.length && Object.values(r).forEach((M) => {
|
|
4862
|
+
M.items.forEach((d) => {
|
|
4863
|
+
x.includes(d.name) && (d.visible = !1);
|
|
4844
4864
|
});
|
|
4845
|
-
}),
|
|
4865
|
+
}), r;
|
|
4846
4866
|
}
|
|
4847
|
-
return
|
|
4867
|
+
return r;
|
|
4848
4868
|
}
|
|
4849
|
-
function r
|
|
4850
|
-
const
|
|
4851
|
-
if (
|
|
4852
|
-
return
|
|
4869
|
+
function u(r) {
|
|
4870
|
+
const p = t.analytical.items.find((v) => v.key === "GetContextParameter");
|
|
4871
|
+
if (p)
|
|
4872
|
+
return p.name + '("' + r.name + '")';
|
|
4853
4873
|
}
|
|
4854
|
-
function
|
|
4855
|
-
if (!
|
|
4874
|
+
function f(r) {
|
|
4875
|
+
if (!r || r.length === 0)
|
|
4856
4876
|
return "";
|
|
4857
|
-
const
|
|
4858
|
-
switch (
|
|
4877
|
+
const p = (v) => {
|
|
4878
|
+
switch (v.type) {
|
|
4859
4879
|
case "string":
|
|
4860
|
-
return `"${
|
|
4880
|
+
return `"${v.name}"`;
|
|
4861
4881
|
case "list":
|
|
4862
|
-
return `[${
|
|
4882
|
+
return `[${v.name}]`;
|
|
4863
4883
|
default:
|
|
4864
|
-
return
|
|
4884
|
+
return v.name;
|
|
4865
4885
|
}
|
|
4866
4886
|
};
|
|
4867
|
-
return
|
|
4887
|
+
return r.map(p).join(",");
|
|
4868
4888
|
}
|
|
4869
|
-
function
|
|
4870
|
-
let
|
|
4871
|
-
return
|
|
4889
|
+
function k(r) {
|
|
4890
|
+
let p = r.name;
|
|
4891
|
+
return r.type.toLowerCase() !== "advanced" && (p += "(" + f(r.params) + ")"), p;
|
|
4872
4892
|
}
|
|
4873
|
-
function
|
|
4874
|
-
return
|
|
4893
|
+
function b(r) {
|
|
4894
|
+
return r == null ? void 0 : r.bindingPath;
|
|
4875
4895
|
}
|
|
4876
|
-
function
|
|
4877
|
-
if (!
|
|
4896
|
+
function h(r) {
|
|
4897
|
+
if (!r)
|
|
4878
4898
|
return "";
|
|
4879
|
-
const
|
|
4880
|
-
for (let
|
|
4881
|
-
let
|
|
4882
|
-
if (
|
|
4883
|
-
const
|
|
4884
|
-
if (
|
|
4885
|
-
const
|
|
4886
|
-
|
|
4899
|
+
const p = o(r), v = l(n, "name2key");
|
|
4900
|
+
for (let M = 0; M < p.length; M++) {
|
|
4901
|
+
let d = 0;
|
|
4902
|
+
if (d === 0 && v && p[M].length > 2 && p[M][0] === '"' && p[M][p[M].length - 1] === '"') {
|
|
4903
|
+
const g = p[M].substring(1, p[M].length - 1);
|
|
4904
|
+
if (v.has(g) && p[M - 1] === "(" && p[M + 1] === ")") {
|
|
4905
|
+
const C = v.get(g);
|
|
4906
|
+
C !== void 0 && (p[M] = `"${C}"`, d = 1);
|
|
4887
4907
|
}
|
|
4888
4908
|
}
|
|
4889
|
-
if (
|
|
4890
|
-
const
|
|
4891
|
-
for (let
|
|
4892
|
-
if (
|
|
4893
|
-
|
|
4909
|
+
if (d === 0) {
|
|
4910
|
+
const g = Object.values(t).map((C) => C.items).flat();
|
|
4911
|
+
for (let C = 0; C < g.length; C++)
|
|
4912
|
+
if (p[M] === g[C].name) {
|
|
4913
|
+
p[M] = g[C].keyFront + "." + g[C].key, d = 1;
|
|
4894
4914
|
break;
|
|
4895
4915
|
}
|
|
4896
4916
|
}
|
|
4897
4917
|
}
|
|
4898
|
-
const
|
|
4899
|
-
return JSON.stringify({ expr:
|
|
4900
|
-
}
|
|
4901
|
-
function
|
|
4902
|
-
let
|
|
4903
|
-
const
|
|
4904
|
-
for (const
|
|
4905
|
-
|
|
4906
|
-
for (let
|
|
4907
|
-
if (
|
|
4908
|
-
|
|
4918
|
+
const x = p.join("");
|
|
4919
|
+
return JSON.stringify({ expr: x, sexpr: "" });
|
|
4920
|
+
}
|
|
4921
|
+
function F(r, p, v, x) {
|
|
4922
|
+
let M = "";
|
|
4923
|
+
const d = [];
|
|
4924
|
+
for (const g of p)
|
|
4925
|
+
g.keyFront === "Math" && d.push(g.key);
|
|
4926
|
+
for (let g = 0; g < r.length; g++) {
|
|
4927
|
+
if (r[g] === "Math" && r[g + 1] === "." && !d.includes(r[g + 2])) {
|
|
4928
|
+
M = M + r[g] + r[g + 1] + r[g + 2], g = g + 2;
|
|
4909
4929
|
continue;
|
|
4910
4930
|
}
|
|
4911
|
-
if (
|
|
4912
|
-
|
|
4931
|
+
if (x.includes(r[g]) && r[g + 1] === ".") {
|
|
4932
|
+
g = g + 1;
|
|
4913
4933
|
continue;
|
|
4914
4934
|
} else {
|
|
4915
|
-
let
|
|
4916
|
-
if (
|
|
4917
|
-
const
|
|
4918
|
-
if (
|
|
4919
|
-
const z =
|
|
4920
|
-
z !== void 0 && (
|
|
4935
|
+
let C = 0;
|
|
4936
|
+
if (C === 0 && r[g].length > 2 && r[g][0] === '"' && r[g][r[g].length - 1] === '"') {
|
|
4937
|
+
const O = r[g].substring(1, r[g].length - 1);
|
|
4938
|
+
if (v.has(O) && r[g - 1] === "(" && r[g + 1] === ")") {
|
|
4939
|
+
const z = v.get(O);
|
|
4940
|
+
z !== void 0 && (M = M + `"${z}"`, C = 1);
|
|
4921
4941
|
}
|
|
4922
4942
|
}
|
|
4923
|
-
if (
|
|
4924
|
-
for (let
|
|
4925
|
-
if (
|
|
4926
|
-
|
|
4943
|
+
if (C === 0) {
|
|
4944
|
+
for (let O = 0; O < p.length; O++)
|
|
4945
|
+
if (r[g] === p[O].key && p[O].type.toLowerCase() !== "advanced") {
|
|
4946
|
+
M = M + p[O].name, C = 1;
|
|
4927
4947
|
break;
|
|
4928
4948
|
}
|
|
4929
4949
|
}
|
|
4930
|
-
|
|
4950
|
+
C === 0 && (M = M + r[g]);
|
|
4931
4951
|
}
|
|
4932
4952
|
}
|
|
4933
|
-
return
|
|
4953
|
+
return M;
|
|
4934
4954
|
}
|
|
4935
|
-
function
|
|
4936
|
-
if (!
|
|
4955
|
+
function w(r) {
|
|
4956
|
+
if (!r)
|
|
4937
4957
|
return "";
|
|
4938
|
-
const
|
|
4939
|
-
return
|
|
4958
|
+
const p = o(r), v = l(n, "key2name"), x = Object.values(t).map((d) => d.items).flat();
|
|
4959
|
+
return F(p, x, v, ["DefaultFunction", "Math", "DefaultExtendFunctionProxy"]);
|
|
4940
4960
|
}
|
|
4941
|
-
async function
|
|
4942
|
-
return await i(() =>
|
|
4961
|
+
async function m(r) {
|
|
4962
|
+
return await i(() => w(r));
|
|
4943
4963
|
}
|
|
4944
4964
|
return {
|
|
4945
4965
|
resetFunctionItems: s,
|
|
4946
|
-
getFieldExpression:
|
|
4947
|
-
getFunctionExpression:
|
|
4948
|
-
getContextVariableExpression:
|
|
4949
|
-
getExpressionCodeValue:
|
|
4950
|
-
getExpressionTextValue:
|
|
4966
|
+
getFieldExpression: b,
|
|
4967
|
+
getFunctionExpression: k,
|
|
4968
|
+
getContextVariableExpression: u,
|
|
4969
|
+
getExpressionCodeValue: h,
|
|
4970
|
+
getExpressionTextValue: m
|
|
4951
4971
|
};
|
|
4952
4972
|
}
|
|
4953
4973
|
function io(e, t) {
|
|
4954
|
-
const n =
|
|
4974
|
+
const n = c([]), a = Me(t.value), o = Object.values(a).map((s) => s.items).flat();
|
|
4955
4975
|
function l(s) {
|
|
4956
|
-
const
|
|
4957
|
-
return Object.keys(
|
|
4958
|
-
const
|
|
4959
|
-
|
|
4960
|
-
}),
|
|
4976
|
+
const u = Me(a);
|
|
4977
|
+
return Object.keys(u).forEach((f) => {
|
|
4978
|
+
const k = u[f].items.filter((b) => s.includes(b.key));
|
|
4979
|
+
k.length > 0 ? u[f].items = k : delete u[f];
|
|
4980
|
+
}), u;
|
|
4961
4981
|
}
|
|
4962
4982
|
function i(s) {
|
|
4963
4983
|
if (!s) {
|
|
4964
4984
|
t.value = a;
|
|
4965
4985
|
return;
|
|
4966
4986
|
}
|
|
4967
|
-
const
|
|
4968
|
-
t.value = l(
|
|
4987
|
+
const u = o.filter((f) => f.name.toLowerCase().includes(s.toLowerCase())).map((f) => f.key);
|
|
4988
|
+
t.value = l(u);
|
|
4969
4989
|
}
|
|
4970
4990
|
return {
|
|
4971
4991
|
searchResultList: n,
|
|
@@ -4979,7 +4999,7 @@ const so = /* @__PURE__ */ G({
|
|
|
4979
4999
|
emits: [],
|
|
4980
5000
|
setup(e, t) {
|
|
4981
5001
|
var E;
|
|
4982
|
-
const n =
|
|
5002
|
+
const n = c(), a = c(e.validateMessage), o = c(e.messageType), l = c(e.modelValue), i = c(), s = [{
|
|
4983
5003
|
label: "提示",
|
|
4984
5004
|
value: "info"
|
|
4985
5005
|
}, {
|
|
@@ -4989,78 +5009,78 @@ const so = /* @__PURE__ */ G({
|
|
|
4989
5009
|
label: "错误",
|
|
4990
5010
|
value: "error"
|
|
4991
5011
|
}], {
|
|
4992
|
-
getFunctionExpression:
|
|
4993
|
-
getContextVariableExpression:
|
|
4994
|
-
resetFunctionItems:
|
|
4995
|
-
getFieldExpression:
|
|
4996
|
-
getExpressionCodeValue:
|
|
4997
|
-
getExpressionTextValue:
|
|
4998
|
-
} = lo(e, ca, e.variables),
|
|
4999
|
-
onFunctionSearch:
|
|
5000
|
-
} = io(e,
|
|
5001
|
-
function
|
|
5012
|
+
getFunctionExpression: u,
|
|
5013
|
+
getContextVariableExpression: f,
|
|
5014
|
+
resetFunctionItems: k,
|
|
5015
|
+
getFieldExpression: b,
|
|
5016
|
+
getExpressionCodeValue: h,
|
|
5017
|
+
getExpressionTextValue: F
|
|
5018
|
+
} = lo(e, ca, e.variables), w = c(k()), {
|
|
5019
|
+
onFunctionSearch: m
|
|
5020
|
+
} = io(e, w);
|
|
5021
|
+
function r({
|
|
5002
5022
|
$event: R,
|
|
5003
5023
|
item: T
|
|
5004
5024
|
}) {
|
|
5005
5025
|
var N;
|
|
5006
|
-
const P =
|
|
5026
|
+
const P = u(T);
|
|
5007
5027
|
(N = i.value) == null || N.insertText(P);
|
|
5008
5028
|
}
|
|
5009
|
-
function
|
|
5029
|
+
function p({
|
|
5010
5030
|
$event: R,
|
|
5011
5031
|
item: T
|
|
5012
5032
|
}) {
|
|
5013
5033
|
var N;
|
|
5014
|
-
const P =
|
|
5034
|
+
const P = f(T);
|
|
5015
5035
|
(N = i.value) == null || N.insertText(P);
|
|
5016
5036
|
}
|
|
5017
|
-
function
|
|
5037
|
+
function v(R) {
|
|
5018
5038
|
return R.reduce((T, P) => {
|
|
5019
5039
|
var N;
|
|
5020
|
-
return T.push(P.data), (N = P.children) != null && N.length && T.push(...
|
|
5040
|
+
return T.push(P.data), (N = P.children) != null && N.length && T.push(...v(P.children)), T;
|
|
5021
5041
|
}, []);
|
|
5022
5042
|
}
|
|
5023
|
-
const
|
|
5024
|
-
function
|
|
5043
|
+
const x = v(((E = e == null ? void 0 : e.entities) == null ? void 0 : E.fields) || []);
|
|
5044
|
+
function M(R) {
|
|
5025
5045
|
return R.map((T) => {
|
|
5026
|
-
const P =
|
|
5046
|
+
const P = x.find((N) => N.bindingPath === T);
|
|
5027
5047
|
return P && P.type === "entity" ? `${T}[0]` : T;
|
|
5028
5048
|
}).join(".");
|
|
5029
5049
|
}
|
|
5030
|
-
function
|
|
5050
|
+
function d({
|
|
5031
5051
|
$event: R,
|
|
5032
5052
|
item: T,
|
|
5033
5053
|
parentCodes: P,
|
|
5034
5054
|
entityCode: N
|
|
5035
5055
|
}) {
|
|
5036
5056
|
var B;
|
|
5037
|
-
const j =
|
|
5038
|
-
P = e.isServerSide ?
|
|
5039
|
-
let
|
|
5040
|
-
N === j && (
|
|
5057
|
+
const j = b(T);
|
|
5058
|
+
P = e.isServerSide ? M(T.parents) : P;
|
|
5059
|
+
let H = `${P}.${j}`;
|
|
5060
|
+
N === j && (H = j), (B = i.value) == null || B.insertText(`${H}`);
|
|
5041
5061
|
}
|
|
5042
|
-
function
|
|
5062
|
+
function g({
|
|
5043
5063
|
$event: R,
|
|
5044
5064
|
item: T
|
|
5045
5065
|
}) {
|
|
5046
5066
|
var N;
|
|
5047
|
-
const P =
|
|
5067
|
+
const P = b(T);
|
|
5048
5068
|
(N = i.value) == null || N.insertText(`${P}`);
|
|
5049
5069
|
}
|
|
5050
|
-
function
|
|
5070
|
+
function C() {
|
|
5051
5071
|
var R;
|
|
5052
5072
|
return (R = i.value) == null ? void 0 : R.getContent();
|
|
5053
5073
|
}
|
|
5054
|
-
function
|
|
5074
|
+
function O() {
|
|
5055
5075
|
var T;
|
|
5056
5076
|
const R = (T = i.value) == null ? void 0 : T.getContent();
|
|
5057
5077
|
return {
|
|
5058
|
-
value:
|
|
5078
|
+
value: h(R),
|
|
5059
5079
|
message: a.value,
|
|
5060
5080
|
messageType: o.value
|
|
5061
5081
|
};
|
|
5062
5082
|
}
|
|
5063
|
-
const z =
|
|
5083
|
+
const z = c("");
|
|
5064
5084
|
function L() {
|
|
5065
5085
|
var R;
|
|
5066
5086
|
(R = i.value) == null || R.clearText();
|
|
@@ -5070,44 +5090,44 @@ const so = /* @__PURE__ */ G({
|
|
|
5070
5090
|
const R = JSON.parse(l.value), {
|
|
5071
5091
|
expr: T
|
|
5072
5092
|
} = R;
|
|
5073
|
-
T && (z.value = await
|
|
5093
|
+
T && (z.value = await F(T) || "");
|
|
5074
5094
|
}
|
|
5075
5095
|
}), t.expose({
|
|
5076
|
-
getExpressionContext:
|
|
5077
|
-
getExpressionValue:
|
|
5096
|
+
getExpressionContext: C,
|
|
5097
|
+
getExpressionValue: O,
|
|
5078
5098
|
resetExpression: L
|
|
5079
|
-
}), () =>
|
|
5099
|
+
}), () => y("div", {
|
|
5080
5100
|
ref: n,
|
|
5081
5101
|
class: "h-100 d-flex flex-column f-utils-fill mx-3 expression-editor"
|
|
5082
|
-
}, [
|
|
5083
|
-
default: () => [
|
|
5102
|
+
}, [y(ee, null, {
|
|
5103
|
+
default: () => [y(Q, {
|
|
5084
5104
|
position: "left",
|
|
5085
5105
|
width: 248,
|
|
5086
5106
|
minWidth: 130
|
|
5087
5107
|
}, {
|
|
5088
|
-
default: () => [
|
|
5089
|
-
functionItems:
|
|
5108
|
+
default: () => [y(ao, {
|
|
5109
|
+
functionItems: w.value,
|
|
5090
5110
|
singleExpand: e.singleExpand,
|
|
5091
|
-
onInsertFunction:
|
|
5092
|
-
onSearch:
|
|
5111
|
+
onInsertFunction: r,
|
|
5112
|
+
onSearch: m
|
|
5093
5113
|
}, null)]
|
|
5094
|
-
}),
|
|
5114
|
+
}), y(Q, {
|
|
5095
5115
|
position: "center",
|
|
5096
5116
|
"custom-class": "layout-border flex-column",
|
|
5097
5117
|
style: "overflow:hidden"
|
|
5098
5118
|
}, {
|
|
5099
|
-
default: () => [
|
|
5119
|
+
default: () => [y("div", {
|
|
5100
5120
|
class: "f-utils-fill my-2 ml-1"
|
|
5101
|
-
}, [
|
|
5121
|
+
}, [y(Ja, {
|
|
5102
5122
|
modelValue: z.value,
|
|
5103
5123
|
"onUpdate:modelValue": (R) => z.value = R,
|
|
5104
5124
|
ref: i
|
|
5105
|
-
}, null)]), e.showMessage &&
|
|
5125
|
+
}, null)]), e.showMessage && y("div", {
|
|
5106
5126
|
class: "d-flex flex-column p-1",
|
|
5107
5127
|
style: "background: #fafafa"
|
|
5108
|
-
}, [
|
|
5128
|
+
}, [y("div", {
|
|
5109
5129
|
class: "d-flex align-items-center py-1"
|
|
5110
|
-
}, [
|
|
5130
|
+
}, [y("b", null, [me("提示信息:")]), e.showMessageType && y(ue, {
|
|
5111
5131
|
style: "width: 75px",
|
|
5112
5132
|
data: s,
|
|
5113
5133
|
modelValue: o.value,
|
|
@@ -5118,24 +5138,24 @@ const so = /* @__PURE__ */ G({
|
|
|
5118
5138
|
enableClear: !1,
|
|
5119
5139
|
minPanelWidth: 130,
|
|
5120
5140
|
placement: "auto"
|
|
5121
|
-
}, null)]), qe(
|
|
5141
|
+
}, null)]), qe(y("textarea", {
|
|
5122
5142
|
"onUpdate:modelValue": (R) => a.value = R,
|
|
5123
5143
|
class: "form-control",
|
|
5124
5144
|
style: "resize:none;border:none;outline:1px solid var(--f-neutral-04);"
|
|
5125
5145
|
}, null), [[Rt, a.value]])])]
|
|
5126
|
-
}), e.showDataPanel &&
|
|
5146
|
+
}), e.showDataPanel && y(Q, {
|
|
5127
5147
|
position: "right",
|
|
5128
5148
|
width: 258,
|
|
5129
5149
|
minWidth: 130
|
|
5130
5150
|
}, {
|
|
5131
|
-
default: () => [
|
|
5151
|
+
default: () => [y(to, {
|
|
5132
5152
|
dataSource: {
|
|
5133
5153
|
entities: e.entities,
|
|
5134
5154
|
variables: e.variables
|
|
5135
5155
|
},
|
|
5136
|
-
onVariableItemDblClick:
|
|
5137
|
-
onEntityItemDblClick:
|
|
5138
|
-
onFieldClick:
|
|
5156
|
+
onVariableItemDblClick: p,
|
|
5157
|
+
onEntityItemDblClick: d,
|
|
5158
|
+
onFieldClick: g
|
|
5139
5159
|
}, null)]
|
|
5140
5160
|
})]
|
|
5141
5161
|
})]);
|
|
@@ -5269,7 +5289,7 @@ const so = /* @__PURE__ */ G({
|
|
|
5269
5289
|
props: uo,
|
|
5270
5290
|
emits: ["click"],
|
|
5271
5291
|
setup(e, t) {
|
|
5272
|
-
const n =
|
|
5292
|
+
const n = c(e.popupContentPosition), a = c(e.host), o = D(() => ({
|
|
5273
5293
|
backgroundColor: e.backgroundColor || "",
|
|
5274
5294
|
pointerEvents: "auto"
|
|
5275
5295
|
}));
|
|
@@ -5279,14 +5299,14 @@ const so = /* @__PURE__ */ G({
|
|
|
5279
5299
|
D(() => {
|
|
5280
5300
|
const s = a.value;
|
|
5281
5301
|
if (s) {
|
|
5282
|
-
const
|
|
5283
|
-
left:
|
|
5284
|
-
top:
|
|
5285
|
-
height:
|
|
5286
|
-
} =
|
|
5302
|
+
const u = s.getBoundingClientRect(), {
|
|
5303
|
+
left: f,
|
|
5304
|
+
top: k,
|
|
5305
|
+
height: b
|
|
5306
|
+
} = u;
|
|
5287
5307
|
return {
|
|
5288
|
-
left:
|
|
5289
|
-
top:
|
|
5308
|
+
left: f,
|
|
5309
|
+
top: k + b
|
|
5290
5310
|
};
|
|
5291
5311
|
}
|
|
5292
5312
|
return n.value;
|
|
@@ -5296,18 +5316,18 @@ const so = /* @__PURE__ */ G({
|
|
|
5296
5316
|
// left: `${position.value.left}px`,
|
|
5297
5317
|
// top: `${position.value.top}px`
|
|
5298
5318
|
}));
|
|
5299
|
-
return () =>
|
|
5319
|
+
return () => y(Ge, {
|
|
5300
5320
|
to: "body"
|
|
5301
5321
|
}, {
|
|
5302
5322
|
default: () => {
|
|
5303
|
-
var s,
|
|
5304
|
-
return [
|
|
5323
|
+
var s, u;
|
|
5324
|
+
return [y("div", {
|
|
5305
5325
|
class: "overlay-container",
|
|
5306
|
-
onClick: (
|
|
5326
|
+
onClick: (f) => l(f),
|
|
5307
5327
|
style: o.value
|
|
5308
|
-
}, [
|
|
5328
|
+
}, [y("div", {
|
|
5309
5329
|
style: i.value
|
|
5310
|
-
}, [(
|
|
5330
|
+
}, [(u = (s = t.slots).default) == null ? void 0 : u.call(s)])])];
|
|
5311
5331
|
}
|
|
5312
5332
|
});
|
|
5313
5333
|
}
|
|
@@ -5332,7 +5352,7 @@ function yo(e) {
|
|
|
5332
5352
|
document.body.removeChild(t);
|
|
5333
5353
|
});
|
|
5334
5354
|
const l = fo(e);
|
|
5335
|
-
return () =>
|
|
5355
|
+
return () => y(co, {
|
|
5336
5356
|
"popup-content-position": e.popupPosition,
|
|
5337
5357
|
host: e.host,
|
|
5338
5358
|
onClick: o,
|
|
@@ -5513,21 +5533,21 @@ class ae {
|
|
|
5513
5533
|
}
|
|
5514
5534
|
}
|
|
5515
5535
|
function vo(e, t) {
|
|
5516
|
-
const n =
|
|
5517
|
-
function
|
|
5536
|
+
const n = c(), a = c(), o = c(), l = c(), i = c(), s = c(), u = c(), f = c(), k = c(), b = c(), h = c(), F = c(e.resizeable), w = c(), m = c(e.draggable), r = c(!1);
|
|
5537
|
+
function p() {
|
|
5518
5538
|
const B = a.value || document.body, I = window.getComputedStyle(B);
|
|
5519
5539
|
if (!I || !n.value)
|
|
5520
5540
|
return;
|
|
5521
5541
|
const $ = Y.getTransformInfo(n.value), A = {};
|
|
5522
|
-
|
|
5542
|
+
u.value && (A.deltaL = n.value.offsetLeft - u.value.x, A.deltaT = n.value.offsetTop - u.value.y);
|
|
5523
5543
|
const q = I.getPropertyValue("position");
|
|
5524
|
-
A.width = B.clientWidth, A.height = B.clientHeight, A.pr = parseInt(I.getPropertyValue("padding-right"), 10), A.pb = parseInt(I.getPropertyValue("padding-bottom"), 10), A.position = I.getPropertyValue("position"), q === "static" && (B.style.position = "relative"), A.translateX = $.x, A.translateY = $.y,
|
|
5544
|
+
A.width = B.clientWidth, A.height = B.clientHeight, A.pr = parseInt(I.getPropertyValue("padding-right"), 10), A.pb = parseInt(I.getPropertyValue("padding-bottom"), 10), A.position = I.getPropertyValue("position"), q === "static" && (B.style.position = "relative"), A.translateX = $.x, A.translateY = $.y, b.value = A;
|
|
5525
5545
|
}
|
|
5526
|
-
function
|
|
5546
|
+
function v(B) {
|
|
5527
5547
|
if (n.value) {
|
|
5528
|
-
l.value = ae.getCurrent(n.value), i.value = Y.getCurrent(n.value), s.value = l.value ? ae.copy(l.value) : null,
|
|
5548
|
+
l.value = ae.getCurrent(n.value), i.value = Y.getCurrent(n.value), s.value = l.value ? ae.copy(l.value) : null, u.value = i.value ? Y.copy(i.value) : null, p();
|
|
5529
5549
|
const I = B.target.getAttribute("type") || "";
|
|
5530
|
-
|
|
5550
|
+
f.value = {
|
|
5531
5551
|
n: !!I.match(/n/),
|
|
5532
5552
|
s: !!I.match(/s/),
|
|
5533
5553
|
w: !!I.match(/w/),
|
|
@@ -5535,40 +5555,40 @@ function vo(e, t) {
|
|
|
5535
5555
|
};
|
|
5536
5556
|
}
|
|
5537
5557
|
}
|
|
5538
|
-
function
|
|
5558
|
+
function x() {
|
|
5539
5559
|
var B, I, $, A;
|
|
5540
5560
|
if (n.value) {
|
|
5541
5561
|
const q = n.value;
|
|
5542
|
-
|
|
5562
|
+
f.value && ((f.value.n || f.value.s) && ((B = s.value) != null && B.height) && (q.style.height = s.value.height + "px"), (f.value.w || f.value.e) && ((I = s.value) != null && I.width) && (q.style.width = s.value.width + "px"), u.value && (($ = u.value) != null && $.x && (q.style.left = u.value.x + "px"), (A = u.value) != null && A.y && (q.style.top = u.value.y + "px")));
|
|
5543
5563
|
}
|
|
5544
5564
|
}
|
|
5545
|
-
function
|
|
5565
|
+
function M() {
|
|
5546
5566
|
const B = e.minHeight ? e.minHeight : 1, I = e.minWidth ? e.minWidth : 1;
|
|
5547
|
-
s.value &&
|
|
5567
|
+
s.value && u.value && f.value && l.value && (s.value.height < B && (s.value.height = B, f.value.n && i.value && (u.value.y = i.value.y + (l.value.height - B))), s.value.width < I && (s.value.width = I, f.value.w && i.value && (u.value.x = i.value.x + (l.value.width - I))), e.maxHeight && s.value.height > e.maxHeight && (s.value.height = e.maxHeight, i.value && f.value.n && (u.value.y = i.value.y + (l.value.height - e.maxHeight))), e.maxWidth && s.value.width > e.maxWidth && (s.value.width = e.maxWidth, f.value.w && i.value && (u.value.x = i.value.x + (l.value.width - e.maxWidth))));
|
|
5548
5568
|
}
|
|
5549
|
-
function
|
|
5569
|
+
function d() {
|
|
5550
5570
|
if (a.value) {
|
|
5551
|
-
const B =
|
|
5552
|
-
if (
|
|
5553
|
-
const I = B.width - B.pr - B.deltaL - B.translateX -
|
|
5554
|
-
|
|
5571
|
+
const B = b.value;
|
|
5572
|
+
if (u.value && s.value && f.value && l.value) {
|
|
5573
|
+
const I = B.width - B.pr - B.deltaL - B.translateX - u.value.x, $ = B.height - B.pb - B.deltaT - B.translateY - u.value.y;
|
|
5574
|
+
f.value.n && u.value.y + B.translateY < 0 && i.value && (u.value.y = -B.translateY, s.value.height = l.value.height + i.value.y + B.translateY), f.value.w && u.value.x + B.translateX < 0 && i.value && (u.value.x = -B.translateX, s.value.width = l.value.width + i.value.x + B.translateX), s.value.width > I && (s.value.width = I), s.value.height > $ && (s.value.height = $);
|
|
5555
5575
|
}
|
|
5556
5576
|
}
|
|
5557
5577
|
}
|
|
5558
|
-
function
|
|
5559
|
-
if (!o.value || !l.value || !i.value || !
|
|
5578
|
+
function g(B) {
|
|
5579
|
+
if (!o.value || !l.value || !i.value || !f.value)
|
|
5560
5580
|
return;
|
|
5561
5581
|
B.subtract(o.value);
|
|
5562
5582
|
const I = B.x, $ = B.y;
|
|
5563
|
-
|
|
5583
|
+
f.value.n ? (u.value.y = i.value.y + $, s.value.height = l.value.height - $) : f.value.s && (s.value.height = l.value.height + $), f.value.e ? s.value.width = l.value.width + I : f.value.w && (s.value.width = l.value.width - I, u.value.x = i.value.x + I), d(), M(), x();
|
|
5564
5584
|
}
|
|
5565
|
-
function
|
|
5566
|
-
if (!
|
|
5585
|
+
function C(B) {
|
|
5586
|
+
if (!k.value)
|
|
5567
5587
|
return;
|
|
5568
5588
|
const I = Y.fromEvent(B);
|
|
5569
|
-
I &&
|
|
5589
|
+
I && g(I);
|
|
5570
5590
|
}
|
|
5571
|
-
function
|
|
5591
|
+
function O() {
|
|
5572
5592
|
if (n.value) {
|
|
5573
5593
|
const {
|
|
5574
5594
|
width: B,
|
|
@@ -5591,47 +5611,47 @@ function vo(e, t) {
|
|
|
5591
5611
|
}
|
|
5592
5612
|
function z(B) {
|
|
5593
5613
|
if (n.value) {
|
|
5594
|
-
const I =
|
|
5595
|
-
|
|
5614
|
+
const I = O();
|
|
5615
|
+
h.value = I;
|
|
5596
5616
|
}
|
|
5597
|
-
o.value = void 0, l.value = null, i.value = null, s.value = null,
|
|
5617
|
+
o.value = void 0, l.value = null, i.value = null, s.value = null, u.value = null, f.value = null, k.value = null, document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", z);
|
|
5598
5618
|
}
|
|
5599
5619
|
function L() {
|
|
5600
|
-
document.addEventListener("mousemove",
|
|
5620
|
+
document.addEventListener("mousemove", C), document.addEventListener("mouseup", z);
|
|
5601
5621
|
}
|
|
5602
5622
|
function E(B) {
|
|
5603
|
-
B instanceof MouseEvent && B.button === 2 ||
|
|
5623
|
+
B instanceof MouseEvent && B.button === 2 || m.value && (document.body.click(), B.stopPropagation(), B.preventDefault(), o.value = Y.fromEvent(B), k.value = B.target, v(B), L());
|
|
5604
5624
|
}
|
|
5605
5625
|
function R(B) {
|
|
5606
|
-
return n.value = B,
|
|
5626
|
+
return n.value = B, F.value && y(re, null, [y("div", {
|
|
5607
5627
|
class: "fv-resizable-handle fv-resizable-n",
|
|
5608
5628
|
type: "n",
|
|
5609
5629
|
onMousedown: (I) => E(I)
|
|
5610
|
-
}, null),
|
|
5630
|
+
}, null), y("div", {
|
|
5611
5631
|
class: "fv-resizable-handle fv-resizable-e",
|
|
5612
5632
|
type: "e",
|
|
5613
5633
|
onMousedown: (I) => E(I)
|
|
5614
|
-
}, null),
|
|
5634
|
+
}, null), y("div", {
|
|
5615
5635
|
class: "fv-resizable-handle fv-resizable-s",
|
|
5616
5636
|
type: "s",
|
|
5617
5637
|
onMousedown: (I) => E(I)
|
|
5618
|
-
}, null),
|
|
5638
|
+
}, null), y("div", {
|
|
5619
5639
|
class: "fv-resizable-handle fv-resizable-w",
|
|
5620
5640
|
type: "w",
|
|
5621
5641
|
onMousedown: (I) => E(I)
|
|
5622
|
-
}, null),
|
|
5642
|
+
}, null), y("div", {
|
|
5623
5643
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
5624
5644
|
type: "ne",
|
|
5625
5645
|
onMousedown: (I) => E(I)
|
|
5626
|
-
}, null),
|
|
5646
|
+
}, null), y("div", {
|
|
5627
5647
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
5628
5648
|
type: "se",
|
|
5629
5649
|
onMousedown: (I) => E(I)
|
|
5630
|
-
}, null),
|
|
5650
|
+
}, null), y("div", {
|
|
5631
5651
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
5632
5652
|
type: "sw",
|
|
5633
5653
|
onMousedown: (I) => E(I)
|
|
5634
|
-
}, null),
|
|
5654
|
+
}, null), y("div", {
|
|
5635
5655
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
5636
5656
|
type: "nw",
|
|
5637
5657
|
onMousedown: (I) => E(I)
|
|
@@ -5640,30 +5660,30 @@ function vo(e, t) {
|
|
|
5640
5660
|
function T(B = !0) {
|
|
5641
5661
|
document.body.click();
|
|
5642
5662
|
const I = a.value || document.body, $ = ae.getCurrent(I), A = n.value;
|
|
5643
|
-
B && A && (
|
|
5663
|
+
B && A && (w.value = O(), w.value.transform = A.style.transform), $ && A && (s.value = $, s.value.height -= 14, s.value.width -= 14, A.style.height = s.value.height + "px", A.style.width = s.value.width + "px", A.style.left = "7px", A.style.top = "7px", A.style.transform = "", h.value = {
|
|
5644
5664
|
size: s.value,
|
|
5645
5665
|
position: {
|
|
5646
5666
|
x: 0,
|
|
5647
5667
|
y: 0
|
|
5648
5668
|
}
|
|
5649
|
-
},
|
|
5669
|
+
}, m.value = !1, r.value = !0);
|
|
5650
5670
|
}
|
|
5651
5671
|
function P() {
|
|
5652
5672
|
var B, I;
|
|
5653
|
-
if (document.body.click(),
|
|
5673
|
+
if (document.body.click(), w.value) {
|
|
5654
5674
|
const $ = {
|
|
5655
|
-
width:
|
|
5656
|
-
height:
|
|
5675
|
+
width: w.value.size.width || 0,
|
|
5676
|
+
height: w.value.size.height || 0
|
|
5657
5677
|
}, A = {
|
|
5658
5678
|
x: (window.innerWidth - $.width) / 2,
|
|
5659
5679
|
y: (window.innerHeight - $.height) / 2
|
|
5660
5680
|
};
|
|
5661
|
-
(B = s.value) == null || B.set($), (I =
|
|
5681
|
+
(B = s.value) == null || B.set($), (I = u.value) == null || I.set(A);
|
|
5662
5682
|
const q = n.value;
|
|
5663
|
-
q.style.height = $.height + "px", q.style.width = $.width + "px", q.style.left = `${A.x}px`, q.style.top = `${A.y}px`, q.style.transform = "",
|
|
5683
|
+
q.style.height = $.height + "px", q.style.width = $.width + "px", q.style.left = `${A.x}px`, q.style.top = `${A.y}px`, q.style.transform = "", h.value = {
|
|
5664
5684
|
size: $,
|
|
5665
5685
|
position: A
|
|
5666
|
-
},
|
|
5686
|
+
}, m.value = e.draggable, r.value = !1;
|
|
5667
5687
|
}
|
|
5668
5688
|
}
|
|
5669
5689
|
function N() {
|
|
@@ -5680,103 +5700,103 @@ function vo(e, t) {
|
|
|
5680
5700
|
}
|
|
5681
5701
|
function j() {
|
|
5682
5702
|
const B = () => {
|
|
5683
|
-
|
|
5703
|
+
r.value ? T(!1) : N(), document.body.click();
|
|
5684
5704
|
};
|
|
5685
5705
|
return window.addEventListener("resize", B), () => {
|
|
5686
5706
|
window.removeEventListener("resize", B);
|
|
5687
5707
|
};
|
|
5688
5708
|
}
|
|
5689
|
-
const
|
|
5709
|
+
const H = j();
|
|
5690
5710
|
return {
|
|
5691
5711
|
renderResizeBar: R,
|
|
5692
5712
|
boundingElement: a,
|
|
5693
|
-
resizedEventParam:
|
|
5713
|
+
resizedEventParam: h,
|
|
5694
5714
|
maximize: T,
|
|
5695
5715
|
restore: P,
|
|
5696
|
-
allowDrag:
|
|
5697
|
-
isMaximized:
|
|
5698
|
-
unWindowResizeHandle:
|
|
5716
|
+
allowDrag: m,
|
|
5717
|
+
isMaximized: r,
|
|
5718
|
+
unWindowResizeHandle: H,
|
|
5699
5719
|
moveToCenter: N
|
|
5700
5720
|
};
|
|
5701
5721
|
}
|
|
5702
5722
|
function ho(e, t, n) {
|
|
5703
|
-
const a =
|
|
5704
|
-
W(() => n.value, (
|
|
5705
|
-
i.value.style.cursor =
|
|
5723
|
+
const a = c(), o = c(e.draggable), l = c(e.lockAxis), i = c(), s = c(), u = c(!1), f = c(new Y(0, 0)), k = c(new Y(0, 0)), b = c(new Y(0, 0)), h = c(new Y(0, 0));
|
|
5724
|
+
W(() => n.value, (C) => {
|
|
5725
|
+
i.value.style.cursor = C ? "move" : "default";
|
|
5706
5726
|
});
|
|
5707
|
-
function
|
|
5708
|
-
if (
|
|
5727
|
+
function F(C, O) {
|
|
5728
|
+
if (O.tagName === "BUTTON")
|
|
5709
5729
|
return !1;
|
|
5710
|
-
if (
|
|
5730
|
+
if (O === C)
|
|
5711
5731
|
return !0;
|
|
5712
|
-
for (const z in
|
|
5713
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5732
|
+
for (const z in O.children)
|
|
5733
|
+
if (Object.prototype.hasOwnProperty.call(O.children, z) && F(C, O.children[z]))
|
|
5714
5734
|
return !0;
|
|
5715
5735
|
return !1;
|
|
5716
5736
|
}
|
|
5717
|
-
function
|
|
5737
|
+
function w() {
|
|
5718
5738
|
var L, E;
|
|
5719
|
-
let
|
|
5720
|
-
l.value === "x" ? (
|
|
5721
|
-
const z = `translate3d(${Math.round(
|
|
5722
|
-
a.value && (a.value.style.transform = z),
|
|
5739
|
+
let C = b.value.x + k.value.x, O = b.value.y + k.value.y;
|
|
5740
|
+
l.value === "x" ? (C = ((L = f.value) == null ? void 0 : L.x) || 0, b.value.x = 0) : l.value === "y" && (O = ((E = f.value) == null ? void 0 : E.y) || 0, b.value.y = 0);
|
|
5741
|
+
const z = `translate3d(${Math.round(C)}px, ${Math.round(O)}px, 0px)`;
|
|
5742
|
+
a.value && (a.value.style.transform = z), h.value.x = C, h.value.y = O;
|
|
5723
5743
|
}
|
|
5724
|
-
function
|
|
5744
|
+
function m() {
|
|
5725
5745
|
if (!s.value || !a.value)
|
|
5726
5746
|
return null;
|
|
5727
|
-
const
|
|
5728
|
-
top:
|
|
5729
|
-
right:
|
|
5730
|
-
bottom:
|
|
5731
|
-
left:
|
|
5747
|
+
const C = s.value.getBoundingClientRect(), O = a.value.getBoundingClientRect(), z = {
|
|
5748
|
+
top: C.top < O.top,
|
|
5749
|
+
right: C.right > O.right,
|
|
5750
|
+
bottom: C.bottom > O.bottom,
|
|
5751
|
+
left: C.left < O.left
|
|
5732
5752
|
};
|
|
5733
|
-
return z.top || (
|
|
5753
|
+
return z.top || (b.value.y -= O.top - C.top), z.bottom || (b.value.y -= O.bottom - C.bottom), z.right || (b.value.x -= O.right - C.right), z.left || (b.value.x -= O.left - C.left), w(), z;
|
|
5734
5754
|
}
|
|
5735
|
-
function
|
|
5736
|
-
|
|
5755
|
+
function r(C) {
|
|
5756
|
+
C && (f.value && C.subtract(f.value), b.value.set(C), w(), m());
|
|
5737
5757
|
}
|
|
5738
|
-
function
|
|
5739
|
-
|
|
5758
|
+
function p(C) {
|
|
5759
|
+
u.value && o.value && (C.stopPropagation(), C.preventDefault(), r(Y.fromEvent(C, i.value)));
|
|
5740
5760
|
}
|
|
5741
|
-
function
|
|
5742
|
-
var
|
|
5743
|
-
|
|
5761
|
+
function v() {
|
|
5762
|
+
var C;
|
|
5763
|
+
u.value && (u.value = !1, k.value.add(b.value), b.value.reset(), (C = a.value) == null || C.classList.remove("ng-dragging"), t.emit("stopMove"), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", v));
|
|
5744
5764
|
}
|
|
5745
|
-
function
|
|
5746
|
-
!
|
|
5765
|
+
function x() {
|
|
5766
|
+
!u.value && i.value && (u.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", p), document.addEventListener("mouseup", v));
|
|
5747
5767
|
}
|
|
5748
|
-
function
|
|
5768
|
+
function M() {
|
|
5749
5769
|
if (a.value) {
|
|
5750
|
-
const
|
|
5751
|
-
|
|
5770
|
+
const C = Y.getTransformInfo(a.value);
|
|
5771
|
+
k.value.set(C);
|
|
5752
5772
|
return;
|
|
5753
5773
|
}
|
|
5754
|
-
|
|
5774
|
+
k.value.reset();
|
|
5755
5775
|
}
|
|
5756
|
-
function
|
|
5757
|
-
if (!n.value ||
|
|
5776
|
+
function d(C) {
|
|
5777
|
+
if (!n.value || C instanceof MouseEvent && C.button === 2)
|
|
5758
5778
|
return;
|
|
5759
|
-
const
|
|
5760
|
-
i.value !== void 0 &&
|
|
5779
|
+
const O = C.target || C.srcElement;
|
|
5780
|
+
i.value !== void 0 && O && !F(O, i.value) || o.value !== !1 && (document.body.click(), C.stopPropagation(), C.preventDefault(), f.value = Y.fromEvent(C, a.value), M(), x());
|
|
5761
5781
|
}
|
|
5762
|
-
function
|
|
5763
|
-
if (o.value &&
|
|
5764
|
-
if (
|
|
5765
|
-
i.value =
|
|
5782
|
+
function g(C, O, z) {
|
|
5783
|
+
if (o.value && O) {
|
|
5784
|
+
if (C)
|
|
5785
|
+
i.value = C;
|
|
5766
5786
|
else if (e.dragHandle) {
|
|
5767
5787
|
if (e.dragHandle instanceof HTMLElement)
|
|
5768
5788
|
i.value = e.dragHandle;
|
|
5769
5789
|
else if (typeof e.dragHandle == "string") {
|
|
5770
|
-
const L =
|
|
5790
|
+
const L = O.querySelector(e.dragHandle);
|
|
5771
5791
|
L && (i.value = L);
|
|
5772
5792
|
}
|
|
5773
5793
|
}
|
|
5774
|
-
a.value =
|
|
5794
|
+
a.value = O, s.value = z, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown", d)) : o.value = !1;
|
|
5775
5795
|
}
|
|
5776
5796
|
}
|
|
5777
5797
|
return {
|
|
5778
|
-
registerDraggle:
|
|
5779
|
-
resetTranslate:
|
|
5798
|
+
registerDraggle: g,
|
|
5799
|
+
resetTranslate: M
|
|
5780
5800
|
};
|
|
5781
5801
|
}
|
|
5782
5802
|
function st(e, t) {
|
|
@@ -5790,7 +5810,7 @@ function st(e, t) {
|
|
|
5790
5810
|
}
|
|
5791
5811
|
}
|
|
5792
5812
|
function go(e, t) {
|
|
5793
|
-
const n =
|
|
5813
|
+
const n = c(e.enableEsc);
|
|
5794
5814
|
let a = null;
|
|
5795
5815
|
return n.value ? (a = st("Escape", (o) => {
|
|
5796
5816
|
t.emit("esc", { event: o.event, type: "esc" });
|
|
@@ -5799,7 +5819,7 @@ function go(e, t) {
|
|
|
5799
5819
|
}) : null;
|
|
5800
5820
|
}
|
|
5801
5821
|
function bo(e, t) {
|
|
5802
|
-
const n =
|
|
5822
|
+
const n = c(e.enableEnter);
|
|
5803
5823
|
let a = null;
|
|
5804
5824
|
return n.value ? (a = st("Enter", (o) => {
|
|
5805
5825
|
t.emit("enter", { event: o.event, type: "enter" });
|
|
@@ -5812,40 +5832,40 @@ const se = /* @__PURE__ */ G({
|
|
|
5812
5832
|
props: po,
|
|
5813
5833
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
5814
5834
|
setup(e, t) {
|
|
5815
|
-
const n =
|
|
5816
|
-
|
|
5817
|
-
const
|
|
5818
|
-
function
|
|
5819
|
-
const X =
|
|
5835
|
+
const n = c(e.width || 300), a = c(e.height || 200), o = c(e.modelValue), l = c(""), i = c(e.class), s = c(e.fitContent), u = c(e.showHeader), f = c(""), k = c(e.showCloseButton), b = c(e.showMaxButton), h = c(!1), F = c(e.dialogType), w = c(e.src), m = c(""), r = c(e.showButtons), p = c(e.title), v = c(e.containment || null), x = c();
|
|
5836
|
+
p.value === "错误提示" && (p.value = Z.getLocaleValue("messageBox.errorTitle"));
|
|
5837
|
+
const M = c(!1);
|
|
5838
|
+
function d(S, V) {
|
|
5839
|
+
const X = V ? "accept" : "cancel";
|
|
5820
5840
|
Promise.resolve().then(() => {
|
|
5821
5841
|
var U;
|
|
5822
5842
|
return (U = e.beforeClose) == null ? void 0 : U.call(e, {
|
|
5823
5843
|
closeType: X
|
|
5824
5844
|
});
|
|
5825
5845
|
}).then((U) => {
|
|
5826
|
-
U && (o.value = !1, t.emit("update:modelValue", !1),
|
|
5846
|
+
U && (o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", S));
|
|
5827
5847
|
});
|
|
5828
5848
|
}
|
|
5829
|
-
const
|
|
5849
|
+
const g = [{
|
|
5830
5850
|
name: "cancel",
|
|
5831
5851
|
text: Z.getLocaleValue("messageBox.cancel") || "取消",
|
|
5832
5852
|
class: "btn btn-secondary",
|
|
5833
5853
|
handle: (S) => {
|
|
5834
|
-
|
|
5854
|
+
d(S, !1);
|
|
5835
5855
|
}
|
|
5836
5856
|
}, {
|
|
5837
5857
|
name: "accept",
|
|
5838
5858
|
text: Z.getLocaleValue("messageBox.ok") || "确定",
|
|
5839
5859
|
class: "btn btn-primary",
|
|
5840
5860
|
handle: (S) => {
|
|
5841
|
-
|
|
5861
|
+
d(S, !0);
|
|
5842
5862
|
}
|
|
5843
|
-
}],
|
|
5863
|
+
}], C = c(e.buttons && e.buttons.length ? e.buttons : g), O = D(() => !!f.value), z = D(() => !!r.value && !!C.value), L = c(), E = c(), R = c(!1), {
|
|
5844
5864
|
renderResizeBar: T,
|
|
5845
5865
|
maximize: P,
|
|
5846
5866
|
restore: N,
|
|
5847
5867
|
boundingElement: j,
|
|
5848
|
-
resizedEventParam:
|
|
5868
|
+
resizedEventParam: H,
|
|
5849
5869
|
allowDrag: B,
|
|
5850
5870
|
unWindowResizeHandle: I,
|
|
5851
5871
|
moveToCenter: $
|
|
@@ -5857,27 +5877,27 @@ const se = /* @__PURE__ */ G({
|
|
|
5857
5877
|
}
|
|
5858
5878
|
function yt() {
|
|
5859
5879
|
const S = document.querySelectorAll(".farris-modal").length;
|
|
5860
|
-
(!S || S - 1 <= 0) && document.body.classList.remove("modal-open"),
|
|
5861
|
-
}
|
|
5862
|
-
W(() => e.title, (S,
|
|
5863
|
-
S !==
|
|
5864
|
-
}), W(() => e.modelValue, (S,
|
|
5865
|
-
S !==
|
|
5866
|
-
E.value && !
|
|
5867
|
-
}), S || (
|
|
5868
|
-
}), W(() => e.showHeader, (S,
|
|
5869
|
-
S !==
|
|
5870
|
-
}), W(() => e.showButtons, (S,
|
|
5871
|
-
S !==
|
|
5872
|
-
}), W(() =>
|
|
5873
|
-
const X = S || {}, U =
|
|
5880
|
+
(!S || S - 1 <= 0) && document.body.classList.remove("modal-open"), x.value && x.value.classList.remove("show");
|
|
5881
|
+
}
|
|
5882
|
+
W(() => e.title, (S, V) => {
|
|
5883
|
+
S !== V && (p.value = S);
|
|
5884
|
+
}), W(() => e.modelValue, (S, V) => {
|
|
5885
|
+
S !== V && (o.value = S, o.value && e.draggable && oe(() => {
|
|
5886
|
+
E.value && !v.value && (v.value = E.value.parentElement, j.value = v.value, A(L.value, E.value, j.value), $());
|
|
5887
|
+
}), S || (v.value && (v.value = null), yt())), o.value ? M.value = q() : (R.value = !1, B.value = e.draggable);
|
|
5888
|
+
}), W(() => e.showHeader, (S, V) => {
|
|
5889
|
+
S !== V && (u.value = S);
|
|
5890
|
+
}), W(() => e.showButtons, (S, V) => {
|
|
5891
|
+
S !== V && (r.value = S);
|
|
5892
|
+
}), W(() => H.value, (S, V) => {
|
|
5893
|
+
const X = S || {}, U = V || {};
|
|
5874
5894
|
JSON.stringify(X) !== JSON.stringify(U) && t.emit("resize", {
|
|
5875
5895
|
newSize: S,
|
|
5876
|
-
oldSize:
|
|
5896
|
+
oldSize: V,
|
|
5877
5897
|
isMaximized: R.value
|
|
5878
5898
|
});
|
|
5879
|
-
}), W([() => e.width, () => e.height], (S,
|
|
5880
|
-
(S[0] !==
|
|
5899
|
+
}), W([() => e.width, () => e.height], (S, V) => {
|
|
5900
|
+
(S[0] !== V[0] || S[1] !== V[1]) && (n.value = S[0] || 500, a.value = S[1] || 600);
|
|
5881
5901
|
});
|
|
5882
5902
|
const be = D(() => (o.value && document.body.classList.add("modal-open"), o.value)), mt = D(() => {
|
|
5883
5903
|
var X;
|
|
@@ -5887,16 +5907,16 @@ const se = /* @__PURE__ */ G({
|
|
|
5887
5907
|
fade: !0
|
|
5888
5908
|
};
|
|
5889
5909
|
S["f-modal-fitContent"] = !!s.value, S.show = !!be.value;
|
|
5890
|
-
const
|
|
5891
|
-
return
|
|
5910
|
+
const V = (X = e.maskClass) == null ? void 0 : X.split(" ");
|
|
5911
|
+
return V == null || V.reduce((U, le) => (U[le] = !0, U), S), S;
|
|
5892
5912
|
}), pt = D(() => {
|
|
5893
5913
|
var X;
|
|
5894
5914
|
const S = {
|
|
5895
5915
|
"modal-dialog": !0
|
|
5896
|
-
},
|
|
5897
|
-
return
|
|
5916
|
+
}, V = (X = i.value) == null ? void 0 : X.split(" ");
|
|
5917
|
+
return V == null || V.reduce((U, le) => (U[le] = !0, U), S), S;
|
|
5898
5918
|
}), vt = D(() => {
|
|
5899
|
-
const S = document.documentElement.clientWidth,
|
|
5919
|
+
const S = document.documentElement.clientWidth, V = document.documentElement.clientHeight, X = Math.min(n.value, S), U = s.value ? "auto" : `${Math.min(a.value, V - 10)}px`, le = {
|
|
5900
5920
|
position: "absolute",
|
|
5901
5921
|
top: `${(window.innerHeight - parseInt(U === "auto" ? "0" : U)) / 2}px`,
|
|
5902
5922
|
left: `${(window.innerWidth - X) / 2}px`,
|
|
@@ -5909,13 +5929,13 @@ const se = /* @__PURE__ */ G({
|
|
|
5909
5929
|
display: "block",
|
|
5910
5930
|
zIndex: ht()
|
|
5911
5931
|
};
|
|
5912
|
-
return e.mask || (S.pointerEvents = "none", S.backgroundColor = "transparent"),
|
|
5932
|
+
return e.mask || (S.pointerEvents = "none", S.backgroundColor = "transparent"), M.value && (S.backgroundColor = "transparent"), S;
|
|
5913
5933
|
}), bt = D(() => ({
|
|
5914
5934
|
"modal-content": !0,
|
|
5915
|
-
"modal-content-has-header":
|
|
5935
|
+
"modal-content-has-header": u.value
|
|
5916
5936
|
})), kt = D(() => {
|
|
5917
5937
|
const S = {
|
|
5918
|
-
display:
|
|
5938
|
+
display: u.value ? "" : "none"
|
|
5919
5939
|
};
|
|
5920
5940
|
return S["pointer-events"] = B.value ? "auto" : "none", S;
|
|
5921
5941
|
}), Ct = D(() => ({
|
|
@@ -5924,7 +5944,7 @@ const se = /* @__PURE__ */ G({
|
|
|
5924
5944
|
modalrevert: R.value
|
|
5925
5945
|
})), wt = D(() => ({
|
|
5926
5946
|
"modal-body": !0,
|
|
5927
|
-
"f-utils-flex-column":
|
|
5947
|
+
"f-utils-flex-column": F.value === "iframe",
|
|
5928
5948
|
"f-utils-fill": !0
|
|
5929
5949
|
}));
|
|
5930
5950
|
function xt() {
|
|
@@ -5934,9 +5954,9 @@ const se = /* @__PURE__ */ G({
|
|
|
5934
5954
|
}
|
|
5935
5955
|
const Ft = D(() => {
|
|
5936
5956
|
const S = {
|
|
5937
|
-
textAlgin:
|
|
5938
|
-
},
|
|
5939
|
-
return Object.assign(S,
|
|
5957
|
+
textAlgin: m.value
|
|
5958
|
+
}, V = xt();
|
|
5959
|
+
return Object.assign(S, V);
|
|
5940
5960
|
});
|
|
5941
5961
|
function je(S) {
|
|
5942
5962
|
if (S == null || S.stopPropagation(), R.value) {
|
|
@@ -5945,77 +5965,77 @@ const se = /* @__PURE__ */ G({
|
|
|
5945
5965
|
}
|
|
5946
5966
|
P(), R.value = !0;
|
|
5947
5967
|
}
|
|
5948
|
-
async function Tt(S,
|
|
5949
|
-
S.handle && await S.handle(
|
|
5968
|
+
async function Tt(S, V) {
|
|
5969
|
+
S.handle && await S.handle(V, S) && t.emit("closed", V);
|
|
5950
5970
|
}
|
|
5951
5971
|
function St(S) {
|
|
5952
|
-
S.width && (n.value = S.width), S.height && (a.value = S.height), S.buttons && (
|
|
5972
|
+
S.width && (n.value = S.width), S.height && (a.value = S.height), S.buttons && (C.value = S.buttons), S.title && (p.value = S.title);
|
|
5953
5973
|
}
|
|
5954
5974
|
let ke = null, Ce = null;
|
|
5955
5975
|
Lt(() => {
|
|
5956
|
-
|
|
5976
|
+
M.value = q();
|
|
5957
5977
|
}), K(() => {
|
|
5958
|
-
E.value && !
|
|
5978
|
+
E.value && !v.value && (v.value = E.value.parentElement, j.value = v.value, A(L.value, E.value, j.value)), be.value && document.body.classList.add("modal-open"), ke = go(e, t), Ce = bo(e, t);
|
|
5959
5979
|
}), ve(() => {
|
|
5960
5980
|
I && I(), ke && ke.remove(), Ce && Ce.remove();
|
|
5961
5981
|
}), t.expose({
|
|
5962
5982
|
modalElementRef: E,
|
|
5963
5983
|
updateModalOptions: St,
|
|
5964
|
-
close:
|
|
5984
|
+
close: d,
|
|
5965
5985
|
maxDialog: je,
|
|
5966
5986
|
isMaximized: R
|
|
5967
5987
|
});
|
|
5968
5988
|
function Mt() {
|
|
5969
|
-
return
|
|
5989
|
+
return y("ul", null, [h.value && y("li", {
|
|
5970
5990
|
class: "f-btn-icon f-bare"
|
|
5971
|
-
}, [
|
|
5991
|
+
}, [y("span", {
|
|
5972
5992
|
class: "f-icon modal_minimize"
|
|
5973
|
-
}, null)]),
|
|
5993
|
+
}, null)]), b.value && y("li", {
|
|
5974
5994
|
onClick: je,
|
|
5975
5995
|
class: "f-btn-icon f-bare",
|
|
5976
5996
|
style: "pointer-events: auto;"
|
|
5977
|
-
}, [
|
|
5997
|
+
}, [y("span", {
|
|
5978
5998
|
class: Ct.value
|
|
5979
|
-
}, null)]),
|
|
5999
|
+
}, null)]), k.value && y("li", {
|
|
5980
6000
|
class: "f-btn-icon f-bare",
|
|
5981
|
-
onClick: (S) =>
|
|
6001
|
+
onClick: (S) => d(S, !1),
|
|
5982
6002
|
style: "pointer-events: auto;"
|
|
5983
|
-
}, [
|
|
6003
|
+
}, [y("span", {
|
|
5984
6004
|
class: "f-icon modal_close"
|
|
5985
6005
|
}, null)])]);
|
|
5986
6006
|
}
|
|
5987
6007
|
function Ot() {
|
|
5988
|
-
return
|
|
6008
|
+
return y("div", {
|
|
5989
6009
|
class: "modal-footer",
|
|
5990
6010
|
style: Ft.value
|
|
5991
|
-
}, [
|
|
5992
|
-
const
|
|
5993
|
-
return
|
|
6011
|
+
}, [C.value && C.value.map((S) => {
|
|
6012
|
+
const V = c(S.disabled);
|
|
6013
|
+
return y("button", {
|
|
5994
6014
|
name: S.name,
|
|
5995
6015
|
type: "button",
|
|
5996
|
-
disabled:
|
|
6016
|
+
disabled: V.value,
|
|
5997
6017
|
class: S.class + (S.iconClass ? " btn-icontext" : ""),
|
|
5998
6018
|
onClick: (X) => {
|
|
5999
6019
|
Tt(S, X);
|
|
6000
6020
|
}
|
|
6001
|
-
}, [!!S.iconClass &&
|
|
6021
|
+
}, [!!S.iconClass && y("i", {
|
|
6002
6022
|
class: S.iconClass
|
|
6003
6023
|
}, null), S.text]);
|
|
6004
6024
|
})]);
|
|
6005
6025
|
}
|
|
6006
6026
|
function Bt() {
|
|
6007
|
-
return
|
|
6027
|
+
return y("div", {
|
|
6008
6028
|
ref: L,
|
|
6009
6029
|
class: "modal-header",
|
|
6010
6030
|
style: kt.value
|
|
6011
|
-
}, [t.slots.headerTemplate ? t.slots.headerTemplate() :
|
|
6031
|
+
}, [t.slots.headerTemplate ? t.slots.headerTemplate() : y("div", {
|
|
6012
6032
|
class: "modal-title"
|
|
6013
|
-
}, [
|
|
6014
|
-
class:
|
|
6033
|
+
}, [O.value && y("span", {
|
|
6034
|
+
class: f.value,
|
|
6015
6035
|
style: "margin-right: 8px"
|
|
6016
|
-
}, null),
|
|
6036
|
+
}, null), y("span", {
|
|
6017
6037
|
class: "modal-title-label"
|
|
6018
|
-
}, [
|
|
6038
|
+
}, [p.value])]), y("div", {
|
|
6019
6039
|
class: "actions"
|
|
6020
6040
|
}, [Mt()])]);
|
|
6021
6041
|
}
|
|
@@ -6024,42 +6044,42 @@ const se = /* @__PURE__ */ G({
|
|
|
6024
6044
|
}
|
|
6025
6045
|
function Dt(S) {
|
|
6026
6046
|
if (S.stopPropagation(), e.allowClickMaskToClose) {
|
|
6027
|
-
if (S.target !==
|
|
6047
|
+
if (S.target !== x.value)
|
|
6028
6048
|
return;
|
|
6029
|
-
|
|
6049
|
+
d(S, !1);
|
|
6030
6050
|
}
|
|
6031
6051
|
}
|
|
6032
6052
|
function Pt() {
|
|
6033
|
-
var S,
|
|
6034
|
-
return
|
|
6053
|
+
var S, V;
|
|
6054
|
+
return y("div", {
|
|
6035
6055
|
id: l.value,
|
|
6036
6056
|
class: pt.value,
|
|
6037
6057
|
style: vt.value,
|
|
6038
6058
|
ref: E
|
|
6039
|
-
}, [
|
|
6059
|
+
}, [y("div", {
|
|
6040
6060
|
class: bt.value
|
|
6041
|
-
}, [
|
|
6061
|
+
}, [u.value && Bt(), y("div", {
|
|
6042
6062
|
class: wt.value
|
|
6043
|
-
}, [(
|
|
6063
|
+
}, [(V = (S = t.slots).default) == null ? void 0 : V.call(S), F.value === "iframe" && y("iframe", {
|
|
6044
6064
|
title: l.value,
|
|
6045
6065
|
class: "f-utils-fill",
|
|
6046
6066
|
width: "100%",
|
|
6047
6067
|
frameborder: "0",
|
|
6048
|
-
src:
|
|
6068
|
+
src: w.value
|
|
6049
6069
|
}, null)]), Et()]), !s.value && E.value && !R.value && T(E.value)]);
|
|
6050
6070
|
}
|
|
6051
6071
|
function Nt(S) {
|
|
6052
6072
|
return S || "body";
|
|
6053
6073
|
}
|
|
6054
|
-
return () =>
|
|
6074
|
+
return () => y(Ge, {
|
|
6055
6075
|
to: Nt(e.host)
|
|
6056
6076
|
}, {
|
|
6057
|
-
default: () => [be.value &&
|
|
6077
|
+
default: () => [be.value && y(Ue, {
|
|
6058
6078
|
name: "fade",
|
|
6059
6079
|
appear: !0
|
|
6060
6080
|
}, {
|
|
6061
|
-
default: () => [
|
|
6062
|
-
ref:
|
|
6081
|
+
default: () => [y("div", {
|
|
6082
|
+
ref: x,
|
|
6063
6083
|
class: mt.value,
|
|
6064
6084
|
style: gt.value,
|
|
6065
6085
|
onClick: Dt
|
|
@@ -6082,38 +6102,38 @@ function ko(e) {
|
|
|
6082
6102
|
ve(() => {
|
|
6083
6103
|
document.body.removeChild(t);
|
|
6084
6104
|
});
|
|
6085
|
-
const l =
|
|
6086
|
-
}),
|
|
6087
|
-
}),
|
|
6088
|
-
}),
|
|
6089
|
-
}),
|
|
6090
|
-
}),
|
|
6091
|
-
|
|
6105
|
+
const l = c(), i = c(e.class || ""), s = c(!!e.showButtons), u = c(!!e.showHeader), f = c(e.showCloseButton == null ? !0 : e.showCloseButton), k = c(!0), b = c(e.title || ""), h = e.acceptCallback || (() => {
|
|
6106
|
+
}), F = e.rejectCallback || (() => {
|
|
6107
|
+
}), w = e.closedCallback || ((x) => {
|
|
6108
|
+
}), m = e.resizeHandle || ((x) => {
|
|
6109
|
+
}), r = e.stopMoveHandle || ((x) => {
|
|
6110
|
+
}), p = rt(e), v = (x) => {
|
|
6111
|
+
k.value = !1, n.unmount(), w(x);
|
|
6092
6112
|
};
|
|
6093
6113
|
return K(() => {
|
|
6094
6114
|
}), o.expose({
|
|
6095
6115
|
modalRef: l
|
|
6096
|
-
}), () =>
|
|
6116
|
+
}), () => y(se, {
|
|
6097
6117
|
ref: l,
|
|
6098
6118
|
class: i.value,
|
|
6099
|
-
modelValue:
|
|
6100
|
-
"onUpdate:modelValue": (
|
|
6101
|
-
title:
|
|
6119
|
+
modelValue: k.value,
|
|
6120
|
+
"onUpdate:modelValue": (x) => k.value = x,
|
|
6121
|
+
title: b.value,
|
|
6102
6122
|
width: e.width,
|
|
6103
6123
|
height: e.height,
|
|
6104
6124
|
buttons: e.buttons,
|
|
6105
|
-
"show-header":
|
|
6125
|
+
"show-header": u.value,
|
|
6106
6126
|
"show-buttons": s.value,
|
|
6107
|
-
"show-close-button":
|
|
6127
|
+
"show-close-button": f.value,
|
|
6108
6128
|
"show-max-button": !1,
|
|
6109
|
-
onAccept:
|
|
6110
|
-
onCancel:
|
|
6129
|
+
onAccept: h,
|
|
6130
|
+
onCancel: F,
|
|
6111
6131
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
6112
|
-
onClosed:
|
|
6113
|
-
onResize:
|
|
6114
|
-
onStopMove:
|
|
6132
|
+
onClosed: v,
|
|
6133
|
+
onResize: m,
|
|
6134
|
+
onStopMove: r
|
|
6115
6135
|
}, {
|
|
6116
|
-
default: () => [
|
|
6136
|
+
default: () => [p && p(n)]
|
|
6117
6137
|
});
|
|
6118
6138
|
}
|
|
6119
6139
|
});
|
|
@@ -6122,10 +6142,10 @@ function ko(e) {
|
|
|
6122
6142
|
class Co {
|
|
6123
6143
|
constructor(t) {
|
|
6124
6144
|
J(this, "appContext", null);
|
|
6125
|
-
J(this, "modalRef",
|
|
6126
|
-
J(this, "activeModalIndex",
|
|
6145
|
+
J(this, "modalRef", c());
|
|
6146
|
+
J(this, "activeModalIndex", c(0));
|
|
6127
6147
|
J(this, "modalRefs", {});
|
|
6128
|
-
J(this, "isUseEscCloseModal",
|
|
6148
|
+
J(this, "isUseEscCloseModal", c(!1));
|
|
6129
6149
|
J(this, "activeModalInstance", D(() => this.modalRefs[this.activeModalIndex.value]));
|
|
6130
6150
|
this.app = t, this.appContext = t ? t._context : null;
|
|
6131
6151
|
}
|
|
@@ -6164,64 +6184,64 @@ class Co {
|
|
|
6164
6184
|
title: "",
|
|
6165
6185
|
showButtons: !0,
|
|
6166
6186
|
showHeader: !0
|
|
6167
|
-
}, t)), o =
|
|
6187
|
+
}, t)), o = c(!0), l = a.value.acceptCallback || (() => {
|
|
6168
6188
|
}), i = a.value.rejectCallback || (() => {
|
|
6169
|
-
}), s = a.value.closedCallback || ((
|
|
6170
|
-
}),
|
|
6171
|
-
}),
|
|
6189
|
+
}), s = a.value.closedCallback || ((d, g) => {
|
|
6190
|
+
}), u = a.value.resizeHandle || ((d) => {
|
|
6191
|
+
}), f = t.stopMoveHandle || ((d) => {
|
|
6172
6192
|
});
|
|
6173
|
-
let
|
|
6174
|
-
const
|
|
6175
|
-
var
|
|
6193
|
+
let k;
|
|
6194
|
+
const b = rt(a.value), h = (d) => {
|
|
6195
|
+
var C;
|
|
6176
6196
|
o.value = !1;
|
|
6177
|
-
const
|
|
6178
|
-
s(
|
|
6179
|
-
},
|
|
6180
|
-
d
|
|
6181
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], we(null, n),
|
|
6182
|
-
const
|
|
6183
|
-
|
|
6197
|
+
const g = (C = d == null ? void 0 : d.target) == null ? void 0 : C.classList.contains("modal_close");
|
|
6198
|
+
s(d, this.isUseEscCloseModal.value ? "esc" : g ? "icon" : "button");
|
|
6199
|
+
}, F = (d) => {
|
|
6200
|
+
h(d), k && oe(() => {
|
|
6201
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], we(null, n), k = null, this.modalRef.value = null, this.modalRefs) {
|
|
6202
|
+
const g = Object.keys(this.modalRefs).map((C) => Number(C));
|
|
6203
|
+
g.length > 0 ? this.activeModalIndex.value = Math.max(...g) : this.activeModalIndex.value = 0;
|
|
6184
6204
|
}
|
|
6185
6205
|
this.isUseEscCloseModal.value = !1;
|
|
6186
6206
|
});
|
|
6187
|
-
},
|
|
6188
|
-
var
|
|
6189
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
6207
|
+
}, w = (d) => {
|
|
6208
|
+
var g;
|
|
6209
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((g = this.activeModalInstance.value) == null || g.close(d == null ? void 0 : d.event));
|
|
6190
6210
|
}, {
|
|
6191
|
-
width:
|
|
6192
|
-
height:
|
|
6193
|
-
} = a.value,
|
|
6194
|
-
Object.assign(a.value,
|
|
6195
|
-
const
|
|
6211
|
+
width: m,
|
|
6212
|
+
height: r
|
|
6213
|
+
} = a.value, p = this.adaptToWindow(m || 500, r || 320);
|
|
6214
|
+
Object.assign(a.value, p);
|
|
6215
|
+
const v = () => y(se, Ee({
|
|
6196
6216
|
ref: this.modalRef,
|
|
6197
6217
|
modelValue: o.value,
|
|
6198
|
-
"onUpdate:modelValue": (
|
|
6218
|
+
"onUpdate:modelValue": (d) => o.value = d
|
|
6199
6219
|
}, a.value, {
|
|
6200
6220
|
onAccept: l,
|
|
6201
6221
|
onCancel: i,
|
|
6202
|
-
onClosed:
|
|
6203
|
-
onResize:
|
|
6204
|
-
onEsc:
|
|
6205
|
-
onStopMove:
|
|
6222
|
+
onClosed: F,
|
|
6223
|
+
onResize: u,
|
|
6224
|
+
onEsc: w,
|
|
6225
|
+
onStopMove: f
|
|
6206
6226
|
}), {
|
|
6207
|
-
default: () => [
|
|
6227
|
+
default: () => [b && b(this.app)]
|
|
6208
6228
|
});
|
|
6209
|
-
return
|
|
6210
|
-
const
|
|
6211
|
-
return
|
|
6229
|
+
return k = ((d) => {
|
|
6230
|
+
const g = Vt(v, d);
|
|
6231
|
+
return g.appContext = this.appContext, we(g, n), g;
|
|
6212
6232
|
})({
|
|
6213
6233
|
...a.value
|
|
6214
6234
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
6215
6235
|
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
6216
|
-
update: (
|
|
6236
|
+
update: (d) => {
|
|
6217
6237
|
a.value = {
|
|
6218
6238
|
...a.value,
|
|
6219
|
-
...
|
|
6220
|
-
},
|
|
6239
|
+
...d
|
|
6240
|
+
}, k && we(Ht(k, {
|
|
6221
6241
|
...a
|
|
6222
6242
|
}), n);
|
|
6223
6243
|
},
|
|
6224
|
-
destroy:
|
|
6244
|
+
destroy: F,
|
|
6225
6245
|
modalRef: this.activeModalInstance,
|
|
6226
6246
|
close: () => this.close()
|
|
6227
6247
|
};
|
|
@@ -6248,94 +6268,94 @@ function ct(e, t) {
|
|
|
6248
6268
|
return { judgeCanOpen: n };
|
|
6249
6269
|
}
|
|
6250
6270
|
function wo(e, t, n, a, o) {
|
|
6251
|
-
const l =
|
|
6271
|
+
const l = c(e.buttonBehavior), i = c(e.popupOnInput), s = D(() => ({
|
|
6252
6272
|
"input-group-append": !0,
|
|
6253
6273
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
6254
|
-
})), { judgeCanOpen:
|
|
6255
|
-
async function
|
|
6256
|
-
if (await
|
|
6257
|
-
const
|
|
6274
|
+
})), { judgeCanOpen: u } = ct(e, o), f = D(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), k = _(ut, null), b = c();
|
|
6275
|
+
async function h(m) {
|
|
6276
|
+
if (await u() && f.value) {
|
|
6277
|
+
const r = !!t.slots.default;
|
|
6258
6278
|
if (l.value === "Modal") {
|
|
6259
|
-
const
|
|
6260
|
-
...
|
|
6279
|
+
const p = e.modalOptions, v = k == null ? void 0 : k.open({
|
|
6280
|
+
...p,
|
|
6261
6281
|
render: () => t.slots.default && t.slots.default()
|
|
6262
6282
|
});
|
|
6263
|
-
|
|
6283
|
+
b.value = v == null ? void 0 : v.modalRef;
|
|
6264
6284
|
}
|
|
6265
6285
|
l.value === "Overlay" && mo.show({
|
|
6266
6286
|
// host: buttonEditRef.value,
|
|
6267
6287
|
host: document.body,
|
|
6268
6288
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
6269
6289
|
render: () => t.slots.default && t.slots.default()
|
|
6270
|
-
}),
|
|
6290
|
+
}), r && l.value === "Popup" && a.togglePopup(!0), r && i.value && a.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
|
|
6271
6291
|
}
|
|
6272
6292
|
}
|
|
6273
|
-
function
|
|
6274
|
-
t.emit("mouseEnterIcon",
|
|
6293
|
+
function F(m) {
|
|
6294
|
+
t.emit("mouseEnterIcon", m);
|
|
6275
6295
|
}
|
|
6276
|
-
function
|
|
6277
|
-
t.emit("mouseLeaveIcon",
|
|
6296
|
+
function w(m) {
|
|
6297
|
+
t.emit("mouseLeaveIcon", m);
|
|
6278
6298
|
}
|
|
6279
6299
|
return {
|
|
6280
6300
|
buttonGroupClass: s,
|
|
6281
|
-
onClickButton:
|
|
6282
|
-
onMouseEnterButton:
|
|
6283
|
-
onMouseLeaveButton:
|
|
6284
|
-
modalRef:
|
|
6301
|
+
onClickButton: h,
|
|
6302
|
+
onMouseEnterButton: F,
|
|
6303
|
+
onMouseLeaveButton: w,
|
|
6304
|
+
modalRef: b
|
|
6285
6305
|
};
|
|
6286
6306
|
}
|
|
6287
6307
|
function xo(e, t, n, a, o, l) {
|
|
6288
|
-
const i =
|
|
6289
|
-
function
|
|
6290
|
-
i.value =
|
|
6308
|
+
const i = c(!1), s = D(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: u, hasClearClass: f } = l;
|
|
6309
|
+
function k(w) {
|
|
6310
|
+
i.value = w, f.value = w;
|
|
6291
6311
|
}
|
|
6292
6312
|
W(o, () => {
|
|
6293
|
-
|
|
6313
|
+
k(!!o.value);
|
|
6294
6314
|
});
|
|
6295
|
-
function
|
|
6296
|
-
const
|
|
6297
|
-
|
|
6315
|
+
function b(w) {
|
|
6316
|
+
const m = !e.readonly && !e.disable && e.editable, r = !e.editable;
|
|
6317
|
+
w.stopPropagation(), (m || r) && (u(""), o.value = "", k(!i.value), t.emit("clear"));
|
|
6298
6318
|
}
|
|
6299
|
-
function
|
|
6319
|
+
function h(w) {
|
|
6300
6320
|
if (s.value) {
|
|
6301
6321
|
if (!n.value) {
|
|
6302
|
-
|
|
6322
|
+
k(!1);
|
|
6303
6323
|
return;
|
|
6304
6324
|
}
|
|
6305
|
-
!e.disable && !e.readonly &&
|
|
6325
|
+
!e.disable && !e.readonly && k(!0);
|
|
6306
6326
|
}
|
|
6307
6327
|
}
|
|
6308
|
-
function w
|
|
6309
|
-
s.value &&
|
|
6328
|
+
function F(w) {
|
|
6329
|
+
s.value && k(!1);
|
|
6310
6330
|
}
|
|
6311
6331
|
return {
|
|
6312
6332
|
enableClearButton: s,
|
|
6313
6333
|
showClearButton: i,
|
|
6314
|
-
onClearValue:
|
|
6315
|
-
onMouseEnterTextBox:
|
|
6316
|
-
onMouseLeaveTextBox:
|
|
6334
|
+
onClearValue: b,
|
|
6335
|
+
onMouseEnterTextBox: h,
|
|
6336
|
+
onMouseLeaveTextBox: F
|
|
6317
6337
|
};
|
|
6318
6338
|
}
|
|
6319
6339
|
function Fo(e, t, n, a, o) {
|
|
6320
|
-
const l = D(() => e.popupOnInput), i = D(() => e.popupOnFocus), { shouldPopupContent: s, closeAllPopover:
|
|
6340
|
+
const l = D(() => e.popupOnInput), i = D(() => e.popupOnFocus), { shouldPopupContent: s, closeAllPopover: u } = o, f = c(!1), k = D(() => e.enableTitle ? n.value : ""), b = D(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), h = D(() => e.readonly || !e.editable), F = c(!1), w = D(() => !e.disable && F.value), m = D(() => ({
|
|
6321
6341
|
"text-left": e.textAlign === "left",
|
|
6322
6342
|
"text-center": e.textAlign === "center",
|
|
6323
6343
|
"text-right": e.textAlign === "right",
|
|
6324
6344
|
"form-control": !0,
|
|
6325
6345
|
"f-utils-fill": !0
|
|
6326
|
-
})),
|
|
6346
|
+
})), r = D(() => ({
|
|
6327
6347
|
"input-group": !0,
|
|
6328
6348
|
"f-state-disabled": e.disable,
|
|
6329
6349
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
6330
6350
|
"f-state-readonly": e.readonly,
|
|
6331
|
-
"f-state-focus":
|
|
6332
|
-
"input-group--has-clear": e.enableClear &&
|
|
6351
|
+
"f-state-focus": w.value,
|
|
6352
|
+
"input-group--has-clear": e.enableClear && f.value
|
|
6333
6353
|
}));
|
|
6334
|
-
function
|
|
6354
|
+
function p(E, R = !0) {
|
|
6335
6355
|
n.value = E, R && (t.emit("change", E), t.emit("update:modelValue", E));
|
|
6336
6356
|
}
|
|
6337
|
-
function
|
|
6338
|
-
s.value = !1,
|
|
6357
|
+
function v(E) {
|
|
6358
|
+
s.value = !1, p(E, !0);
|
|
6339
6359
|
}
|
|
6340
6360
|
W(
|
|
6341
6361
|
() => e.modelValue,
|
|
@@ -6343,24 +6363,24 @@ function Fo(e, t, n, a, o) {
|
|
|
6343
6363
|
n.value = E;
|
|
6344
6364
|
}
|
|
6345
6365
|
);
|
|
6346
|
-
function
|
|
6347
|
-
|
|
6366
|
+
function x(E) {
|
|
6367
|
+
F.value = !1, t.emit("blur", E), E.stopPropagation();
|
|
6348
6368
|
}
|
|
6349
|
-
function
|
|
6350
|
-
t.emit("click", E),
|
|
6369
|
+
function M(E) {
|
|
6370
|
+
t.emit("click", E), u(), t.slots.default && !e.disable && !e.readonly && e.popupOnClick && o.togglePopup();
|
|
6351
6371
|
}
|
|
6352
|
-
function
|
|
6353
|
-
!e.disable && !e.readonly && (
|
|
6372
|
+
function d(E) {
|
|
6373
|
+
!e.disable && !e.readonly && (F.value = !0, h.value || (t.emit("focus", E), i.value && !s.value && o.popup()));
|
|
6354
6374
|
}
|
|
6355
|
-
function
|
|
6375
|
+
function g(E) {
|
|
6356
6376
|
t.emit("input", E);
|
|
6357
6377
|
const R = E.target.value;
|
|
6358
|
-
a.value = R, n.value !== R &&
|
|
6378
|
+
a.value = R, n.value !== R && p(R, e.updateOn === "change"), l.value && !s.value && o.popup();
|
|
6359
6379
|
}
|
|
6360
|
-
function
|
|
6380
|
+
function C(E) {
|
|
6361
6381
|
E.target.tagName !== "INPUT" && E.preventDefault(), E.stopPropagation();
|
|
6362
6382
|
}
|
|
6363
|
-
function
|
|
6383
|
+
function O(E) {
|
|
6364
6384
|
t.emit("keydown", E);
|
|
6365
6385
|
}
|
|
6366
6386
|
function z(E) {
|
|
@@ -6368,112 +6388,112 @@ function Fo(e, t, n, a, o) {
|
|
|
6368
6388
|
}
|
|
6369
6389
|
function L(E) {
|
|
6370
6390
|
const R = E.target.value;
|
|
6371
|
-
E.stopPropagation(),
|
|
6391
|
+
E.stopPropagation(), p(R);
|
|
6372
6392
|
}
|
|
6373
6393
|
return {
|
|
6374
|
-
hasFocusedTextBox:
|
|
6375
|
-
isTextBoxReadonly:
|
|
6376
|
-
textBoxClass:
|
|
6377
|
-
textBoxPlaceholder:
|
|
6378
|
-
textBoxTitle:
|
|
6379
|
-
inputGroupClass:
|
|
6380
|
-
hasClearClass:
|
|
6381
|
-
changeTextBoxValue:
|
|
6382
|
-
commitValue:
|
|
6383
|
-
onBlurTextBox:
|
|
6384
|
-
onClickTextBox:
|
|
6385
|
-
onFocusTextBox:
|
|
6386
|
-
onInput:
|
|
6387
|
-
onKeyDownTextBox:
|
|
6394
|
+
hasFocusedTextBox: w,
|
|
6395
|
+
isTextBoxReadonly: h,
|
|
6396
|
+
textBoxClass: m,
|
|
6397
|
+
textBoxPlaceholder: b,
|
|
6398
|
+
textBoxTitle: k,
|
|
6399
|
+
inputGroupClass: r,
|
|
6400
|
+
hasClearClass: f,
|
|
6401
|
+
changeTextBoxValue: p,
|
|
6402
|
+
commitValue: v,
|
|
6403
|
+
onBlurTextBox: x,
|
|
6404
|
+
onClickTextBox: M,
|
|
6405
|
+
onFocusTextBox: d,
|
|
6406
|
+
onInput: g,
|
|
6407
|
+
onKeyDownTextBox: O,
|
|
6388
6408
|
onKeyUpTextBox: z,
|
|
6389
|
-
onMouseDownTextBox:
|
|
6409
|
+
onMouseDownTextBox: C,
|
|
6390
6410
|
onTextBoxValueChange: L
|
|
6391
6411
|
};
|
|
6392
6412
|
}
|
|
6393
6413
|
const ne = "FarrisVue_PopoverInstancesKey";
|
|
6394
6414
|
function To(e, t, n, a) {
|
|
6395
|
-
const o =
|
|
6396
|
-
W(() => o.value, (
|
|
6397
|
-
window[ne] = window[ne] || /* @__PURE__ */ new WeakMap(),
|
|
6415
|
+
const o = c(), l = c(!1), { judgeCanOpen: i } = ct(e, a);
|
|
6416
|
+
W(() => o.value, (F, w) => {
|
|
6417
|
+
window[ne] = window[ne] || /* @__PURE__ */ new WeakMap(), F ? window[ne].set(n.value, F) : window[ne].delete(n.value);
|
|
6398
6418
|
});
|
|
6399
6419
|
function s() {
|
|
6400
6420
|
if (window[ne]) {
|
|
6401
|
-
const
|
|
6402
|
-
document.querySelectorAll(".f-button-edit,.v-popover").forEach((
|
|
6403
|
-
const
|
|
6404
|
-
|
|
6421
|
+
const F = window[ne];
|
|
6422
|
+
document.querySelectorAll(".f-button-edit,.v-popover").forEach((w) => {
|
|
6423
|
+
const m = F.get(w);
|
|
6424
|
+
m && w !== n.value && !n.value.closest(".popover-fitcontent") && m.hide();
|
|
6405
6425
|
});
|
|
6406
6426
|
}
|
|
6407
6427
|
}
|
|
6408
|
-
function
|
|
6409
|
-
const
|
|
6410
|
-
|
|
6428
|
+
function u() {
|
|
6429
|
+
const F = o.value;
|
|
6430
|
+
F && F.show(n.value);
|
|
6411
6431
|
}
|
|
6412
|
-
async function
|
|
6432
|
+
async function f(F = !1) {
|
|
6413
6433
|
if (!!t.slots.default) {
|
|
6414
|
-
if (!
|
|
6434
|
+
if (!F && !l.value && !await i())
|
|
6415
6435
|
return;
|
|
6416
|
-
l.value = !l.value, l.value && (await oe(),
|
|
6436
|
+
l.value = !l.value, l.value && (await oe(), u());
|
|
6417
6437
|
}
|
|
6418
6438
|
}
|
|
6419
|
-
async function
|
|
6439
|
+
async function k(F = !1) {
|
|
6420
6440
|
if (!!t.slots.default) {
|
|
6421
|
-
if (!
|
|
6441
|
+
if (!F && !await i())
|
|
6422
6442
|
return;
|
|
6423
|
-
l.value = !0, await oe(),
|
|
6443
|
+
l.value = !0, await oe(), u();
|
|
6424
6444
|
}
|
|
6425
6445
|
}
|
|
6426
|
-
function
|
|
6446
|
+
function b() {
|
|
6427
6447
|
l.value = !1;
|
|
6428
6448
|
}
|
|
6429
|
-
function
|
|
6449
|
+
function h() {
|
|
6430
6450
|
l.value = !0, oe(() => {
|
|
6431
|
-
|
|
6451
|
+
u();
|
|
6432
6452
|
});
|
|
6433
6453
|
}
|
|
6434
|
-
return { hidePopup:
|
|
6454
|
+
return { hidePopup: b, showPopup: h, popup: k, shouldPopupContent: l, togglePopup: f, popoverRef: o, closeAllPopover: s };
|
|
6435
6455
|
}
|
|
6436
6456
|
function So(e, t, n) {
|
|
6437
|
-
const a =
|
|
6457
|
+
const a = c(), {
|
|
6438
6458
|
isTextBoxReadonly: o,
|
|
6439
6459
|
textBoxClass: l,
|
|
6440
6460
|
textBoxPlaceholder: i,
|
|
6441
6461
|
textBoxTitle: s,
|
|
6442
|
-
onBlurTextBox:
|
|
6443
|
-
onClickTextBox:
|
|
6444
|
-
onFocusTextBox:
|
|
6445
|
-
onInput:
|
|
6446
|
-
onKeyDownTextBox:
|
|
6447
|
-
onKeyUpTextBox:
|
|
6448
|
-
onMouseDownTextBox:
|
|
6449
|
-
onTextBoxValueChange:
|
|
6450
|
-
} = n,
|
|
6451
|
-
uuid:
|
|
6452
|
-
} = Kt(),
|
|
6462
|
+
onBlurTextBox: u,
|
|
6463
|
+
onClickTextBox: f,
|
|
6464
|
+
onFocusTextBox: k,
|
|
6465
|
+
onInput: b,
|
|
6466
|
+
onKeyDownTextBox: h,
|
|
6467
|
+
onKeyUpTextBox: F,
|
|
6468
|
+
onMouseDownTextBox: w,
|
|
6469
|
+
onTextBoxValueChange: m
|
|
6470
|
+
} = n, r = c(e.id), {
|
|
6471
|
+
uuid: p
|
|
6472
|
+
} = Kt(), v = D(() => ({
|
|
6453
6473
|
// 'border-top-right-radius': '6px',
|
|
6454
6474
|
// 'border-bottom-right-radius': '6px'
|
|
6455
6475
|
}));
|
|
6456
6476
|
K(() => {
|
|
6457
|
-
var
|
|
6458
|
-
e.selectOnCreated && ((
|
|
6477
|
+
var C, O;
|
|
6478
|
+
e.selectOnCreated && ((C = a.value) == null || C.select()), e.focusOnCreated && ((O = a.value) == null || O.focus({
|
|
6459
6479
|
preventScroll: !0
|
|
6460
|
-
})),
|
|
6480
|
+
})), r.value || (r.value = "button-edit_" + p(8)), r.value = r.value + "-textbox";
|
|
6461
6481
|
});
|
|
6462
|
-
const
|
|
6463
|
-
|
|
6464
|
-
},
|
|
6465
|
-
|
|
6482
|
+
const x = c(!1), M = (C) => {
|
|
6483
|
+
C.preventDefault(), x.value = !0;
|
|
6484
|
+
}, d = (C) => {
|
|
6485
|
+
C.preventDefault(), x.value = !1, b(C);
|
|
6466
6486
|
};
|
|
6467
|
-
function
|
|
6468
|
-
|
|
6487
|
+
function g(C) {
|
|
6488
|
+
x.value || b(C);
|
|
6469
6489
|
}
|
|
6470
|
-
return () =>
|
|
6490
|
+
return () => y("input", {
|
|
6471
6491
|
id: e.id ? e.id + "-textbox" : void 0,
|
|
6472
6492
|
ref: a,
|
|
6473
6493
|
name: "input-group-value",
|
|
6474
6494
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
6475
6495
|
class: l.value,
|
|
6476
|
-
style:
|
|
6496
|
+
style: v.value,
|
|
6477
6497
|
disabled: e.disable,
|
|
6478
6498
|
maxlength: e.maxLength,
|
|
6479
6499
|
minlength: e.minLength,
|
|
@@ -6483,55 +6503,55 @@ function So(e, t, n) {
|
|
|
6483
6503
|
title: s.value,
|
|
6484
6504
|
type: e.inputType,
|
|
6485
6505
|
value: t.value,
|
|
6486
|
-
onBlur:
|
|
6487
|
-
onChange:
|
|
6488
|
-
onClick:
|
|
6489
|
-
onFocus:
|
|
6490
|
-
onInput:
|
|
6491
|
-
onKeydown:
|
|
6492
|
-
onKeyup:
|
|
6493
|
-
onMousedown:
|
|
6494
|
-
onCompositionend:
|
|
6495
|
-
onCompositionstart:
|
|
6506
|
+
onBlur: u,
|
|
6507
|
+
onChange: m,
|
|
6508
|
+
onClick: f,
|
|
6509
|
+
onFocus: k,
|
|
6510
|
+
onInput: g,
|
|
6511
|
+
onKeydown: h,
|
|
6512
|
+
onKeyup: F,
|
|
6513
|
+
onMousedown: w,
|
|
6514
|
+
onCompositionend: d,
|
|
6515
|
+
onCompositionstart: M
|
|
6496
6516
|
}, null);
|
|
6497
6517
|
}
|
|
6498
6518
|
function Mo(e, t, n) {
|
|
6499
|
-
const a =
|
|
6519
|
+
const a = c(e.separator), o = D(() => e.readonly || e.disable), {
|
|
6500
6520
|
changeTextBoxValue: l,
|
|
6501
6521
|
onFocusTextBox: i,
|
|
6502
6522
|
onBlurTextBox: s,
|
|
6503
|
-
onClickTextBox:
|
|
6504
|
-
textBoxPlaceholder:
|
|
6505
|
-
} = n,
|
|
6506
|
-
name:
|
|
6523
|
+
onClickTextBox: u,
|
|
6524
|
+
textBoxPlaceholder: f
|
|
6525
|
+
} = n, k = D(() => t.value ? t.value.split(a.value).map((w) => ({
|
|
6526
|
+
name: w,
|
|
6507
6527
|
selectable: !0
|
|
6508
6528
|
})) : []);
|
|
6509
|
-
function
|
|
6510
|
-
l(
|
|
6529
|
+
function b(w) {
|
|
6530
|
+
l(w.map((m) => m.name).join(a.value), !0);
|
|
6511
6531
|
}
|
|
6512
|
-
W(() => e.separator, (
|
|
6513
|
-
a.value =
|
|
6532
|
+
W(() => e.separator, (w) => {
|
|
6533
|
+
a.value = w;
|
|
6514
6534
|
});
|
|
6515
|
-
const
|
|
6516
|
-
W([() => e.disable, () => e.readonly], ([
|
|
6517
|
-
|
|
6535
|
+
const h = c(!e.disable && !e.readonly);
|
|
6536
|
+
W([() => e.disable, () => e.readonly], ([w, m], [r, p]) => {
|
|
6537
|
+
h.value = !w && !m;
|
|
6518
6538
|
});
|
|
6519
|
-
function w
|
|
6520
|
-
|
|
6539
|
+
function F(w) {
|
|
6540
|
+
u(w);
|
|
6521
6541
|
}
|
|
6522
|
-
return () =>
|
|
6542
|
+
return () => y(on, {
|
|
6523
6543
|
tabindex: e.tabIndex,
|
|
6524
6544
|
onFocus: i,
|
|
6525
6545
|
onBlur: s,
|
|
6526
6546
|
id: `${e.id}-tag-editor`,
|
|
6527
6547
|
class: "form-control",
|
|
6528
|
-
placeholder:
|
|
6529
|
-
data:
|
|
6548
|
+
placeholder: f.value,
|
|
6549
|
+
data: k.value,
|
|
6530
6550
|
showClose: !o.value,
|
|
6531
6551
|
showInput: !0,
|
|
6532
6552
|
disable: o.value,
|
|
6533
|
-
onChange:
|
|
6534
|
-
onClick:
|
|
6553
|
+
onChange: b,
|
|
6554
|
+
onClick: F
|
|
6535
6555
|
}, null);
|
|
6536
6556
|
}
|
|
6537
6557
|
function Oo(e, t, n, a) {
|
|
@@ -6541,48 +6561,48 @@ function Oo(e, t, n, a) {
|
|
|
6541
6561
|
onMouseEnterButton: i,
|
|
6542
6562
|
onMouseLeaveButton: s
|
|
6543
6563
|
} = n, {
|
|
6544
|
-
enableClearButton:
|
|
6545
|
-
showClearButton:
|
|
6546
|
-
onClearValue:
|
|
6547
|
-
} = a,
|
|
6548
|
-
l(
|
|
6549
|
-
}, e.buttonBehavior === "Modal" ? 0 : 200),
|
|
6564
|
+
enableClearButton: u,
|
|
6565
|
+
showClearButton: f,
|
|
6566
|
+
onClearValue: k
|
|
6567
|
+
} = a, b = c(), h = Qt((w) => {
|
|
6568
|
+
l(w);
|
|
6569
|
+
}, e.buttonBehavior === "Modal" ? 0 : 200), F = () => {
|
|
6550
6570
|
t.emit("beforeClearValue");
|
|
6551
6571
|
};
|
|
6552
6572
|
return {
|
|
6553
|
-
renderButtonGroup: () =>
|
|
6573
|
+
renderButtonGroup: () => y("div", {
|
|
6554
6574
|
id: e.id ? `${e.id}-button-group` : void 0,
|
|
6555
6575
|
class: o.value
|
|
6556
|
-
}, [
|
|
6576
|
+
}, [u.value && qe(y("span", {
|
|
6557
6577
|
class: "input-group-text input-group-clear",
|
|
6558
|
-
onClick:
|
|
6559
|
-
onMousedown:
|
|
6560
|
-
}, [
|
|
6578
|
+
onClick: k,
|
|
6579
|
+
onMousedown: F
|
|
6580
|
+
}, [y("i", {
|
|
6561
6581
|
class: "f-icon modal_close"
|
|
6562
|
-
}, null)]), [[At,
|
|
6582
|
+
}, null)]), [[At, f.value]]), t.slots.buttonContent ? y("span", {
|
|
6563
6583
|
class: "input-group-text input-group-append-button",
|
|
6564
|
-
onClick:
|
|
6584
|
+
onClick: h,
|
|
6565
6585
|
onMouseenter: i,
|
|
6566
6586
|
onMouseleave: s
|
|
6567
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
6587
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? y("span", {
|
|
6568
6588
|
class: "input-group-text input-group-append-button",
|
|
6569
6589
|
innerHTML: e.buttonContent,
|
|
6570
|
-
ref:
|
|
6571
|
-
onClick: (
|
|
6590
|
+
ref: b,
|
|
6591
|
+
onClick: (w) => h(w),
|
|
6572
6592
|
onMouseenter: i,
|
|
6573
6593
|
onMouseleave: s
|
|
6574
6594
|
}, null) : null]),
|
|
6575
|
-
buttonHandleElement:
|
|
6595
|
+
buttonHandleElement: b
|
|
6576
6596
|
};
|
|
6577
6597
|
}
|
|
6578
6598
|
function Bo(e, t, n) {
|
|
6579
|
-
const a =
|
|
6599
|
+
const a = c(e.popupMinWidth), {
|
|
6580
6600
|
hidePopup: o,
|
|
6581
6601
|
popoverRef: l
|
|
6582
6602
|
} = n, i = () => {
|
|
6583
6603
|
t.emit("shown");
|
|
6584
6604
|
};
|
|
6585
|
-
return () =>
|
|
6605
|
+
return () => y(ln, {
|
|
6586
6606
|
id: `${e.id}-popover`,
|
|
6587
6607
|
ref: l,
|
|
6588
6608
|
placement: e.placement,
|
|
@@ -6599,8 +6619,8 @@ function Bo(e, t, n) {
|
|
|
6599
6619
|
limitContentBySpace: e.limitContentBySpace
|
|
6600
6620
|
}, {
|
|
6601
6621
|
default: () => {
|
|
6602
|
-
var s,
|
|
6603
|
-
return [(
|
|
6622
|
+
var s, u;
|
|
6623
|
+
return [(u = (s = t.slots).default) == null ? void 0 : u.call(s)];
|
|
6604
6624
|
}
|
|
6605
6625
|
});
|
|
6606
6626
|
}
|
|
@@ -6609,49 +6629,49 @@ const Eo = /* @__PURE__ */ G({
|
|
|
6609
6629
|
props: ro,
|
|
6610
6630
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue"],
|
|
6611
6631
|
setup(e, t) {
|
|
6612
|
-
const n =
|
|
6632
|
+
const n = c(), a = c(e.customClass), o = c(e.modelValue), l = To(e, t, n, o), {
|
|
6613
6633
|
shouldPopupContent: i,
|
|
6614
6634
|
hidePopup: s,
|
|
6615
|
-
showPopup:
|
|
6616
|
-
togglePopup:
|
|
6617
|
-
} = l,
|
|
6618
|
-
hasFocusedTextBox:
|
|
6619
|
-
commitValue:
|
|
6620
|
-
inputGroupClass:
|
|
6621
|
-
} =
|
|
6622
|
-
onMouseEnterTextBox:
|
|
6623
|
-
onMouseLeaveTextBox:
|
|
6624
|
-
} =
|
|
6635
|
+
showPopup: u,
|
|
6636
|
+
togglePopup: f
|
|
6637
|
+
} = l, k = wo(e, t, n, l, o), b = c(""), h = Fo(e, t, o, b, l), {
|
|
6638
|
+
hasFocusedTextBox: F,
|
|
6639
|
+
commitValue: w,
|
|
6640
|
+
inputGroupClass: m
|
|
6641
|
+
} = h, r = xo(e, t, o, F, b, h), {
|
|
6642
|
+
onMouseEnterTextBox: p,
|
|
6643
|
+
onMouseLeaveTextBox: v
|
|
6644
|
+
} = r, x = c(!1), M = D(() => {
|
|
6625
6645
|
const j = {
|
|
6626
6646
|
"f-button-edit": !0,
|
|
6627
6647
|
"f-cmp-inputgroup": !0,
|
|
6628
6648
|
"f-button-edit-nowrap": !e.wrapText
|
|
6629
6649
|
};
|
|
6630
|
-
return a.value && a.value.split(" ").reduce((
|
|
6631
|
-
}),
|
|
6650
|
+
return a.value && a.value.split(" ").reduce((H, B) => (H[B] = !0, H), j), j;
|
|
6651
|
+
}), d = D(() => ({
|
|
6632
6652
|
overflow: e.wrapText ? "hidden" : ""
|
|
6633
|
-
})),
|
|
6653
|
+
})), g = D(() => ({
|
|
6634
6654
|
// paddingLeft: '3px',
|
|
6635
6655
|
// backgroundColor: '#fff'
|
|
6636
6656
|
}));
|
|
6637
|
-
function
|
|
6657
|
+
function C() {
|
|
6638
6658
|
if (!e.multiSelect || e.inputType !== "tag" || !n.value)
|
|
6639
6659
|
return 0;
|
|
6640
6660
|
let j = 0;
|
|
6641
|
-
const
|
|
6642
|
-
return
|
|
6661
|
+
const H = Array.from(n.value.querySelectorAll(".farris-tag-item"));
|
|
6662
|
+
return H && H.length && (j = H.map((B) => B.offsetTop).filter((B) => B > 20).length), j;
|
|
6643
6663
|
}
|
|
6644
|
-
const
|
|
6664
|
+
const O = c(C());
|
|
6645
6665
|
$t(() => {
|
|
6646
|
-
|
|
6666
|
+
O.value = C();
|
|
6647
6667
|
});
|
|
6648
6668
|
function z() {
|
|
6649
|
-
return e.multiSelect && e.inputType === "tag" ? () =>
|
|
6669
|
+
return e.multiSelect && e.inputType === "tag" ? () => y(re, null, [Mo(e, o, h)(), !!O.value && y("div", {
|
|
6650
6670
|
class: "d-flex flex-row mr-2 more-tags",
|
|
6651
6671
|
"more-tags": !0
|
|
6652
|
-
}, [
|
|
6672
|
+
}, [y("span", {
|
|
6653
6673
|
class: "multi--more-text"
|
|
6654
|
-
}, [me("+"),
|
|
6674
|
+
}, [me("+"), O.value])])]) : So(e, o, h);
|
|
6655
6675
|
}
|
|
6656
6676
|
let L = z();
|
|
6657
6677
|
W([() => e.multiSelect, () => e.inputType], () => {
|
|
@@ -6660,28 +6680,28 @@ const Eo = /* @__PURE__ */ G({
|
|
|
6660
6680
|
const {
|
|
6661
6681
|
renderButtonGroup: E,
|
|
6662
6682
|
buttonHandleElement: R
|
|
6663
|
-
} = Oo(e, t,
|
|
6664
|
-
displayText:
|
|
6665
|
-
commitValue:
|
|
6683
|
+
} = Oo(e, t, k, r), T = Bo(e, t, l), P = c(i.value), N = {
|
|
6684
|
+
displayText: b,
|
|
6685
|
+
commitValue: w,
|
|
6666
6686
|
elementRef: n,
|
|
6667
6687
|
hidePopup: s,
|
|
6668
|
-
showPopup:
|
|
6688
|
+
showPopup: u,
|
|
6669
6689
|
popoverRef: l.popoverRef,
|
|
6670
6690
|
shouldPopupContent: i,
|
|
6671
|
-
togglePopup:
|
|
6691
|
+
togglePopup: f,
|
|
6672
6692
|
openDialog: () => {
|
|
6673
6693
|
R.value && e.buttonBehavior === "Modal" && R.value.click();
|
|
6674
6694
|
},
|
|
6675
6695
|
getModal: () => {
|
|
6676
6696
|
var j;
|
|
6677
|
-
return e.buttonBehavior === "Modal" ? (j =
|
|
6697
|
+
return e.buttonBehavior === "Modal" ? (j = k.modalRef.value) == null ? void 0 : j.value : null;
|
|
6678
6698
|
},
|
|
6679
6699
|
getTextbox: () => {
|
|
6680
6700
|
var j;
|
|
6681
6701
|
return (j = n.value) == null ? void 0 : j.querySelector("input");
|
|
6682
6702
|
},
|
|
6683
6703
|
forceClosePopup: () => {
|
|
6684
|
-
P.value = !1,
|
|
6704
|
+
P.value = !1, x.value = !0, i.value = !1;
|
|
6685
6705
|
}
|
|
6686
6706
|
};
|
|
6687
6707
|
return K(() => {
|
|
@@ -6691,9 +6711,9 @@ const Eo = /* @__PURE__ */ G({
|
|
|
6691
6711
|
}), Ye(() => {
|
|
6692
6712
|
var j;
|
|
6693
6713
|
window.onresize = null, (j = window[ne]) == null || j.delete(n.value);
|
|
6694
|
-
}), t.expose(N), W(() => i.value, async (j,
|
|
6695
|
-
if (
|
|
6696
|
-
P.value = j,
|
|
6714
|
+
}), t.expose(N), W(() => i.value, async (j, H) => {
|
|
6715
|
+
if (x.value) {
|
|
6716
|
+
P.value = j, x.value = !1;
|
|
6697
6717
|
return;
|
|
6698
6718
|
}
|
|
6699
6719
|
if (!j && e.beforeClosePopup && typeof e.beforeClosePopup == "function") {
|
|
@@ -6701,25 +6721,25 @@ const Eo = /* @__PURE__ */ G({
|
|
|
6701
6721
|
const B = await e.beforeClosePopup();
|
|
6702
6722
|
P.value = !B, (!B || e.readonly) && (i.value = !0);
|
|
6703
6723
|
} catch (B) {
|
|
6704
|
-
console.error("Error in beforeClosePopup:", B), P.value =
|
|
6724
|
+
console.error("Error in beforeClosePopup:", B), P.value = H, i.value = H;
|
|
6705
6725
|
}
|
|
6706
6726
|
return;
|
|
6707
6727
|
}
|
|
6708
6728
|
P.value = j;
|
|
6709
6729
|
}), () => {
|
|
6710
|
-
var j,
|
|
6711
|
-
return
|
|
6730
|
+
var j, H;
|
|
6731
|
+
return y(re, null, [y("div", Ee(t.attrs, {
|
|
6712
6732
|
ref: n,
|
|
6713
|
-
class:
|
|
6733
|
+
class: M.value,
|
|
6714
6734
|
id: e.id ? e.id : void 0,
|
|
6715
|
-
style:
|
|
6716
|
-
}), [
|
|
6735
|
+
style: d.value
|
|
6736
|
+
}), [y("div", {
|
|
6717
6737
|
id: e.id ? `${e.id}-input-group` : void 0,
|
|
6718
|
-
class:
|
|
6719
|
-
style:
|
|
6720
|
-
onMouseenter:
|
|
6721
|
-
onMouseleave:
|
|
6722
|
-
}, [(
|
|
6738
|
+
class: m.value,
|
|
6739
|
+
style: g.value,
|
|
6740
|
+
onMouseenter: p,
|
|
6741
|
+
onMouseleave: v
|
|
6742
|
+
}, [(H = (j = t.slots).precontent) == null ? void 0 : H.call(j), L(), E()])]), P.value && T()]);
|
|
6723
6743
|
};
|
|
6724
6744
|
}
|
|
6725
6745
|
}), Do = "https://json-schema.org/draft/2020-12/schema", Po = "https://farris-design.gitee.io/expression-editor.schema.json", No = "expression-editor", Io = "A Farris Expression Editor Component", jo = "object", Ro = {
|
|
@@ -6949,79 +6969,79 @@ const Eo = /* @__PURE__ */ G({
|
|
|
6949
6969
|
props: Ao,
|
|
6950
6970
|
emits: ["close", "click"],
|
|
6951
6971
|
setup: (e, t) => {
|
|
6952
|
-
const n =
|
|
6953
|
-
const
|
|
6972
|
+
const n = c(e.animate), a = "fadeOut", o = D(() => e.options), l = c(!1), i = D(() => o.value.title && o.value.message), s = D(() => !o.value.title && o.value.message), u = D(() => {
|
|
6973
|
+
const v = {
|
|
6954
6974
|
animated: l.value,
|
|
6955
6975
|
toast: !0,
|
|
6956
6976
|
"toast--only-content": !i.value
|
|
6957
6977
|
};
|
|
6958
|
-
return
|
|
6959
|
-
}),
|
|
6960
|
-
const
|
|
6978
|
+
return v[e.animate] = !1, v[a] = l.value, v["toasty-type-" + o.value.type] = !0, o.value.theme && (v[o.value.theme] = !0), v;
|
|
6979
|
+
}), f = D(() => {
|
|
6980
|
+
const M = `f-icon-${o.value && o.value.type ? o.value.type.replace("toasty-type-", "") : "default"}`, d = {
|
|
6961
6981
|
"f-icon": !0
|
|
6962
6982
|
};
|
|
6963
|
-
return
|
|
6964
|
-
}),
|
|
6983
|
+
return d[M] = !0, d;
|
|
6984
|
+
}), k = D(() => o.value.title || o.value.message), b = D(() => e.showCloseButton), h = D(() => !!o.value.buttons || !!t.slots.default), F = D(() => Z.getLocale() === "en" ? {
|
|
6965
6985
|
wordBreak: "keep-all",
|
|
6966
6986
|
overflowWrap: "break-word"
|
|
6967
6987
|
} : {});
|
|
6968
|
-
function
|
|
6969
|
-
|
|
6988
|
+
function w(v) {
|
|
6989
|
+
v.stopPropagation(), v.preventDefault(), l.value = !1, setTimeout(() => {
|
|
6970
6990
|
t.emit("close", o.value);
|
|
6971
6991
|
}, 200);
|
|
6972
6992
|
}
|
|
6973
|
-
function
|
|
6993
|
+
function m(v, x) {
|
|
6974
6994
|
}
|
|
6975
|
-
function
|
|
6976
|
-
return `f-preten-link ${
|
|
6995
|
+
function r(v) {
|
|
6996
|
+
return `f-preten-link ${v.customClass ? v.customClass : ""}`;
|
|
6977
6997
|
}
|
|
6978
6998
|
W(n, () => {
|
|
6979
6999
|
n.value;
|
|
6980
7000
|
});
|
|
6981
|
-
const
|
|
6982
|
-
var
|
|
6983
|
-
return
|
|
7001
|
+
const p = () => {
|
|
7002
|
+
var v;
|
|
7003
|
+
return y(re, null, [y("div", {
|
|
6984
7004
|
class: "after-toast-msg text-right"
|
|
6985
|
-
}, [!t.slots.default && ((
|
|
6986
|
-
class:
|
|
6987
|
-
onClick: (
|
|
6988
|
-
}, [
|
|
7005
|
+
}, [!t.slots.default && ((v = o.value.buttons) == null ? void 0 : v.map((x) => y("span", {
|
|
7006
|
+
class: r(x),
|
|
7007
|
+
onClick: (M) => void 0
|
|
7008
|
+
}, [x.text]))), t.slots.default && t.slots.default()])]);
|
|
6989
7009
|
};
|
|
6990
|
-
return () =>
|
|
6991
|
-
class:
|
|
7010
|
+
return () => y("div", {
|
|
7011
|
+
class: u.value,
|
|
6992
7012
|
style: "min-height:44px"
|
|
6993
|
-
}, [
|
|
7013
|
+
}, [b.value && y("button", {
|
|
6994
7014
|
title: Z.getLocaleValue("messageBox.close"),
|
|
6995
7015
|
class: "toast-close f-btn-icon f-bare",
|
|
6996
|
-
onClick:
|
|
6997
|
-
}, [
|
|
7016
|
+
onClick: w
|
|
7017
|
+
}, [y("span", {
|
|
6998
7018
|
class: "f-icon modal_close"
|
|
6999
|
-
}, null)]),
|
|
7019
|
+
}, null)]), k.value && y("section", {
|
|
7000
7020
|
class: "modal-tips"
|
|
7001
|
-
}, [!i.value &&
|
|
7021
|
+
}, [!i.value && y("div", {
|
|
7002
7022
|
class: "float-left modal-tips-iconwrap"
|
|
7003
|
-
}, [
|
|
7004
|
-
class:
|
|
7005
|
-
}, null)]),
|
|
7023
|
+
}, [y("span", {
|
|
7024
|
+
class: f.value
|
|
7025
|
+
}, null)]), y("div", {
|
|
7006
7026
|
class: "modal-tips-content"
|
|
7007
|
-
}, [i.value &&
|
|
7027
|
+
}, [i.value && y(re, null, [y("h5", {
|
|
7008
7028
|
class: "toast-title modal-tips-title",
|
|
7009
7029
|
innerHTML: o.value.title
|
|
7010
|
-
}, null),
|
|
7030
|
+
}, null), y("p", {
|
|
7011
7031
|
class: "toast-msg",
|
|
7012
7032
|
innerHTML: o.value.message,
|
|
7013
|
-
style:
|
|
7014
|
-
}, null),
|
|
7033
|
+
style: F.value
|
|
7034
|
+
}, null), h.value && p()]), s.value && (o.value.buttons ? y("div", {
|
|
7015
7035
|
class: "toast-title-btns-wrapper d-flex"
|
|
7016
|
-
}, [
|
|
7036
|
+
}, [y("h5", {
|
|
7017
7037
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
7018
|
-
style:
|
|
7038
|
+
style: F.value,
|
|
7019
7039
|
innerHTML: o.value.message
|
|
7020
|
-
}, null),
|
|
7040
|
+
}, null), y("div", {
|
|
7021
7041
|
class: "after-toast-title text-right ml-auto"
|
|
7022
|
-
}, [
|
|
7042
|
+
}, [p()])]) : y("h5", {
|
|
7023
7043
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
7024
|
-
style:
|
|
7044
|
+
style: F.value,
|
|
7025
7045
|
innerHTML: o.value.message
|
|
7026
7046
|
}, null))])])]);
|
|
7027
7047
|
}
|
|
@@ -7037,38 +7057,38 @@ const Eo = /* @__PURE__ */ G({
|
|
|
7037
7057
|
right: 12,
|
|
7038
7058
|
top: 20,
|
|
7039
7059
|
bottom: 12
|
|
7040
|
-
}, o =
|
|
7041
|
-
const
|
|
7060
|
+
}, o = c(), l = c(e.options), i = c(e.showCloseButton), s = D(() => e.position || "bottom-right"), u = D(() => e.timeout != null ? e.timeout : 3e3), f = D(() => {
|
|
7061
|
+
const h = e.bottom ? e.bottom : a.bottom, F = e.top ? e.top : a.top, w = {
|
|
7042
7062
|
transition: "all 0.2s ease",
|
|
7043
7063
|
left: s.value.indexOf("left") > -1 ? `${e.left ? e.left : a.left}px` : "",
|
|
7044
7064
|
right: s.value.indexOf("right") > -1 ? `${e.right ? e.right : a.right}px` : "",
|
|
7045
|
-
top: s.value.indexOf("top") > -1 ? `${
|
|
7046
|
-
bottom: s.value.indexOf("bottom") > -1 ? `${
|
|
7065
|
+
top: s.value.indexOf("top") > -1 ? `${F}px` : "",
|
|
7066
|
+
bottom: s.value.indexOf("bottom") > -1 ? `${h}px` : ""
|
|
7047
7067
|
};
|
|
7048
|
-
return s.value.indexOf("center") > -1 && (
|
|
7068
|
+
return s.value.indexOf("center") > -1 && (w.left = "50%", w.marginLeft = "calc(-24rem / 2)", s.value === "center-center" && (w.top = "50%", w.transform = "translate(-50%, -50%)")), w;
|
|
7049
7069
|
});
|
|
7050
|
-
function h
|
|
7070
|
+
function k(h) {
|
|
7051
7071
|
t.emit("close");
|
|
7052
7072
|
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
},
|
|
7056
|
-
closeToast:
|
|
7073
|
+
u.value && setTimeout(() => {
|
|
7074
|
+
k();
|
|
7075
|
+
}, u.value), t.expose({
|
|
7076
|
+
closeToast: k,
|
|
7057
7077
|
container: o,
|
|
7058
7078
|
notifyPosition: s
|
|
7059
7079
|
});
|
|
7060
|
-
function
|
|
7061
|
-
|
|
7080
|
+
function b(h, F) {
|
|
7081
|
+
k();
|
|
7062
7082
|
}
|
|
7063
|
-
return () =>
|
|
7083
|
+
return () => y("div", {
|
|
7064
7084
|
class: n.value,
|
|
7065
|
-
style:
|
|
7085
|
+
style: f.value,
|
|
7066
7086
|
ref: o
|
|
7067
|
-
}, [
|
|
7087
|
+
}, [y(Oe, {
|
|
7068
7088
|
options: l.value,
|
|
7069
7089
|
showCloseButton: i.value,
|
|
7070
7090
|
animate: e.animate,
|
|
7071
|
-
onClose: (
|
|
7091
|
+
onClose: (h) => b(h, l.value)
|
|
7072
7092
|
}, null)]);
|
|
7073
7093
|
}
|
|
7074
7094
|
});
|
|
@@ -7095,33 +7115,33 @@ class $o {
|
|
|
7095
7115
|
l.style.display = "contents";
|
|
7096
7116
|
const i = Be({
|
|
7097
7117
|
setup() {
|
|
7098
|
-
var
|
|
7099
|
-
const s =
|
|
7100
|
-
function
|
|
7118
|
+
var f;
|
|
7119
|
+
const s = c();
|
|
7120
|
+
function u() {
|
|
7101
7121
|
s.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
7102
7122
|
n.updateNotifyPositionForClose(o, s), i.unmount();
|
|
7103
7123
|
}, 220);
|
|
7104
7124
|
}
|
|
7105
7125
|
if (o.position.indexOf("top") > -1) {
|
|
7106
|
-
const
|
|
7107
|
-
if (
|
|
7108
|
-
const
|
|
7109
|
-
o.top =
|
|
7126
|
+
const k = n.getNotifyInstances(o.position), b = k[k.length - 1];
|
|
7127
|
+
if (b) {
|
|
7128
|
+
const h = b.value.container.getBoundingClientRect();
|
|
7129
|
+
o.top = h.bottom;
|
|
7110
7130
|
}
|
|
7111
7131
|
}
|
|
7112
|
-
return o.safeHtml && ((
|
|
7132
|
+
return o.safeHtml && ((f = o.options) != null && f.message) && (o.options.message = n.escapeAllHtml(o.options.message)), ve(() => {
|
|
7113
7133
|
document.body.removeChild(l);
|
|
7114
7134
|
}), K(() => {
|
|
7115
7135
|
n.updateNotifyPositionForCreate(o, s);
|
|
7116
|
-
}), () =>
|
|
7136
|
+
}), () => y(Ue, {
|
|
7117
7137
|
mode: "out-in",
|
|
7118
7138
|
name: "fade",
|
|
7119
7139
|
appear: !0
|
|
7120
7140
|
}, {
|
|
7121
|
-
default: () => [
|
|
7141
|
+
default: () => [y(ye, Ee({
|
|
7122
7142
|
ref: s
|
|
7123
7143
|
}, o, {
|
|
7124
|
-
onClose:
|
|
7144
|
+
onClose: u
|
|
7125
7145
|
}), null)]
|
|
7126
7146
|
});
|
|
7127
7147
|
}
|
|
@@ -7157,14 +7177,14 @@ class $o {
|
|
|
7157
7177
|
buildNotifyProps(t, n) {
|
|
7158
7178
|
let a = "", o = "", l, i, s;
|
|
7159
7179
|
typeof n == "string" ? a = n : n && (a = n.message || "", o = n.title || "", i = n.position || null, s = n.showCloseButton != null ? n.showCloseButton : null, l = n.timeout != null ? n.timeout : null);
|
|
7160
|
-
const
|
|
7180
|
+
const f = {
|
|
7161
7181
|
options: {
|
|
7162
7182
|
type: t,
|
|
7163
7183
|
message: a,
|
|
7164
7184
|
title: o
|
|
7165
7185
|
}
|
|
7166
7186
|
};
|
|
7167
|
-
return i != null && (
|
|
7187
|
+
return i != null && (f.position = i), s != null && (f.showCloseButton = s), l != null && (f.timeout = l), f;
|
|
7168
7188
|
}
|
|
7169
7189
|
info(t) {
|
|
7170
7190
|
const n = this.buildNotifyProps("info", t);
|
|
@@ -7201,43 +7221,43 @@ const Se = /* @__PURE__ */ G({
|
|
|
7201
7221
|
name: "f-expression-textbox",
|
|
7202
7222
|
props: dt,
|
|
7203
7223
|
setup(e, t) {
|
|
7204
|
-
const n = _(ft), a = _("FLoadingService"), o = '<i class="f-icon f-icon-lookup"></i>', l =
|
|
7205
|
-
async function
|
|
7224
|
+
const n = _(ft), a = _("FLoadingService"), o = '<i class="f-icon f-icon-lookup"></i>', l = c(e.modelValue), i = c(e.entities), s = c(e.variables), u = c(), f = c(e.validateMessage || ""), k = c("info");
|
|
7225
|
+
async function b() {
|
|
7206
7226
|
const {
|
|
7207
|
-
value:
|
|
7208
|
-
message:
|
|
7209
|
-
messageType:
|
|
7210
|
-
} =
|
|
7211
|
-
if (
|
|
7212
|
-
const
|
|
7227
|
+
value: m,
|
|
7228
|
+
message: r,
|
|
7229
|
+
messageType: p
|
|
7230
|
+
} = u.value.getExpressionValue();
|
|
7231
|
+
if (f.value = r, k.value = p, e.beforeSubmit && typeof e.beforeSubmit == "function") {
|
|
7232
|
+
const v = await e.beforeSubmit({
|
|
7213
7233
|
notifyService: n,
|
|
7214
|
-
expressionValue:
|
|
7234
|
+
expressionValue: m
|
|
7215
7235
|
});
|
|
7216
|
-
if (typeof
|
|
7236
|
+
if (typeof v == "boolean" && !v)
|
|
7217
7237
|
return !1;
|
|
7218
|
-
if (typeof
|
|
7238
|
+
if (typeof v == "object") {
|
|
7219
7239
|
const {
|
|
7220
|
-
canClose:
|
|
7221
|
-
message:
|
|
7222
|
-
} =
|
|
7223
|
-
if (!
|
|
7224
|
-
return
|
|
7225
|
-
message:
|
|
7240
|
+
canClose: x,
|
|
7241
|
+
message: M
|
|
7242
|
+
} = v;
|
|
7243
|
+
if (!x)
|
|
7244
|
+
return M && (n == null || n.error({
|
|
7245
|
+
message: M
|
|
7226
7246
|
})), !1;
|
|
7227
7247
|
}
|
|
7228
7248
|
}
|
|
7229
|
-
if (t.emit("update:modelValue",
|
|
7230
|
-
const
|
|
7231
|
-
expression:
|
|
7232
|
-
message:
|
|
7249
|
+
if (t.emit("update:modelValue", m), l.value = m, e.onSubmitModal) {
|
|
7250
|
+
const v = {
|
|
7251
|
+
expression: m,
|
|
7252
|
+
message: r
|
|
7233
7253
|
};
|
|
7234
|
-
e.showMessageType && (
|
|
7235
|
-
const
|
|
7236
|
-
e.onExpressionChanged && e.onExpressionChanged(
|
|
7254
|
+
e.showMessageType && (v.messageType = k.value);
|
|
7255
|
+
const x = e.onSubmitModal(v);
|
|
7256
|
+
e.onExpressionChanged && e.onExpressionChanged(x);
|
|
7237
7257
|
}
|
|
7238
7258
|
return !0;
|
|
7239
7259
|
}
|
|
7240
|
-
const
|
|
7260
|
+
const h = {
|
|
7241
7261
|
title: e.dialogTitle || "表达式编辑器",
|
|
7242
7262
|
width: e.dialogWidth || 975,
|
|
7243
7263
|
height: e.dialogHeight || 600,
|
|
@@ -7252,31 +7272,31 @@ const Se = /* @__PURE__ */ G({
|
|
|
7252
7272
|
name: "reset",
|
|
7253
7273
|
text: "清空",
|
|
7254
7274
|
class: "btn btn-secondary mr-2",
|
|
7255
|
-
handle: (
|
|
7256
|
-
var
|
|
7257
|
-
return (
|
|
7275
|
+
handle: (m) => {
|
|
7276
|
+
var r;
|
|
7277
|
+
return (r = u.value) == null || r.resetExpression(), !1;
|
|
7258
7278
|
}
|
|
7259
7279
|
}, {
|
|
7260
7280
|
name: "cancel",
|
|
7261
7281
|
text: "取消",
|
|
7262
7282
|
class: "btn btn-secondary",
|
|
7263
|
-
handle: (
|
|
7283
|
+
handle: (m) => !0
|
|
7264
7284
|
}, {
|
|
7265
7285
|
name: "accept",
|
|
7266
7286
|
text: "确定",
|
|
7267
7287
|
class: "btn btn-primary",
|
|
7268
|
-
handle: async (
|
|
7288
|
+
handle: async (m) => await b()
|
|
7269
7289
|
}]
|
|
7270
7290
|
};
|
|
7271
|
-
async function
|
|
7291
|
+
async function F() {
|
|
7272
7292
|
if (e.beforeOpen)
|
|
7273
7293
|
try {
|
|
7274
7294
|
a == null || a.show();
|
|
7275
|
-
const
|
|
7295
|
+
const m = await e.beforeOpen({
|
|
7276
7296
|
notifyService: n
|
|
7277
7297
|
});
|
|
7278
|
-
if (
|
|
7279
|
-
return i.value =
|
|
7298
|
+
if (m)
|
|
7299
|
+
return i.value = m.entities || {}, s.value = m.variables || {}, f.value = m.message || "", k.value = m.messageType || "info", a == null || a.clearAll(), !0;
|
|
7280
7300
|
} catch {
|
|
7281
7301
|
return n == null || n.error({
|
|
7282
7302
|
message: "获取数据失败!"
|
|
@@ -7286,41 +7306,41 @@ const Se = /* @__PURE__ */ G({
|
|
|
7286
7306
|
}
|
|
7287
7307
|
return !0;
|
|
7288
7308
|
}
|
|
7289
|
-
function
|
|
7309
|
+
function w() {
|
|
7290
7310
|
if (t.emit("update:modelValue", ""), l.value = "", e.onSubmitModal) {
|
|
7291
|
-
const
|
|
7311
|
+
const m = e.onSubmitModal({
|
|
7292
7312
|
expression: "",
|
|
7293
7313
|
message: ""
|
|
7294
7314
|
});
|
|
7295
|
-
e.onExpressionChanged && e.onExpressionChanged(
|
|
7315
|
+
e.onExpressionChanged && e.onExpressionChanged(m);
|
|
7296
7316
|
}
|
|
7297
7317
|
}
|
|
7298
|
-
return W(() => e.modelValue, (
|
|
7299
|
-
l.value =
|
|
7300
|
-
}), () =>
|
|
7318
|
+
return W(() => e.modelValue, (m) => {
|
|
7319
|
+
l.value = m;
|
|
7320
|
+
}), () => y(Eo, {
|
|
7301
7321
|
editable: !1,
|
|
7302
7322
|
enableTitle: !0,
|
|
7303
7323
|
modelValue: l.value,
|
|
7304
|
-
"onUpdate:modelValue": (
|
|
7324
|
+
"onUpdate:modelValue": (m) => l.value = m,
|
|
7305
7325
|
disabled: e.disabled,
|
|
7306
7326
|
readonly: e.readonly,
|
|
7307
7327
|
inputType: "text",
|
|
7308
7328
|
enableClear: e.enableClear,
|
|
7309
7329
|
buttonContent: o,
|
|
7310
7330
|
buttonBehavior: "Modal",
|
|
7311
|
-
modalOptions:
|
|
7312
|
-
beforeOpen:
|
|
7313
|
-
onClear:
|
|
7331
|
+
modalOptions: h,
|
|
7332
|
+
beforeOpen: F,
|
|
7333
|
+
onClear: w
|
|
7314
7334
|
}, {
|
|
7315
|
-
default: () => [
|
|
7335
|
+
default: () => [y("div", {
|
|
7316
7336
|
class: "h-100 d-flex flex-column"
|
|
7317
|
-
}, [
|
|
7318
|
-
ref:
|
|
7319
|
-
validateMessage:
|
|
7337
|
+
}, [y(so, {
|
|
7338
|
+
ref: u,
|
|
7339
|
+
validateMessage: f.value,
|
|
7320
7340
|
showMessageType: e.showMessageType,
|
|
7321
|
-
messageType:
|
|
7341
|
+
messageType: k.value,
|
|
7322
7342
|
modelValue: l.value,
|
|
7323
|
-
"onUpdate:modelValue": (
|
|
7343
|
+
"onUpdate:modelValue": (m) => l.value = m,
|
|
7324
7344
|
esprimaPath: e.esprimaPath,
|
|
7325
7345
|
showMessage: e.showMessage,
|
|
7326
7346
|
entities: i.value,
|