@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,294 lines • 316 kB
JavaScript
var zn = Object.defineProperty;
var Gn = (e, t, n) => t in e ? zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var q = (e, t, n) => Gn(e, typeof t != "symbol" ? t + "" : t, n);
import { defineComponent as He, ref as T, computed as L, watch as _e, onMounted as ft, createVNode as M, withDirectives as rn, vModelText as qn, nextTick as Ct, Fragment as xt, reactive as at, createApp as an, onUnmounted as Dt, Transition as ln, mergeProps as ht, createTextVNode as vt, onBeforeUnmount as sn, resolveDirective as Un, onBeforeMount as Yn, Teleport as Xn, shallowRef as Kn, render as Lt, h as Qn, cloneVNode as Jn, inject as gt, provide as Zn, triggerRef as eo, isVNode as to } from "vue";
import { isPlainObject as Qt, cloneDeep as dt, isUndefined as Jt } from "lodash-es";
import { useTextBox as no, useClear as oo, useDateFormat as ro, useNumberFormat as io, resolveField as Ye, setFieldValue as Wt, getCustomClass as Pt, withInstall as un, FormSchemaEntityField$Type as Zt, FormSchemaEntityFieldType$Type as ao } from "../common/index.esm.js";
import { DgControl as en } from "../designer-canvas/index.esm.js";
import { useResizeObserver as cn } from "@vueuse/core";
import { useIdentify as lo, useGroupData as so, useFilter as uo, useHierarchy as co, useLoading as fo, useDataView as po, useSelection as mo, useSelectHierarchyItem as ho, useDataViewContainerStyle as vo, useCommandColumn as go, useColumn as yo, useSort as bo, useGroupColumn as Co, useRow as wo, useEdit as _o, useVisualDataBound as So, useVisualDataCell as xo, useVisualDataRow as To, useVisualData as Fo, useCellPosition as Io, useSidebar as Eo, useVirtualScroll as ko, useFitColumn as Mo, useFilterHistory as Oo, useColumnFilter as Bo, useDragColumn as Vo, getColumnHeader as Do, getSidebar as No, getDisableMask as Ro, getHorizontalScrollbar as $o, getVerticalScrollbar as Lo, getEmpty as Po } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import jo from "../transfer/index.esm.js";
import Wo from "../tabs/index.esm.js";
import Ho from "../order/index.esm.js";
import "../condition/index.esm.js";
import Ao, { FCheckbox as zo } from "../checkbox/index.esm.js";
import Go from "../filter-bar/index.esm.js";
import tn from "../tooltip/index.esm.js";
import qo from "../pagination/index.esm.js";
import Uo from "../button/index.esm.js";
import Yo from "../search-box/index.esm.js";
import Xo from "../tags/index.esm.js";
import Ko, { FDynamicFormGroup as Qo, FDynamicFormInput as Jo } from "../dynamic-form/index.esm.js";
import Zo from "../binding-selector/index.esm.js";
import "../notify/index.esm.js";
import er from "../accordion/index.esm.js";
import tr from "../avatar/index.esm.js";
import nr from "../button-edit/index.esm.js";
import or from "../button-group/index.esm.js";
import rr from "../calendar/index.esm.js";
import ir from "../capsule/index.esm.js";
import ar from "../color-picker/index.esm.js";
import Ht from "../combo-list/index.esm.js";
import lr from "../content-container/index.esm.js";
import sr from "../data-grid/index.esm.js";
import ur from "../date-picker/index.esm.js";
import cr from "../dropdown/index.esm.js";
import "../external-container/index.esm.js";
import dr from "../events-editor/index.esm.js";
import fr from "../image-cropper/index.esm.js";
import pr from "../input-group/index.esm.js";
import mr from "../layout/index.esm.js";
import hr from "../list-nav/index.esm.js";
import vr from "../list-view/index.esm.js";
import gr from "../lookup/index.esm.js";
import yr from "../nav/index.esm.js";
import br from "../number-spinner/index.esm.js";
import Cr from "../number-range/index.esm.js";
import wr from "../page-header/index.esm.js";
import _r from "../page-footer/index.esm.js";
import Sr from "../progress/index.esm.js";
import xr from "../query-solution/index.esm.js";
import Tr from "../radio-group/index.esm.js";
import Fr from "../rate/index.esm.js";
import Ir from "../response-toolbar/index.esm.js";
import Er from "../response-layout/index.esm.js";
import kr from "../response-layout-editor/index.esm.js";
import Mr from "../section/index.esm.js";
import Or from "../smoke-detector/index.esm.js";
import Br from "../splitter/index.esm.js";
import Vr from "../step/index.esm.js";
import Dr from "../switch/index.esm.js";
import Nr from "../text/index.esm.js";
import Rr from "../time-picker/index.esm.js";
import $r from "../tree-view/index.esm.js";
import Lr from "../uploader/index.esm.js";
import Pr from "../verify-detail/index.esm.js";
import jr from "../component/index.esm.js";
import Wr from "../video/index.esm.js";
import Hr from "../textarea/index.esm.js";
import Ar from "../tree-grid/index.esm.js";
import zr from "../fieldset/index.esm.js";
import Gr from "../drawer/index.esm.js";
import qr from "../combo-tree/index.esm.js";
import Ur from "../field-selector/index.esm.js";
import Yr from "../mapping-editor/index.esm.js";
import Xr from "../schema-selector/index.esm.js";
import Kr from "../event-parameter/index.esm.js";
import Qr from "../filter-condition-editor/index.esm.js";
import Jr from "../sort-condition-editor/index.esm.js";
import Zr from "../menu-lookup/index.esm.js";
import { createPropsResolver as ei } from "../dynamic-resolver/index.esm.js";
const dn = {}, fn = {};
function qt(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 ? qt(t[u]) : dt(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 ti(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 ? qt(t[i]) : dt(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 pn(e, t = {}, n) {
const o = dn[e];
if (o) {
let r = ti(o);
const a = fn[e];
return r = a ? a({ getSchemaByType: pn }, r, t, n) : r, r;
}
return null;
}
function ni(e, t) {
const n = qt(t);
return Object.keys(n).reduce((o, r) => (Object.prototype.hasOwnProperty.call(e, r) && (o[r] && Qt(o[r]) && Qt(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r]), o), n), n;
}
function mn(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 oi(e, t, n = /* @__PURE__ */ new Map()) {
const o = ni(e, t);
return mn(o, n);
}
function ri(e = {}) {
function t(p, d, l, f) {
if (typeof l == "number")
return f[p].length === l;
if (typeof l == "object") {
const y = Object.keys(l)[0], v = l[y];
if (y === "not")
return Number(f[p].length) !== Number(v);
if (y === "moreThan")
return Number(f[p].length) >= Number(v);
if (y === "lessThan")
return Number(f[p].length) <= Number(v);
}
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 y = f, v = d[f];
return { target: l, operator: "getProperty", param: y, value: v };
}) : [];
}
function a(p) {
return Object.keys(p).reduce((l, f) => {
const y = r(f, p[f]);
return l.push(...y), 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((y, v) => y && i(v, d), !0);
}
function s(p, d) {
const l = Object.keys(p), f = l.includes("allOf"), y = l.includes("anyOf"), v = f || y, m = (v ? p[v ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((F) => u(F, 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: "抽屉" }
}, ii = {}, ai = {};
ri();
function pt(e, t, n = /* @__PURE__ */ new Map(), o = (i, u, s, p) => u, r = {}, a = (i) => i) {
return dn[t.title] = t, fn[t.title] = o, ii[t.title] = r, ai[t.title] = a, (i = {}, u = !0) => {
if (!u)
return mn(i, n);
const s = oi(i, t, n), p = Object.keys(e).reduce((d, l) => (d[l] = e[l].default, d), {});
return Object.assign(p, s);
};
}
function Tt(e, t) {
return { customClass: t.class, customStyle: t.style };
}
function li() {
function e(t, n) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: e
};
}
function si() {
function e(t, n) {
return t.selectItemById(n);
}
return {
selectItemById: e
};
}
function ui() {
function e(t, n) {
const { columns: o } = n;
return t.updateColumns(o);
}
return {
updateColumns: e
};
}
const ci = /* @__PURE__ */ new Map([
["appearance", Tt]
]), di = "https://json-schema.org/draft/2020-12/schema", fi = "https://farris-design.gitee.io/switch.schema.json", pi = "textarea", mi = "A Farris Component", hi = "object", vi = {
id: {
description: "The unique identifier for a textarea",
type: "string"
},
type: {
description: "The type string of textarea component",
type: "string",
default: "textarea"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
binding: {
description: "",
type: "object",
default: {}
},
disabled: {
type: "boolean",
default: !1
},
editable: {
description: "",
type: "boolean",
default: !0
},
placeholder: {
description: "",
type: "string",
default: ""
},
readonly: {
description: "",
type: "boolean",
default: !1
},
required: {
description: "",
type: "boolean",
default: !1
},
tabindex: {
description: "",
type: "number",
default: -1
},
visible: {
description: "",
type: "boolean",
default: !0
},
rows: {
description: "",
type: "number"
},
showCount: {
description: "",
type: "boolean",
default: !0
},
maxLength: {
description: "",
type: "number",
default: ""
}
}, gi = [
"type"
], yi = [
"id",
"appearance",
"binding",
"visible"
], bi = {
$schema: di,
$id: fi,
title: pi,
description: mi,
type: hi,
properties: vi,
required: gi,
ignore: yi
};
function Ci(e, t, n) {
return t;
}
const Ut = {
/** 是否撑开高度 */
autoHeight: { type: Boolean, default: !1 },
/** 自动聚焦 */
autofocus: { type: Boolean, default: !1 },
/** 自动完成 */
autocomplete: { type: Boolean, default: !1 },
/** 禁用 */
disabled: { type: Boolean, default: !1 },
/** 启用清除按钮 */
enableClear: { type: Boolean, default: !1 },
/** 组件标识 */
id: { type: String, default: "" },
/** 最小字符长度 */
minLength: { type: Number, default: 0 },
/** 最大字符长度 */
maxLength: { type: Number },
/** 组件值 */
modelValue: { type: String, default: "" },
/** 背景文字 */
placeholder: { type: String, default: "" },
/** 只读 */
readonly: { type: Boolean, default: !1 },
/** 文本区域可见的行数 */
rows: { type: Number },
/** 展示输入文本数量 */
showCount: { type: Boolean, default: !1 },
/** 展示边线 */
showBorder: { Type: Boolean, default: !0 },
/** 键盘按键索引 */
tabIndex: { type: Number, default: -1 },
/**
* 作为内嵌编辑器被创建后默认获得焦点
*/
focusOnCreated: { type: Boolean, default: !1 },
/**
* 作为内嵌编辑器被创建后默认选中文本
*/
selectOnCreated: { type: Boolean, default: !1 }
}, wi = Object.assign({}, Ut, {
readonly: {}
}), hn = pt(Ut, bi, ci, Ci), kt = /* @__PURE__ */ He({
name: "FTextarea",
props: Ut,
emits: ["update:modelValue", "valueChange", "change"],
setup(e, t) {
const n = T(), o = T(null), r = T(e.modelValue), a = L(() => e.modelValue), i = no(e, t, r, a, n), {
inputGroupClass: u,
onBlur: s,
onFocus: p,
hasFocused: d
} = i, l = oo(e, t, i), {
onMouseEnter: f,
onMouseLeave: y,
clearButtonClass: v,
shouldShowClearButton: B,
clearButtonStyle: x
} = l, m = L(() => e.maxLength ? e.maxLength : e.modelValue ? e.modelValue.length : 0), g = (_) => {
var b, N, V;
_.stopPropagation(), t.emit("update:modelValue", (b = _.target) == null ? void 0 : b.value), t.emit("valueChange", (N = _.target) == null ? void 0 : N.value), t.emit("change", (V = _.target) == null ? void 0 : V.value);
}, F = (_) => {
_.stopPropagation(), o.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", ""), t.emit("change", "");
}, h = (_) => {
if (!d)
return;
const {
shiftKey: b,
altKey: N,
key: V
} = _;
if (_.stopPropagation(), V === "Enter" && !N && _.preventDefault(), (V === "ArrowUp" || V === "ArrowDown") && _.preventDefault(), N && V === "Enter") {
_.preventDefault();
const {
selectionStart: D,
selectionEnd: I
} = o.value;
r.value = r.value.slice(0, D) + `
` + r.value.slice(I), Ct(() => {
var k;
o.value.selectionStart = D + 1, o.value.selectionEnd = D + 1, (k = o.value) == null || k.focus();
});
return;
}
if (b && (V === "ArrowUp" || V === "ArrowDown")) {
_.preventDefault();
const D = o.value.selectionStart, I = r.value;
let k = 0, E = 0, R = 0, H = 0;
const U = I.split(`
`);
for (let Z = 0; Z < U.length; Z++) {
const Q = U[Z].length;
if (H + Q + 1 >= D) {
H = H + Q + 1, k = Z;
break;
} else
H = H + Q + 1;
}
V === "ArrowUp" && k > 0 && (R = D - U[k - 1].length - 1, R >= U[k - 1].length + 1 ? E = 0 : E = U[k - 1].length + 1 - R, Ct(() => {
o.value.selectionStart = D - R - E, o.value.selectionEnd = D - R - E, o.value.focus();
})), V === "ArrowDown" && k < U.length - 1 && (R = D - (H - U[k].length), R >= U[k + 1].length + 1 ? E = 0 : E = U[k + 1].length + 1 - R, Ct(() => {
o.value.selectionStart = D + R + E, o.value.selectionEnd = D + R + E, o.value.focus();
}));
}
}, S = L(() => ({
"form-control": !0,
"h-100": e.autoHeight
})), O = L(() => e.rows > 2 ? {
height: "auto"
} : {}), c = L(() => e.disabled || e.readonly ? "" : e.placeholder);
_e(() => e.modelValue, (_, b) => {
_ !== b && (r.value = _);
});
const C = () => o.value;
t.expose({
elementRef: o,
getTextareaElement: C
});
function w() {
var _, b;
e.selectOnCreated && ((_ = o.value) == null || _.select()), e.focusOnCreated && ((b = o.value) == null || b.focus());
}
return ft(() => {
w();
}), () => M("div", {
ref: n,
class: u.value,
onMouseenter: f,
onMouseleave: y,
style: "position:relative"
}, [rn(M("textarea", {
ref: o,
class: S.value,
id: e.id,
"onUpdate:modelValue": (_) => r.value = _,
minlength: e.minLength,
maxlength: e.maxLength ? e.maxLength : null,
tabindex: e.tabIndex,
disabled: e.disabled,
readonly: e.readonly,
autocomplete: e.autocomplete,
placeholder: c.value,
autofocus: e.autofocus,
rows: e.rows,
onInput: g,
onFocus: p,
onKeydown: h,
style: O.value
}, null), [[qn, r.value]]), B.value && M("span", {
id: "clearIcon",
class: v.value,
style: x.value,
onClick: (_) => F(_)
}, [M("i", {
class: "f-icon modal_close"
}, null)]), e.showCount && M("span", {
style: "position: absolute;bottom: 5px;right: 10px;z-index:999"
}, [`${e.modelValue ? e.modelValue.length : 0}/${m.value}`])]);
}
});
function vn(e, t, n) {
var O;
const o = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", a = T();
function i() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
}
function u() {
return !1;
}
function s() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
}
function p() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
}
function d(c) {
if (!c || !c.value)
return null;
if (c.value.schema && c.value.schema.type === "component")
return c.value;
const C = T(c == null ? void 0 : c.value.parent), w = d(C);
return w || null;
}
function l(c = t) {
var b;
if (n != null && n.getDraggableDesignItemElement)
return n.getDraggableDesignItemElement(c);
const { componentInstance: C, designerItemElementRef: w } = c;
if (!C || !C.value)
return null;
const { getCustomButtons: _ } = C.value;
return C.value.canMove || _ && ((b = _()) != null && b.length) ? w : l(c.parent);
}
function f(c) {
return !!n && n.canAccepts(c);
}
function y() {
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
}
function v() {
}
function B(c, C) {
var w;
!c || !C || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(c, C), (w = t == null ? void 0 : t.setupContext) == null || w.emit("dragEnd"));
}
function x(c, C) {
const { componentType: w } = c;
let _ = pn(w, c, C);
n && n.onResolveNewComponentSchema && (_ = n.onResolveNewComponentSchema(c, _));
const b = w.toLowerCase().replace(/-/g, "_");
return _ && !_.id && _.type === w && (_.id = `${b}_${Math.random().toString().slice(2, 6)}`), _;
}
function m(c) {
c && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(c);
}
function g(...c) {
if (n && n.getPropsConfig)
return n.getPropsConfig(...c);
}
function F() {
n && n.onRemoveComponent && n.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((c) => {
let C = c.id;
c.type === "component-ref" && (C = c.component);
const w = e.value.querySelectorAll(`#${C}-design-item`);
w != null && w.length && Array.from(w).map((_) => {
var b;
(b = _ == null ? void 0 : _.componentInstance) != null && b.value.onRemoveComponent && _.componentInstance.value.onRemoveComponent();
});
});
}
function h() {
if (n && n.getCustomButtons)
return n.getCustomButtons();
}
function S(c) {
if (n && n.onPropertyChanged)
return n.onPropertyChanged(c);
}
return a.value = {
canMove: i(),
canSelectParent: u(),
canDelete: s(),
canNested: !p(),
contents: t == null ? void 0 : t.schema.contents,
elementRef: e,
parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
schema: t == null ? void 0 : t.schema,
styles: o,
designerClass: r,
canAccepts: f,
getBelongedComponentInstance: d,
getDraggableDesignItemElement: l,
getDraggingDisplayText: y,
getPropConfig: g,
getDragScopeElement: v,
onAcceptMovedChildElement: B,
onChildElementMovedOut: m,
addNewChildComponentSchema: x,
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || T(!1),
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
onRemoveComponent: F,
getCustomButtons: h,
onPropertyChanged: S
}, a;
}
const _i = T(0);
function Si() {
_i.value++;
}
const yt = T(0);
function xi(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), r = o.top >= n.top, a = o.top <= n.bottom;
return r && a;
}
function Ti(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 Fi(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 gn(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 = Fi(e);
if (r && (o = xi(e, r)), !o) {
n.style.display = "none";
return;
}
Ti(e);
}
}
function Ii(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && gn(t);
}
class yn {
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": {
yt.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 = dt(o.contents[r]);
o.contents.splice(r, 1), o.contents.splice(r, 0, a), Si();
}
}
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 Mt = bt;
class Ei {
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 ki(e) {
let t, n;
const o = /* @__PURE__ */ new Map();
let r = [];
function a(d, l) {
const y = d.split(" ").filter((g) => g.startsWith("col-"));
if (y.length === 0) {
l.isSupportedClass = !1;
return;
}
let v = y.find((g) => /^col-([1-9]|10|11|12)$/.test(g)), B = y.find((g) => /^col-md-([1-9]|10|11|12)$/.test(g)), x = y.find((g) => /^col-xl-([1-9]|10|11|12)$/.test(g)), m = y.find((g) => /^col-el-([1-9]|10|11|12)$/.test(g));
v = v || "col-12", l.columnInSM = parseInt(v.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), B = B || "col-md-" + l.columnInSM, l.columnInMD = parseInt(B.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), x = x || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(x.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, y = !1) {
let v = !1;
d.contents.forEach((B) => {
if (B.type === "fieldset") {
f += 1, i(B, l, f, !0), v = !0;
return;
}
v && (f += 1, v = !1);
const x = B.appearance && B.appearance.class, m = new Ei();
x ? a(x, m) : m.isSupportedClass = !1, m.label = B.label || B.id, m.id = B.id, m.group = f, y && (m.fieldSetId = d.id), n === B.id && (t = f), o.set(B.id, B), 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, (y) => y.type === en["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: y, formNode: v } = u(l);
if (!f)
return { result: f, message: y };
n = d.id, r = [], o.clear();
const B = v.contents[0].type === en.fieldset.type ? 0 : 1;
i(v, r, B);
const x = r.find((g) => !g.isSupportedClass);
return {
defaultState: {
defaultGroupNumber: t || 1,
model: x ? "customize" : "standard"
},
importData: r
};
}
function p(d, l) {
l = l;
const { result: f, formNode: y } = u(l);
if (!f)
return "";
const v = [];
return d.forEach((B) => {
var g;
const x = o.get(B.id), m = x.appearance && x.appearance.class;
if (m) {
const h = m.split(" ").filter((_) => !_.startsWith("col-")), S = "col-" + B.columnInSM, O = "col-md-" + B.columnInMD, c = "col-xl-" + B.columnInLG, C = "col-el-" + B.columnInEL, w = [S, O, c, C].concat(h);
x.appearance.class = w.join(" ");
}
if (B.fieldSetId) {
const F = y.contents.find((S) => S.id === B.fieldSetId), h = v.find((S) => S.id === B.fieldSetId);
h ? (g = h.contents) == null || g.push(x) : (v.push(F), F.contents = [x]);
} else
v.push(x);
}), y.contents = v, y.id;
}
return {
checkCanFindFormNode: u,
checkCanOpenLayoutEditor: s,
changeFormControlsByResponseLayoutConfig: p,
getResonseFormLayoutConfig: i
};
}
var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Ft(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 Mi = { 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 Ft == "function" && Ft;
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 y = r[p] = { exports: {} };
o[p][0].call(y.exports, function(v) {
var B = o[p][1][v];
return i(B || v);
}, y, y.exports, n, o, r, a);
}
return r[p].exports;
}
for (var u = typeof Ft == "function" && Ft, 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 y = l.className;
y.length ? s(f).test(y) || (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(b, N) {
var V = arguments.length;
V === 1 && Array.isArray(b) === !1 && (N = b, b = []);
var D, I, k, E, R, H, U, Z, Q, pe = null, W, j, A = !1, X = 0, ee, K = N || {};
K.moves === void 0 && (K.moves = g), K.accepts === void 0 && (K.accepts = g), K.invalid === void 0 && (K.invalid = rt), K.containers === void 0 && (K.containers = b || []), K.isContainer === void 0 && (K.isContainer = m), K.copy === void 0 && (K.copy = !1), K.copySortSource === void 0 && (K.copySortSource = !1), K.revertOnSpill === void 0 && (K.revertOnSpill = !1), K.removeOnSpill === void 0 && (K.removeOnSpill = !1), K.direction === void 0 && (K.direction = "vertical"), K.ignoreInputTextSelection === void 0 && (K.ignoreInputTextSelection = !0), K.mirrorContainer === void 0 && (K.mirrorContainer = p.body);
var $ = i({
containers: K.containers,
start: Ge,
end: oe,
cancel: it,
remove: Ie,
destroy: xe,
canMove: Me,
dragging: !1
});
return K.removeOnSpill === !0 && $.on("over", me).on("out", ve), ie(), $;
function G(P) {
return $.containers.indexOf(P) !== -1 || K.isContainer(P);
}
function ie(P) {
var J = P ? "remove" : "add";
v(d, J, "mousedown", Te), v(d, J, "mouseup", Ee);
}
function te(P) {
var J = P ? "remove" : "add";
v(d, J, "mousemove", je);
}
function ne(P) {
var J = P ? "remove" : "add";
u[J](d, "selectstart", Fe), u[J](d, "click", Fe);
}
function xe() {
ie(!0), Ee({});
}
function Fe(P) {
W && P.preventDefault();
}
function Te(P) {
E = P.clientX, R = P.clientY;
var J = B(P) !== 1 || P.metaKey || P.ctrlKey;
if (!J) {
var Y = P.target, ce = Ne(Y);
ce && (W = ce, te(), P.type === "mousedown" && (O(Y) ? Y.focus() : P.preventDefault()));
}
}
function je(P) {
if (W) {
if (B(P) === 0) {
Ee({});
return;
}
if (!(P.clientX !== void 0 && Math.abs(P.clientX - E) <= (K.slideFactorX || 0) && P.clientY !== void 0 && Math.abs(P.clientY - R) <= (K.slideFactorY || 0))) {
if (K.ignoreInputTextSelection) {
var J = _("clientX", P) || 0, Y = _("clientY", P) || 0, ce = p.elementFromPoint(J, Y);
if (O(ce))
return;
}
var ge = W;
te(!0), ne(), oe(), Ae(ge), s.add(Z || k, "gu-transit"), ke(), Se(), X = 0, qe(P);
}
}
}
function Ne(P) {
if (!($.dragging && D) && !G(P)) {
for (var J = P; S(P) && G(S(P)) === !1; )
if (K.invalid(P, J) || (P = S(P), !P))
return;
var Y = S(P);
if (Y && !K.invalid(P, J)) {
var ce = K.moves(P, Y, J, C(P));
if (ce)
return {
item: P,
source: Y
};
}
}
}
function Me(P) {
return !!Ne(P);
}
function Ge(P) {
var J = Ne(P);
J && Ae(J);
}
function Ae(P) {
$e(P.item, P.source) && (Z = P.item.cloneNode(!0), $.emit("cloned", Z, P.item, "copy")), I = P.source, k = P.item, H = U = C(P.item), $.dragging = !0, $.emit("drag", k, I);
}
function rt() {
return !1;
}
function oe() {
if ($.dragging) {
var P = Z || k;
Ve(P, S(P));
}
}
function be() {
W = !1, te(!0), ne(!0);
}
function Ee(P) {
if (be(), !!$.dragging) {
var J = Z || k, Y = _("clientX", P) || 0, ce = _("clientY", P) || 0, ge = x(D, Y, ce), ye = lt(ge, Y, ce);
ye && (Z && K.copySortSource || !Z || ye !== I) ? Ve(J, ye) : K.removeOnSpill ? Ie() : it();
}
}
function Ve(P, J) {
var Y = S(P);
Z && K.copySortSource && J === I && Y.removeChild(k), et(J) ? $.emit("cancel", P, I) : $.emit("drop", P, J, I, U), Ze();
}
function Ie() {
if ($.dragging) {
var P = Z || k, J = S(P);
J && J.removeChild(P), $.emit(Z ? "cancel" : "remove", P, J, I), Ze();
}
}
function it(P) {
if ($.dragging) {
var J = arguments.length > 0 ? P : K.revertOnSpill, Y = Z || k, ce = S(Y), ge = et(ce);
ge === !1 && J && (Z ? ce && ce.removeChild(Z) : I.insertBefore(Y, H)), ge || J ? $.emit("cancel", Y, I, I) : $.emit("drop", Y, ce, I, U), Ze();
}
}
function Ze() {
var P = Z || k;
be(), Re(), ze(), P && s.rm(P, "gu-transit"), Q && clearTimeout(Q), $.dragging = !1, pe && $.emit("out", P, pe, I), $.emit("dragend", P, X), I = k = Z = H = U = Q = pe = null;
}
function et(P, J) {
var Y;
return J !== void 0 ? Y = J : D ? Y = U : Y = C(Z || k), P === I && Y === H;
}
function lt(P, J, Y) {
for (var ce = P; ce && !ge(); )
ce = S(ce);
return ce;
function ge() {
var ye = G(ce);
if (ye === !1)
return !1;
var ae = tt(ce, P), we = Be(ce, ae, J, Y), De = et(ce, we);
return De ? !0 : K.accepts(k, ce, I, we);
}
}
function qe(P) {
if (!D)
return;
P.preventDefault();
var J = _("clientX", P) || 0, Y = _("clientY", P) || 0;
D.style.left = J - 2 + "px", D.style.top = Y - 2 + "px";
var ce = Z || k, ge = x(D, J, Y), ye = lt(ge, J, Y), ae = ye !== null && ye !== pe;
(ae || ye === null) && (Ke(), pe = ye, st()), Ce(ge, Y);
var we = S(ce);
if (ye === I && Z && !K.copySortSource) {
we && we.removeChild(ce);
return;
}
var De, Xe = tt(ye, ge);
if (A = nt(Xe, ye), Xe !== null)
De = Be(ye, Xe, J, Y);
else if (K.revertOnSpill === !0 && !Z)
De = H, ye = I;
else {
Z && we && we.removeChild(ce), Z && j && (j.style.display = "none");
return;
}
j.style.display = "block", re(De, ce, ae), De ? z(Xe, De) : he(ye);
function Le(We) {
$.emit(We, ce, pe, I);
}
function st() {
ae && Le("over");
}
function Ke() {
pe && Le("out");
}
}
function re(P, J, Y) {
(P === J || P === C(J)) && (U = C(J)), (P === null && Y || P !== J && P !== C(J)) && (U = P);
}
function me(P) {
s.rm(P, "gu-hide");
}
function ve(P) {
$.dragging && s.add(P, "gu-hide");
}
function Se() {
D || (D = document.createElement("div"), D.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;", D.innerHTML = K.getMirrorText && K.getMirrorText(k) || "控件", s.add(D, "gu-mirror"), K.mirrorContainer.appendChild(D), v(d, "add", "mousemove", qe), s.add(K.mirrorContainer, "gu-unselectable"), $.emit("cloned", D, k, "mirror"));
}
function ke() {
if (j = document.createElement("div"), s.add(j, "gu-insertion"), k) {
var P = k.getBoundingClientRect();
j.style.left = P.left + "px", j.style.top = P.top + "px";
}
A = !1, K.mirrorContainer.appendChild(j);
}
function Re() {
D && (s.rm(K.mirrorContainer, "gu-unselectable"), v(d, "remove", "mousemove", qe), S(D).removeChild(D), D = null);
}
function ze() {
j && (S(j).removeChild(j), j = null);
}
function tt(P, J) {
for (var Y = J; Y !== P && S(Y) !== P; )
Y = S(Y);
return Y === d ? null : Y;
}
function nt(P, J) {
if (!J)
return A;
var Y = P || J && J.lastElementChild;
if (!Y)
return !0;
var ce = getComputedStyle(P), ge = /^inline/.test(ce.getPropertyValue("display")) || /^(left|right)$/.test(ce.getPropertyValue("float"));
if (ge)
return !0;
if (J) {
var ye = getComputedStyle(J), ae = ye.getPropertyValue("display");
if (/flex$/.test(ae)) {
var we = ye.getPropertyValue("flex-direction") || "row";
if (we === "row" || we === "row-reverse")
return !Ue(J);
}
return !1;
}
return !0;
}
function Ue(P) {
if (!P.children || !P.children.length)
return !1;
for (const J of Array.from(P.children)) {
const ce = (J.className && J.className.split(" ") || []).filter((ge) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ge));
if (!ce.length)
return !1;
for (const ge of ce) {
const ye = ge.slice(ge.lastIndexOf("-") + 1);
if (parseInt(ye, 10) !== 12)
return !1;
}
}
return !0;
}
function z(P, J) {
const Y = J.getBoundingClientRect();
if (j.style.left = Y.left + "px", j.style.top = Y.top + "px", A) {
if (j.style.height = Y.height + "px", j.style.width = "4px", P) {
const ce = P.getBoundingClientRect();
ce.top !== Y.top && (j.style.left = ce.right + "px", j.style.top = ce.top + "px", j.style.height = ce.height + "px");
}
} else if (j.style.height = "4px", j.style.width = Y.width + "px", ee) {
const ce = ee.getBoundingClientRect();
Y.top < ce