UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,249 lines 213 kB
var wa = Object.defineProperty; var Sa = (e, t, n) => t in e ? wa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Xe = (e, t, n) => Sa(e, typeof t != "symbol" ? t + "" : t, n); import { ref as u, defineComponent as Re, computed as ee, watch as Se, createVNode as v, Fragment as mt, reactive as Xt, createApp as bn, onUnmounted as Ft, onMounted as Je, Transition as wn, mergeProps as dt, nextTick as vt, createTextVNode as Ge, inject as Te, withDirectives as Qt, resolveDirective as Jt, onBeforeMount as Sn, provide as bt, triggerRef as Fa, onBeforeUnmount as Fn, isVNode as Ta, watchEffect as Da, Teleport as Ea, shallowRef as Ba, render as Wt, h as Ma, cloneVNode as ka, withModifiers as Ia } from "vue"; import { isUndefined as tt, cloneDeep as on, mergeWith as xa, merge as yt, findIndex as fn } from "lodash-es"; import { LocaleService as Qe } from "../locale/index.esm.js"; import { getCustomClass as ot, withInstall as Oa, FormSchemaEntityField$Type as mn, FormSchemaEntityFieldTypeName as pn, useThirdComponent as Tn, isMobilePhone as Dn, getMaxZIndex as vn } from "../common/index.esm.js"; import { useResizeObserver as Pa } from "@vueuse/core"; import { getHierarchyRow as Na, useIdentify as La, useGroupData as Va, useFilter as ja, useHierarchy as Ra, useLoading as Aa, useDataView as za, useSelection as $a, useSelectHierarchyItem as Ha, usePagination as _a, useDataViewContainerStyle as Ua, useCommandColumn as qa, useSettingColumn as Wa, useColumn as Ga, useSort as Ka, useGroupColumn as Ya, useRow as Xa, useEdit as Qa, useVisualDataBound as Ja, useVisualDataCell as Za, useVisualDataRow as el, useVisualData as tl, useCellPosition as nl, useSidebar as ol, useVirtualScroll as al, useFitColumn as ll, useFilterHistory as rl, useColumnFilter as il, useDragColumn as sl, getColumnHeader as cl, getSidebar as ul, getDisableMask as dl, getHorizontalScrollbar as fl, getVerticalScrollbar as ml, getEmpty as pl, getPagination as vl, getSummary as gl, ColumnSettingSolution as hl, COMMAND_COLUMN_DATA_TYPE as Gt, SETTING_COLUMN_DATA_TYPE as Kt } from "../data-view/index.esm.js"; import yl from "../input-group/index.esm.js"; import Cl from "../button/index.esm.js"; import { resolveAppearance as En, createPropsResolver as Tt, schemaResolverMap as bl, propertyEffectMap as wl, propertyConfigSchemaMap as Sl, schemaMap as Fl, schemaResolverMapForDesigner as Bn, propertyEffectMapForDesigner as Mn, propertyConfigSchemaMapForDesigner as kn, schemaMapForDesigner as In, getSchemaByTypeForDesigner as xn } from "../dynamic-resolver/index.esm.js"; import { useDesignerComponent as Tl } from "../designer-canvas/index.esm.js"; import { loadRegister as Dl, useComponentManager as El, useBindingData as Bl, useEntityState as Ml, useDynamicViewUtils as kl, componentMap as Yt, resolverMap as Il, componentPropsConverter as xl } from "../dynamic-view/index.esm.js"; import Ol from "../section/index.esm.js"; import On from "../accordion/index.esm.js"; import Pn from "../avatar/index.esm.js"; import Nn from "../../designer/button-edit/index.esm.js"; import Ln from "../button-group/index.esm.js"; import Vn from "../calendar/index.esm.js"; import jn from "../../designer/capsule/index.esm.js"; import Zt from "../../designer/checkbox/index.esm.js"; import It from "../../designer/checkbox-group/index.esm.js"; import Rn from "../combo-list/index.esm.js"; import Pl from "../combo-tree/index.esm.js"; import An from "../component/index.esm.js"; import zn from "../color-picker/index.esm.js"; import $n from "../content-container/index.esm.js"; import Hn from "../../designer/date-picker/index.esm.js"; import _n from "../../designer/data-grid/index.esm.js"; import Un from "../dropdown/index.esm.js"; import qn from "../../designer/dynamic-form/index.esm.js"; import Nl from "../events-editor/index.esm.js"; import Wn from "../filter-bar/index.esm.js"; import Ll from "../field-selector/index.esm.js"; import Vl, { FBindingSelectorContainer as jl } from "../binding-selector/index.esm.js"; import Gn from "../image-cropper/index.esm.js"; import Kn from "../../designer/input-group/index.esm.js"; import Yn from "../layout/index.esm.js"; import Xn from "../list-nav/index.esm.js"; import Qn from "../../designer/list-view/index.esm.js"; import Jn from "../lookup/index.esm.js"; import Rl from "../mapping-editor/index.esm.js"; import Zn from "../nav/index.esm.js"; import eo from "../number-range/index.esm.js"; import to from "../../designer/number-spinner/index.esm.js"; import no from "../order/index.esm.js"; import oo from "../page-header/index.esm.js"; import ao from "../page-footer/index.esm.js"; import lo from "../pagination/index.esm.js"; import ro from "../progress/index.esm.js"; import io from "../query-solution/index.esm.js"; import so from "../../designer/radio-group/index.esm.js"; import co from "../../designer/rate/index.esm.js"; import uo from "../../designer/response-toolbar/index.esm.js"; import fo from "../response-layout/index.esm.js"; import mo from "../../designer/response-layout-editor/index.esm.js"; import po from "../search-box/index.esm.js"; import vo from "../../designer/section/index.esm.js"; import go from "../smoke-detector/index.esm.js"; import ho from "../splitter/index.esm.js"; import yo from "../step/index.esm.js"; import Co from "../../designer/switch/index.esm.js"; import bo from "../../designer/tabs/index.esm.js"; import wo from "../../designer/tags/index.esm.js"; import So from "../text/index.esm.js"; import Fo from "../../designer/time-picker/index.esm.js"; import To from "../transfer/index.esm.js"; import Do from "../tree-view/index.esm.js"; import Eo from "../uploader/index.esm.js"; import Bo from "../verify-detail/index.esm.js"; import Mo from "../video/index.esm.js"; import ko from "../../designer/textarea/index.esm.js"; import Al from "../schema-selector/index.esm.js"; import Io from "../../designer/tree-grid/index.esm.js"; import zl from "../event-parameter/index.esm.js"; import $l from "../filter-condition-editor/index.esm.js"; import xo from "../fieldset/index.esm.js"; import Hl from "../sort-condition-editor/index.esm.js"; import _l from "../menu-lookup/index.esm.js"; import Oo from "../../designer/drawer/index.esm.js"; import Ul from "../json-editor/index.esm.js"; import ql from "../property-editor/index.esm.js"; import Wl from "../expression-editor/index.esm.js"; import Gl from "../code-editor/index.esm.js"; import Po from "../html-template/index.esm.js"; import Kl from "../collection-property-editor/index.esm.js"; import Yl from "../../designer/modal/index.esm.js"; import No from "../external-container/index.esm.js"; import Lo from "../language-textbox/index.esm.js"; import Vo from "../image/index.esm.js"; import jo from "../comment/index.esm.js"; import "../property-panel/index.esm.js"; import { FNotifyService as Xl } from "../notify/index.esm.js"; const at = u(0); function Ql() { at.value++; } function Jl(e, t) { const n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), l = r.top >= n.top, a = r.top <= n.bottom; return l && a; } function Ro(e) { const t = e.querySelector(".component-btn-group"); if (!t) return; t.style.display = ""; const n = t.getBoundingClientRect(); if (!(n.top === 0 && n.left === 0)) { const r = t.querySelector("div"); if (r) { const l = r.getBoundingClientRect(); r.style.top = n.top + "px"; let a = n.left - l.width; const i = document.querySelector(".editorDiv"); if (i) { const c = i.getBoundingClientRect(); a < c.left && ({ left: a } = e.getBoundingClientRect()); } r.style.left = a + "px"; } } } function Ao(e) { var n, r, l, a, i; if (!window.scrollContainerList) return; const t = Array.from(window.scrollContainerList); if (t.length) if (t.length === 1) { const c = t[0], g = document.querySelector(`[id=${c}]`); if (g && g.contains(e)) return g; } else { const { componentInstance: c } = e; if (((n = c == null ? void 0 : c.value) == null ? void 0 : n.scrollElementId) === ((r = c == null ? void 0 : c.value.schema) == null ? void 0 : r.id)) return e; if (((l = c == null ? void 0 : c.value) == null ? void 0 : l.scrollElementId) === `${(a = c == null ? void 0 : c.value.schema) == null ? void 0 : a.id}-design-item`) return e.parentElement; if ((i = c.value.parent) != null && i.elementRef) return Ao(c.value.parent.elementRef); } } function an(e) { if (!e) return; const t = e.getBoundingClientRect(); if (t.width === 0 && t.height === 0) return; const n = e.querySelector(".component-btn-group"); if (n) { let r = !0; const l = Ao(e); if (l && (r = Jl(e, l)), !r) { n.style.display = "none"; return; } Ro(e); } } function wt(e) { if (!e) return; let t; e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && an(t); } function oc() { const e = document.querySelector(".dgComponentSelected"); if (!e) return; const t = e.querySelector(".component-btn-group"); t && t.getBoundingClientRect().top !== 0 && Ro(e); } const Zl = { /** * 组件值 */ modelValue: { type: Object, default: {} }, componentId: { type: String, default: "" }, components: { type: Array }, canvasMode: { type: String, default: "PC" } }; var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function er(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function Bt(e) { throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var zo = { exports: {} }; (function(e, t) { (function(n) { e.exports = n(); })(function() { return (/* @__PURE__ */ function() { function n(r, l, a) { function i(d, y) { if (!l[d]) { if (!r[d]) { var m = typeof Bt == "function" && Bt; if (!y && m) return m(d, !0); if (c) return c(d, !0); var F = new Error("Cannot find module '" + d + "'"); throw F.code = "MODULE_NOT_FOUND", F; } var o = l[d] = { exports: {} }; r[d][0].call(o.exports, function(s) { var B = r[d][1][s]; return i(B || s); }, o, o.exports, n, r, l, a); } return l[d].exports; } for (var c = typeof Bt == "function" && Bt, g = 0; g < a.length; g++) i(a[g]); return i; } return n; }())({ 1: [function(n, r, l) { var a = {}, i = "(?:^|\\s)", c = "(?:\\s|$)"; function g(m) { var F = a[m]; return F ? F.lastIndex = 0 : a[m] = F = new RegExp(i + m + c, "g"), F; } function d(m, F) { var o = m.className; o.length ? g(F).test(o) || (m.className += " " + F) : m.className = F; } function y(m, F) { m.className = m.className.replace(g(F), " ").trim(); } r.exports = { add: d, rm: y }; }, {}], 2: [function(n, r, l) { (function(a) { var i = n("contra/emitter"), c = n("crossvent"), g = n("./classes"), d = document, y = d.documentElement; function m(C, b) { var $ = arguments.length; $ === 1 && Array.isArray(C) === !1 && (b = C, C = []); var V, _, x, U, j, A, I, L, H, ae = null, ue, X, Pe = !1, be = 0, me, J = b || {}; J.moves === void 0 && (J.moves = M), J.accepts === void 0 && (J.accepts = M), J.invalid === void 0 && (J.invalid = lt), J.containers === void 0 && (J.containers = C || []), J.isContainer === void 0 && (J.isContainer = E), J.copy === void 0 && (J.copy = !1), J.copySortSource === void 0 && (J.copySortSource = !1), J.revertOnSpill === void 0 && (J.revertOnSpill = !1), J.removeOnSpill === void 0 && (J.removeOnSpill = !1), J.direction === void 0 && (J.direction = "vertical"), J.ignoreInputTextSelection === void 0 && (J.ignoreInputTextSelection = !0), J.mirrorContainer === void 0 && (J.mirrorContainer = d.body); var w = i({ containers: J.containers, start: Le, end: rt, cancel: Ze, remove: ct, destroy: Ee, canMove: Ie, dragging: !1 }); return J.removeOnSpill === !0 && w.on("over", Nt).on("out", Lt), le(), w; function re(O) { return w.containers.indexOf(O) !== -1 || J.isContainer(O); } function le(O) { var G = O ? "remove" : "add"; s(y, G, "mousedown", Ne), s(y, G, "mouseup", it); } function se(O) { var G = O ? "remove" : "add"; s(y, G, "mousemove", De); } function fe(O) { var G = O ? "remove" : "add"; c[G](y, "selectstart", Me), c[G](y, "click", Me); } function Ee() { le(!0), it({}); } function Me(O) { ue && O.preventDefault(); } function Ne(O) { U = O.clientX, j = O.clientY; var G = B(O) !== 1 || O.metaKey || O.ctrlKey; if (!G) { var Q = O.target, ie = ke(Q); ie && (ue = ie, se(), O.type === "mousedown" && (k(Q) ? Q.focus() : O.preventDefault())); } } function De(O) { if (ue) { if (B(O) === 0) { it({}); return; } if (!(O.clientX !== void 0 && Math.abs(O.clientX - U) <= (J.slideFactorX || 0) && O.clientY !== void 0 && Math.abs(O.clientY - j) <= (J.slideFactorY || 0))) { if (J.ignoreInputTextSelection) { var G = h("clientX", O) || 0, Q = h("clientY", O) || 0, ie = d.elementFromPoint(G, Q); if (k(ie)) return; } var ve = ue; se(!0), fe(), rt(), Ve(ve), g.add(L || x, "gu-transit"), jt(), Vt(), be = 0, we(O); } } } function ke(O) { if (!(w.dragging && V) && !re(O)) { for (var G = O; f(O) && re(f(O)) === !1; ) if (J.invalid(O, G) || (O = f(O), !O)) return; var Q = f(O); if (Q && !J.invalid(O, G)) { var ie = J.moves(O, Q, G, D(O)); if (ie) return { item: O, source: Q }; } } } function Ie(O) { return !!ke(O); } function Le(O) { var G = ke(O); G && Ve(G); } function Ve(O) { qt(O.item, O.source) && (L = O.item.cloneNode(!0), w.emit("cloned", L, O.item, "copy")), _ = O.source, x = O.item, A = I = D(O.item), w.dragging = !0, w.emit("drag", x, _); } function lt() { return !1; } function rt() { if (w.dragging) { var O = L || x; st(O, f(O)); } } function Be() { ue = !1, se(!0), fe(!0); } function it(O) { if (Be(), !!w.dragging) { var G = L || x, Q = h("clientX", O) || 0, ie = h("clientY", O) || 0, ve = P(V, Q, ie), he = Fe(ve, Q, ie); he && (L && J.copySortSource || !L || he !== _) ? st(G, he) : J.removeOnSpill ? ct() : Ze(); } } function st(O, G) { var Q = f(O); L && J.copySortSource && G === _ && Q.removeChild(x), ce(G) ? w.emit("cancel", O, _) : w.emit("drop", O, G, _, I), R(); } function ct() { if (w.dragging) { var O = L || x, G = f(O); G && G.removeChild(O), w.emit(L ? "cancel" : "remove", O, G, _), R(); } } function Ze(O) { if (w.dragging) { var G = arguments.length > 0 ? O : J.revertOnSpill, Q = L || x, ie = f(Q), ve = ce(ie); ve === !1 && G && (L ? ie && ie.removeChild(L) : _.insertBefore(Q, A)), ve || G ? w.emit("cancel", Q, _, _) : w.emit("drop", Q, ie, _, I), R(); } } function R() { var O = L || x; Be(), Rt(), At(), O && g.rm(O, "gu-transit"), H && clearTimeout(H), w.dragging = !1, ae && w.emit("out", O, ae, _), w.emit("dragend", O, be), _ = x = L = A = I = H = ae = null; } function ce(O, G) { var Q; return G !== void 0 ? Q = G : V ? Q = I : Q = D(L || x), O === _ && Q === A; } function Fe(O, G, Q) { for (var ie = O; ie && !ve(); ) ie = f(ie); return ie; function ve() { var he = re(ie); if (he === !1) return !1; var Ke = Dt(ie, O), $e = Et(ie, Ke, G, Q), Ue = ce(ie, $e); return Ue ? !0 : J.accepts(x, ie, _, $e); } } function we(O) { if (!V) return; O.preventDefault(); var G = h("clientX", O) || 0, Q = h("clientY", O) || 0; V.style.left = G - 2 + "px", V.style.top = Q - 2 + "px"; var ie = L || x, ve = P(V, G, Q), he = Fe(ve, G, Q), Ke = he !== null && he !== ae; (Ke || he === null) && (_e(), ae = he, qe()), Ut(ve, Q); var $e = f(ie); if (he === _ && L && !J.copySortSource) { $e && $e.removeChild(ie); return; } var Ue, He = Dt(he, ve); if (Pe = zt(He, he), He !== null) Ue = Et(he, He, G, Q); else if (J.revertOnSpill === !0 && !L) Ue = A, he = _; else { L && $e && $e.removeChild(ie), L && X && (X.style.display = "none"); return; } X.style.display = "block", ze(Ue, ie, Ke), Ue ? Ht(He, Ue) : _t(he); function je(Ae) { w.emit(Ae, ie, ae, _); } function qe() { Ke && je("over"); } function _e() { ae && je("out"); } } function ze(O, G, Q) { (O === G || O === D(G)) && (I = D(G)), (O === null && Q || O !== G && O !== D(G)) && (I = O); } function Nt(O) { g.rm(O, "gu-hide"); } function Lt(O) { w.dragging && g.add(O, "gu-hide"); } function Vt() { V || (V = document.createElement("div"), V.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", V.innerHTML = J.getMirrorText && J.getMirrorText(x) || "控件", g.add(V, "gu-mirror"), J.mirrorContainer.appendChild(V), s(y, "add", "mousemove", we), g.add(J.mirrorContainer, "gu-unselectable"), w.emit("cloned", V, x, "mirror")); } function jt() { if (X = document.createElement("div"), g.add(X, "gu-insertion"), x) { var O = x.getBoundingClientRect(); X.style.left = O.left + "px", X.style.top = O.top + "px"; } Pe = !1, J.mirrorContainer.appendChild(X); } function Rt() { V && (g.rm(J.mirrorContainer, "gu-unselectable"), s(y, "remove", "mousemove", we), f(V).removeChild(V), V = null); } function At() { X && (f(X).removeChild(X), X = null); } function Dt(O, G) { for (var Q = G; Q !== O && f(Q) !== O; ) Q = f(Q); return Q === y ? null : Q; } function zt(O, G) { if (!G) return Pe; var Q = O || G && G.lastElementChild; if (!Q) return !0; var ie = getComputedStyle(O), ve = /^inline/.test(ie.getPropertyValue("display")) || /^(left|right)$/.test(ie.getPropertyValue("float")); if (ve) return !0; if (G) { var he = getComputedStyle(G), Ke = he.getPropertyValue("display"); if (/flex$/.test(Ke)) { var $e = he.getPropertyValue("flex-direction") || "row"; if ($e === "row" || $e === "row-reverse") return !$t(G); } return !1; } return !0; } function $t(O) { if (!O.children || !O.children.length) return !1; for (const G of Array.from(O.children)) { const ie = (G.className && G.className.split(" ") || []).filter((ve) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ve)); if (!ie.length) return !1; for (const ve of ie) { const he = ve.slice(ve.lastIndexOf("-") + 1); if (parseInt(he, 10) !== 12) return !1; } } return !0; } function Ht(O, G) { const Q = G.getBoundingClientRect(); if (X.style.left = Q.left + "px", X.style.top = Q.top + "px", Pe) { if (X.style.height = Q.height + "px", X.style.width = "4px", O) { const ie = O.getBoundingClientRect(); ie.top !== Q.top && (X.style.left = ie.right + "px", X.style.top = ie.top + "px", X.style.height = ie.height + "px"); } } else if (X.style.height = "4px", X.style.width = Q.width + "px", me) { const ie = me.getBoundingClientRect(); Q.top < ie.top && (X.style.display = "none"); } G === x && x && (X.style.display = "none"); } function _t(O) { I = null; var G = O.lastElementChild; if (G) { var Q = G.getBoundingClientRect(); Pe ? (X.style.left = Q.right + "px", X.style.top = Q.top + "px", X.style.height = Q.height + "px", X.style.width = "4px") : (X.style.left = Q.left + "px", X.style.top = Q.bottom + "px", X.style.height = "4px", X.style.width = Q.width + "px"), G === x && x && (X.style.display = "none"); } else X.style.display = "none"; } function Ut(O, G) { if (!J.mirrorContainer.contains(O) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (me = F(O), !me || !me.contains(O))) return; const Q = document.querySelector(".dgComponentSelected"), ie = me.getBoundingClientRect(); if (G - 30 < ie.top && me.scrollTop > 0) { let ve = me.scrollTop < 10 ? me.scrollTop : 10; me.scrollBy(0, -1 * ve), Q && me.contains(Q) && (be = be + -1 * ve); } if (G + 30 > ie.bottom && me.scrollTop < me.scrollHeight - me.clientHeight) { const ve = me.scrollHeight - me.clientHeight - me.scrollTop; let he = ve < 10 ? ve : 10; me.scrollBy(0, he), Q && me.contains(Q) && (be = be + he); } } function Et(O, G, Q, ie) { var ve = J.direction === "horizontal", he = J.direction === "mixed", Ke = G !== O ? Ue() : $e(); return Ke; function $e() { var je = O.children.length, qe, _e, Ae; for (qe = 0; qe < je; qe++) if (_e = O.children[qe], Ae = _e.getBoundingClientRect(), ve && Ae.left + Ae.width / 2 > Q || !he && !ve && Ae.top + Ae.height / 2 > ie || he && Ae.left + Ae.width > Q && Ae.top + Ae.height > ie) return _e; return null; } function Ue() { var je = G.getBoundingClientRect(); if (he) { var qe = ie - je.top, _e = Q - je.left, Ae = je.bottom - ie, gt = je.right - Q, ht = Math.min(_e, gt, qe, Ae), pt; return Pe ? pt = gt < _e : pt = Ae === ht || gt === ht || _e === ht, He(pt); } return He(ve ? Q > je.left + N(je) / 2 : ie > je.top + p(je) / 2); } function He(je) { return je ? D(G) : G; } } function qt(O, G) { return typeof J.copy == "boolean" ? J.copy : J.copy(O, G); } } function F(C) { const b = Array.from(window.scrollContainerList); if (b.length === 1) { const V = Array.from(window.scrollContainerList)[0]; return document.getElementById(V); } const $ = o(b); for (const V of $) if (V.contains(C)) return V; return null; } function o(C) { const b = []; return C.forEach(($) => { const V = document.getElementById($); V && b.push(V); }), b.sort(($, V) => $.contains(V) ? 1 : V.contains($) ? -1 : 0), b; } function s(C, b, $, V) { var _ = { mouseup: "touchend", mousedown: "touchstart", mousemove: "touchmove" }, x = { mouseup: "pointerup", mousedown: "pointerdown", mousemove: "pointermove" }, U = { mouseup: "MSPointerUp", mousedown: "MSPointerDown", mousemove: "MSPointerMove" }; a.navigator.pointerEnabled ? c[b](C, x[$], V) : a.navigator.msPointerEnabled ? c[b](C, U[$], V) : (c[b](C, _[$], V), c[b](C, $, V)); } function B(C) { if (C.touches !== void 0) return C.touches.length; if (C.which !== void 0 && C.which !== 0) return C.which; if (C.buttons !== void 0) return C.buttons; var b = C.button; if (b !== void 0) return b & 1 ? 1 : b & 2 ? 3 : b & 4 ? 2 : 0; } function P(C, b, $) { C = C || {}; var V = C.className || "", _; return C.className += " gu-hide", _ = d.elementFromPoint(b, $), C.className = V, _; } function E() { return !1; } function M() { return !0; } function N(C) { return C.width || C.right - C.left; } function p(C) { return C.height || C.bottom - C.top; } function f(C) { return C.parentNode === d ? null : C.parentNode; } function k(C) { return C.tagName === "INPUT" || C.tagName === "TEXTAREA" || C.tagName === "SELECT" || T(C); } function T(C) { return !C || C.contentEditable === "false" ? !1 : C.contentEditable === "true" ? !0 : T(f(C)); } function D(C) { return C.nextElementSibling || b(); function b() { var $ = C; do $ = $.nextSibling; while ($ && $.nodeType !== 1); return $; } } function S(C) { return C.targetTouches && C.targetTouches.length ? C.targetTouches[0] : C.changedTouches && C.changedTouches.length ? C.changedTouches[0] : C; } function h(C, b) { var $ = S(b), V = { pageX: "clientX", // IE8 pageY: "clientY" // IE8 }; return C in V && !(C in $) && V[C] in $ && (C = V[C]), $[C]; } r.exports = m; }).call(this, typeof nt < "u" ? nt : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }], 3: [function(n, r, l) { r.exports = function(i, c) { return Array.prototype.slice.call(i, c); }; }, {}], 4: [function(n, r, l) { var a = n("ticky"); r.exports = function(c, g, d) { c && a(function() { c.apply(d || null, g || []); }); }; }, { ticky: 10 }], 5: [function(n, r, l) { var a = n("atoa"), i = n("./debounce"); r.exports = function(g, d) { var y = d || {}, m = {}; return g === void 0 && (g = {}), g.on = function(F, o) { return m[F] ? m[F].push(o) : m[F] = [o], g; }, g.once = function(F, o) { return o._once = !0, g.on(F, o), g; }, g.off = function(F, o) { var s = arguments.length; if (s === 1) delete m[F]; else if (s === 0) m = {}; else { var B = m[F]; if (!B) return g; B.splice(B.indexOf(o), 1); } return g; }, g.emit = function() { var F = a(arguments); return g.emitterSnapshot(F.shift()).apply(this, F); }, g.emitterSnapshot = function(F) { var o = (m[F] || []).slice(0); return function() { var s = a(arguments), B = this || g; if (F === "error" && y.throws !== !1 && !o.length) throw s.length === 1 ? s[0] : s; return o.forEach(function(E) { y.async ? i(E, s, B) : E.apply(B, s), E._once && g.off(F, E); }), g; }; }, g; }; }, { "./debounce": 4, atoa: 3 }], 6: [function(n, r, l) { (function(a) { var i = n("custom-event"), c = n("./eventmap"), g = a.document, d = F, y = s, m = []; a.addEventListener || (d = o, y = B), r.exports = { add: d, remove: y, fabricate: P }; function F(f, k, T, D) { return f.addEventListener(k, T, D); } function o(f, k, T) { return f.attachEvent("on" + k, M(f, k, T)); } function s(f, k, T, D) { return f.removeEventListener(k, T, D); } function B(f, k, T) { var D = N(f, k, T); if (D) return f.detachEvent("on" + k, D); } function P(f, k, T) { var D = c.indexOf(k) === -1 ? h() : S(); f.dispatchEvent ? f.dispatchEvent(D) : f.fireEvent("on" + k, D); function S() { var C; return g.createEvent ? (C = g.createEvent("Event"), C.initEvent(k, !0, !0)) : g.createEventObject && (C = g.createEventObject()), C; } function h() { return new i(k, { detail: T }); } } function E(f, k, T) { return function(S) { var h = S || a.event; h.target = h.target || h.srcElement, h.preventDefault = h.preventDefault || function() { h.returnValue = !1; }, h.stopPropagation = h.stopPropagation || function() { h.cancelBubble = !0; }, h.which = h.which || h.keyCode, T.call(f, h); }; } function M(f, k, T) { var D = N(f, k, T) || E(f, k, T); return m.push({ wrapper: D, element: f, type: k, fn: T }), D; } function N(f, k, T) { var D = p(f, k, T); if (D) { var S = m[D].wrapper; return m.splice(D, 1), S; } } function p(f, k, T) { var D, S; for (D = 0; D < m.length; D++) if (S = m[D], S.element === f && S.type === k && S.fn === T) return D; } }).call(this, typeof nt < "u" ? nt : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, { "./eventmap": 7, "custom-event": 8 }], 7: [function(n, r, l) { (function(a) { var i = [], c = "", g = /^on/; for (c in a) g.test(c) && i.push(c.slice(2)); r.exports = i; }).call(this, typeof nt < "u" ? nt : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, {}], 8: [function(n, r, l) { (function(a) { var i = a.CustomEvent; function c() { try { var g = new i("cat", { detail: { foo: "bar" } }); return g.type === "cat" && g.detail.foo === "bar"; } catch { } return !1; } r.exports = c() ? i : ( // IE >= 9 typeof document < "u" && typeof document.createEvent == "function" ? function(d, y) { var m = document.createEvent("CustomEvent"); return y ? m.initCustomEvent(d, y.bubbles, y.cancelable, y.detail) : m.initCustomEvent(d, !1, !1, void 0), m; } : ( // IE <= 8 function(d, y) { var m = document.createEventObject(); return m.type = d, y ? (m.bubbles = !!y.bubbles, m.cancelable = !!y.cancelable, m.detail = y.detail) : (m.bubbles = !1, m.cancelable = !1, m.detail = void 0), m; } ) ); }).call(this, typeof nt < "u" ? nt : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, {}], 9: [function(n, r, l) { var a = r.exports = {}, i, c; function g() { throw new Error("setTimeout has not been defined"); } function d() { throw new Error("clearTimeout has not been defined"); } (function() { try { typeof setTimeout == "function" ? i = setTimeout : i = g; } catch { i = g; } try { typeof clearTimeout == "function" ? c = clearTimeout : c = d; } catch { c = d; } })(); function y(p) { if (i === setTimeout) return setTimeout(p, 0); if ((i === g || !i) && setTimeout) return i = setTimeout, setTimeout(p, 0); try { return i(p, 0); } catch { try { return i.call(null, p, 0); } catch { return i.call(this, p, 0); } } } function m(p) { if (c === clearTimeout) return clearTimeout(p); if ((c === d || !c) && clearTimeout) return c = clearTimeout, clearTimeout(p); try { return c(p); } catch { try { return c.call(null, p); } catch { return c.call(this, p); } } } var F = [], o = !1, s, B = -1; function P() { !o || !s || (o = !1, s.length ? F = s.concat(F) : B = -1, F.length && E()); } function E() { if (!o) { var p = y(P); o = !0; for (var f = F.length; f; ) { for (s = F, F = []; ++B < f; ) s && s[B].run(); B = -1, f = F.length; } s = null, o = !1, m(p); } } a.nextTick = function(p) { var f = new Array(arguments.length - 1); if (arguments.length > 1) for (var k = 1; k < arguments.length; k++) f[k - 1] = arguments[k]; F.push(new M(p, f)), F.length === 1 && !o && y(E); }; function M(p, f) { this.fun = p, this.array = f; } M.prototype.run = function() { this.fun.apply(null, this.array); }, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "", a.versions = {}; function N() { } a.on = N, a.addListener = N, a.once = N, a.off = N, a.removeListener = N, a.removeAllListeners = N, a.emit = N, a.prependListener = N, a.prependOnceListener = N, a.listeners = function(p) { return []; }, a.binding = function(p) { throw new Error("process.binding is not supported"); }, a.cwd = function() { return "/"; }, a.chdir = function(p) { throw new Error("process.chdir is not supported"); }, a.umask = function() { return 0; }; }, {}], 10: [function(n, r, l) { (function(a) { var i = typeof a == "function", c; i ? c = function(g) { a(g); } : c = function(g) { setTimeout(g, 0); }, r.exports = c; }).call(this, n("timers").setImmediate); }, { timers: 11 }], 11: [function(n, r, l) { (function(a, i) { var c = n("process/browser.js").nextTick, g = Function.prototype.apply, d = Array.prototype.slice, y = {}, m = 0; l.setTimeout = function() { return new F(g.call(setTimeout, window, arguments), clearTimeout); }, l.setInterval = function() { return new F(g.call(setInterval, window, arguments), clearInterval); }, l.clearTimeout = l.clearInterval = function(o) { o.close(); }; function F(o, s) { this._id = o, this._clearFn = s; } F.prototype.unref = F.prototype.ref = function() { }, F.prototype.close = function() { this._clearFn.call(window, this._id); }, l.enroll = function(o, s) { clearTimeout(o._idleTimeoutId), o._idleTimeout = s; }, l.unenroll = function(o) { clearTimeout(o._idleTimeoutId), o._idleTimeout = -1; }, l._unrefActive = l.active = function(o) { clearTimeout(o._idleTimeoutId); var s = o._idleTimeout; s >= 0 && (o._idleTimeoutId = setTimeout(function() { o._onTimeout && o._onTimeout(); }, s)); }, l.setImmediate = typeof a == "function" ? a : function(o) { var s = m++, B = arguments.length < 2 ? !1 : d.call(arguments, 1); return y[s] = !0, c(function() { y[s] && (B ? o.apply(null, B) : o.call(null), l.clearImmediate(s)); }), s; }, l.clearImmediate = typeof i == "function" ? i : function(o) { delete y[o]; }; }).call(this, n("timers").setImmediate, n("timers").clearImmediate); }, { "process/browser.js": 9, timers: 11 }] }, {}, [2])(2); }); })(zo); var tr = zo.exports; const gn = /* @__PURE__ */ er(tr), nr = { showCloseButton: { type: Boolean, default: !0 }, position: { type: String, default: "top-center" }, timeout: { type: Number, default: 3e3 }, theme: { type: String, default: "bootstrap" }, left: { type: Number }, right: { type: Number }, top: { type: Number }, bottom: { type: Number }, id: { type: String }, animate: { type: String, default: "fadeIn" }, options: { type: Object }, safeHtml: { type: Boolean, default: !0 } }, or = { showCloseButton: { type: Boolean, default: !0 }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, en = /* @__PURE__ */ Re({ name: "Toast", props: or, emits: ["close", "click"], setup: (e, t) => { const n = u(e.animate), r = "fadeOut", l = ee(() => e.options), a = u(!1), i = ee(() => l.value.title && l.value.message), c = ee(() => !l.value.title && l.value.message), g = ee(() => { const M = { animated: a.value, toast: !0, "toast--only-content": !i.value }; return M[e.animate] = !1, M[r] = a.value, M["toasty-type-" + l.value.type] = !0, l.value.theme && (M[l.value.theme] = !0), M; }), d = ee(() => { const p = `f-icon-${l.value && l.value.type ? l.value.type.replace("toasty-type-", "") : "default"}`, f = { "f-icon": !0 }; return f[p] = !0, f; }), y = ee(() => l.value.title || l.value.message), m = ee(() => e.showCloseButton), F = ee(() => !!l.value.buttons || !!t.slots.default), o = ee(() => Qe.getLocale() === "en" ? { wordBreak: "keep-all", overflowWrap: "break-word" } : {}); function s(M) { M.stopPropagation(), M.preventDefault(), a.value = !1, setTimeout(() => { t.emit("close", l.value); }, 200); } function B(M, N) { } function P(M) { return `f-preten-link ${M.customClass ? M.customClass : ""}`; } Se(n, () => { n.value; }); const E = () => { var M; return v(mt, null, [v("div", { class: "after-toast-msg text-right" }, [!t.slots.default && ((M = l.value.buttons) == null ? void 0 : M.map((N) => v("span", { class: P(N), onClick: (p) => void 0 }, [N.text]))), t.slots.default && t.slots.default()])]); }; return () => v("div", { class: g.value, style: "min-height:44px" }, [m.value && v("button", { title: Qe.getLocaleValue("messageBox.close"), class: "toast-close f-btn-icon f-bare", onClick: s }, [v("span", { class: "f-icon modal_close" }, null)]), y.value && v("section", { class: "modal-tips" }, [!i.value && v("div", { class: "float-left modal-tips-iconwrap" }, [v("span", { class: d.value }, null)]), v("div", { class: "modal-tips-content" }, [i.value && v(mt, null, [v("h5", { class: "toast-title modal-tips-title", innerHTML: l.value.title }, null), v("p", { class: "toast-msg", innerHTML: l.value.message, style: o.value }, null), F.value && E()]), c.value && (l.value.buttons ? v("div", { class: "toast-title-btns-wrapper d-flex" }, [v("h5", { class: "toast-title modal-tips-title only-toast-msg", style: o.value, innerHTML: l.value.message }, null), v("div", { class: "after-toast-title text-right ml-auto" }, [E()])]) : v("h5", { class: "toast-title modal-tips-title only-toast-msg", style: o.value, innerHTML: l.value.message }, null))])])]); } }), Mt = /* @__PURE__ */ Re({ name: "Notify", props: nr, emits: ["close", "empty"], setup(e, t) { const n = ee(() => ({ "farris-notify": !0 })), r = { left: 12, right: 12, top: 20, bottom: 12 }, l = u(), a = u(e.options), i = u(e.showCloseButton), c = ee(() => e.position || "bottom-right"), g = ee(() => e.timeout != null ? e.timeout : 3e3), d = ee(() => { const F = e.bottom ? e.bottom : r.bottom, o = e.top ? e.top : r.top, s = { transition: "all 0.2s ease", left: c.value.indexOf("left") > -1 ? `${e.left ? e.left : r.left}px` : "", right: c.value.indexOf("right") > -1 ? `${e.right ? e.right : r.right}px` : "", top: c.value.indexOf("top") > -1 ? `${o}px` : "", bottom: c.value.indexOf("bottom") > -1 ? `${F}px` : "" }; return c.value.indexOf("center") > -1 && (s.left = "50%", s.marginLeft = "calc(-24rem / 2)", c.value === "center-center" && (s.top = "50%", s.transform = "translate(-50%, -50%)")), s; }); function y(F) { t.emit("close"); } g.value && setTimeout(() => { y(); }, g.value), t.expose({ closeToast: y, container: l, notifyPosition: c }); function m(F, o) { y(); } return () => v("div", { class: n.value, style: d.value, ref: l }, [v(en, { options: a.value, showCloseButton: i.value, animate: e.animate, onClose: (F) => m(F, a.value) }, null)]); } }); class ln { constructor() { Xe(this, "notifyRefs", []); Xe(this, "globalConfig", Xt({})); } escapeAllHtml(t) { if (typeof t != "string" || !t) return ""; const n = document.createElement("div"); return n.textContent = t || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g, ""); } createNotifyInstance(t) { const n = this, l = Object.assign({ timeout: 3e3, position: "bottom-right", showCloseButton: !0, safeHtml: !0 }, this.globalConfig, { ...t }), a = document.createElement("div"); a.style.display = "contents"; const i = bn({ setup() { var d; const c = u(); function g() { c.value.container.style.transform = "scale(0)", setTimeout(() => { n.updateNotifyPositionForClose(l, c), i.unmount(); }, 220); } if (l.position.indexOf("top") > -1) { const y = n.getNotifyInstances(l.position), m = y[y.length - 1]; if (m) { const F = m.value.container.getBoundingClientRect(); l.top = F.bottom; } } return l.safeHtml && ((d = l.options) != null && d.message) && (l.options.message = n.escapeAllHtml(l.options.message)), Ft(() => { document.body.removeChild(a); }), Je(() => { n.updateNotifyPositionForCreate(l, c); }), () => v(wn, { mode: "out-in", name: "fade", appear: !0 }, { default: () => [v(Mt, dt({ ref: c }, l, { onClose: g }), null)] }); } }); return i.provide("NotifyService", this), document.body.appendChild(a), i.use(Qe.i18n), i.mount(a), i; } getNotifyInstances(t) { return this.notifyRefs.filter((n) => n.value.notifyPosition === t); } updateNotifyPositionForCreate(t, n) { if (this.notifyRefs && this.notifyRefs.length) { const r = window.innerHeight; t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((l) => { const a = l.value.container.getBoundingClientRect(); l.value.container.style.bottom = a.height + r - a.bottom + "px"; }); } this.notifyRefs = [...this.notifyRefs, n]; } updateNotifyPositionForClose(t, n) { const r = this.notifyRefs.indexOf(n); if (t.position.indexOf("top") > -1) { const l = this.getNotifyInstances(t.position), a = l.indexOf(n); l.slice(a + 1).forEach((i) => { i.value.container.style.top = i.value.container.offsetTop - i.value.container.offsetHeight + "px"; }); } r > -1 && this.notifyRefs.splice(r, 1); } show(t) { return this.createNotifyInstance(t); } buildNotifyProps(t, n) { let r = "", l = "", a, i, c; typeof n == "string" ? r = n : n && (r = n.message || "", l = n.title || "", i = n.position || null, c = n.showCloseButton != null ? n.showCloseButton : null, a = n.timeout != null ? n.timeout : null); const d = { options: { type: t, message: r, title: l } }; return i != null && (d.position = i), c != null && (d.showCloseButton = c), a != null && (d.timeout = a), d; } info(t) { const n = this.buildNotifyProps("info", t); return this.show(n); } success(t) { const n = this.buildNotifyProps("success", t); return this.show(n); } warning(t) { const n = this.buildNotifyProps("warning", t); return this.show(n); } error(t) { const n = this.buildNotifyProps("error", t); return this.show(n); } close(t) { t && t.unmount(); } closeAll() { this.notifyRefs.forEach((t) => { t == null || t.value.closeToast(); }), this.notifyRefs.length = 0; } } const ar = Symbol("NOTIFY_SERVICE_TOKEN"); Mt.install = (e) => { e.component(Mt.name, Mt), e.component(en.name, en); const t = new ln(); e.provide(ar, t), e.provide("FNotifyService", t); }; const lr = { designerHostService: { type: Object, default: {} }, /** 预设的控件类型 */ componentType: { type: String, default: "" }, /** 预设绑定的实体id */ bindingEntityId: { type: String, default: "" }, /** 绑定步骤 */ steps: { type: Array, default: ["selectEntity", "selectFields"] }, /** 目标区域的控件实例 */ targetComponentInstance: { type: Object, default: {} } }; `${Qe.getLocaleValue("datagrid.loadingMessage")}`; const rr = { /** 自定义样式 */ customClass: { type: String, default: "" }, /** 排序配置 */ sort: { type: Object }, /** 筛选配置 */ filter: { type: Object }, /** 自动勾选子节点 */ autoCheckChildren: { type: Boolean, default: !1 }, /** 列集合 */ columns: { type: Array, default: [] }, /** 列配置 */ columnOption: { type: Object }, /** 命令列配置选项 */ commandOption: { type: Object, default: { enable: !1, commands: [] } }, /** 被绑定数据 */ data: { type: Array, default: [] }, /** 禁用组件 */ disabled: { type: Boolean, default: !1 }, /** 用于控制节点禁用状态的字段 */ disabledField: { type: String, default: "disabled" }, /** 用于显示信息的字段 */ displayField: { type: String, default: "name" }, /** 允许编辑 */ editable: { type: Boolean, default: !1 }, /** 编辑配置 */ editOption: { type: Object, default: { selectOnEditing: !1, editMode: "cell" } }, /** 适配父组件尺寸 */ fit: