@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,151 lines • 988 kB
JavaScript
var Hc = Object.defineProperty;
var _c = (e, t, n) => t in e ? Hc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var Ue = (e, t, n) => _c(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as C, defineComponent as Ie, computed as $, watch as ae, createVNode as f, Fragment as it, reactive as Qe, createApp as ma, onUnmounted as Nt, onMounted as Ke, Transition as tr, mergeProps as $t, nextTick as gt, createTextVNode as Ne, inject as Te, withDirectives as Vt, resolveDirective as Rn, onBeforeMount as vl, provide as wt, triggerRef as Uc, onBeforeUnmount as wo, isVNode as en, watchEffect as gl, Teleport as nr, shallowRef as zo, render as Ga, h as va, cloneVNode as zc, withModifiers as or, vModelText as xo, toRaw as qc, vModelCheckbox as hl, vModelSelect as Wc, resolveComponent as Gc, vShow as Xc, onUpdated as Yc, Comment as ar, getCurrentInstance as lr } from "vue";
import "bignumber.js";
import { isUndefined as sn, cloneDeep as Ht, mergeWith as la, merge as Mn, findIndex as pi, isPlainObject as mi, debounce as Hn, isNil as Jc, isNaN as Kc, flatten as ir, get as Ln, isEmpty as Qc } from "lodash-es";
import { LocaleService as Ze } from "../components/locale/index.esm.js";
import { getCustomClass as an, withInstall as _n, EVENT_PROPERTY_TAB_IDS as jn, FormSchemaEntityField$Type as ia, FormSchemaEntityFieldTypeName as vi, useThirdComponent as rr, isMobilePhone as Dt, getMaxZIndex as gi, FormSchemaEntityFieldType$Type as uo, resolveField as Jt, encrypt as Zc, useNumberFormat as ed, useDateFormat as td, useResizeObserver as nd, useTouchMomentum as od, useTouch as ad, useCommonUtils as Un, useBem as qt, useFarrisConfig as ld, useTextBox as id, useClear as rd, getCustomStyle as hi, useGuid as sd } from "../components/common/index.esm.js";
import { useResizeObserver as sr } from "@vueuse/core";
import { getHierarchyRow as ud, useIdentify as yl, useGroupData as bl, useFilter as Cl, useHierarchy as Sl, useLoading as ur, useDataView as wl, useSelection as xl, useSelectHierarchyItem as cd, usePagination as Tl, useDataViewContainerStyle as cr, useCommandColumn as dr, useSettingColumn as fr, useColumn as Fl, useSort as pr, useGroupColumn as mr, useRow as Pl, useEdit as kl, useVisualDataBound as Il, useVisualDataCell as El, useVisualDataRow as Bl, useVisualData as Ll, useCellPosition as vr, useSidebar as Ml, useVirtualScroll as Ol, useFitColumn as gr, useFilterHistory as hr, useColumnFilter as yr, useDragColumn as br, getColumnHeader as Cr, getSidebar as Sr, getDisableMask as wr, getHorizontalScrollbar as xr, getVerticalScrollbar as Tr, getEmpty as Fr, getPagination as Pr, getSummary as kr, ColumnSettingSolution as Ir, COMMAND_COLUMN_DATA_TYPE as hn, SETTING_COLUMN_DATA_TYPE as yn, useVisualGroupRow as Er, useVisualSummaryRow as Br, useScreen as Lr, SETTING_COLUMN_FIELD as dd, COMMAND_COLUMN_FIELD as fd, CellMode as Mr, useCellContentStyle as pd, getFilterPanel as md, getGroupPanel as vd, useAdapt as gd, useNavigation as hd } from "../components/data-view/index.esm.js";
import yd from "../components/input-group/index.esm.js";
import Dl, { ButtonProperty as bd, FButton as yi } from "../components/button/index.esm.js";
import { resolveAppearance as Kn, createPropsResolver as cn, schemaResolverMap as Cd, propertyEffectMap as Sd, propertyConfigSchemaMap as wd, schemaMap as xd, schemaResolverMapForDesigner as Or, propertyEffectMapForDesigner as Vl, propertyConfigSchemaMapForDesigner as Nl, schemaMapForDesigner as Dr, getSchemaByTypeForDesigner as Vr, getPropsResolverGenerator as Nr, createEventsResolver as Ar, createFormBindingResolver as Td } from "../components/dynamic-resolver/index.esm.js";
import { DgControl as Fe, canvasChanged as qo, refreshCanvas as Fd, useDesignerComponent as To } from "../components/designer-canvas/index.esm.js";
import { loadRegister as Pd, useComponentManager as kd, useEntityState as Id, useDynamicViewUtils as Ed, componentMap as Xa, resolverMap as Bd, componentPropsConverter as Ld } from "../components/dynamic-view/index.esm.js";
import Za from "../components/section/index.esm.js";
import Rr from "../components/accordion/index.esm.js";
import jr from "./avatar/index.esm.js";
import $r from "./approval-logs/index.esm.js";
import ga from "./button-edit/index.esm.js";
import Hr from "../components/button-group/index.esm.js";
import _r from "../components/calendar/index.esm.js";
import Ur from "./capsule/index.esm.js";
import el from "./checkbox/index.esm.js";
import ra from "./checkbox-group/index.esm.js";
import zr, { FComboList as qr } from "../components/combo-list/index.esm.js";
import Md from "../components/combo-tree/index.esm.js";
import Wr from "../components/component/index.esm.js";
import Gr from "../components/color-picker/index.esm.js";
import Xr from "../components/content-container/index.esm.js";
import Yr from "./date-picker/index.esm.js";
import Jr from "./data-grid/index.esm.js";
import Kr from "../components/dropdown/index.esm.js";
import Qr from "./dynamic-form/index.esm.js";
import Od from "../components/events-editor/index.esm.js";
import Zr from "../components/filter-bar/index.esm.js";
import Dd, { FieldSelectorRepositoryToken as mo } from "../components/field-selector/index.esm.js";
import Vd, { FBindingSelectorContainer as Nd } from "../components/binding-selector/index.esm.js";
import es from "../components/image-cropper/index.esm.js";
import ts from "./input-group/index.esm.js";
import Al, { FLayout as Ad, FLayoutPane as sa } from "../components/layout/index.esm.js";
import ns from "../components/list-nav/index.esm.js";
import os from "./list-view/index.esm.js";
import as from "../components/lookup/index.esm.js";
import Rd from "../components/mapping-editor/index.esm.js";
import ls from "./nav/index.esm.js";
import is from "../components/number-range/index.esm.js";
import rs from "./number-spinner/index.esm.js";
import ss from "../components/order/index.esm.js";
import us from "../components/page-header/index.esm.js";
import cs from "../components/page-footer/index.esm.js";
import ds from "../components/pagination/index.esm.js";
import fs from "../components/progress/index.esm.js";
import ps from "../components/query-solution/index.esm.js";
import ms from "./radio-group/index.esm.js";
import vs from "./rate/index.esm.js";
import gs from "./response-toolbar/index.esm.js";
import hs from "../components/response-layout/index.esm.js";
import ys from "./response-layout-editor/index.esm.js";
import bs from "../components/search-box/index.esm.js";
import Cs from "./section/index.esm.js";
import Ss from "../components/smoke-detector/index.esm.js";
import ws from "../components/splitter/index.esm.js";
import xs from "../components/step/index.esm.js";
import Ts from "./switch/index.esm.js";
import Fs from "./tabs/index.esm.js";
import Ps from "./tags/index.esm.js";
import ks from "../components/text/index.esm.js";
import Is from "./time-picker/index.esm.js";
import Es from "../components/transfer/index.esm.js";
import vo, { FTreeView as jd } from "../components/tree-view/index.esm.js";
import Bs from "../components/uploader/index.esm.js";
import Ls from "../components/verify-detail/index.esm.js";
import Ms from "../components/video/index.esm.js";
import Os from "./textarea/index.esm.js";
import $d from "../components/schema-selector/index.esm.js";
import Ds from "./tree-grid/index.esm.js";
import Hd from "../components/event-parameter/index.esm.js";
import _d from "../components/filter-condition-editor/index.esm.js";
import Vs from "../components/fieldset/index.esm.js";
import Ud from "../components/sort-condition-editor/index.esm.js";
import zd from "../components/menu-lookup/index.esm.js";
import Ns from "./drawer/index.esm.js";
import qd from "../components/json-editor/index.esm.js";
import Wd from "../components/property-editor/index.esm.js";
import Gd from "../components/expression-editor/index.esm.js";
import Xd from "../components/code-editor/index.esm.js";
import As from "../components/html-template/index.esm.js";
import Yd from "../components/collection-property-editor/index.esm.js";
import Jd from "./modal/index.esm.js";
import Rs from "../components/external-container/index.esm.js";
import js from "../components/language-textbox/index.esm.js";
import $s from "../components/image/index.esm.js";
import Hs from "../components/comment/index.esm.js";
import _s from "./wizard/index.esm.js";
import Kd from "../components/tooltip/index.esm.js";
import { BaseControlProperty as Qd, InputBaseProperty as Us, ExpressionProperty as Zd } from "../components/property-panel/index.esm.js";
import { FNotifyService as Rl, F_NOTIFY_SERVICE_TOKEN as jl } from "../components/notify/index.esm.js";
import { useButtonItemsDesigner as ef } from "../components/collection-property-editor/index.esm.js/src/use-button-items.designer";
import { F_MODAL_SERVICE_TOKEN as $l } from "../components/modal/index.esm.js";
import zs, { FButtonEdit as Hl } from "../components/button-edit/index.esm.js";
import { FDataGrid as ha } from "../components/data-grid/index.esm.js";
import { FTreeGrid as _l } from "../components/tree-grid/index.esm.js";
import qs from "../components/list-view/index.esm.js";
import { useNumber as tf, useFormat as nf, useSpinner as of, useTextBox as af, getSpinnerRender as lf, getNumberTextBoxRender as rf, FNumberSpinner as Ya } from "../components/number-spinner/index.esm.js";
import { useInputExpand as Ws } from "../components/common/index.esm.js/text-box/use-input-expand";
import { FSwitch as sf } from "../components/switch/index.esm.js";
import { FDatePicker as bi } from "../components/components/index.esm.js";
import { FRadioGroup as uf } from "../components/radio-group/index.esm.js";
import { FCheckboxGroup as cf } from "../components/checkbox-group/index.esm.js";
import { SearchRelation as df, SearchComparisonOperator as ff } from "../components/field-search-box/index.esm.js";
import Ul from "../components/popover/index.esm.js";
import Gs, { FCheckbox as zl } from "../components/checkbox/index.esm.js";
import Xs from "../components/capsule/index.esm.js";
import Qn from "../components/scroll-list/index.esm.js";
import ql from "../components/drawer/index.esm.js";
import pf, { FDynamicFormGroup as mf, FDynamicForm as vf, FDynamicFormLabel as gf } from "../components/dynamic-form/index.esm.js";
import hf, { FTabPage as yf } from "../components/tabs/index.esm.js";
import bf from "../components/textarea/index.esm.js";
import Cf from "../components/response-toolbar/index.esm.js";
import Sf from "../components/loading/index.esm.js";
import wf from "../components/tags/index.esm.js";
const xf = ["moz", "ms", "webkit"];
function Tf() {
let e = 0;
return (t) => {
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
t(n + o);
}, o);
return e = n + o, a;
};
}
function Ff() {
if (typeof window > "u")
return () => 0;
if (window.requestAnimationFrame)
return window.requestAnimationFrame.bind(window);
const e = xf.filter((t) => `${t}RequestAnimationFrame` in window)[0];
return e ? window[`${e}RequestAnimationFrame`] : Tf();
}
Ff();
const Qx = Symbol("controller schema repository inject token"), Zx = Symbol("form schema repository inject token");
C("");
function ho() {
const e = navigator.userAgent || navigator.vendor || window.opera, t = [
/iPhone/i,
/iPod/i,
/Android.*Mobile/i,
// Android 手机通常包含 "Mobile" 字样,而平板不包含
/webOS/i,
/BlackBerry/i,
/IEMobile/i,
/Opera Mini/i,
/Harmony/i
], n = [
/iPad/i,
/Android(?!.*Mobile)/i,
// Android 平板通常不含 "Mobile"
/Tablet/i,
/PlayBook/i,
/Kindle/i,
/Silk/i
];
for (const r of n)
if (r.test(e))
return !1;
for (const r of t)
if (r.test(e))
return !0;
const o = "ontouchstart" in window || navigator.maxTouchPoints > 0, a = screen.width, l = screen.height, i = Math.min(a, l);
return !!(o && i <= 768);
}
const Pn = C(0);
function Pf() {
Pn.value++;
}
function kf(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), a = o.top >= n.top, l = o.top <= n.bottom;
return a && l;
}
function Ys(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 o = t.querySelector("div");
if (o) {
const a = o.getBoundingClientRect();
o.style.top = n.top + "px";
let l = n.left - a.width;
const i = document.querySelector(".editorDiv");
if (i) {
const r = i.getBoundingClientRect();
l < r.left && ({ left: l } = e.getBoundingClientRect());
}
o.style.left = l + "px";
}
}
}
function Js(e) {
var n, o, a, l, i;
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length)
if (t.length === 1) {
const r = t[0], d = document.querySelector(`[id=${r}]`);
if (d && d.contains(e))
return d;
} else {
const { componentInstance: r } = e;
if (((n = r == null ? void 0 : r.value) == null ? void 0 : n.scrollElementId) === ((o = r == null ? void 0 : r.value.schema) == null ? void 0 : o.id))
return e;
if (((a = r == null ? void 0 : r.value) == null ? void 0 : a.scrollElementId) === `${(l = r == null ? void 0 : r.value.schema) == null ? void 0 : l.id}-design-item`)
return e.parentElement;
if ((i = r.value.parent) != null && i.elementRef)
return Js(r.value.parent.elementRef);
}
}
function Wl(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 o = !0;
const a = Js(e);
if (a && (o = kf(e, a)), !o) {
n.style.display = "none";
return;
}
Ys(e);
}
}
function go(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && Wl(t);
}
function eT() {
const e = document.querySelector(".dgComponentSelected");
if (!e)
return;
const t = e.querySelector(".component-btn-group");
t && t.getBoundingClientRect().top !== 0 && Ys(e);
}
const If = {
/**
* 组件值
*/
modelValue: { type: Object, default: {} },
componentId: { type: String, default: "" },
components: { type: Array },
canvasMode: { type: String, default: "PC" }
};
var xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Ef(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Ho(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 Ks = { exports: {} };
(function(e, t) {
(function(n) {
e.exports = n();
})(function() {
return (/* @__PURE__ */ function() {
function n(o, a, l) {
function i(s, c) {
if (!a[s]) {
if (!o[s]) {
var u = typeof Ho == "function" && Ho;
if (!c && u) return u(s, !0);
if (r) return r(s, !0);
var g = new Error("Cannot find module '" + s + "'");
throw g.code = "MODULE_NOT_FOUND", g;
}
var m = a[s] = { exports: {} };
o[s][0].call(m.exports, function(p) {
var v = o[s][1][p];
return i(v || p);
}, m, m.exports, n, o, a, l);
}
return a[s].exports;
}
for (var r = typeof Ho == "function" && Ho, d = 0; d < l.length; d++) i(l[d]);
return i;
}
return n;
}())({
1: [function(n, o, a) {
var l = {}, i = "(?:^|\\s)", r = "(?:\\s|$)";
function d(u) {
var g = l[u];
return g ? g.lastIndex = 0 : l[u] = g = new RegExp(i + u + r, "g"), g;
}
function s(u, g) {
var m = u.className;
m.length ? d(g).test(m) || (u.className += " " + g) : u.className = g;
}
function c(u, g) {
u.className = u.className.replace(d(g), " ").trim();
}
o.exports = {
add: s,
rm: c
};
}, {}],
2: [function(n, o, a) {
(function(l) {
var i = n("contra/emitter"), r = n("crossvent"), d = n("./classes"), s = document, c = s.documentElement;
function u(E, O) {
var B = arguments.length;
B === 1 && Array.isArray(E) === !1 && (O = E, E = []);
var R, N, D, j, L, U, _, H, K, le = null, q, V, A = !1, z = 0, J, W = O || {};
W.moves === void 0 && (W.moves = b), W.accepts === void 0 && (W.accepts = b), W.invalid === void 0 && (W.invalid = pe), W.containers === void 0 && (W.containers = E || []), W.isContainer === void 0 && (W.isContainer = y), W.copy === void 0 && (W.copy = !1), W.copySortSource === void 0 && (W.copySortSource = !1), W.revertOnSpill === void 0 && (W.revertOnSpill = !1), W.removeOnSpill === void 0 && (W.removeOnSpill = !1), W.direction === void 0 && (W.direction = "vertical"), W.ignoreInputTextSelection === void 0 && (W.ignoreInputTextSelection = !0), W.mirrorContainer === void 0 && (W.mirrorContainer = s.body);
var M = i({
containers: W.containers,
start: oe,
end: he,
cancel: pt,
remove: at,
destroy: se,
canMove: xe,
dragging: !1
});
return W.removeOnSpill === !0 && M.on("over", ge).on("out", We), G(), M;
function Q(ne) {
return M.containers.indexOf(ne) !== -1 || W.isContainer(ne);
}
function G(ne) {
var Be = ne ? "remove" : "add";
p(c, Be, "mousedown", Z), p(c, Be, "mouseup", ze);
}
function te(ne) {
var Be = ne ? "remove" : "add";
p(c, Be, "mousemove", ce);
}
function fe(ne) {
var Be = ne ? "remove" : "add";
r[Be](c, "selectstart", Y), r[Be](c, "click", Y);
}
function se() {
G(!0), ze({});
}
function Y(ne) {
q && ne.preventDefault();
}
function Z(ne) {
j = ne.clientX, L = ne.clientY;
var Be = v(ne) !== 1 || ne.metaKey || ne.ctrlKey;
if (!Be) {
var Le = ne.target, Ge = we(Le);
Ge && (q = Ge, te(), ne.type === "mousedown" && (w(Le) ? Le.focus() : ne.preventDefault()));
}
}
function ce(ne) {
if (q) {
if (v(ne) === 0) {
ze({});
return;
}
if (!(ne.clientX !== void 0 && Math.abs(ne.clientX - j) <= (W.slideFactorX || 0) && ne.clientY !== void 0 && Math.abs(ne.clientY - L) <= (W.slideFactorY || 0))) {
if (W.ignoreInputTextSelection) {
var Be = I("clientX", ne) || 0, Le = I("clientY", ne) || 0, Ge = s.elementFromPoint(Be, Le);
if (w(Ge))
return;
}
var ut = q;
te(!0), fe(), he(), ie(ut), d.add(H || D, "gu-transit"), re(), ht(), z = 0, be(ne);
}
}
}
function we(ne) {
if (!(M.dragging && R) && !Q(ne)) {
for (var Be = ne; P(ne) && Q(P(ne)) === !1; )
if (W.invalid(ne, Be) || (ne = P(ne), !ne))
return;
var Le = P(ne);
if (Le && !W.invalid(ne, Be)) {
var Ge = W.moves(ne, Le, Be, S(ne));
if (Ge)
return {
item: ne,
source: Le
};
}
}
}
function xe(ne) {
return !!we(ne);
}
function oe(ne) {
var Be = we(ne);
Be && ie(Be);
}
function ie(ne) {
Tt(ne.item, ne.source) && (H = ne.item.cloneNode(!0), M.emit("cloned", H, ne.item, "copy")), N = ne.source, D = ne.item, U = _ = S(ne.item), M.dragging = !0, M.emit("drag", D, N);
}
function pe() {
return !1;
}
function he() {
if (M.dragging) {
var ne = H || D;
$e(ne, P(ne));
}
}
function ye() {
q = !1, te(!0), fe(!0);
}
function ze(ne) {
if (ye(), !!M.dragging) {
var Be = H || D, Le = I("clientX", ne) || 0, Ge = I("clientY", ne) || 0, ut = h(R, Le, Ge), ct = X(ut, Le, Ge);
ct && (H && W.copySortSource || !H || ct !== N) ? $e(Be, ct) : W.removeOnSpill ? at() : pt();
}
}
function $e(ne, Be) {
var Le = P(ne);
H && W.copySortSource && Be === N && Le.removeChild(D), ve(Be) ? M.emit("cancel", ne, N) : M.emit("drop", ne, Be, N, _), de();
}
function at() {
if (M.dragging) {
var ne = H || D, Be = P(ne);
Be && Be.removeChild(ne), M.emit(H ? "cancel" : "remove", ne, Be, N), de();
}
}
function pt(ne) {
if (M.dragging) {
var Be = arguments.length > 0 ? ne : W.revertOnSpill, Le = H || D, Ge = P(Le), ut = ve(Ge);
ut === !1 && Be && (H ? Ge && Ge.removeChild(H) : N.insertBefore(Le, U)), ut || Be ? M.emit("cancel", Le, N, N) : M.emit("drop", Le, Ge, N, _), de();
}
}
function de() {
var ne = H || D;
ye(), _e(), ee(), ne && d.rm(ne, "gu-transit"), K && clearTimeout(K), M.dragging = !1, le && M.emit("out", ne, le, N), M.emit("dragend", ne, z), N = D = H = U = _ = K = le = null;
}
function ve(ne, Be) {
var Le;
return Be !== void 0 ? Le = Be : R ? Le = _ : Le = S(H || D), ne === N && Le === U;
}
function X(ne, Be, Le) {
for (var Ge = ne; Ge && !ut(); )
Ge = P(Ge);
return Ge;
function ut() {
var ct = Q(Ge);
if (ct === !1)
return !1;
var Ft = Se(Ge, ne), At = Ct(Ge, Ft, Be, Le), Wt = ve(Ge, At);
return Wt ? !0 : W.accepts(D, Ge, N, At);
}
}
function be(ne) {
if (!R)
return;
ne.preventDefault();
var Be = I("clientX", ne) || 0, Le = I("clientY", ne) || 0;
R.style.left = Be - 2 + "px", R.style.top = Le - 2 + "px";
var Ge = H || D, ut = h(R, Be, Le), ct = X(ut, Be, Le), Ft = ct !== null && ct !== le;
(Ft || ct === null) && (_t(), le = ct, Gt()), Xe(ut, Le);
var At = P(Ge);
if (ct === N && H && !W.copySortSource) {
At && At.removeChild(Ge);
return;
}
var Wt, Rt = Se(ct, ut);
if (A = Oe(Rt, ct), Rt !== null)
Wt = Ct(ct, Rt, Be, Le);
else if (W.revertOnSpill === !0 && !H)
Wt = U, ct = N;
else {
H && At && At.removeChild(Ge), H && V && (V.style.display = "none");
return;
}
V.style.display = "block", He(Wt, Ge, Ft), Wt ? rt(Rt, Wt) : Je(ct);
function Et(Mt) {
M.emit(Mt, Ge, le, N);
}
function Gt() {
Ft && Et("over");
}
function _t() {
le && Et("out");
}
}
function He(ne, Be, Le) {
(ne === Be || ne === S(Be)) && (_ = S(Be)), (ne === null && Le || ne !== Be && ne !== S(Be)) && (_ = ne);
}
function ge(ne) {
d.rm(ne, "gu-hide");
}
function We(ne) {
M.dragging && d.add(ne, "gu-hide");
}
function ht() {
R || (R = document.createElement("div"), R.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;", R.innerHTML = W.getMirrorText && W.getMirrorText(D) || "控件", d.add(R, "gu-mirror"), W.mirrorContainer.appendChild(R), p(c, "add", "mousemove", be), d.add(W.mirrorContainer, "gu-unselectable"), M.emit("cloned", R, D, "mirror"));
}
function re() {
if (V = document.createElement("div"), d.add(V, "gu-insertion"), D) {
var ne = D.getBoundingClientRect();
V.style.left = ne.left + "px", V.style.top = ne.top + "px";
}
A = !1, W.mirrorContainer.appendChild(V);
}
function _e() {
R && (d.rm(W.mirrorContainer, "gu-unselectable"), p(c, "remove", "mousemove", be), P(R).removeChild(R), R = null);
}
function ee() {
V && (P(V).removeChild(V), V = null);
}
function Se(ne, Be) {
for (var Le = Be; Le !== ne && P(Le) !== ne; )
Le = P(Le);
return Le === c ? null : Le;
}
function Oe(ne, Be) {
if (!Be)
return A;
var Le = ne || Be && Be.lastElementChild;
if (!Le)
return !0;
var Ge = getComputedStyle(ne), ut = /^inline/.test(Ge.getPropertyValue("display")) || /^(left|right)$/.test(Ge.getPropertyValue("float"));
if (ut)
return !0;
if (Be) {
var ct = getComputedStyle(Be), Ft = ct.getPropertyValue("display");
if (/flex$/.test(Ft)) {
var At = ct.getPropertyValue("flex-direction") || "row";
if (At === "row" || At === "row-reverse")
return !De(Be);
}
return !1;
}
return !0;
}
function De(ne) {
if (!ne.children || !ne.children.length)
return !1;
for (const Be of Array.from(ne.children)) {
const Ge = (Be.className && Be.className.split(" ") || []).filter((ut) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ut));
if (!Ge.length)
return !1;
for (const ut of Ge) {
const ct = ut.slice(ut.lastIndexOf("-") + 1);
if (parseInt(ct, 10) !== 12)
return !1;
}
}
return !0;
}
function rt(ne, Be) {
const Le = Be.getBoundingClientRect();
if (V.style.left = Le.left + "px", V.style.top = Le.top + "px", A) {
if (V.style.height = Le.height + "px", V.style.width = "4px", ne) {
const Ge = ne.getBoundingClientRect();
Ge.top !== Le.top && (V.style.left = Ge.right + "px", V.style.top = Ge.top + "px", V.style.height = Ge.height + "px");
}
} else if (V.style.height = "4px", V.style.width = Le.width + "px", J) {
const Ge = J.getBoundingClientRect();
Le.top < Ge.top && (V.style.display = "none");
}
Be === D && D && (V.style.display = "none");
}
function Je(ne) {
_ = null;
var Be = ne.lastElementChild;
if (Be) {
var Le = Be.getBoundingClientRect();
A ? (V.style.left = Le.right + "px", V.style.top = Le.top + "px", V.style.height = Le.height + "px", V.style.width = "4px") : (V.style.left = Le.left + "px", V.style.top = Le.bottom + "px", V.style.height = "4px", V.style.width = Le.width + "px"), Be === D && D && (V.style.display = "none");
} else
V.style.display = "none";
}
function Xe(ne, Be) {
if (!W.mirrorContainer.contains(ne) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (J = g(ne), !J || !J.contains(ne)))
return;
const Le = document.querySelector(".dgComponentSelected"), Ge = J.getBoundingClientRect();
if (Be - 30 < Ge.top && J.scrollTop > 0) {
let ut = J.scrollTop < 10 ? J.scrollTop : 10;
J.scrollBy(0, -1 * ut), Le && J.contains(Le) && (z = z + -1 * ut);
}
if (Be + 30 > Ge.bottom && J.scrollTop < J.scrollHeight - J.clientHeight) {
const ut = J.scrollHeight - J.clientHeight - J.scrollTop;
let ct = ut < 10 ? ut : 10;
J.scrollBy(0, ct), Le && J.contains(Le) && (z = z + ct);
}
}
function Ct(ne, Be, Le, Ge) {
var ut = W.direction === "horizontal", ct = W.direction === "mixed", Ft = Be !== ne ? Wt() : At();
return Ft;
function At() {
var Et = ne.children.length, Gt, _t, Mt;
for (Gt = 0; Gt < Et; Gt++)
if (_t = ne.children[Gt], Mt = _t.getBoundingClientRect(), ut && Mt.left + Mt.width / 2 > Le || !ct && !ut && Mt.top + Mt.height / 2 > Ge || ct && Mt.left + Mt.width > Le && Mt.top + Mt.height > Ge)
return _t;
return null;
}
function Wt() {
var Et = Be.getBoundingClientRect();
if (ct) {
var Gt = Ge - Et.top, _t = Le - Et.left, Mt = Et.bottom - Ge, Cn = Et.right - Le, tn = Math.min(_t, Cn, Gt, Mt), Sn;
return A ? Sn = Cn < _t : Sn = Mt === tn || Cn === tn || _t === tn, Rt(Sn);
}
return Rt(ut ? Le > Et.left + T(Et) / 2 : Ge > Et.top + F(Et) / 2);
}
function Rt(Et) {
return Et ? S(Be) : Be;
}
}
function Tt(ne, Be) {
return typeof W.copy == "boolean" ? W.copy : W.copy(ne, Be);
}
}
function g(E) {
const O = Array.from(window.scrollContainerList);
if (O.length === 1) {
const R = Array.from(window.scrollContainerList)[0];
return document.getElementById(R);
}
const B = m(O);
for (const R of B)
if (R.contains(E))
return R;
return null;
}
function m(E) {
const O = [];
return E.forEach((B) => {
const R = document.getElementById(B);
R && O.push(R);
}), O.sort((B, R) => B.contains(R) ? 1 : R.contains(B) ? -1 : 0), O;
}
function p(E, O, B, R) {
var N = {
mouseup: "touchend",
mousedown: "touchstart",
mousemove: "touchmove"
}, D = {
mouseup: "pointerup",
mousedown: "pointerdown",
mousemove: "pointermove"
}, j = {
mouseup: "MSPointerUp",
mousedown: "MSPointerDown",
mousemove: "MSPointerMove"
};
l.navigator.pointerEnabled ? r[O](E, D[B], R) : l.navigator.msPointerEnabled ? r[O](E, j[B], R) : (r[O](E, N[B], R), r[O](E, B, R));
}
function v(E) {
if (E.touches !== void 0)
return E.touches.length;
if (E.which !== void 0 && E.which !== 0)
return E.which;
if (E.buttons !== void 0)
return E.buttons;
var O = E.button;
if (O !== void 0)
return O & 1 ? 1 : O & 2 ? 3 : O & 4 ? 2 : 0;
}
function h(E, O, B) {
E = E || {};
var R = E.className || "", N;
return E.className += " gu-hide", N = s.elementFromPoint(O, B), E.className = R, N;
}
function y() {
return !1;
}
function b() {
return !0;
}
function T(E) {
return E.width || E.right - E.left;
}
function F(E) {
return E.height || E.bottom - E.top;
}
function P(E) {
return E.parentNode === s ? null : E.parentNode;
}
function w(E) {
return E.tagName === "INPUT" || E.tagName === "TEXTAREA" || E.tagName === "SELECT" || x(E);
}
function x(E) {
return !E || E.contentEditable === "false" ? !1 : E.contentEditable === "true" ? !0 : x(P(E));
}
function S(E) {
return E.nextElementSibling || O();
function O() {
var B = E;
do
B = B.nextSibling;
while (B && B.nodeType !== 1);
return B;
}
}
function k(E) {
return E.targetTouches && E.targetTouches.length ? E.targetTouches[0] : E.changedTouches && E.changedTouches.length ? E.changedTouches[0] : E;
}
function I(E, O) {
var B = k(O), R = {
pageX: "clientX",
// IE8
pageY: "clientY"
// IE8
};
return E in R && !(E in B) && R[E] in B && (E = R[E]), B[E];
}
o.exports = u;
}).call(this, typeof xn < "u" ? xn : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
3: [function(n, o, a) {
o.exports = function(i, r) {
return Array.prototype.slice.call(i, r);
};
}, {}],
4: [function(n, o, a) {
var l = n("ticky");
o.exports = function(r, d, s) {
r && l(function() {
r.apply(s || null, d || []);
});
};
}, { ticky: 10 }],
5: [function(n, o, a) {
var l = n("atoa"), i = n("./debounce");
o.exports = function(d, s) {
var c = s || {}, u = {};
return d === void 0 && (d = {}), d.on = function(g, m) {
return u[g] ? u[g].push(m) : u[g] = [m], d;
}, d.once = function(g, m) {
return m._once = !0, d.on(g, m), d;
}, d.off = function(g, m) {
var p = arguments.length;
if (p === 1)
delete u[g];
else if (p === 0)
u = {};
else {
var v = u[g];
if (!v)
return d;
v.splice(v.indexOf(m), 1);
}
return d;
}, d.emit = function() {
var g = l(arguments);
return d.emitterSnapshot(g.shift()).apply(this, g);
}, d.emitterSnapshot = function(g) {
var m = (u[g] || []).slice(0);
return function() {
var p = l(arguments), v = this || d;
if (g === "error" && c.throws !== !1 && !m.length)
throw p.length === 1 ? p[0] : p;
return m.forEach(function(y) {
c.async ? i(y, p, v) : y.apply(v, p), y._once && d.off(g, y);
}), d;
};
}, d;
};
}, { "./debounce": 4, atoa: 3 }],
6: [function(n, o, a) {
(function(l) {
var i = n("custom-event"), r = n("./eventmap"), d = l.document, s = g, c = p, u = [];
l.addEventListener || (s = m, c = v), o.exports = {
add: s,
remove: c,
fabricate: h
};
function g(P, w, x, S) {
return P.addEventListener(w, x, S);
}
function m(P, w, x) {
return P.attachEvent("on" + w, b(P, w, x));
}
function p(P, w, x, S) {
return P.removeEventListener(w, x, S);
}
function v(P, w, x) {
var S = T(P, w, x);
if (S)
return P.detachEvent("on" + w, S);
}
function h(P, w, x) {
var S = r.indexOf(w) === -1 ? I() : k();
P.dispatchEvent ? P.dispatchEvent(S) : P.fireEvent("on" + w, S);
function k() {
var E;
return d.createEvent ? (E = d.createEvent("Event"), E.initEvent(w, !0, !0)) : d.createEventObject && (E = d.createEventObject()), E;
}
function I() {
return new i(w, { detail: x });
}
}
function y(P, w, x) {
return function(k) {
var I = k || l.event;
I.target = I.target || I.srcElement, I.preventDefault = I.preventDefault || function() {
I.returnValue = !1;
}, I.stopPropagation = I.stopPropagation || function() {
I.cancelBubble = !0;
}, I.which = I.which || I.keyCode, x.call(P, I);
};
}
function b(P, w, x) {
var S = T(P, w, x) || y(P, w, x);
return u.push({
wrapper: S,
element: P,
type: w,
fn: x
}), S;
}
function T(P, w, x) {
var S = F(P, w, x);
if (S) {
var k = u[S].wrapper;
return u.splice(S, 1), k;
}
}
function F(P, w, x) {
var S, k;
for (S = 0; S < u.length; S++)
if (k = u[S], k.element === P && k.type === w && k.fn === x)
return S;
}
}).call(this, typeof xn < "u" ? xn : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./eventmap": 7, "custom-event": 8 }],
7: [function(n, o, a) {
(function(l) {
var i = [], r = "", d = /^on/;
for (r in l)
d.test(r) && i.push(r.slice(2));
o.exports = i;
}).call(this, typeof xn < "u" ? xn : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
8: [function(n, o, a) {
(function(l) {
var i = l.CustomEvent;
function r() {
try {
var d = new i("cat", { detail: { foo: "bar" } });
return d.type === "cat" && d.detail.foo === "bar";
} catch {
}
return !1;
}
o.exports = r() ? i : (
// IE >= 9
typeof document < "u" && typeof document.createEvent == "function" ? function(s, c) {
var u = document.createEvent("CustomEvent");
return c ? u.initCustomEvent(s, c.bubbles, c.cancelable, c.detail) : u.initCustomEvent(s, !1, !1, void 0), u;
} : (
// IE <= 8
function(s, c) {
var u = document.createEventObject();
return u.type = s, c ? (u.bubbles = !!c.bubbles, u.cancelable = !!c.cancelable, u.detail = c.detail) : (u.bubbles = !1, u.cancelable = !1, u.detail = void 0), u;
}
)
);
}).call(this, typeof xn < "u" ? xn : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
9: [function(n, o, a) {
var l = o.exports = {}, i, r;
function d() {
throw new Error("setTimeout has not been defined");
}
function s() {
throw new Error("clearTimeout has not been defined");
}
(function() {
try {
typeof setTimeout == "function" ? i = setTimeout : i = d;
} catch {
i = d;
}
try {
typeof clearTimeout == "function" ? r = clearTimeout : r = s;
} catch {
r = s;
}
})();
function c(F) {
if (i === setTimeout)
return setTimeout(F, 0);
if ((i === d || !i) && setTimeout)
return i = setTimeout, setTimeout(F, 0);
try {
return i(F, 0);
} catch {
try {
return i.call(null, F, 0);
} catch {
return i.call(this, F, 0);
}
}
}
function u(F) {
if (r === clearTimeout)
return clearTimeout(F);
if ((r === s || !r) && clearTimeout)
return r = clearTimeout, clearTimeout(F);
try {
return r(F);
} catch {
try {
return r.call(null, F);
} catch {
return r.call(this, F);
}
}
}
var g = [], m = !1, p, v = -1;
function h() {
!m || !p || (m = !1, p.length ? g = p.concat(g) : v = -1, g.length && y());
}
function y() {
if (!m) {
var F = c(h);
m = !0;
for (var P = g.length; P; ) {
for (p = g, g = []; ++v < P; )
p && p[v].run();
v = -1, P = g.length;
}
p = null, m = !1, u(F);
}
}
l.nextTick = function(F) {
var P = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var w = 1; w < arguments.length; w++)
P[w - 1] = arguments[w];
g.push(new b(F, P)), g.length === 1 && !m && c(y);
};
function b(F, P) {
this.fun = F, this.array = P;
}
b.prototype.run = function() {
this.fun.apply(null, this.array);
}, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {};
function T() {
}
l.on = T, l.addListener = T, l.once = T, l.off = T, l.removeListener = T, l.removeAllListeners = T, l.emit = T, l.prependListener = T, l.prependOnceListener = T, l.listeners = function(F) {
return [];
}, l.binding = function(F) {
throw new Error("process.binding is not supported");
}, l.cwd = function() {
return "/";
}, l.chdir = function(F) {
throw new Error("process.chdir is not supported");
}, l.umask = function() {
return 0;
};
}, {}],
10: [function(n, o, a) {
(function(l) {
var i = typeof l == "function", r;
i ? r = function(d) {
l(d);
} : r = function(d) {
setTimeout(d, 0);
}, o.exports = r;
}).call(this, n("timers").setImmediate);
}, { timers: 11 }],
11: [function(n, o, a) {
(function(l, i) {
var r = n("process/browser.js").nextTick, d = Function.prototype.apply, s = Array.prototype.slice, c = {}, u = 0;
a.setTimeout = function() {
return new g(d.call(setTimeout, window, arguments), clearTimeout);
}, a.setInterval = function() {
return new g(d.call(setInterval, window, arguments), clearInterval);
}, a.clearTimeout = a.clearInterval = function(m) {
m.close();
};
function g(m, p) {
this._id = m, this._clearFn = p;
}
g.prototype.unref = g.prototype.ref = function() {
}, g.prototype.close = function() {
this._clearFn.call(window, this._id);
}, a.enroll = function(m, p) {
clearTimeout(m._idleTimeoutId), m._idleTimeout = p;
}, a.unenroll = function(m) {
clearTimeout(m._idleTimeoutId), m._idleTimeout = -1;
}, a._unrefActive = a.active = function(m) {
clearTimeout(m._idleTimeoutId);
var p = m._idleTimeout;
p >= 0 && (m._idleTimeoutId = setTimeout(function() {
m._onTimeout && m._onTimeout();
}, p));
}, a.setImmediate = typeof l == "function" ? l : function(m) {
var p = u++, v = arguments.length < 2 ? !1 : s.call(arguments, 1);
return c[p] = !0, r(function() {
c[p] && (v ? m.apply(null, v) : m.call(null), a.clearImmediate(p));
}), p;
}, a.clearImmediate = typeof i == "function" ? i : function(m) {
delete c[m];
};
}).call(this, n("timers").setImmediate, n("timers").clearImmediate);
}, { "process/browser.js": 9, timers: 11 }]
}, {}, [2])(2);
});
})(Ks);
var Bf = Ks.exports;
const Ci = /* @__PURE__ */ Ef(Bf), Lf = {
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 }
}, Mf = {
showCloseButton: { type: Boolean, default: !0 },
animate: { type: String, default: "fadeIn" },
options: { type: Object }
}, tl = /* @__PURE__ */ Ie({
name: "Toast",
props: Mf,
emits: ["close", "click"],
setup: (e, t) => {
const n = C(e.animate), o = "fadeOut", a = $(() => e.options), l = C(!1), i = $(() => a.value.title && a.value.message), r = $(() => !a.value.title && a.value.message), d = $(() => {
const b = {
animated: l.value,
toast: !0,
"toast--only-content": !i.value
};
return b[e.animate] = !1, b[o] = l.value, b["toasty-type-" + a.value.type] = !0, a.value.theme && (b[a.value.theme] = !0), b;
}), s = $(() => {
const F = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, P = {
"f-icon": !0
};
return P[F] = !0, P;
}), c = $(() => a.value.title || a.value.message), u = $(() => e.showCloseButton), g = $(() => !!a.value.buttons || !!t.slots.default), m = $(() => Ze.getLocale() === "en" ? {
wordBreak: "keep-all",
overflowWrap: "break-word"
} : {});
function p(b) {
b.stopPropagation(), b.preventDefault(), l.value = !1, setTimeout(() => {
t.emit("close", a.value);
}, 200);
}
function v(b, T) {
}
function h(b) {
return `f-preten-link ${b.customClass ? b.customClass : ""}`;
}
ae(n, () => {
n.value;
});
const y = () => {
var b;
return f(it, null, [f("div", {
class: "after-toast-msg text-right"
}, [!t.slots.default && ((b = a.value.buttons) == null ? void 0 : b.map((T) => f("span", {
class: h(T),
onClick: (F) => void 0
}, [T.text]))), t.slots.default && t.slots.default()])]);
};
return () => f("div", {
class: d.value,
style: "min-height:44px"
}, [u.value && f("button", {
title: Ze.getLocaleValue("messageBox.close"),
class: "toast-close f-btn-icon f-bare",
onClick: p
}, [f("span", {
class: "f-icon modal_close"
}, null)]), c.value && f("section", {
class: "modal-tips"
}, [!i.value && f("div", {
class: "float-left modal-tips-iconwrap"
}, [f("span", {
class: s.value
}, null)]), f("div", {
class: "modal-tips-content"
}, [i.value && f(it, null, [f("h5", {
class: "toast-title modal-tips-title",
innerHTML: a.value.title
}, null), f("p", {
class: "toast-msg",
innerHTML: a.value.message,
style: m.value
}, null), g.value && y()]), r.value && (a.value.buttons ? f("div", {
class: "toast-title-btns-wrapper d-flex"
}, [f("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: m.value,
innerHTML: a.value.message
}, null), f("div", {
class: "after-toast-title text-right ml-auto"
}, [y()])]) : f("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: m.value,
innerHTML: a.value.message
}, null))])])]);
}
}), Wo = /* @__PURE__ */ Ie({
name: "Notify",
props: Lf,
emits: ["close", "empty"],
setup(e, t) {
var v;
const n = ho(), a = `farris-notify-${(v = e.options) != null && v.type ? e.options.type : "info"}}`, l = $(() => ({
"farris-notify": !0,
[a]: n
})), i = {
left: 12,
right: 12,
top: 20,
bottom: 12
}, r = C(), d = C(e.options), s = C(e.showCloseButton), c = $(() => e.position || "bottom-right"), u = $(() => e.timeout != null ? e.timeout : 3e3), g = $(() => {
const h = e.bottom ? e.bottom : i.bottom, y = e.top ? e.top : i.top, b = {
transition: "all 0.2s ease",
left: c.value.indexOf("left") > -1 ? `${e.left ? e.left : i.left}px` : "",
right: c.value.indexOf("right") > -1 ? `${e.right ? e.right : i.right}px` : "",
top: c.value.indexOf("top") > -1 ? `${y}px` : "",
bottom: c.value.indexOf("bottom") > -1 ? `${h}px` : ""
};
return c.value.indexOf("center") > -1 && (b.left = "50%", b.marginLeft = "calc(-24rem / 2)", c.value === "center-center" && (b.top = "50%", b.transform = "translate(-50%, -50%)")), b;
});
function m(h) {
t.emit("close");
}
u.value && setTimeout(() => {
m();
}, u.value), t.expose({
closeToast: m,
container: r,
notifyPosition: c
});
function p(h, y) {
m();
}
return () => {
var h;
return n ? f("div", {
class: l.value,
ref: r
}, [(h =