@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,477 lines • 320 kB
JavaScript
var Yn = Object.defineProperty;
var Xn = (e, t, n) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var q = (e, t, n) => Xn(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as x, computed as P, watch as we, onMounted as Ze, nextTick as xt, createVNode as I, withDirectives as qt, vModelText as Kn, reactive as rt, resolveDirective as an, defineComponent as We, Fragment as Ct, createApp as ln, onUnmounted as Vt, Transition as sn, mergeProps as mt, createTextVNode as ht, onBeforeUnmount as un, onBeforeMount as Qn, Teleport as Jn, shallowRef as Zn, render as $t, h as eo, cloneVNode as to, inject as vt, provide as no, triggerRef as oo, isVNode as ro } from "vue";
import { isPlainObject as Jt, cloneDeep as ft, isUndefined as Zt } from "lodash-es";
import { useTextBox as io, useClear as cn, useDateFormat as ao, useNumberFormat as lo, resolveField as Ye, setFieldValue as Ht, getCustomClass as Lt, withInstall as dn, FormSchemaEntityField$Type as en, FormSchemaEntityFieldType$Type as so, useTextBoxDesign as uo } from "../common/index.esm.js";
import co, { useNumber as fo, useFormat as po, useSpinner as mo, useTextBox as ho } from "../number-spinner/index.esm.js";
import { DgControl as tn, useDesignerComponent as vo } from "../designer-canvas/index.esm.js";
import { useResizeObserver as fn } from "@vueuse/core";
import { useIdentify as go, useGroupData as yo, useFilter as bo, useHierarchy as Co, useLoading as wo, useDataView as _o, useSelection as So, useSelectHierarchyItem as xo, useDataViewContainerStyle as To, useCommandColumn as Fo, useColumn as Io, useSort as Eo, useGroupColumn as ko, useRow as Mo, useEdit as Oo, useVisualDataBound as Bo, useVisualDataCell as Vo, useVisualDataRow as Do, useVisualData as No, useCellPosition as Ro, useSidebar as Po, useVirtualScroll as $o, useFitColumn as Lo, useFilterHistory as jo, useColumnFilter as Ho, useDragColumn as Wo, getColumnHeader as Ao, getSidebar as Go, getDisableMask as zo, getHorizontalScrollbar as qo, getVerticalScrollbar as Uo, getEmpty as Yo } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import Xo from "../transfer/index.esm.js";
import Ko from "../tabs/index.esm.js";
import Qo from "../order/index.esm.js";
import "../condition/index.esm.js";
import Jo, { FCheckbox as Zo } from "../checkbox/index.esm.js";
import er from "../filter-bar/index.esm.js";
import nn from "../tooltip/index.esm.js";
import tr from "../pagination/index.esm.js";
import nr from "../button/index.esm.js";
import or from "../search-box/index.esm.js";
import rr from "../tags/index.esm.js";
import ir, { FDynamicFormGroup as ar, FDynamicFormInput as lr } from "../dynamic-form/index.esm.js";
import sr from "../binding-selector/index.esm.js";
import "../notify/index.esm.js";
import ur from "../accordion/index.esm.js";
import cr from "../avatar/index.esm.js";
import dr from "../button-edit/index.esm.js";
import fr from "../button-group/index.esm.js";
import pr from "../calendar/index.esm.js";
import mr from "../capsule/index.esm.js";
import hr from "../color-picker/index.esm.js";
import Wt from "../combo-list/index.esm.js";
import vr from "../content-container/index.esm.js";
import gr from "../data-grid/index.esm.js";
import yr from "../date-picker/index.esm.js";
import br from "../dropdown/index.esm.js";
import "../external-container/index.esm.js";
import Cr from "../events-editor/index.esm.js";
import wr from "../image-cropper/index.esm.js";
import _r from "../input-group/index.esm.js";
import Sr from "../layout/index.esm.js";
import xr from "../list-nav/index.esm.js";
import Tr from "../list-view/index.esm.js";
import Fr from "../lookup/index.esm.js";
import Ir from "../nav/index.esm.js";
import Er from "../number-range/index.esm.js";
import kr from "../page-header/index.esm.js";
import Mr from "../page-footer/index.esm.js";
import Or from "../progress/index.esm.js";
import Br from "../query-solution/index.esm.js";
import Vr from "../radio-group/index.esm.js";
import Dr from "../rate/index.esm.js";
import Nr from "../response-toolbar/index.esm.js";
import Rr from "../response-layout/index.esm.js";
import Pr from "../response-layout-editor/index.esm.js";
import $r from "../section/index.esm.js";
import Lr from "../smoke-detector/index.esm.js";
import jr from "../splitter/index.esm.js";
import Hr from "../step/index.esm.js";
import Wr from "../switch/index.esm.js";
import Ar from "../text/index.esm.js";
import Gr from "../time-picker/index.esm.js";
import zr from "../tree-view/index.esm.js";
import qr from "../uploader/index.esm.js";
import Ur from "../verify-detail/index.esm.js";
import Yr from "../component/index.esm.js";
import Xr from "../video/index.esm.js";
import Kr from "../textarea/index.esm.js";
import Qr from "../tree-grid/index.esm.js";
import Jr from "../fieldset/index.esm.js";
import Zr from "../drawer/index.esm.js";
import ei from "../combo-tree/index.esm.js";
import ti from "../field-selector/index.esm.js";
import ni from "../mapping-editor/index.esm.js";
import oi from "../schema-selector/index.esm.js";
import ri from "../event-parameter/index.esm.js";
import ii from "../filter-condition-editor/index.esm.js";
import ai from "../sort-condition-editor/index.esm.js";
import li from "../menu-lookup/index.esm.js";
import { createPropsResolver as si } from "../dynamic-resolver/index.esm.js";
const pn = {}, mn = {};
function Ut(e) {
const { properties: t, title: n, ignore: o } = e, r = o && Array.isArray(o), a = Object.keys(t).reduce((i, u) => ((!r || !o.find((s) => s === u)) && (i[u] = t[u].type === "object" && t[u].properties ? Ut(t[u]) : ft(t[u].default)), i), {});
if (n && (!r || !o.find((i) => i === "id"))) {
const i = n.toLowerCase().replace(/-/g, "_");
a.id = `${i}_${Math.random().toString().slice(2, 6)}`;
}
return a;
}
function ui(e) {
const { properties: t, title: n, required: o } = e;
if (o && Array.isArray(o)) {
const r = o.reduce((a, i) => (a[i] = t[i].type === "object" && t[i].properties ? Ut(t[i]) : ft(t[i].default), a), {});
if (n && o.find((a) => a === "id")) {
const a = n.toLowerCase().replace(/-/g, "_");
r.id = `${a}_${Math.random().toString().slice(2, 6)}`;
}
return r;
}
return {
type: n
};
}
function hn(e, t = {}, n) {
const o = pn[e];
if (o) {
let r = ui(o);
const a = mn[e];
return r = a ? a({ getSchemaByType: hn }, r, t, n) : r, r;
}
return null;
}
function ci(e, t) {
const n = Ut(t);
return Object.keys(n).reduce((o, r) => (Object.prototype.hasOwnProperty.call(e, r) && (o[r] && Jt(o[r]) && Jt(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r]), o), n), n;
}
function vn(e, t) {
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
if (t.has(r)) {
const a = t.get(r);
if (typeof a == "string")
o[a] = e[r];
else {
const i = a(r, e[r], e);
Object.assign(o, i);
}
} else
o[r] = e[r];
return o;
}, {});
}
function di(e, t, n = /* @__PURE__ */ new Map()) {
const o = ci(e, t);
return vn(o, n);
}
function fi(e = {}) {
function t(p, d, l, f) {
if (typeof l == "number")
return f[p].length === l;
if (typeof l == "object") {
const g = Object.keys(l)[0], h = l[g];
if (g === "not")
return Number(f[p].length) !== Number(h);
if (g === "moreThan")
return Number(f[p].length) >= Number(h);
if (g === "lessThan")
return Number(f[p].length) <= Number(h);
}
return !1;
}
function n(p, d, l, f) {
return f[p] && f[p].propertyValue && String(f[p].propertyValue.value) === String(l);
}
const o = /* @__PURE__ */ new Map([
["length", t],
["getProperty", n]
]);
Object.keys(e).reduce((p, d) => (p.set(d, e[d]), p), o);
function r(p, d) {
const l = p;
return typeof d == "number" ? [{ target: l, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: l, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((f) => {
if (f === "length")
return { target: l, operator: "length", param: null, value: d[f] };
const g = f, h = d[f];
return { target: l, operator: "getProperty", param: g, value: h };
}) : [];
}
function a(p) {
return Object.keys(p).reduce((l, f) => {
const g = r(f, p[f]);
return l.push(...g), l;
}, []);
}
function i(p, d) {
if (o.has(p.operator)) {
const l = o.get(p.operator);
return l && l(p.target, p.param, p.value, d) || !1;
}
return !1;
}
function u(p, d) {
return a(p).reduce((g, h) => g && i(h, d), !0);
}
function s(p, d) {
const l = Object.keys(p), f = l.includes("allOf"), g = l.includes("anyOf"), h = f || g, m = (h ? p[h ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((T) => u(T, d));
return f ? !m.includes(!1) : m.includes(!0);
}
return { parseValueSchema: s };
}
const le = {
button: { type: "button", name: "按钮" },
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
"content-container": { type: "content-container", name: "容器" },
"input-group": { type: "input-group", name: "文本" },
textarea: { type: "textarea", name: "多行文本" },
lookup: { type: "lookup", name: "帮助" },
"number-spinner": { type: "number-spinner", name: "数值" },
"date-picker": { type: "date-picker", name: "日期" },
switch: { type: "switch", name: "开关" },
"radio-group": { type: "radio-group", name: "单选组" },
"check-box": { type: "check-box", name: "复选框" },
"check-group": { type: "check-group", name: "复选框组" },
"combo-list": { type: "combo-list", name: "下拉列表" },
"response-form": { type: "response-form", name: "卡片面板" },
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
"tree-grid": { type: "tree-grid", name: "树表格" },
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
"data-grid": { type: "data-grid", name: "表格" },
"data-grid-column": { type: "data-grid-column", name: "表格列" },
module: { type: "Module", name: "模块" },
component: { type: "component", name: "组件" },
tabs: { type: "tabs", name: "标签页" },
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
"time-picker": { type: "time-picker", name: "时间选择" },
section: { type: "section", name: "分组面板" },
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
splitter: { type: "splitter", name: "分栏面板" },
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
"component-ref": { type: "component-ref", name: "组件引用节点" },
uploader: { type: "uploader", name: "附件上传" },
"page-header": { type: "page-header", name: "页头" },
"page-footer": { type: "page-footer", name: "页脚" },
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
fieldset: { type: "fieldset", name: "分组" },
"query-solution": { type: "query-solution", name: "筛选方案" },
drawer: { type: "drawer", name: "抽屉" }
}, pi = {}, mi = {};
fi();
function yt(e, t, n = /* @__PURE__ */ new Map(), o = (i, u, s, p) => u, r = {}, a = (i) => i) {
return pn[t.title] = t, mn[t.title] = o, pi[t.title] = r, mi[t.title] = a, (i = {}, u = !0) => {
if (!u)
return vn(i, n);
const s = di(i, t, n), p = Object.keys(e).reduce((d, l) => (d[l] = e[l].default, d), {});
return Object.assign(p, s);
};
}
function Dt(e, t) {
return { customClass: t.class, customStyle: t.style };
}
function hi() {
function e(t, n) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: e
};
}
function vi() {
function e(t, n) {
return t.selectItemById(n);
}
return {
selectItemById: e
};
}
function gi() {
function e(t, n) {
const { columns: o } = n;
return t.updateColumns(o);
}
return {
updateColumns: e
};
}
const yi = /* @__PURE__ */ new Map([
["appearance", Dt]
]);
function bi(e, t, n) {
return t;
}
const Ci = "https://json-schema.org/draft/2020-12/schema", wi = "https://farris-design.gitee.io/input-group.schema.json", _i = "input-group", Si = "A Farris Input Component", xi = "object", Ti = {
id: {
description: "The unique identifier for a Input Group",
type: "string"
},
type: {
description: "The type string of Input Group component",
type: "string",
default: "input-group"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
binding: {
description: "",
type: "object",
default: {}
},
editable: {
description: "",
type: "boolean",
default: !0
},
enableLinkLabel: {
description: "",
type: "boolean",
default: !1
},
label: {
description: "",
type: "string",
default: ""
},
labelWidth: {
description: "",
type: "number"
},
placeholder: {
description: "",
type: "string",
default: ""
},
readonly: {
description: "",
type: "boolean",
default: !1
},
disabled: {
description: "",
type: "boolean",
default: !1
},
required: {
description: "",
type: "boolean",
default: !1
},
tabIndex: {
description: "",
type: "number",
default: -1
},
maxLength: {
description: "",
type: "number",
default: ""
},
textAlign: {
description: "",
type: "enum",
enum: [
"left",
"middle",
"right"
],
default: "left"
},
visible: {
description: "",
type: "boolean",
default: !0
},
onBlur: {
description: "",
type: "string",
default: ""
},
onClickLinkLabel: {
description: "",
type: "sting",
default: ""
},
addonDisabled: {
description: "",
type: "boolean",
default: !1
},
addonContent: {
description: "",
type: "string",
default: ""
},
autoHeight: {
description: "",
type: "boolean",
default: !1
},
enableAddon: {
description: "",
type: "boolean",
default: !1
},
addonType: {
description: "",
type: "string",
enum: [
"button",
"static"
],
default: "button"
},
enableClear: {
description: "",
type: "boolean",
default: !0
},
enableViewPassword: {
description: "",
type: "boolean",
default: !1
},
inputType: {
description: "",
type: "string",
enum: [
"input",
"password",
"text"
],
default: "input"
},
maxHeight: {
description: "",
type: "number",
default: 500
},
popUp: {
description: "",
type: "object",
properties: {
footerButtons: {
type: "array",
default: []
},
height: {
type: "number",
default: 600
},
dataMapping: {
type: "object"
},
contents: {
type: "array",
default: []
},
showMaxButton: {
type: "boolean",
default: !0
},
showCloseButton: {
type: "boolean",
default: !0
},
showFooter: {
type: "boolean",
default: !0
},
title: {
type: "string",
default: ""
},
width: {
type: "number",
default: 800
}
}
},
groupText: {
description: "",
type: "string",
default: ""
},
onClickHandle: {
description: "",
type: "string",
default: ""
},
showButtonWhenDisabled: {
description: "",
type: "boolean",
default: !1
},
onClear: {
description: "",
type: "string",
default: ""
},
updateOn: {
description: "",
type: "string",
default: "blur"
}
}, Fi = [
"type"
], Ii = [
"id",
"appearance",
"binding",
"visible"
], Ei = {
$schema: Ci,
$id: wi,
title: _i,
description: Si,
type: xi,
properties: Ti,
required: Fi,
ignore: Ii
}, Yt = {
id: { Type: String, default: "" },
/** 是否自动完成 */
autocomplete: { Type: String, default: "off" },
/** 自定义CLASS */
customClass: { Type: String, default: "" },
/** 禁用 */
disabled: { Type: Boolean, default: !1 },
/** 允许编辑 */
editable: { Type: Boolean, default: !0 },
/** 启用清除按钮 */
enableClear: { Type: Boolean, default: !0 },
/** 启用提示文本 */
enableTitle: { Type: Boolean, default: !0 },
/** 启用密码 */
enableViewPassword: { Type: Boolean, default: !0 },
/** 始终显示占位符文本 */
forcePlaceholder: { Type: Boolean, default: !1 },
/** 扩展按钮 */
groupText: { Type: String, default: "" },
/** 密码模式 */
type: { Type: String, default: "text" },
/** 最大值 */
max: { type: [Number, String] },
/** 最小值 */
min: { type: [Number, String] },
/** 最大长度 */
maxLength: { Type: Number || void 0, default: void 0 },
/** 最小长度 */
minLength: { Type: Number || void 0, default: void 0 },
/** 组件值 */
modelValue: { Type: String || Boolean, default: "" },
/** 隐藏边线 */
showBorder: { Type: Boolean, default: !0 },
/** 步长 */
step: { Type: Number, default: 1 },
/** 启用提示信息 */
placeholder: { Type: String, default: "" },
precision: { Type: Number, default: 0 },
/** 只读 */
readonly: { Type: Boolean, default: !1 },
/** 当组件禁用或只读时显示后边的按钮 */
showButtonWhenDisabled: { Type: Boolean, default: !1 },
/** tab索引 */
tabIndex: { Type: Number || void 0, default: void 0 },
/** 文本在输入框中的对齐方式 */
textAlign: { Type: String, default: "left" },
/** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
useExtendInfo: { Type: Boolean, default: !1 },
/** 前置扩展信息 */
extendInfo: { Type: String, default: "" },
/** 输入值 */
value: { Type: String, default: "" },
/** 是否撑开高度 */
autoHeight: { type: Boolean, default: !1 },
/** 自动聚焦 */
autofocus: { type: Boolean, default: !1 },
/** 文本区域可见的行数 */
rows: { type: Number, default: 2 },
/** 展示输入文本数量 */
showCount: { type: Boolean, default: !1 },
/**
* 作为内嵌编辑器被创建后默认获得焦点
*/
focusOnCreated: { type: Boolean, default: !1 },
/**
* 作为内嵌编辑器被创建后默认选中文本
*/
selectOnCreated: { type: Boolean, default: !1 },
/**
* modelValue 更新时机, 默认 blur; 可选值:blur | input
* - blur: 离开焦点时更新
* - input: 输入时更新
*/
updateOn: { type: String, default: "blur" },
/** 阻止聚焦滚动 默认是浏览器行为会滚动 */
preventScroll: { type: Boolean, default: !1 }
}, gn = yt(Yt, Ei, yi, bi);
function yn(e, t) {
const n = x(e.groupText), o = P(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), r = P(() => e.enableClear || !!e.groupText);
return { appendedButtonClass: P(() => ({
"input-group-append": !0,
"append-force-show": o.value
})), appendedContent: n, shouldShowAppendedButton: r };
}
function bn(e, t, n, o) {
const { appendedContent: r } = o, a = x(e.enableViewPassword), i = P(() => e.type === "password"), u = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', s = '<span class="f-icon f-icon-eye"></span>', p = x(!1);
we(() => [e.readonly, e.disabled], ([f, g]) => {
i.value && (n.value = f || g ? "password" : n.value, r.value = f || g ? s : r.value);
});
function d() {
return p.value = !p.value, n.value = p.value ? "text" : "password", r.value = p.value ? u : s, !1;
}
function l() {
n.value = i.value ? "password" : "text", r.value = i.value ? a.value ? s : "" : r.value;
}
return l(), { isPassword: i, onClickAppendedButton: d };
}
function ki(e, t, n) {
const o = x(), {
onBlurTextBox: r,
onFocusTextBox: a,
onInput: i,
onKeyDown: u,
textBoxValue: s
} = n, p = P(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), d = P(() => ({
"form-control": !0,
"f-utils-fill": !0
})), l = P(() => ({
"text-align": e.textAlign
}));
function f(E) {
E.stopPropagation();
}
function g() {
var E, S;
e.selectOnCreated && ((E = o.value) == null || E.select()), e.focusOnCreated && ((S = o.value) == null || S.focus());
}
async function h(E) {
a(E), await xt, g();
}
return Ze(async () => {
await xt, g();
}), () => I("input", {
ref: o,
class: d.value,
style: l.value,
type: "text",
value: s.value,
disabled: e.disabled,
readonly: e.readonly || !e.editable,
placeholder: p.value,
onBlur: r,
onChange: f,
onFocus: h,
onInput: i,
onKeydown: u
}, null);
}
function Mi(e, t, n) {
const {
canDownward: o,
canUpward: r,
onClickDownButton: a,
onClickUpButton: i
} = n, u = P(() => ({
"input-group-append": !0,
"btn-group": !0,
"btn-group-number": !0
})), s = P(() => ({
btn: !0,
"btn-secondary": !0,
"btn-number-flag": !0
})), p = P(() => ({
cursor: r() ? "pointer" : "not-allowed",
"margin-left": 0
})), d = P(() => ({
cursor: o() ? "pointer" : "not-allowed",
"margin-left": 0
}));
return () => I("div", {
class: u.value
}, [I("button", {
class: s.value,
style: p.value,
onClick: i,
disabled: !r()
}, [I("span", {
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron",
style: "cursor: inherit"
}, null)]), I("button", {
class: s.value,
style: d.value,
onClick: a,
disabled: !o()
}, [I("span", {
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron",
style: "cursor: inherit"
}, null)])]);
}
function Oi(e, t) {
const n = fo(e, t), o = po(e, t, n), r = mo(e, t, o, n), a = ho(e, t, o, n, r), i = Mi(e, t, r), {
displayValue: u,
modelValue: s,
getRealValue: p
} = n, d = ki(e, t, a), {
format: l
} = o, {
isFocus: f
} = a, g = P(() => !e.disabled && !e.readonly);
return Ze(() => {
const h = p(e.modelValue);
u.value = l(h);
}), we(() => [e.value], ([h]) => {
const E = p(h);
s.value = E, u.value = l(E);
}), we(() => [e.modelValue], ([h]) => {
h !== s.value && (s.value = h, !f.value && (u.value = l(p(h))));
}), we(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
u.value = l(s.value);
}), () => I("div", {
class: "input-group flex-row f-cmp-number-spinner"
}, [d(), g.value && i()]);
}
function Bi(e, t, n, o) {
const r = x(), {
inputGroupClass: a,
onBlur: i,
onFocus: u
} = o, {
clearButtonClass: s,
clearButtonStyle: p
} = n, d = P(() => e.maxLength ? e.maxLength : e.modelValue ? e.modelValue.length : 0), l = (b) => {
var k, c;
b.stopPropagation(), t.emit("update:modelValue", (k = b.target) == null ? void 0 : k.value), t.emit("valueChange", (c = b.target) == null ? void 0 : c.value);
}, f = P(() => ({
"form-control": !0,
"h-100": e.autoHeight
})), g = P(() => e.enableClear && !e.readonly && !e.disabled), h = P(() => e.disabled || e.readonly ? "" : e.placeholder), E = P(() => ({
...p.value,
position: "absolute",
right: "5px",
top: "50%",
transform: "translateY(-50%)",
"background-color": "rgb(199, 207, 221)",
"border-radius": "100%",
width: "16px",
height: "16px"
})), S = P(() => {
const b = {
resize: "none",
"padding-right": "15px"
};
return e.rows > 2 ? {
height: "auto",
...b
} : b;
}), m = (b) => {
b.stopPropagation(), r.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
};
function y() {
return qt(I("textarea", {
class: f.value,
id: e.id,
"onUpdate:modelValue": (b) => e.modelValue = b,
ref: r,
minlength: e.minLength,
maxlength: e.maxLength ? e.maxLength : null,
tabindex: e.tabIndex,
disabled: e.disabled,
readonly: e.readonly,
autocomplete: e.autocomplete,
placeholder: h.value,
autofocus: e.autofocus,
rows: e.rows,
onInput: l,
onFocus: u,
onBlur: i,
style: S.value
}, null), [[Kn, e.modelValue]]);
}
function T() {
return e.showCount && I("span", {
style: "position: absolute;bottom: 0;right: 5px;z-index:999;font-size:12px"
}, [`${e.modelValue ? e.modelValue.length : 0}/${d.value}`]);
}
function v() {
return g.value && I("span", {
id: "clearIcon",
class: s.value,
style: E.value,
onClick: (b) => m(b)
}, [I("i", {
class: "f-icon modal_close",
style: "font-size:8px;color:#fff"
}, null)]);
}
return {
renderTextarea: y,
renderCount: T,
renderClear: v
};
}
function Vi(e, t, n, o) {
const r = x(), a = x(e.autocomplete), i = x(e.enableTitle), {
isPassword: u
} = n, s = x(e.minLength), p = x(e.maxLength), d = x(e.tabIndex), {
disabled: l,
displayText: f,
inputType: g,
// onBlur,
onFocus: h,
onInput: E,
onClick: S,
onKeydown: m,
onKeyup: y,
onMousedown: T,
onMouseup: v,
onTextBoxValueChange: b,
readonly: k,
placeholder: c,
textBoxClass: w,
textBoxTitle: C
} = o;
return Ze(() => {
var F, _;
e.selectOnCreated && ((F = r.value) == null || F.select()), e.focusOnCreated && ((_ = r.value) == null || _.focus({
preventScroll: e.preventScroll
}));
}), () => I("input", {
ref: r,
name: "input-group-value",
autocomplete: a.value,
class: w.value,
disabled: l == null ? void 0 : l.value,
maxlength: p.value,
minlength: s.value,
placeholder: c.value,
readonly: k == null ? void 0 : k.value,
tabindex: d.value,
title: i.value && !u.value ? C.value : "",
type: g.value,
value: f == null ? void 0 : f.value,
onClick: S,
onChange: b,
onFocus: h,
onInput: E,
onKeydown: m,
onKeyup: y,
onMousedown: T,
onMouseup: v
}, null);
}
function Di(e, t) {
const n = P(() => e.useExtendInfo && !!e.extendInfo), o = rt({
content: e.extendInfo
});
function r() {
t.emit("updateExtendInfo");
}
return () => n.value && qt(I("span", {
class: "input-group-before-tips",
onMouseenter: r
}, [I("i", {
class: "f-icon f-icon-info-circle"
}, null), I("b", {
class: "tips-arrow"
}, null)]), [[an("tooltip"), o]]);
}
function Cn(e, t, n, o, r) {
const {
appendedButtonClass: a,
appendedContent: i
} = n, u = P(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), s = P(() => i.value && !t.slots.groupTextTemplate), p = P(() => !!t.slots.groupTextTemplate), {
clearButtonClass: d,
clearButtonStyle: l,
onClearValue: f,
shouldShowClearButton: g
} = o;
function h() {
return I("span", {
id: "clearIcon",
class: d.value,
style: l.value,
onClick: (c) => f(c)
}, [I("i", {
class: "f-icon modal_close"
}, null)]);
}
function E(c) {
t.emit("iconMouseEnter", c);
}
function S(c) {
t.emit("iconMouseLeave", c);
}
function m(c) {
u.value && t.emit("clickHandle", {
originalEvent: c
}), c.stopPropagation();
}
const y = e.type === "password" ? r.onClickAppendedButton : m;
function T() {
return I("span", {
class: "input-group-text",
onMouseenter: (c) => E(c),
onMouseleave: (c) => S(c),
innerHTML: i.value,
onClick: (c) => y(c)
}, null);
}
function v() {
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
}
function b() {
return s.value ? T : p.value ? v : "";
}
const k = b();
return () => I("div", {
class: a.value
}, [g.value && h(), k && k()]);
}
const Et = /* @__PURE__ */ We({
name: "FInputGroup",
props: Yt,
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange", "mousedownEvent", "mouseupEvent"],
setup(e, t) {
const n = x(), o = x(e.modelValue), r = x(e.modelValue), a = io(e, t, o, r, n), {
inputGroupClass: i,
inputType: u,
inputGroupStyle: s
} = a, p = yn(e), {
shouldShowAppendedButton: d
} = p, l = cn(e, t, a), {
onMouseEnter: f,
onMouseLeave: g
} = l, h = bn(e, t, u, p), E = Oi(e, t), {
renderTextarea: S,
renderCount: m,
renderClear: y
} = Bi(e, t, l, a), T = Vi(e, t, h, a), v = Cn(e, t, p, l, h), b = Di(e, t), k = P(() => e.type === "number"), c = P(() => e.type === "textarea");
we(() => [e.value], ([C]) => {
o.value = C, r.value = C;
}), we(() => [e.modelValue], ([C]) => {
o.value = C, r.value = C;
}), Ze(() => {
e.value && (o.value = e.value, r.value = e.value);
});
const w = () => I("div", {
ref: n,
id: e.id,
class: i.value,
style: s.value,
onMouseenter: f,
onMouseleave: g
}, [k.value ? E() : c.value ? S() : I(Ct, null, [b(), T()]), !c.value && d.value && v(), c.value && y(), c.value && m()]);
return () => w();
}
}), Ni = x(0);
function Ri() {
Ni.value++;
}
const gt = x(0);
function Pi(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), r = o.top >= n.top, a = o.top <= n.bottom;
return r && a;
}
function $i(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 r = o.getBoundingClientRect();
o.style.top = n.top + "px";
let a = n.left - r.width;
const i = document.querySelector(".editorDiv");
if (i) {
const u = i.getBoundingClientRect();
a < u.left && ({ left: a } = e.getBoundingClientRect());
}
o.style.left = a + "px";
}
}
}
function Li(e) {
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length && t.length === 1) {
const n = t[0], o = document.querySelector(`[id=${n}]`);
if (o && o.contains(e))
return o;
}
}
function wn(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 r = Li(e);
if (r && (o = Pi(e, r)), !o) {
n.style.display = "none";
return;
}
$i(e);
}
}
function ji(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && wn(t);
}
class _n {
constructor(t, n) {
q(this, "componentId");
q(this, "viewModelId");
q(this, "eventsEditorUtils");
q(this, "formSchemaUtils");
q(this, "formMetadataConverter");
q(this, "designViewModelUtils");
q(this, "designViewModelField");
q(this, "controlCreatorUtils");
q(this, "designerHostService");
q(this, "schemaService", null);
q(this, "metadataService", null);
q(this, "propertyConfig", {
type: "object",
categories: {}
});
var o;
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
}
getTableInfo() {
var t;
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(t) {
var o;
const n = t.binding && t.binding.type === "Form" && t.binding.field;
if (n) {
if (!this.designViewModelField) {
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = r.fields.find((a) => a.id === n);
}
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
}
}
getBasicPropConfig(t) {
return {
description: "Basic Information",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "combo-list",
textField: "name",
valueField: "value",
editable: !1,
data: [{ value: t.type, name: le[t.type].name }]
}
}
}
};
}
getAppearanceConfig(t = null) {
return {
title: "外观",
description: "Appearance",
properties: {
class: {
title: "class样式",
type: "string",
description: "组件的CSS样式",
$converter: "/converter/appearance.converter"
},
style: {
title: "style样式",
type: "string",
description: "组件的样式",
$converter: "/converter/appearance.converter"
}
},
setPropertyRelates(n, o) {
if (n)
switch (n && n.propertyID) {
case "class":
case "style": {
gt.value++;
break;
}
}
}
};
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(t, n) {
const o = n && n.parent && n.parent.schema;
if (!o)
return;
const r = o.contents.findIndex((i) => i.id === t), a = ft(o.contents[r]);
o.contents.splice(r, 1), o.contents.splice(r, 0, a), Ri();
}
}
const bt = class bt {
/**
* 根据绑定字段类型获取可用的输入类控件
*/
static getEditorTypesByMDataType(t, n = "") {
let o = bt.fieldControlTypeMapping[t];
if (n === "data-grid-column" && (o != null && o.length)) {
const r = [le["check-group"].type, le["radio-group"].type];
o = o.filter((a) => !r.includes(a.key));
}
return o;
}
/**
* 获取所有输入类控件
*/
static getAllInputTypes() {
const t = [];
for (const n in bt.fieldControlTypeMapping)
bt.fieldControlTypeMapping[n].forEach((o) => {
t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
});
return t;
}
/**
* 提供schema字段基础属性和DOM控件属性的映射
* @param control 控件元数据
*/
static mappingDomPropAndSchemaProp(t) {
var r;
const n = (r = t.editor) == null ? void 0 : r.type, o = [];
return (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === le["input-group"].type || n === le.textarea.type || n === le["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === le["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === le["combo-list"].type || n === le["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === le["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === le["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === le.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
}
};
/**
* <字段类型,可配置的控件类型列表>的映射
*/
q(bt, "fieldControlTypeMapping", {
String: [
{ key: le["input-group"].type, value: le["input-group"].name },
{ key: le.lookup.type, value: le.lookup.name },
{ key: le["date-picker"].type, value: le["date-picker"].name },
{ key: le["check-group"].type, value: le["check-group"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name },
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le.textarea.type, value: le.textarea.name },
{ key: le["time-picker"].type, value: le["time-picker"].name }
],
Text: [
{ key: le.textarea.type, value: le.textarea.name },
{ key: le.lookup.type, value: le.lookup.name }
],
Decimal: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Integer: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Number: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
BigNumber: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Date: [
{ key: le["date-picker"].type, value: le["date-picker"].name }
],
DateTime: [
{ key: le["date-picker"].type, value: le["date-picker"].name }
],
Boolean: [
{ key: le.switch.type, value: le.switch.name },
{ key: le["check-box"].type, value: le["check-box"].name }
],
Enum: [
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name }
],
Object: [
{ key: le.lookup.type, value: le.lookup.name },
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name }
]
});
let kt = bt;
class Hi {
constructor() {
/** 控件标题 */
q(this, "label", "");
/** 控件id */
q(this, "id", "");
/** 每个控件占用的栅格数 */
q(this, "columnInSM", 12);
q(this, "columnInMD", 6);
q(this, "columnInLG", 3);
q(this, "columnInEL", 2);
/** 每个控件占用的列数 */
q(this, "displayWidthInSM", 1);
q(this, "displayWidthInMD", 1);
q(this, "displayWidthInLG", 1);
q(this, "displayWidthInEL", 1);
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
q(this, "displayColumnCountAtBreakPoint", "md");
/** 控件所在行,传0即可-----编辑器内部使用 */
q(this, "tagRow", 0);
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
q(this, "showTopBorder", 0);
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
q(this, "group", 1);
/** 控件是否符合标准的class配置(设计器用的) */
q(this, "isSupportedClass", !0);
/** 控件所在分组id(设计器用的) */
q(this, "fieldSetId", "");
}
}
function Wi(e) {
let t, n;
const o = /* @__PURE__ */ new Map();
let r = [];
function a(d, l) {
const g = d.split(" ").filter((y) => y.startsWith("col-"));
if (g.length === 0) {
l.isSupportedClass = !1;
return;
}
let h = g.find((y) => /^col-([1-9]|10|11|12)$/.test(y)), E = g.find((y) => /^col-md-([1-9]|10|11|12)$/.test(y)), S = g.find((y) => /^col-xl-([1-9]|10|11|12)$/.test(y)), m = g.find((y) => /^col-el-([1-9]|10|11|12)$/.test(y));
h = h || "col-12", l.columnInSM = parseInt(h.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), E = E || "col-md-" + l.columnInSM, l.columnInMD = parseInt(E.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), S = S || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(S.replace("col-xl-", ""), 10), l.displayWidthInLG = l.columnInLG / 3, [1, 2, 3, 4].includes(l.displayWidthInLG) || (l.isSupportedClass = !1), m = m || "col-el-" + l.columnInLG, l.columnInEL = parseInt(m.replace("col-el-", ""), 10), l.displayWidthInEL = l.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(l.displayWidthInEL) || (l.isSupportedClass = !1);
}
function i(d, l, f, g = !1) {
let h = !1;
d.contents.forEach((E) => {
if (E.type === "fieldset") {
f += 1, i(E, l, f, !0), h = !0;
return;
}
h && (f += 1, h = !1);
const S = E.appearance && E.appearance.class, m = new Hi();
S ? a(S, m) : m.isSupportedClass = !1, m.label = E.label || E.id, m.id = E.id, m.group = f, g && (m.fieldSetId = d.id), n === E.id && (t = f), o.set(E.id, E), l.push(m);
});
}
function u(d) {
const l = e.getComponentById(d);
if (!l || !l.componentType || !l.componentType.startsWith("form"))
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
const f = e.selectNode(l, (g) => g.type === tn["response-form"].type);
return !f || !f.contents || f.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: f };
}
function s(d, l) {
l = l || d.id;
const { result: f, message: g, formNode: h } = u(l);
if (!f)
return { result: f, message: g };
n = d.id, r = [], o.clear();
const E = h.contents[0].type === tn.fieldset.type ? 0 : 1;
i(h, r, E);
const S = r.find((y) => !y.isSupportedClass);
return {
defaultState: {
defaultGroupNumber: t || 1,
model: S ? "customize" : "standard"
},
importData: r
};
}
function p(d, l) {
l = l;
const { result: f, formNode: g } = u(l);
if (!f)
return "";
const h = [];
return d.forEach((E) => {
var y;
const S = o.get(E.id), m = S.appearance && S.appearance.class;
if (m) {
const v = m.split(" ").filter((F) => !F.startsWith("col-")), b = "col-" + E.columnInSM, k = "col-md-" + E.columnInMD, c = "col-xl-" + E.columnInLG, w = "col-el-" + E.columnInEL, C = [b, k, c, w].concat(v);
S.appearance.class = C.join(" ");
}
if (E.fieldSetId) {
const T = g.contents.find((b) => b.id === E.fieldSetId), v = h.find((b) => b.id === E.fieldSetId);
v ? (y = v.contents) == null || y.push(S) : (h.push(T), T.contents = [S]);
} else
h.push(S);
}), g.contents = h, g.id;
}
return {
checkCanFindFormNode: u,
checkCanOpenLayoutEditor: s,
changeFormControlsByResponseLayoutConfig: p,
getResonseFormLayoutConfig: i
};
}
var ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Tt(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 Ai = { exports: {} };
(function(e, t) {
(function(n) {
e.exports = n();
})(function() {
return (/* @__PURE__ */ function() {
function n(o, r, a) {
function i(p, d) {
if (!r[p]) {
if (!o[p]) {
var l = typeof Tt == "function" && Tt;
if (!d && l) return l(p, !0);
if (u) return u(p, !0);
var f = new Error("Cannot find module '" + p + "'");
throw f.code = "MODULE_NOT_FOUND", f;
}
var g = r[p] = { exports: {} };
o[p][0].call(g.exports, function(h) {
var E = o[p][1][h];
return i(E || h);
}, g, g.exports, n, o, r, a);
}
return r[p].exports;
}
for (var u = typeof Tt == "function" && Tt, s = 0; s < a.length; s++) i(a[s]);
return i;
}
return n;
}())({
1: [function(n, o, r) {
var a = {}, i = "(?:^|\\s)", u = "(?:\\s|$)";
function s(l) {
var f = a[l];
return f ? f.lastIndex = 0 : a[l] = f = new RegExp(i + l + u, "g"), f;
}
function p(l, f) {
var g = l.className;
g.length ? s(f).test(g) || (l.className += " " + f) : l.className = f;
}
function d(l, f) {
l.className = l.className.replace(s(f), " ").trim();
}
o.exports = {
add: p,
rm: d
};
}, {}],
2: [function(n, o, r) {
(function(a) {
var i = n("contra/emitter"), u = n("crossvent"), s = n("./classes"), p = document, d = p.documentElement;
function l(_, N) {
var V = arguments.length;
V === 1 && Array.isArray(_) === !1 && (N = _, _ = []);
var D, M, B, O, R, W, K, oe, te, pe = null, H, j, A = !1, Y = 0, J, X = N || {};
X.moves === void 0 && (X.moves = y), X.accepts === void 0 && (X.accepts = y), X.invalid === void 0 && (X.invalid = at), X.containers === void 0 && (X.containers = _ || []), X.isContainer === void 0 && (X.isContainer = m), X.copy === void 0 && (X.copy = !1), X.copySortSource === void 0 && (X.copySortSource = !1), X.revertOnSpill === void 0 && (X.revertOnSpill = !1), X.removeOnSpill === void 0 && (X.removeOnSpill = !1), X.direction === void 0 && (X.direction = "vertical"), X.ignoreInputTextSelection === void 0 && (X.ignoreInputTextSelection = !0), X.mirrorContainer === void 0 && (X.mirrorContainer = p.body);
var $ = i({
containers: X.containers,
start: ze,
end: ne,
cancel: lt,
remove: Ie,
destroy: xe,
canMove: Me,
dragging: !1
});
return X.removeOnSpill === !0 && $.on("over", me).on("out", ve), ie(), $;
function z(L) {
return $.containers.indexOf(L) !== -1 || X.isContainer(L);
}
function ie(L) {
var Q = L ? "remove" : "add";
h(d, Q, "mousedown", Te), h(d, Q, "mouseup", Ee);
}
function Z(L) {
var Q = L ? "remove" : "add";
h(d, Q, "mousemove", je);
}
function ee(L) {
var Q = L ? "remove" : "add";
u[Q](d, "selectstart", Fe), u[Q](d, "click", Fe);
}
function xe() {
ie(!0), Ee({});
}
function Fe(L) {
H && L.preventDefault();
}
function Te(L) {
O = L.clientX, R = L.clientY;
var Q = E(L) !== 1 || L.metaKey || L.ctrlKey;
if (!Q) {
var U = L.target, ce = Ne(U);
ce && (H = ce, Z(), L.type === "mousedown" && (k(U) ? U.focus() : L.preventDefault()));
}
}
function je(L) {
if (H) {
if (E(L) === 0) {
Ee({});
return;
}
if (!(L.clientX !== void 0 && Math.abs(L.clientX - O) <= (X.slideFactorX || 0) && L.clientY !== void 0 && Math.abs(L.clientY - R) <= (X.slideFactorY || 0))) {
if (X.ignoreInputTextSelection) {
var Q = F("clientX", L) || 0, U = F("clientY", L) || 0, ce = p.elementFromPoint(Q, U);
if (k(ce))
return;
}
var ge = H;
Z(!0), ee(), ne(), Ae(ge), s.add(oe || B, "gu-transit"), ke(), Se(), Y = 0, qe(L);
}
}
}
function Ne(L) {
if (!($.dragging && D) && !z(L)) {
for (var Q = L; b(L) && z(b(L)) === !1; )
if (X.invalid(L, Q) || (L = b(L), !L))
return;
var U = b(L);
if (U && !X.invalid(L, Q)) {
var ce = X.moves(L, U, Q, w(L));
if (ce)
return {
item: L,
source: U
};
}
}
}
function Me(L) {
return !!Ne(L);
}
function ze(L) {
var Q = Ne(L);
Q && Ae(Q);
}
function Ae(L) {
Pe(L.item, L.source) && (oe = L.item.cloneNode(!0), $.emit("cloned", oe, L.item, "copy")), M = L.source, B = L.item, W = K = w(L.item), $.dragging = !0, $.emit("drag", B, M);
}
function at() {
return !1;
}
function ne() {
if ($.dragging) {
var L = oe || B;
Ve(L, b(L));
}
}
function be() {
H = !1, Z(!0), ee(!0);
}
function Ee(L) {
if (be(), !!$.dragging) {
var Q = oe || B, U = F("clientX", L) || 0, ce = F("clientY", L) || 0, ge = S(D, U, ce), ye = st(ge, U, ce);
ye && (oe && X.copySortSource || !oe || ye !== M) ? Ve(Q, ye) : X.removeOnSpill ? Ie() : lt();
}
}
function Ve(L, Q) {
var U = b(L);
oe && X.copySortSource && Q === M && U.removeChild(B), tt(Q) ? $.emit("cancel", L, M) : $.emit("drop", L, Q, M, K), et();
}
function Ie() {
if ($.dragging) {
var L = oe || B, Q = b(L);
Q && Q.removeChild(L), $.emit(oe ? "cancel" : "remove