@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,421 lines • 328 kB
JavaScript
var Io = Object.defineProperty;
var Eo = (e, t, n) => t in e ? Io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var ne = (e, t, n) => Eo(e, typeof t != "symbol" ? t + "" : t, n);
import { defineComponent as Ve, createVNode as C, computed as N, createTextVNode as We, ref as w, inject as ut, provide as Oo, watch as _e, triggerRef as Mo, onMounted as ct, onBeforeUnmount as fn, mergeProps as gt, isVNode as Vo, Fragment as Ct, onBeforeMount as Do, onUnmounted as Bt, Teleport as Bo, Transition as pn, shallowRef as Ro, createApp as mn, nextTick as Kt, render as Lt, h as $o, cloneVNode as No, withModifiers as jo, withDirectives as vn, vModelText as Po, reactive as st, resolveDirective as Ho } from "vue";
import { isPlainObject as on, cloneDeep as vt, isUndefined as an } from "lodash-es";
import Lo from "../accordion/index.esm.js";
import Wo from "../avatar/index.esm.js";
import Ao from "../button-edit/index.esm.js";
import zo from "../button-group/index.esm.js";
import Go from "../calendar/index.esm.js";
import qo from "../capsule/index.esm.js";
import Uo, { FCheckbox as Rt } from "../checkbox/index.esm.js";
import Yo from "../color-picker/index.esm.js";
import Gt from "../combo-list/index.esm.js";
import Xo from "../content-container/index.esm.js";
import Ko from "../data-grid/index.esm.js";
import Jo from "../date-picker/index.esm.js";
import Qo from "../dropdown/index.esm.js";
import Zo, { FDynamicFormGroup as ea, FDynamicFormInput as ta } from "../dynamic-form/index.esm.js";
import "../external-container/index.esm.js";
import na from "../events-editor/index.esm.js";
import oa from "../filter-bar/index.esm.js";
import aa from "../image-cropper/index.esm.js";
import ia from "../input-group/index.esm.js";
import ra from "../layout/index.esm.js";
import la from "../list-nav/index.esm.js";
import sa from "../list-view/index.esm.js";
import ua from "../lookup/index.esm.js";
import ca from "../nav/index.esm.js";
import da from "../number-spinner/index.esm.js";
import fa from "../number-range/index.esm.js";
import pa from "../order/index.esm.js";
import ma from "../page-header/index.esm.js";
import va from "../page-footer/index.esm.js";
import ha from "../pagination/index.esm.js";
import ga from "../progress/index.esm.js";
import ya from "../query-solution/index.esm.js";
import ba from "../radio-group/index.esm.js";
import Ca from "../rate/index.esm.js";
import wa from "../response-toolbar/index.esm.js";
import _a from "../response-layout/index.esm.js";
import Sa from "../response-layout-editor/index.esm.js";
import xa from "../search-box/index.esm.js";
import Ta from "../section/index.esm.js";
import Fa from "../smoke-detector/index.esm.js";
import ka from "../splitter/index.esm.js";
import Ia from "../step/index.esm.js";
import Ea from "../switch/index.esm.js";
import Oa from "../tabs/index.esm.js";
import Ma from "../tags/index.esm.js";
import Va from "../text/index.esm.js";
import Da from "../time-picker/index.esm.js";
import Ba from "../transfer/index.esm.js";
import Ra from "../tree-view/index.esm.js";
import $a from "../uploader/index.esm.js";
import Na from "../verify-detail/index.esm.js";
import ja from "../component/index.esm.js";
import Pa from "../video/index.esm.js";
import Ha from "../textarea/index.esm.js";
import La from "../tree-grid/index.esm.js";
import Wa from "../fieldset/index.esm.js";
import Aa from "../drawer/index.esm.js";
import { getCustomClass as Wt, withInstall as za, useDateFormat as Ga, useNumberFormat as qa, resolveField as Ke, setFieldValue as qt } from "../common/index.esm.js";
import { useFilter as hn, useIdentify as gn, useHierarchy as yn, useGroupData as bn, useDataView as Cn, useSelection as wn, useRow as _n, useEdit as Sn, useVisualDataBound as xn, useVisualDataCell as Tn, useVisualDataRow as Fn, useVisualGroupRow as Ua, useVisualSummaryRow as Ya, useVisualData as kn, useLoading as Xa, useSelectHierarchyItem as Ka, useDataViewContainerStyle as Ja, useCommandColumn as Qa, useColumn as Za, useSort as ei, useGroupColumn as ti, useCellPosition as ni, useSidebar as oi, useVirtualScroll as ai, useFitColumn as ii, useFilterHistory as ri, useColumnFilter as li, useDragColumn as si, getColumnHeader as ui, getSidebar as ci, getDisableMask as di, getHorizontalScrollbar as fi, getVerticalScrollbar as pi, getEmpty as mi } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import "../condition/index.esm.js";
import rn from "../tooltip/index.esm.js";
import vi from "../button/index.esm.js";
import "../designer-canvas/index.esm.js";
import { useResizeObserver as In } from "@vueuse/core";
import hi from "../binding-selector/index.esm.js";
import "../notify/index.esm.js";
import gi from "../combo-tree/index.esm.js";
import yi from "../field-selector/index.esm.js";
import bi from "../mapping-editor/index.esm.js";
import Ci from "../schema-selector/index.esm.js";
import wi from "../event-parameter/index.esm.js";
import _i from "../filter-condition-editor/index.esm.js";
import Si from "../sort-condition-editor/index.esm.js";
import xi from "../menu-lookup/index.esm.js";
import { createPropsResolver as Ti } from "../dynamic-resolver/index.esm.js";
const En = {}, On = {};
function Jt(e) {
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), r = Object.keys(t).reduce((i, s) => ((!a || !o.find((u) => u === s)) && (i[s] = t[s].type === "object" && t[s].properties ? Jt(t[s]) : vt(t[s].default)), i), {});
if (n && (!a || !o.find((i) => i === "id"))) {
const i = n.toLowerCase().replace(/-/g, "_");
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
}
return r;
}
function Fi(e) {
const { properties: t, title: n, required: o } = e;
if (o && Array.isArray(o)) {
const a = o.reduce((r, i) => (r[i] = t[i].type === "object" && t[i].properties ? Jt(t[i]) : vt(t[i].default), r), {});
if (n && o.find((r) => r === "id")) {
const r = n.toLowerCase().replace(/-/g, "_");
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
}
return a;
}
return {
type: n
};
}
function Mn(e, t = {}, n) {
const o = En[e];
if (o) {
let a = Fi(o);
const r = On[e];
return a = r ? r({ getSchemaByType: Mn }, a, t, n) : a, a;
}
return null;
}
function ki(e, t) {
const n = Jt(t);
return Object.keys(n).reduce((o, a) => (Object.prototype.hasOwnProperty.call(e, a) && (o[a] && on(o[a]) && on(e[a] || !e[a]) ? Object.assign(o[a], e[a] || {}) : o[a] = e[a]), o), n), n;
}
function Vn(e, t) {
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
if (t.has(a)) {
const r = t.get(a);
if (typeof r == "string")
o[r] = e[a];
else {
const i = r(a, e[a], e);
Object.assign(o, i);
}
} else
o[a] = e[a];
return o;
}, {});
}
function Ii(e, t, n = /* @__PURE__ */ new Map()) {
const o = ki(e, t);
return Vn(o, n);
}
function Ei(e = {}) {
function t(p, f, d, c) {
if (typeof d == "number")
return c[p].length === d;
if (typeof d == "object") {
const y = Object.keys(d)[0], _ = d[y];
if (y === "not")
return Number(c[p].length) !== Number(_);
if (y === "moreThan")
return Number(c[p].length) >= Number(_);
if (y === "lessThan")
return Number(c[p].length) <= Number(_);
}
return !1;
}
function n(p, f, d, c) {
return c[p] && c[p].propertyValue && String(c[p].propertyValue.value) === String(d);
}
const o = /* @__PURE__ */ new Map([
["length", t],
["getProperty", n]
]);
Object.keys(e).reduce((p, f) => (p.set(f, e[f]), p), o);
function a(p, f) {
const d = p;
return typeof f == "number" ? [{ target: d, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: d, operator: "getProperty", param: p, value: !!f }] : typeof f == "object" ? Object.keys(f).map((c) => {
if (c === "length")
return { target: d, operator: "length", param: null, value: f[c] };
const y = c, _ = f[c];
return { target: d, operator: "getProperty", param: y, value: _ };
}) : [];
}
function r(p) {
return Object.keys(p).reduce((d, c) => {
const y = a(c, p[c]);
return d.push(...y), d;
}, []);
}
function i(p, f) {
if (o.has(p.operator)) {
const d = o.get(p.operator);
return d && d(p.target, p.param, p.value, f) || !1;
}
return !1;
}
function s(p, f) {
return r(p).reduce((y, _) => y && i(_, f), !0);
}
function u(p, f) {
const d = Object.keys(p), c = d.includes("allOf"), y = d.includes("anyOf"), _ = c || y, v = (_ ? p[_ ? c ? "allOf" : "anyOf" : "allOf"] : [p]).map((T) => s(T, f));
return c ? !v.includes(!1) : v.includes(!0);
}
return { parseValueSchema: u };
}
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: "抽屉" }
}, Oi = {}, Mi = {};
Ei();
function it(e, t, n = /* @__PURE__ */ new Map(), o = (i, s, u, p) => s, a = {}, r = (i) => i) {
return En[t.title] = t, On[t.title] = o, Oi[t.title] = a, Mi[t.title] = r, (i = {}, s = !0) => {
if (!s)
return Vn(i, n);
const u = Ii(i, t, n), p = Object.keys(e).reduce((f, d) => (f[d] = e[d].default, f), {});
return Object.assign(p, u);
};
}
function _t(e, t) {
return { customClass: t.class, customStyle: t.style };
}
function Vi() {
function e(t, n) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: e
};
}
function Di() {
function e(t, n) {
return t.selectItemById(n);
}
return {
selectItemById: e
};
}
function Bi() {
function e(t, n) {
const { columns: o } = n;
return t.updateColumns(o);
}
return {
updateColumns: e
};
}
const Ri = /* @__PURE__ */ new Map([
["appearance", _t]
]);
function $i(e, t, n) {
return t;
}
const Ni = "https://json-schema.org/draft/2020-12/schema", ji = "https://farris-design.gitee.io/external-container.schema.json", Pi = "external-container", Hi = "A Farris Visual Component", Li = "object", Wi = {
id: {
description: "The unique identifier for a external-container",
type: "string"
},
type: {
description: "The type string of external-container",
type: "string",
default: "external-container"
},
componentType: {
description: "The type string of external-container",
type: "string"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
visible: {
description: "",
type: "boolean",
default: !0
},
url: {
description: "The url that load the schema from",
type: "string"
},
externalComponent: {
description: "The unique identifier for component",
type: "string"
}
}, Ai = [
"id",
"type"
], zi = {
$schema: Ni,
$id: ji,
title: Pi,
description: Hi,
type: Li,
properties: Wi,
required: Ai
}, Gi = "external-container", qi = "A Farris Component", Ui = "object", Yi = {
basic: {
description: "Basic Infomation",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "waiting for modification",
enum: []
}
},
url: {
description: "外部组件地址",
title: "URL",
type: "string"
}
}
}
}, Xi = {
title: Gi,
description: qi,
type: Ui,
categories: Yi
}, Qt = {
customClass: { type: String, default: "" },
componentType: { type: String, default: "" },
url: { type: String, default: "" },
schema: { type: Object },
useIsolateJs: { type: Boolean, default: !1 }
}, ln = it(Qt, zi, Ri, $i, Xi), At = /* @__PURE__ */ Ve({
name: "FExternalContainer",
props: Qt,
emits: [],
setup(e, t) {
return () => C("div", {
class: e.customClass
}, [t.slots.default && t.slots.default()]);
}
}), Ki = {
id: { type: String, default: "" },
componentId: { type: String, default: "" },
type: { type: String, default: "" },
canDelete: { type: Boolean, default: !0 },
canMove: { type: Boolean, default: !0 },
canSelectParent: { type: Boolean, default: !0 },
customButtons: { type: Array, default: [] },
customClass: { type: String, default: "" },
customStyle: { type: String, default: "" },
/**
* 组件值
*/
modelValue: { type: Object },
ignore: { type: Boolean, default: !1 }
}, Ji = {}, Qi = {}, Zi = {
id: { type: String }
}, er = /* @__PURE__ */ Ve({
name: "FDesignerPlaceholder",
props: Zi,
emits: [],
setup(e) {
const t = N(() => ({
"drag-and-drop-alert": !0,
"no-drag": !0,
"w-100": !0
})), n = N(() => ({
height: "60px",
display: "flex",
"justify-content": "center",
"align-items": "center",
margin: 0,
padding: ".75rem 1.25rem",
border: "1px solid transparent",
"border-radius": "3px",
color: "#315585",
"background-color": "#dfedff",
"border-color": "#d2e6ff"
}));
return () => C("div", {
class: t.value,
style: n.value,
role: "alert",
"data-noattach": "true",
"data-position": "0"
}, [We("拖拽组件到这里")]);
}
}), Ft = w(0);
function tr(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), a = o.top >= n.top, r = o.top <= n.bottom;
return a && r;
}
function nr(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 r = n.left - a.width;
const i = document.querySelector(".editorDiv");
if (i) {
const s = i.getBoundingClientRect();
r < s.left && ({ left: r } = e.getBoundingClientRect());
}
o.style.left = r + "px";
}
}
}
function or(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 Dn(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 = or(e);
if (a && (o = tr(e, a)), !o) {
n.style.display = "none";
return;
}
nr(e);
}
}
function ar(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && Dn(t);
}
function ir(e) {
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Vo(e);
}
const Et = /* @__PURE__ */ Ve({
name: "FDesignerItem",
props: Ki,
emits: ["selectionChange", "dragEnd"],
setup(e, t) {
const n = w(`${e.modelValue.id}-component`), o = w(e.canMove), a = w(e.canDelete), r = w(!1), i = w(e.modelValue), s = w(e.componentId || ""), u = w(""), p = w(""), f = w(e.customClass), d = w(), c = ut("canvas-dragula"), y = w(), _ = ut("design-item-context"), D = {
designerItemElementRef: d,
componentInstance: y,
schema: i.value,
parent: _,
setupContext: t
};
Oo("design-item-context", D);
const x = ut("useFormSchema"), v = N(() => {
var W;
const O = e.modelValue.appearance && e.modelValue.appearance.class || "", M = ((W = y.value) == null ? void 0 : W.getCustomButtons) && y.value.getCustomButtons();
let B = {
"farris-component": !0,
// 受position-relative影响,整个容器的高度不能被撑起
"flex-fill": i.value.id === "root-component",
"position-relative": o.value && a.value || (M == null ? void 0 : M.length),
"farris-nested": r.value,
"can-move": o.value,
"d-none": d.value && d.value.classList.contains("d-none"),
dgComponentSelected: d.value && d.value.classList.contains("dgComponentSelected"),
dgComponentFocused: d.value && d.value.classList.contains("dgComponentFocused")
};
return B[`farris-component-${i.value.type}`] = !0, B = Wt(B, O), B = Wt(B, p.value), B = Wt(B, f.value), B;
}), b = N(() => {
const O = {}, M = e.modelValue.appearance && e.modelValue.appearance.style || "";
return M && M.split(";").reduce((B, W) => {
const [K, te] = W.split(":");
return B[K] = te, B;
}, O), u.value && u.value.split(";").reduce((B, W) => {
const [K, te] = W.split(":");
return K && (B[K] = te), B;
}, O), O;
});
function T(O, M) {
var K, te;
if (O && (O.preventDefault(), O.stopPropagation()), y.value.triggerBelongedComponentToDeleteWhenDeleted) {
const Y = y.value.getBelongedComponentInstance(y);
if (Y && Y.parent) {
const pe = w(Y == null ? void 0 : Y.parent), L = pe.value.contents.findIndex((H) => H.id === Y.schema.id);
(te = (K = pe.value) == null ? void 0 : K.contents) == null || te.splice(L, 1), Ft.value++;
}
return;
}
y.value.onRemoveComponent();
let B = _, W = (Y) => Y.id === M.id;
if (M.type === "component" && (B = _ == null ? void 0 : _.parent, W = (Y) => Y.component === M.id), B && B.schema.contents) {
const Y = B.schema.contents.findIndex(W);
B.schema.contents.splice(Y, 1), Ft.value++, t.emit("selectionChange");
}
}
function m(O) {
return a.value && C("div", {
role: "button",
class: "btn component-settings-button",
title: "删除",
ref: "removeComponent",
onClick: (M) => {
T(M, O);
}
}, [C("i", {
class: "f-icon f-icon-yxs_delete"
}, null)]);
}
function F() {
return o.value && C("div", {
role: "button",
class: "btn component-settings-button",
title: "移动",
ref: "moveComponent"
}, [C("i", {
"data-dragging-icon": "true",
class: "cmp_move f-icon f-icon-yxs_move"
}, null)]);
}
function k() {
var M;
const O = ((M = y.value) == null ? void 0 : M.getCustomButtons) && y.value.getCustomButtons();
return O && !!O.length && O.map((B) => C("div", {
role: "button",
class: `btn component-settings-button ${B.class || ""}`,
title: B.title,
ref: B.id,
onClick: (W) => B.onClick && B.onClick(W)
}, [C("i", {
class: B.icon
}, null)]));
}
function l(O) {
return C("div", {
class: "component-btn-group",
"data-noattach": "true"
}, [C("div", null, [m(O), F(), k()])]);
}
function g(O, M, B, W) {
t.emit("selectionChange", O, M, B, W);
}
function h() {
t.emit("dragEnd");
}
function E(O) {
let M;
const B = O.type, W = Ji[B], K = Qi[B], te = K ? K(O) : {};
te.customClass = e.ignore ? te.customClass : "", te.componentId = s.value, te.id = O.id;
const Y = O.contents && O.contents.length === 0;
return O.contents && !!O.contents.length && W ? C(W, gt({
ref: y
}, te), ir(M = O.contents.map((L) => C(Et, {
key: L.id,
modelValue: L,
"onUpdate:modelValue": (H) => L = H,
componentId: s.value,
onSelectionChange: g,
onDragEnd: h
}, null))) ? M : {
default: () => [M]
}) : W ? Y ? C(W, gt({
ref: y
}, te), {
default: () => [C(er, null, null)]
}) : C(W, gt({
ref: y
}, te), null) : C("div", null, null);
}
function S(O) {
if (O.type === "component-ref") {
let B = x == null ? void 0 : x.getFormSchema().module.components.find((W) => W.id === O.component);
if (B)
return C(Et, {
key: B.id,
modelValue: B,
"onUpdate:modelValue": (W) => B = W,
componentId: B.id,
onSelectionChange: g,
onDragEnd: h
}, null);
}
}
_e(() => e.modelValue, (O) => {
i.value = O, n.value = `${O.id}-component`, Mo(d);
}, {
deep: !0
});
function $(O) {
window.scrollContainerList || (window.scrollContainerList = /* @__PURE__ */ new Set());
const M = O.getAttribute("id");
M && window.scrollContainerList.add(M);
}
function R(O) {
const M = O == null ? void 0 : O.target;
$(M), ar(M);
}
function V() {
var O, M;
if (d.value) {
(M = (O = i.value) == null ? void 0 : O.contents) != null && M.length && d.value.addEventListener("scroll", R);
const B = d.value.querySelector(".drag-container");
B && B.addEventListener("scroll", R);
}
}
ct(() => {
if (d.value && y.value && y.value.schema) {
const O = d.value.querySelector(`[data-dragref='${y.value.schema.id}-container']`);
c && O && c.attachComponents(O, i.value), r.value = y.value.canNested !== void 0 ? y.value.canNested : r.value, a.value = y.value.canDelete !== void 0 ? y.value.canDelete : a.value, o.value = y.value.canMove !== void 0 ? y.value.canMove : o.value, u.value = y.value.styles || "", p.value = y.value.designerClass || "", d.value && (d.value.componentInstance = y, d.value.designItemContext = D), y.value.belongedComponentId = s.value;
}
V(), Ft.value++;
}), fn(() => {
d.value && d.value.removeEventListener("scroll", R);
});
function I(O) {
O && (O.preventDefault(), O.stopPropagation());
let M = D.designerItemElementRef;
const B = d.value;
if (B) {
const W = document.getElementsByClassName("dgComponentFocused");
W && W.length === 1 && W[0] === d.value || (Array.from(W).forEach((te) => te.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((te) => te.classList.remove("dgComponentSelected")), B.classList.add("dgComponentFocused"), t.emit("selectionChange", i.value.type, i.value, s.value, y.value), y.value.getDraggableDesignItemElement && (M = y.value.getDraggableDesignItemElement(D), M && M.value && M.value.classList.add("dgComponentSelected")));
}
Dn(M == null ? void 0 : M.value);
}
return () => i.value.type === "component-ref" ? S(i.value) : C("div", {
id: `${i.value.id}-design-item`,
ref: d,
class: v.value,
style: b.value,
onClick: I
}, [l(i.value), E(i.value)]);
}
});
function $t(e, t, n) {
var k;
const o = n && n.getStyles && n.getStyles() || "", a = n && n.getDesignerClass && n.getDesignerClass() || "", r = w();
function i() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
}
function s() {
return !1;
}
function u() {
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 f(l) {
if (!l || !l.value)
return null;
if (l.value.schema && l.value.schema.type === "component")
return l.value;
const g = w(l == null ? void 0 : l.value.parent), h = f(g);
return h || null;
}
function d(l = t) {
var S;
if (n != null && n.getDraggableDesignItemElement)
return n.getDraggableDesignItemElement(l);
const { componentInstance: g, designerItemElementRef: h } = l;
if (!g || !g.value)
return null;
const { getCustomButtons: E } = g.value;
return g.value.canMove || E && ((S = E()) != null && S.length) ? h : d(l.parent);
}
function c(l) {
return !!n && n.canAccepts(l);
}
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 _() {
}
function D(l, g) {
var h;
!l || !g || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(l, g), (h = t == null ? void 0 : t.setupContext) == null || h.emit("dragEnd"));
}
function x(l, g) {
const { componentType: h } = l;
let E = Mn(h, l, g);
n && n.onResolveNewComponentSchema && (E = n.onResolveNewComponentSchema(l, E));
const S = h.toLowerCase().replace(/-/g, "_");
return E && !E.id && E.type === h && (E.id = `${S}_${Math.random().toString().slice(2, 6)}`), E;
}
function v(l) {
l && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(l);
}
function b(...l) {
if (n && n.getPropsConfig)
return n.getPropsConfig(...l);
}
function T() {
n && n.onRemoveComponent && n.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((l) => {
let g = l.id;
l.type === "component-ref" && (g = l.component);
const h = e.value.querySelectorAll(`#${g}-design-item`);
h != null && h.length && Array.from(h).map((E) => {
var S;
(S = E == null ? void 0 : E.componentInstance) != null && S.value.onRemoveComponent && E.componentInstance.value.onRemoveComponent();
});
});
}
function m() {
if (n && n.getCustomButtons)
return n.getCustomButtons();
}
function F(l) {
if (n && n.onPropertyChanged)
return n.onPropertyChanged(l);
}
return r.value = {
canMove: i(),
canSelectParent: s(),
canDelete: u(),
canNested: !p(),
contents: t == null ? void 0 : t.schema.contents,
elementRef: e,
parent: (k = t == null ? void 0 : t.parent) == null ? void 0 : k.componentInstance,
schema: t == null ? void 0 : t.schema,
styles: o,
designerClass: a,
canAccepts: c,
getBelongedComponentInstance: f,
getDraggableDesignItemElement: d,
getDraggingDisplayText: y,
getPropConfig: b,
getDragScopeElement: _,
onAcceptMovedChildElement: D,
onChildElementMovedOut: v,
addNewChildComponentSchema: x,
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || w(!1),
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || w(!1),
onRemoveComponent: T,
getCustomButtons: m,
onPropertyChanged: F
}, r;
}
function rr(e, t) {
function n() {
return !1;
}
function o() {
return !0;
}
function a() {
return !0;
}
function r() {
return !0;
}
function i() {
return " position:relative; padding:0 !important;border:0;";
}
return { canAccepts: n, checkCanDeleteComponent: o, checkCanMoveComponent: a, hideNestedPaddingInDesginerView: r, getStyles: i };
}
const lr = "data-grid-component", sr = "component", ur = "data-grid", cr = {
class: "f-struct-wrapper f-utils-fill-flex-column"
}, dr = [
{
id: "data-grid-section",
type: "section",
appearance: {
class: "f-section-grid f-section-in-nav"
},
showHeader: !1,
contents: [
{
id: "dataGrid",
type: "data-grid",
appearance: {
class: "f-component-grid"
},
columns: [
{
id: "code_6d5f8d5b_1fvq",
type: "GridField",
title: "项目编号",
field: "code",
dataType: "string",
binding: {
type: "Form",
path: "code",
field: "6d5f8d5b-c68a-47fa-9f3b-f3805489cfae"
},
resizable: !0
},
{
id: "name_2efe6193_lljv",
type: "GridField",
title: "项目名称",
field: "name",
dataType: "string",
binding: {
type: "Form",
path: "name",
field: "2efe6193-278c-4b5f-9f31-cdd8ee48751a"
},
resizable: !0
},
{
id: "projectStatus_7d2dd238_3d6l",
type: "GridField",
title: "项目状态",
binding: {
type: "Form",
path: "projectStatus",
field: "7d2dd238-42a7-4643-a849-cdac3b4fe13f",
fullPath: "ProjectStatus"
},
field: "projectStatus",
dataType: "enum",
data: [
{
name: "进行中",
value: "1"
},
{
name: "已结项",
value: "2"
}
],
resizable: !0
}
]
}
]
}
], fr = {
id: lr,
type: sr,
componentType: ur,
appearance: cr,
contents: dr
}, pr = {
/**
* 自定义类
*/
class: { type: String, default: "" },
/**
* 模态框标题
*/
title: { type: String, default: "" },
/**
* 模态框宽度
*/
width: { type: Number, default: 500 },
/**
* 模态框高度
*/
height: { type: Number, default: 320 },
/**
* 自定义按钮列表
*/
buttons: {
type: Array,
default: []
},
/**
* 是否展示模态框
*/
modelValue: { type: Boolean, default: !1 },
/**
* 是否展示头部
*/
showHeader: { type: Boolean, default: !0 },
/**
* 是否展示默认按钮
*/
showButtons: { type: Boolean, default: !0 },
/**
* 是否启用自适应样式
*/
fitContent: { type: Boolean, default: !0 },
/**
* 是否展示右上角按钮
*/
showCloseButton: { type: Boolean, default: !0 },
showMaxButton: { type: Boolean, default: !1 },
minHeight: { type: Number },
maxHeight: { type: Number },
minWidth: { type: Number },
maxWidth: { type: Number },
containment: { type: Object, default: null },
resizeable: { type: Boolean, default: !1 },
draggable: { type: Boolean, default: !1 },
dragHandle: { type: Object, default: null },
closedCallback: { type: Function, default: null },
resizeHandle: { type: Function, default: null },
render: { type: Function, default: null },
acceptCallback: { type: Function, default: null },
rejectCallback: { type: Function, default: null },
enableEsc: { type: Boolean, default: !0 },
enableEnter: { type: Boolean, default: !1 },
dialogType: { type: String, default: "" },
src: { type: String, default: "" },
footerHeight: { type: Number, default: 60 }
};
class Me {
constructor(t, n) {
this.x = t, this.y = n;
}
static getTransformInfo(t) {
const o = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
if (o.length >= 6) {
const a = parseInt(o[4], 10), r = parseInt(o[5], 10);
return { x: a, y: r };
}
return { x: 0, y: 0 };
}
static fromEvent(t, n = null) {
if (this.isMouseEvent(t))
return new Me(t.clientX, t.clientY);
if (n === null || t.changedTouches.length === 1)
return new Me(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
for (let o = 0; o < t.changedTouches.length; o++)
if (t.changedTouches[o].target === n)
return new Me(t.changedTouches[o].clientX, t.changedTouches[o].clientY);
}
static isMouseEvent(t) {
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
}
static isIPosition(t) {
return !!t && "x" in t && "y" in t;
}
static getCurrent(t) {
const n = new Me(0, 0);
if (window) {
const o = window.getComputedStyle(t);
if (o) {
const a = parseInt(o.getPropertyValue("left"), 10), r = parseInt(o.getPropertyValue("top"), 10);
n.x = isNaN(a) ? 0 : a, n.y = isNaN(r) ? 0 : r;
}
return n;
}
return null;
}
static copy(t) {
return new Me(0, 0).set(t);
}
get value() {
return { x: this.x, y: this.y };
}
add(t) {
return this.x += t.x, this.y += t.y, this;
}
subtract(t) {
return this.x -= t.x, this.y -= t.y, this;
}
multiply(t) {
this.x *= t, this.y *= t;
}
divide(t) {
this.x /= t, this.y /= t;
}
reset() {
return this.x = 0, this.y = 0, this;
}
set(t) {
return this.x = t.x, this.y = t.y, this;
}
}
class ht {
constructor(t, n) {
this.width = t, this.height = n;
}
static getCurrent(t) {
const n = new ht(0, 0);
if (window) {
const o = window.getComputedStyle(t);
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
}
return null;
}
static copy(t) {
return new ht(0, 0).set(t);
}
set(t) {
return this.width = t.width, this.height = t.height, this;
}
}
function mr(e, t) {
const n = w(), o = w(), a = w(), r = w(), i = w(), s = w(), u = w(), p = w(), f = w(), d = w(), c = w(), y = w(), _ = w(e.draggable), D = w(!1);
function x() {
const M = o.value || document.body, B = window.getComputedStyle(M);
if (!B || !n.value)
return;
const W = Me.getTransformInfo(n.value), K = {};
u.value && (K.deltaL = n.value.offsetLeft - u.value.x, K.deltaT = n.value.offsetTop - u.value.y);
const te = B.getPropertyValue("position");
K.width = M.clientWidth, K.height = M.clientHeight, K.pr = parseInt(B.getPropertyValue("padding-right"), 10), K.pb = parseInt(B.getPropertyValue("padding-bottom"), 10), K.position = B.getPropertyValue("position"), te === "static" && (M.style.position = "relative"), K.translateX = W.x, K.translateY = W.y, d.value = K;
}
function v(M) {
if (n.value) {
r.value = ht.getCurrent(n.value), i.value = Me.getCurrent(n.value), s.value = r.value ? ht.copy(r.value) : null, u.value = i.value ? Me.copy(i.value) : null, x();
const B = M.target.getAttribute("type") || "";
p.value = {
n: !!B.match(/n/),
s: !!B.match(/s/),
w: !!B.match(/w/),
e: !!B.match(/e/)
};
}
}
function b() {
var M, B, W, K;
if (n.value) {
const te = n.value;
p.value && ((p.value.n || p.value.s) && ((M = s.value) != null && M.height) && (te.style.height = s.value.height + "px"), (p.value.w || p.value.e) && ((B = s.value) != null && B.width) && (te.style.width = s.value.width + "px"), u.value && ((W = u.value) != null && W.x && (te.style.left = u.value.x + "px"), (K = u.value) != null && K.y && (te.style.top = u.value.y + "px")));
}
}
function T() {
const M = e.minHeight ? e.minHeight : 1, B = e.minWidth ? e.minWidth : 1;
s.value && u.value && p.value && r.value && (s.value.height < M && (s.value.height = M, p.value.n && i.value && (u.value.y = i.value.y + (r.value.height - M))), s.value.width < B && (s.value.width = B, p.value.w && i.value && (u.value.x = i.value.x + (r.value.width - B))), e.maxHeight && s.value.height > e.maxHeight && (s.value.height = e.maxHeight, i.value && p.value.n && (u.value.y = i.value.y + (r.value.height - e.maxHeight))), e.maxWidth && s.value.width > e.maxWidth && (s.value.width = e.maxWidth, p.value.w && i.value && (u.value.x = i.value.x + (r.value.width - e.maxWidth))));
}
function m() {
if (o.value) {
const M = d.value;
if (u.value && s.value && p.value && r.value) {
const B = M.width - M.pr - M.deltaL - M.translateX - u.value.x, W = M.height - M.pb - M.deltaT - M.translateY - u.value.y;
p.value.n && u.value.y + M.translateY < 0 && i.value && (u.value.y = -M.translateY, s.value.height = r.value.height + i.value.y + M.translateY), p.value.w && u.value.x + M.translateX < 0 && i.value && (u.value.x = -M.translateX, s.value.width = r.value.width + i.value.x + M.translateX), s.value.width > B && (s.value.width = B), s.value.height > W && (s.value.height = W);
}
}
}
function F(M) {
if (!a.value || !r.value || !i.value || !p.value)
return;
M.subtract(a.value);
const B = M.x, W = M.y;
p.value.n ? (u.value.y = i.value.y + W, s.value.height = r.value.height - W) : p.value.s && (s.value.height = r.value.height + W), p.value.e ? s.value.width = r.value.width + B : p.value.w && (s.value.width = r.value.width - B, u.value.x = i.value.x + B), m(), T(), b();
}
function k(M) {
if (!f.value)
return;
const B = Me.fromEvent(M);
B && F(B);
}
function l() {
if (n.value) {
const {
width: M,
height: B,
x: W,
y: K
} = n.value.getBoundingClientRect(), te = Me.getTransformInfo(n.value);
return {
size: {
width: M,
height: B
},
position: {
x: W - te.x,
y: K - te.y
}
};
}
return null;
}
function g(M) {
if (n.value) {
const B = l();
c.value = B;
}
a.value = void 0, r.value = null, i.value = null, s.value = null, u.value = null, p.value = null, f.value = null, document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", g);
}
function h() {
document.addEventListener("mousemove", k), document.addEventListener("mouseup", g);
}
function E(M) {
M instanceof MouseEvent && M.button === 2 || _.value && (document.body.click(), M.stopPropagation(), M.preventDefault(), a.value = Me.fromEvent(M), f.value = M.target, v(M), h());
}
function S(M) {
return n.value = M, C(Ct, null, [C("div", {
class: "fv-resizable-handle fv-resizable-n",
type: "n",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-e",
type: "e",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-s",
type: "s",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-w",
type: "w",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-ne",
type: "ne",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
type: "se",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-sw",
type: "sw",
onMousedown: (B) => E(B)
}, null), C("div", {
class: "fv-resizable-handle fv-resizable-nw",
type: "nw",
onMousedown: (B) => E(B)
}, null)]);
}
function $(M = !0) {
document.body.click();
const B = o.value || document.body, W = ht.getCurrent(B), K = n.value;
M && K && (y.value = l(), y.value.transform = K.style.transform), W && K && (s.value = W, K.style.height = s.value.height - 14 + "px", K.style.width = s.value.width - 14 + "px", K.style.left = "7px", K.style.top = "7px", K.style.transform = "", c.value = {
size: s.value,
position: {
x: 0,
y: 0
}
}, _.value = !1, D.value = !0);
}
function R() {
var M, B;
if (document.body.click(), y.value) {
const W = {
width: y.value.size.width || 0,
height: y.value.size.height || 0
}, K = {
x: (window.innerWidth - W.width) / 2,
y: (window.innerHeight - W.height) / 2
};
(M = s.value) == null || M.set(W), (B = u.value) == null || B.set(K);
const te = n.value;
te.style.height = W.height + "px", te.style.width = W.width + "px", te.style.left = `${K.x}px`, te.style.top = `${K.y}px`, te.style.transform = "", c.value = {
size: W,
position: K
}, _.value = e.draggable, D.value = !1;
}
}
function V() {
if (n.value) {
const M = ht.getCurrent(n.value);
if (M) {
const {
width: B,
height: W
} = M;
n.value.style.left = `${(window.innerWidth - B) / 2}px`, n.value.style.top = `${(window.innerHeight - W) / 2}px`, n.value.style.transform = "";
}
}
}
function I() {
const M = () => {
D.value ? $(!1) : V(), document.body.click();
};
return window.addEventListener("resize", M), () => {
window.removeEventListener("resize", M);
};
}
const O = I();
return {
renderResizeBar: S,
boundingElement: o,
resizedEventParam: c,
maximize: $,
restore: R,
allowDrag: _,
isMaximized: D,
unWindowResizeHandle: O
};
}
function vr(e, t, n) {
const o = w(), a = w(e.draggable), r = w(e.lockAxis), i = w(), s = w(), u = w(!1), p = w(new Me(0, 0)), f = w(new Me(0, 0)), d = w(new Me(0, 0)), c = w(new Me(0, 0));
_e(() => n.value, (l) => {
i.value.style.cursor = l ? "move" : "default";
});
function y(l, g) {
if (g.tagName === "BUTTON")
return !1;
if (g === l)
return !0;
for (const h in g.children)
if (Object.prototype.hasOwnProperty.call(g.children, h) && y(l, g.children[h]))
return !0;
return !1;
}
function _() {
var E, S;
let l = d.value.x + f.value.x, g = d.value.y + f.value.y;
r.value === "x" ? (l = ((E = p.value) == null ? void 0 : E.x) || 0, d.value.x = 0) : r.value === "y" && (g = ((S = p.value) == null ? void 0 : S.y) || 0, d.value.y = 0);
const h = `translate3d(${Math.round(l)}px, ${Math.round(g)}px, 0px)`;
o.value && (o.value.style.transform = h), c.value.x = l, c.value.y = g;
}
function D() {
if (!s.value || !o.value)
return null;
const l = s.value.getBoundingClientRect(), g = o.value.getBoundingClientRect(), h = {
top: l.top < g.top,
right: l.right > g.right,
bottom: l.bottom > g.bottom,
left: l.left < g.left
};
return h.top || (d.value.y -= g.top - l.top), h.bottom || (d.value.y -= g.bottom - l.bottom), h.right || (d.value.x -= g.right - l.right), h.left || (d.value.x -= g.left - l.left), _(), h;
}
function x(l) {
l && (p.value && l.subtract(p.value), d.value.set(l), _(), D());
}
function v(l) {
u.value && a.value && (l.stopPropagation(), l.preventDefault(), x(Me.fromEvent(l, i.value)));
}
function b() {
var l;
u.value && (u.value = !1, f.value.add(d.value), d.value.reset(), (l = o.value) == null || l.classList.remove("ng-dragging"), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", b));
}
function T() {
!u.value && i.value && (u.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", v), document.addEventListener("mouseup", b));
}
function m() {
if (o.value) {
const l = Me.getTransformInfo(o.value);
f.value.set(l);
return;
}
f.value.reset();
}
function F(l) {
if (!n.value || l instanceof MouseEvent && l.button === 2)
return;
const g = l.target || l.srcElement;
i.value !== void 0 && g && !y(g, i.value) || a.value !== !1 && (document.body.click(), l.stopPropagation(), l.preventDefault(), p.value = Me.fromEvent(l, o.value), m(), T());
}
function k(l, g, h) {
if (a.value && g) {
if (l)
i.value = l;
else if (e.dragHandle) {
if (e.dragHandle instanceof HTMLElement)
i.value = e.dragHandle;
else if (typeof e.dragHandle == "string") {
const E = g.querySelector(e.dragHandle);
E && (i.value = E);
}
}
o.value = g, s.value = h, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown", F)) : a.value = !1;
}
}
return {
registerDraggle: k,
resetTranslate: m
};
}
function Bn(e, t) {
if (e) {
const n = (o) => {
o.key.toLowerCase() === e.toLowerCase() && t({ event: o, key: e });
};
return document.addEventListener("keydown", n), () => {
document.removeEventListener("keydown", n);
};
}
}
function hr(e, t) {
const n = w(e.enableEsc);
let o = null;
return n.value ? (o = Bn("Escape", (a) => {
t.emit("esc", { event: a.event, type: "esc" });
}), {
remove: o
}) : null;
}
function gr(e, t) {
const n = w(e.enableEnter);
let o = null;
return n.value ? (o = Bn("Enter", (a) => {
t.emit("enter", { event: a.event, type: "enter" });
}), {
remove: o
}) : null;
}
const St = /* @__PURE__ */ Ve({
name: "FModal",
props: pr,
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
setup(e, t) {
const n = w(e.width || 300), o = w(e.height || 200), a = w(e.modelValue), r = w(""), i = w(e.class), s = w(e.fitContent), u = w(e.showHeader), p = w(""), f = w(e.showCloseButton), d = w(e.showMaxButton), c = w(!1), y = w(e.dialogType), _ = w(e.src), D = w(""), x = w(e.showButtons), v = w(e.title), b = w(e.resizeable), T = w(e.containment || null), m = w(), F = w(!1);
function k(oe, be) {
a.value = !1, t.emit("update:modelValue", !1), be != null && t.emit(be ? "accept" : "cancel"), t.emit("closed", oe);
}
const l = [{
name: "cancel",
text: "取消",
class: "btn btn-secondary",
handle: (oe) => {
k(oe, !1);
}
}, {
name: "accept",
text: "确定",
class: "btn btn-primary",
handle: (oe) => {
k(oe, !0);
}
}], g = w(e.buttons && e.buttons.length ? e.buttons : l), h = N(() => !!p.value), E = N(() => !!x.value && !!g.value), S = w(), $ = w(), R = w(!1), {
renderResizeBar: V,
maximize: I,
restore: O,
boundingElement: M,
resizedEventParam: B,
allowDrag: W,
unWindowResizeHandle: K
} = mr(e), {
registerDraggle: te
} = vr(e, t, W);
function Y() {
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
}
function pe() {
const oe = document.querySelectorAll(".farris-modal").length;
(!oe || oe - 1 <= 0) && document.body.classList.remove("modal-open"), m.value && m.value.classList.remove("show");
}
_e(() => e.title, (oe, be) => {
oe !== be && (v.value = oe);
}), _e(() => e.modelValue, (oe, be) => {
oe !== be && (a.value = oe, oe || pe()), a.value && (F.value = Y());
}), _e(() => e.showHeader, (oe, be) => {
oe !== be && (u.value = oe);
}), _e(() => e.showButtons, (oe, be) => {
oe !== be && (x.value = oe);
}), _e(() => B.value, (oe, be) => {
const Ie = oe || {}, Be = be || {};
JSON.stringify(Ie) !== JSON.stringify(Be) && t.emit("resize", {
newSize: oe,
oldSize: be
});
});
const L = N(() => (a.value && document.body.classList.add("modal-open"), a.value)), H = N(() => {
const oe = {
modal: !0,
"farris-modal": !0,
fade: !0
};
return oe["f-modal-fitContent"] = !!s.value, oe.show = !!L.value, oe;
}), z = N(() => {
var Ie;
const oe = {
"modal-dialog": !0
}, be = (Ie = i.value) == null ? void 0 : Ie.split(" ");
return be == null || be.reduce((Be, ke) => (Be[ke] = !0, Be), oe), oe;
}), A = N(() => ({
position: "absolute",
top: `${(window.innerHeight - o.value) / 2}px`,
left: `${(window.innerWidth - n.value) / 2}px`,
width: `${n.value}px`,
height: s.value ? "auto" : `${o.value}px`
})), Q = N(() => ({
"modal-content": !0,
"modal-content-has-header": u.value
})), X = N(() => {
const oe = {
display: u.value ? "" : "none"
};
return oe["pointer-events"] = W.value ? "auto" : "none", oe;
}), j = N(() => ({
"f-icon": !0,
modal_maximize: !0,
modalrevert: R.value
})), q = N(() => ({
"modal-body": !0,
"f-utils-flex-column": y.value === "iframe",
"f-utils-fill": !0
}));
function ie() {
return {
height: `${e.footerHeight || 60}px`
};
}
const Z = N(() => {
const oe = {
textAlgin: D.value
}, be = ie();
return Object.assign(oe, be);
});
funct