@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,392 lines • 418 kB
JavaScript
var Jo = Object.defineProperty;
var Zo = (t, n, e) => n in t ? Jo(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
var P = (t, n, e) => Zo(t, typeof n != "symbol" ? n + "" : n, e);
import { ref as C, computed as q, defineComponent as Ze, watch as ke, createVNode as E, createTextVNode as Tt, mergeProps as Rt, reactive as pt, withDirectives as _n, resolveDirective as Qn, Fragment as $t, inject as Nt, onMounted as Et, onBeforeMount as Kn, vModelText as er, nextTick as Qt, createApp as Jn, onUnmounted as un, Transition as Zn, onBeforeUnmount as eo, Teleport as tr, shallowRef as nr, render as cn, h as or, cloneVNode as rr, provide as ir, triggerRef as ar, isVNode as sr } from "vue";
import { isPlainObject as Nn, cloneDeep as Ft, debounce as lr, isUndefined as dt, throttle as ur } from "lodash-es";
import cr from "../accordion/index.esm.js";
import dr from "../avatar/index.esm.js";
import fr from "../../designer/button-edit/index.esm.js";
import pr from "../button-group/index.esm.js";
import mr from "../calendar/index.esm.js";
import hr from "../capsule/index.esm.js";
import Bn from "../../designer/checkbox/index.esm.js";
import Rn from "../../designer/checkbox-group/index.esm.js";
import hn from "../combo-list/index.esm.js";
import vr from "../combo-tree/index.esm.js";
import gr from "../component/index.esm.js";
import yr from "../color-picker/index.esm.js";
import br from "../content-container/index.esm.js";
import wr from "../date-picker/index.esm.js";
import Cr from "../../designer/data-grid/index.esm.js";
import xr from "../dropdown/index.esm.js";
import _r, { FDynamicFormGroup as Sr, FDynamicFormInput as Tr } from "../dynamic-form/index.esm.js";
import Er from "../events-editor/index.esm.js";
import Fr from "../filter-bar/index.esm.js";
import kr from "../field-selector/index.esm.js";
import Mr from "../binding-selector/index.esm.js";
import Ir from "../image-cropper/index.esm.js";
import Or from "../../designer/input-group/index.esm.js";
import Pr from "../layout/index.esm.js";
import Dr from "../list-nav/index.esm.js";
import Vr from "../list-view/index.esm.js";
import Nr from "../lookup/index.esm.js";
import Br from "../mapping-editor/index.esm.js";
import Rr from "../nav/index.esm.js";
import Lr from "../number-range/index.esm.js";
import $r from "../number-spinner/index.esm.js";
import Wr from "../order/index.esm.js";
import Hr from "../page-header/index.esm.js";
import jr from "../page-footer/index.esm.js";
import Ar from "../pagination/index.esm.js";
import qr from "../progress/index.esm.js";
import Gr from "../query-solution/index.esm.js";
import zr from "../../designer/radio-group/index.esm.js";
import Yr from "../rate/index.esm.js";
import Ur from "../response-toolbar/index.esm.js";
import Xr from "../response-layout/index.esm.js";
import Qr from "../response-layout-editor/index.esm.js";
import Kr from "../search-box/index.esm.js";
import Jr from "../section/index.esm.js";
import Zr from "../smoke-detector/index.esm.js";
import ei from "../splitter/index.esm.js";
import ti from "../step/index.esm.js";
import ni from "../switch/index.esm.js";
import oi from "../tabs/index.esm.js";
import ri from "../tags/index.esm.js";
import ii from "../text/index.esm.js";
import ai from "../time-picker/index.esm.js";
import si from "../transfer/index.esm.js";
import li from "../tree-view/index.esm.js";
import ui from "../uploader/index.esm.js";
import ci from "../verify-detail/index.esm.js";
import di from "../video/index.esm.js";
import fi from "../textarea/index.esm.js";
import pi from "../schema-selector/index.esm.js";
import mi from "../tree-grid/index.esm.js";
import hi from "../event-parameter/index.esm.js";
import vi from "../filter-condition-editor/index.esm.js";
import gi from "../fieldset/index.esm.js";
import yi from "../sort-condition-editor/index.esm.js";
import bi from "../menu-lookup/index.esm.js";
import wi from "../drawer/index.esm.js";
import Ci from "../json-editor/index.esm.js";
import xi from "../property-editor/index.esm.js";
import _i from "../expression-editor/index.esm.js";
import Si from "../code-editor/index.esm.js";
import Ti from "../html-template/index.esm.js";
import { DgControl as Ln } from "../designer-canvas/index.esm.js";
import { useGuid as Ei, resolveField as at, FormSchemaEntityFieldTypeName as $n, useCommonUtils as Fi, useDateFormat as ki, useNumberFormat as Mi, setFieldValue as vn, getCustomClass as dn, withInstall as Ii, FormSchemaEntityField$Type as Wn, FormSchemaEntityFieldType$Type as Oi } from "../common/index.esm.js";
import { useResizeObserver as to } from "@vueuse/core";
import { useIdentify as Pi, useGroupData as Di, useFilter as Vi, useHierarchy as Ni, useLoading as Bi, useDataView as Ri, useSelection as Li, useSelectHierarchyItem as $i, useDataViewContainerStyle as Wi, useCommandColumn as Hi, useColumn as ji, useSort as Ai, useGroupColumn as qi, useRow as Gi, useEdit as zi, useVisualDataBound as Yi, useVisualDataCell as Ui, useVisualDataRow as Xi, useVisualData as Qi, useCellPosition as Ki, useSidebar as Ji, useVirtualScroll as Zi, useFitColumn as ea, useFilterHistory as ta, useColumnFilter as na, useDragColumn as oa, getColumnHeader as ra, getSidebar as ia, getDisableMask as aa, getHorizontalScrollbar as sa, getVerticalScrollbar as la, getEmpty as ua } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import "../condition/index.esm.js";
import { FCheckbox as ca } from "../checkbox/index.esm.js";
import Hn from "../tooltip/index.esm.js";
import da from "../button/index.esm.js";
import { createPropsResolver as fa } from "../dynamic-resolver/index.esm.js";
import "../property-panel/index.esm.js";
import "../external-container/index.esm.js";
import "../notify/index.esm.js";
const pa = {
width: { type: String, default: "300px" },
height: { type: Number, default: 10 },
isWidePanel: { type: Boolean, default: !1 },
/** 是否启用搜索 */
enableSearch: { type: Boolean, default: !0 },
/** 使用模式 */
mode: { type: String, default: "panel" },
/** 是否持有面板的隐藏显示状态 */
isPersitOpenState: { type: Boolean, default: !1 },
/** isPersitOpenState=true时,控制面板是否隐藏显示 */
isShowPanel: { type: Boolean, default: !1 },
/** 属性名 */
propertyName: { type: String, default: "" },
/** 属性类型 */
propertyConfig: { type: Array },
/** 属性值 */
propertyData: { type: Object, default: {} },
/** 是否展示关闭按钮 */
showCloseBtn: { type: Boolean, default: !1 },
/** 当前选中的标签页id */
selectedTabId: { type: String, default: "" },
/** 是否是白色主题 */
isWhiteTheme: { type: Boolean, default: !0 },
/** dom结构 */
schema: { type: Object, default: {} },
/** 属性变更后事件 */
propertyChanged: { type: Function }
};
function ma(t = {}) {
function n(c, d, s, m) {
if (typeof s == "number")
return m[c].length === s;
if (typeof s == "object") {
const f = Object.keys(s)[0], p = s[f];
if (f === "not")
return Number(m[c].length) !== Number(p);
if (f === "moreThan")
return Number(m[c].length) >= Number(p);
if (f === "lessThan")
return Number(m[c].length) <= Number(p);
}
return !1;
}
function e(c, d, s, m) {
return m[c] && m[c].propertyValue && String(m[c].propertyValue.value) === String(s);
}
const o = /* @__PURE__ */ new Map([
["length", n],
["getProperty", e]
]);
Object.keys(t).reduce((c, d) => (c.set(d, t[d]), c), o);
function r(c, d) {
const s = c;
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: c, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
if (m === "length")
return { target: s, operator: "length", param: null, value: d[m] };
const f = m, p = d[m];
return { target: s, operator: "getProperty", param: f, value: p };
}) : [];
}
function i(c) {
return Object.keys(c).reduce((s, m) => {
const f = r(m, c[m]);
return s.push(...f), s;
}, []);
}
function a(c, d) {
if (o.has(c.operator)) {
const s = o.get(c.operator);
return s && s(c.target, c.param, c.value, d) || !1;
}
return !1;
}
function u(c, d) {
return i(c).reduce((f, p) => f && a(p, d), !0);
}
function l(c, d) {
const s = Object.keys(c), m = s.includes("allOf"), f = s.includes("anyOf"), p = m || f, v = (p ? c[p ? m ? "allOf" : "anyOf" : "allOf"] : [c]).map((y) => u(y, d));
return m ? !v.includes(!1) : v.includes(!0);
}
return { parseValueSchema: l };
}
const tn = {}, no = {};
function Sn(t) {
const { properties: n, title: e, ignore: o } = t, r = o && Array.isArray(o), i = Object.keys(n).reduce((a, u) => ((!r || !o.find((l) => l === u)) && (a[u] = n[u].type === "object" && n[u].properties ? Sn(n[u]) : Ft(n[u].default)), a), {});
if (e && (!r || !o.find((a) => a === "id"))) {
const a = e.toLowerCase().replace(/-/g, "_");
i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
}
return i;
}
function ha(t) {
const { properties: n, title: e, required: o } = t;
if (o && Array.isArray(o)) {
const r = o.reduce((i, a) => (i[a] = n[a].type === "object" && n[a].properties ? Sn(n[a]) : Ft(n[a].default), i), {});
if (e && o.find((i) => i === "id")) {
const i = e.toLowerCase().replace(/-/g, "_");
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
}
return r;
}
return {
type: e
};
}
function oo(t, n = {}, e) {
const o = tn[t];
if (o) {
let r = ha(o);
const i = no[t];
return r = i ? i({ getSchemaByType: oo }, r, n, e) : r, r;
}
return null;
}
function gn(t, n) {
const e = Sn(n);
return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(t, r) && (o[r] && Nn(o[r]) && Nn(t[r] || !t[r]) ? Object.assign(o[r], t[r] || {}) : o[r] = t[r]), o), e), e;
}
function ro(t, n) {
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
if (n.has(r)) {
const i = n.get(r);
if (typeof i == "string")
o[i] = t[r];
else {
const a = i(r, t[r], t);
Object.assign(o, a);
}
} else
o[r] = t[r];
return o;
}, {});
}
function va(t, n, e = /* @__PURE__ */ new Map()) {
const o = gn(t, n);
return ro(o, e);
}
function io(t) {
var e;
const n = t.type;
if (n) {
const o = tn[n];
if (!o)
return t;
const r = gn(t, o), i = ((e = t.editor) == null ? void 0 : e.type) || "";
if (i) {
const a = tn[i], u = gn(t.editor, a);
r.editor = u;
}
return r;
}
return t;
}
const ga = {
convertTo: (t, n, e, o) => {
t.appearance || (t.appearance = {}), t.appearance[n] = e;
},
convertFrom: (t, n, e) => t.appearance ? t.appearance[n] : t[n]
}, ya = {
convertFrom: (t, n, e) => t.buttons && t.buttons.length ? `共 ${t.buttons.length} 项` : "无"
}, ba = {
convertTo: (t, n, e, o) => {
t.editor && (t.editor[n] = e);
},
convertFrom: (t, n, e) => t.editor && Object.prototype.hasOwnProperty.call(t.editor, n) ? t.editor[n] : t[n]
}, me = {
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: "标签页工具栏按钮" },
"html-template": { type: "html-template", 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: "抽屉" },
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
"list-nav": { type: "list-nav", name: "列表导航" },
"filter-bar": { type: "filter-bar", name: "筛选条" }
}, wa = {
convertFrom: (t, n, e) => {
var r;
const o = t.editor && t.editor[n] ? t.editor[n] : t[n];
return ((r = me[o]) == null ? void 0 : r.name) || o;
}
}, Ca = {
convertTo: (t, n, e, o) => {
t[n] = t[n];
},
convertFrom: (t, n, e) => t.editor ? e.getRealEditorType(t.editor.type) : ""
}, xa = {
convertFrom: (t, n) => t.binding ? t.binding.path : "",
convertTo: (t, n, e) => {
if (e && e.length > 0) {
const o = e[0];
t.binding || (t.binding = {}), t.binding.type = "Form", t.binding.path = o.bindingField, t.binding.field = o.id, t.binding.fullPath = o.path, t.path = o.bindingPath;
}
}
}, _a = {
convertTo: (t, n, e, o) => {
t.pagination || (t.pagination = {}), t.pagination[n] = e;
},
convertFrom: (t, n, e) => t.pagination ? t.pagination[n] : t[n]
}, Sa = {
convertTo: (t, n, e, o) => {
t.rowNumber || (t.rowNumber = {}), t.rowNumber[n] = e;
},
convertFrom: (t, n, e) => t.rowNumber ? t.rowNumber[n] : t[n]
}, Ta = {
convertTo: (t, n, e, o) => {
t.selection || (t.selection = {}), t.selection[n] = e;
},
convertFrom: (t, n, e) => t.selection ? t.selection[n] : t[n]
}, Ea = {
convertFrom: (t, n, e) => t[n] && t[n].length ? `共 ${t[n].length} 项` : ""
}, Fa = {
convertFrom: (t, n) => t[n] || "",
convertTo: (t, n, e) => {
t[n] = e;
}
}, Tn = {}, yn = /* @__PURE__ */ new Map([
["/converter/appearance.converter", ga],
["/converter/buttons.converter", ya],
["/converter/property-editor.converter", ba],
["/converter/items-count.converter", Ea],
["/converter/type.converter", wa],
["/converter/change-editor.converter", Ca],
["/converter/form-group-label.converter", Fa],
["/converter/field-selector.converter", xa],
["/converter/pagination.converter", _a],
["/converter/row-number.converter", Sa],
["/converter/grid-selection.converter", Ta]
]), ka = {}, Ma = /* @__PURE__ */ new Map([
["string", { type: "input-group", enableClear: !1 }],
["boolean", {
type: "combo-list",
textField: "name",
valueField: "value",
idField: "value",
enableClear: !1,
editable: !1,
maxHeight: 64,
data: [
{
value: !0,
name: "是"
},
{
value: !1,
name: "否"
}
]
}],
["enum", { type: "combo-list", maxHeight: 350, enableClear: !1, editable: !1 }],
["array", { type: "button-edit" }],
["number", { type: "number-spinner", placeholder: "" }],
["events-editor", { type: "events-editor", hide: !0 }]
]), Ia = ma();
function ao(t, n) {
return () => Ia.parseValueSchema(t, n);
}
function Oa(t, n, e) {
return t.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : ao(n.visible, e) : () => !0;
}
function Pa(t, n, e) {
return t.includes("readonly") && n.readonly !== void 0 ? typeof n.readonly == "boolean" ? () => !!n.readonly : ao(n.readonly, e) : () => !1;
}
function Da(t, n) {
const e = t.$converter || n;
return typeof e == "string" && e && yn.has(e) ? yn.get(e) || null : e || null;
}
function En(t, n, e, o, r, i = "", a = "") {
return Object.keys(t).map((l) => {
const c = C(1), d = l, s = t[l], m = Object.keys(s), f = s.title, p = s.type, k = Ma.get(p) || { type: "input-group", enableClear: !1 }, b = s.editor ? Object.assign({}, k, s.editor) : Object.assign({}, k), v = Oa(m, s, n), w = Pa(m, s, n);
b.readonly = b.readonly === void 0 ? w() : b.readonly;
const y = s.type === "cascade" ? En(s.properties, n, e, o, r, i, a) : [], x = !0;
let T = Da(s, a);
const F = q({
get() {
if (c.value) {
if (["class", "style"].find((D) => D === d) && !T && (T = yn.get("/converter/appearance.converter") || null), T && T.convertFrom)
return T.convertFrom(e, l, r, i);
const g = e[l];
return Object.prototype.hasOwnProperty.call(s, "defaultValue") && (g === void 0 || typeof g == "string" && g === "") ? s.defaultValue : g;
}
return null;
},
set(g) {
c.value += 1, T && T.convertTo ? (T.convertTo(o, l, g, r, i), T.convertTo(e, l, g, r, i)) : (o[l] = g, e[l] = g);
}
}), { refreshPanelAfterChanged: h, description: S, isExpand: _ } = s, M = { propertyID: d, propertyName: f, propertyType: p, propertyValue: F, editor: b, visible: v, readonly: w, cascadeConfig: y, hideCascadeTitle: x, refreshPanelAfterChanged: h, description: S, isExpand: _ };
return n[d] = M, M;
});
}
function Va(t, n, e, o, r = "") {
const i = n.$ref.schema, a = n.$ref.converter, u = e[i], l = u.type, c = io(u), d = {}, s = Tn[l];
if (s && s.categories) {
const m = s.categories[t], f = m == null ? void 0 : m.title;
a && Object.keys(m.properties).forEach((b) => {
m.properties[b].$converter = a;
});
const p = (m == null ? void 0 : m.properties) || {}, k = En(p, d, c, u, o, r);
return { categoryId: t, categoryName: f, properties: k };
}
return { categoryId: t, categoryName: "", properties: [] };
}
function fn(t, n, e, o, r) {
const i = t.type, a = io(t), u = {};
let l = r || Tn[i];
if (l && Object.keys(l).length === 0 && e && e.getPropConfig && (l = e.getPropConfig(o)), l && l.categories) {
const c = [];
return Object.keys(l.categories).map((d) => {
const s = l.categories[d];
if (s.$ref) {
c.push(Va(d, s, t, n, o));
return;
}
const m = s == null ? void 0 : s.title, f = s == null ? void 0 : s.tabId, p = s == null ? void 0 : s.tabName, k = s == null ? void 0 : s.hide, b = s == null ? void 0 : s.hideTitle, v = En(s.properties || {}, u, a, t, n, o, s.$converter), { setPropertyRelates: w } = s;
c.push({ categoryId: d, categoryName: m, tabId: f, tabName: p, hide: k, properties: v, hideTitle: b, setPropertyRelates: w });
}), c;
}
return [];
}
const Na = {
/** 某一分类下的属性配置 */
// as PropType<ElementPropertyConfig>
category: { type: Object, default: {} },
categoryKey: { type: String },
/** 属性值 */
propertyData: { type: Object, default: {} },
valueChanged: { type: Function },
triggerRefreshPanel: { type: Function }
}, Ba = {
elementConfig: { type: Object, default: {} },
category: { type: Object, default: {} }
};
function At(t, n, e = /* @__PURE__ */ new Map(), o = (a, u, l, c) => u, r = {}, i = (a) => a) {
return tn[n.title] = n, no[n.title] = o, Tn[n.title] = r, ka[n.title] = i, (a = {}, u = !0) => {
if (!u)
return ro(a, e);
const l = va(a, n, e), c = Object.keys(t).reduce((d, s) => (d[s] = t[s].default, d), {});
return Object.assign(c, l);
};
}
function Fn(t, n) {
return { customClass: n.class, customStyle: n.style };
}
function Ra() {
function t(n, e) {
const { dataSource: o } = n || {};
return o === void 0 ? {} : {};
}
return {
resolve: t
};
}
function La() {
function t(n, e) {
return n.selectItemById(e);
}
return {
selectItemById: t
};
}
function $a() {
function t(n, e) {
const { columns: o } = e;
return n.updateColumns(o);
}
return {
updateColumns: t
};
}
const kn = /* @__PURE__ */ new Map([
["appearance", Fn]
]), Wa = /* @__PURE__ */ new Map([]), Ha = "https://json-schema.org/draft/2020-12/schema", ja = "https://farris-design.gitee.io/form-group.schema.json", Aa = "form-group", qa = "A Farris Input Component", Ga = "object", za = {
id: {
description: "The unique identifier for a form group",
type: "string"
},
type: {
description: "The type string of form group component",
type: "string",
default: "form-group"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
enableLinkLabel: {
description: "",
type: "boolean",
default: !1
},
editor: {
description: "",
type: "obejct",
default: null
},
label: {
description: "",
type: "string",
default: ""
},
lableWidth: {
description: "",
type: "number"
},
binding: {
description: "",
type: "object",
default: {}
},
visible: {
description: "",
type: "boolean",
default: !0
},
required: {
description: "",
type: "boolean",
default: !1
},
errors: {
description: "",
type: "object",
default: null
}
}, Ya = [
"id",
"type",
"editor"
], so = {
$schema: Ha,
$id: ja,
title: Aa,
description: qa,
type: Ga,
properties: za,
required: Ya
}, lo = {
id: { type: String, default: "" },
customClass: { type: String, default: "" },
customStyle: { type: String, default: "" },
/** 筛选组件配置器,具体配置项可查看各组件文档 */
editor: { type: Object, default: {} },
label: { type: String, default: "" },
/** value is uncertain because type is uncertain, default value should not be set */
modelValue: { type: [String, Boolean, Array, Number] },
// readonly: { type: Boolean, default: false },
visible: { type: Boolean, default: !0 },
required: { type: Boolean, default: !1 },
showLabel: { type: Boolean, default: !0 },
type: { type: String, default: "input-group" },
componentId: { type: String, default: "" },
errors: { type: Object, default: null }
};
At(
lo,
so,
kn,
void 0
);
const Ua = {
id: { type: String },
required: { type: Boolean, default: !1 },
text: { type: String, default: "" },
title: { type: String },
valid: { type: Boolean, default: !0 },
inValidTip: { type: String, default: "" }
}, Xa = /* @__PURE__ */ Ze({
name: "FDynamicFormLabel",
props: Ua,
emits: [],
setup(t, n) {
C(t.title || t.text);
const e = C(t.required), o = C(t.text), r = C(t.valid), i = C(t.inValidTip);
ke(() => t.text, () => {
o.value = t.text;
}), ke(() => t.required, (l, c) => {
l !== c && (e.value = l);
}), ke([() => t.valid, () => t.inValidTip], ([l, c]) => {
r.value = l, i.value = c;
});
const a = q(() => r.value ? o.value : i.value), u = q(() => r.value ? "" : "color:red");
return () => o.value && E("label", {
class: "col-form-label",
title: a.value,
style: u.value
}, [!r.value && E("span", {
class: "f-icon f-icon-warning mr-1",
style: "color: red; min-width: 16px;",
title: i.value
}, null), e.value && E("span", {
class: "farris-label-info text-danger"
}, [Tt("*")]), E("span", {
class: "farris-label-text"
}, [o.value])]);
}
}), ue = {}, ce = {}, fe = {}, pe = {};
let jn = !1;
function Qa() {
jn || (jn = !0, dr.register(ue, ce, fe, pe), cr.register(ue, ce, fe, pe), fr.register(ue, ce, fe, pe), pr.register(ue, ce, fe, pe), mr.register(ue, ce, fe, pe), hr.register(ue, ce, fe, pe), Bn.register(ue, ce, fe, pe), Rn.register(ue, ce, fe, pe), Bn.register(ue, ce, fe, pe), Rn.register(ue, ce, fe, pe), hn.register(ue, ce, fe, pe), vr.register(ue, ce, fe, pe), gr.register(ue, ce, fe, pe), br.register(ue, ce, fe, pe), yr.register(ue, ce, fe, pe), wr.register(ue, ce, fe, pe), Cr.register(ue, ce, fe, pe), xr.register(ue, ce, fe, pe), _r.register(ue, ce, fe, pe), Er.register(ue, ce, fe, pe), _i.register(ue, ce, fe, pe), Fr.register(ue, ce, fe, pe), kr.register(ue, ce, fe, pe), vi.register(ue, ce, fe, pe), Ir.register(ue, ce, fe, pe), Or.register(ue, ce, fe, pe), Pr.register(ue, ce, fe, pe), Vr.register(ue, ce, fe, pe), Dr.register(ue, ce, fe, pe), Nr.register(ue, ce, fe, pe), Br.register(ue, ce, fe, pe), Rr.register(ue, ce, fe, pe), Lr.register(ue, ce, fe, pe), $r.register(ue, ce, fe, pe), Wr.register(ue, ce, fe, pe), Hr.register(ue, ce, fe, pe), jr.register(ue, ce, fe, pe), Ar.register(ue, ce, fe, pe), qr.register(ue, ce, fe, pe), Gr.register(ue, ce, fe, pe), zr.register(ue, ce, fe, pe), Yr.register(ue, ce, fe, pe), Xr.register(ue, ce, fe, pe), Qr.register(ue, ce, fe, pe), Ur.register(ue, ce, fe, pe), pi.register(ue, ce, fe), Kr.register(ue, ce, fe, pe), Jr.register(ue, ce, fe, pe), Zr.register(ue, ce, fe, pe), ei.register(ue, ce, fe, pe), ti.register(ue, ce, fe, pe), ni.register(ue, ce, fe, pe), yi.register(ue, ce, fe, pe), oi.register(ue, ce, fe, pe), ri.register(ue, ce, fe, pe), ii.register(ue, ce, fe, pe), ai.register(ue, ce, fe, pe), si.register(ue, ce, fe, pe), li.register(ue, ce, fe, pe), ci.register(ue, ce, fe, pe), ui.register(ue, ce, fe, pe), di.register(ue, ce, fe, pe), fi.register(ue, ce, fe, pe), mi.register(ue, ce, fe, pe), Mr.register(ue, ce, fe, pe), hi.register(ue, ce, fe, pe), gi.register(ue, ce, fe, pe), bi.register(ue, ce, fe, pe), wi.register(ue, ce, fe, pe), Ci.register(ue, ce, fe, pe), xi.register(ue, ce, fe, pe), Si.register(ue, ce, fe, pe), Ti.register(ue, ce, fe, pe));
}
function Ka() {
Qa();
function t(a) {
const u = ue[a];
if (!u)
throw new Error(`Could not find the editor of type '${a}'`);
return u;
}
function n(a, u) {
const l = ce[a];
return l ? l(u) : {};
}
function e(a) {
switch (a) {
case "check-box":
return "onChangeValue";
case "switch":
return "onModelValueChanged";
case "check-group":
return "onChangeValue";
case "combo-list":
case "combo-tree":
return "onChange";
case "combo-lookup":
return "";
case "date-picker":
return "onDatePicked";
case "date-range":
return "";
case "datetime-picker":
return "";
case "time-picker":
return "onValueChange";
case "datetime-range":
return "";
case "month-picker":
return "";
case "month-range":
return "";
case "year-picker":
return "";
case "year-range":
return "";
case "input-group":
return "onChange";
case "lookup":
case "sort-condition-editor":
case "filter-condition-editor":
case "code-editor":
return "onUpdate:modelValue";
case "number-range":
return "onValueChange";
case "number-spinner":
return "onValueChange";
case "radio-group":
return "onChangeValue";
case "text":
return "";
case "events-editor":
return "onSavedCommandListChanged";
case "grid-field-editor":
case "item-collection-editor":
case "response-form-layout-setting":
case "response-layout-editor-setting":
case "response-layout-splitter":
case "menu-lookup":
case "json-editor":
return "onChange";
case "field-selector":
case "binding-selector":
return "onFieldSelected";
case "schema-selector":
return "onSchemaSelected";
case "mapping-editor":
return "onMappingFieldsChanged";
case "textarea":
return "onChange";
case "query-solution-config":
case "solution-preset":
return "onFieldsChanged";
case "property-editor":
return "onValueChange";
case "expression-editor":
return "onExpressionChanged";
}
}
function o(a) {
switch (a) {
case "combo-list":
case "input-group":
case "textarea":
return "onClear";
}
}
function r(a) {
switch (a) {
case "input-group":
case "textarea":
return "onMousedownEvent";
}
}
function i(a) {
switch (a) {
case "input-group":
case "textarea":
return "onMouseupEvent";
}
}
return { resolveEditorProps: n, resolveEditorType: t, getChangeFunctionName: e, getClearFunctionName: o, getMousedownFunctionName: r, getMouseupFunctionName: i };
}
const Ja = {
/**
* 显示的错误信息
*/
errors: {
type: Object,
default: null
}
}, Za = /* @__PURE__ */ Ze({
name: "FValidationMessage",
props: Ja,
emits: [],
setup(t, n) {
const e = C(t.errors);
ke(() => t.errors, (i) => {
e.value = i;
});
const o = C(!0), r = q(() => {
if (e.value) {
const i = Object.keys(e.value).map((a) => {
var u;
return (u = e.value[a]) == null ? void 0 : u.name;
});
return i.length ? i.join(" ") : "";
}
return "";
});
return () => r.value && E("div", {
class: "farris-feedback f-state-invalid",
onClick: () => o.value = !o.value
}, [!o.value && E("span", {
class: "f-icon f-icon-message_warning f-feedback-icon"
}, null), o.value && E("span", {
class: "f-feedback-message"
}, [r.value])]);
}
}), uo = /* @__PURE__ */ Ze({
name: "FDynamicFormGroup",
props: lo,
emits: ["change", "update:modelValue"],
setup(t, n) {
var F;
const e = C(t.id), o = C(t.customClass), r = C(t.editor), i = C(t.label), a = C(t.modelValue), u = C(t.readonly), l = C(((F = t.editor) == null ? void 0 : F.required) || t.required), c = C(t.showLabel), d = C(t.visible);
C(t.type);
const s = C(), m = C(t.errors), {
resolveEditorProps: f,
resolveEditorType: p,
getChangeFunctionName: k,
getClearFunctionName: b
} = Ka(), v = q(() => ({
"form-group": !0,
"farris-form-group": !0,
"common-group": !0,
"q-state-readonly": u.value
}));
function w(h, S, _) {
a.value = S !== void 0 ? S : h, n.emit("update:modelValue", a.value), n.emit("change", a.value, {
newValue: h,
newModelValue: S,
parameters: _
});
}
function y() {
n.emit("update:modelValue", "");
}
const x = q(() => {
const h = r.value.type || "input-group", S = p(h), _ = f(h, r.value), M = k(h), g = b(r.value.type);
return g && (_[g] = y), _[M] = w, (_.id == null || _.id === "") && (_.id = e.value), h === "number-range" && r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" ? (r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" && (_.onBeginValueChange = r.value.onBeginValueChange), r.value.onEndValueChange && typeof r.value.onEndValueChange == "function" && (_.onEndValueChange = r.value.onEndValueChange)) : h === "lookup" && r.value["onUpdate:idValue"] && typeof r.value["onUpdate:idValue"] == "function" ? _["onUpdate:idValue"] = r.value["onUpdate:idValue"] : h === "property-editor" && (_.onBeforeOpenVariables = r.value.onBeforeOpenVariables), () => E(S, Rt({
ref: s
}, _, {
modelValue: a.value,
"onUpdate:modelValue": (D) => a.value = D
}), n.slots);
});
function T() {
return E(Za, {
id: `${e.value}-validation-message`,
errors: m.value
}, null);
}
return ke([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible, () => t.errors], ([h, S, _, M, g, D, N, I, O, G]) => {
var H;
e.value = h, o.value = S, r.value = _, i.value = M, a.value = g, u.value = D, l.value = ((H = r.value) == null ? void 0 : H.required) || N, c.value = I, d.value = O, m.value = G;
}), n.expose({
editorRef: s
}), () => d.value && E("div", {
id: `${e.value}-input-group`,
class: o.value,
style: t.customStyle
}, [E("div", {
class: "farris-group-wrap"
}, [E("div", {
class: v.value
}, [c.value && E(Xa, {
id: `${e.value}-lable`,
required: l.value,
text: i.value,
title: i.value
}, null), E("div", {
class: "farris-input-wrap"
}, [x.value(), T()])])])]);
}
}), es = /* @__PURE__ */ Ze({
name: "FPropertyPanelItem",
props: Ba,
emits: ["propertyChange", "triggerRefreshPanel"],
setup(t, n) {
var d;
const e = C((d = t.category) == null ? void 0 : d.categoryId), o = C(t.elementConfig.propertyID), r = C(t.elementConfig.propertyName);
C(t.elementConfig.editor);
const i = C(t.elementConfig.propertyValue), a = q(() => {
const s = t.elementConfig.visible;
return {
"farris-group-wrap": !0,
"property-item": !0,
"d-none": !(typeof s == "boolean" ? s : s === void 0 ? !0 : s())
};
});
ke(() => {
var s;
return (s = t.elementConfig) == null ? void 0 : s.propertyValue;
}, (s) => {
i.value = s;
}), ke(() => {
var s;
return (s = t.elementConfig) == null ? void 0 : s.propertyName;
}, (s) => {
r.value = s;
});
function u(s, m) {
const {
parameters: f
} = m;
t.elementConfig.propertyValue = s;
const p = {
propertyID: t.elementConfig.propertyID,
propertyValue: s
};
n.emit("propertyChange", p, f), t.elementConfig.refreshPanelAfterChanged && n.emit("triggerRefreshPanel");
}
const l = t.elementConfig.description ? `<div style="color: gray; "> 描述 :${t.elementConfig.description}</div>` : "", c = pt({
content: `
<div>
<div style="color: black; ">${t.elementConfig.propertyName}</div>
<div style="color: gray; ">ID:${t.elementConfig.propertyID}</div>
${l}
</div>`,
placement: "left"
});
return () => E("div", {
class: a.value
}, [t.elementConfig.propertyName && _n(E("label", {
class: `col-form-label ${e.value}-${o.value}`
}, [E("span", {
class: "farris-label-text"
}, [r.value])]), [[Qn("tooltip"), c]]), E(uo, {
id: o.value,
showLabel: !1,
editor: t.elementConfig.editor,
modelValue: i.value,
onChange: u,
editorParams: t.elementConfig.editorParams
}, null)]);
}
}), ts = /* @__PURE__ */ Ze({
name: "FPropertyPanelItemList",
props: Na,
emits: ["valueChanged", "submitModal", "triggerRefreshPanel"],
setup(t, n) {
const e = C(t.category);
function o(f) {
if (!f.hideCascadeTitle)
return E("div", {
class: "farris-input-wrap"
}, [E("input", {
title: "summary",
type: "input",
class: "form-control form-control-sm",
value: f.cascadeSummary,
readonly: !0
}, null)]);
}
function r(f, p) {
p.isExpand = !p.isExpand;
}
function i(f) {
return E("div", {
class: "landscape"
}, [E("button", {
title: "expand-button",
class: ["btn f-btn-collapse-expand f-btn-mx px-1", {
"f-state-expand": f.isExpand
}],
onClick: (p) => r(p, f)
}, [E("span", null, null)])]);
}
function a(f) {
return E("div", {
class: `f-section-formgroup-legend ${e.value.categoryId}-${f.propertyID}`
}, [E("div", {
class: "f-header px-0 my-0 col-form-label",
style: "font-size: inherit;"
}, [E("div", {
class: "wrap"
}, [E("span", {
class: ["f-icon mr-1", {
"f-icon-arrow-60-right": !f.isExpand,
"f-icon-arrow-60-down": f.isExpand
}]
}, null), E("span", {
class: "farris-label-text"
}, [f.propertyName])])])]);
}
function u(f) {
return `${t.categoryKey}_${f.propertyID}`;
}
function l(f, p) {
f.categoryId = e.value.categoryId, e.value.enableCascade && (f.propertyPath = e.value.parentPropertyID), e.value.setPropertyRelates && e.value.setPropertyRelates(f, t.propertyData, p), n.emit("valueChanged", {
changeObject: f
});
}
function c() {
n.emit("triggerRefreshPanel");
}
function d(f) {
return E("div", {
class: "px-2 mb-2"
}, [E(es, {
key: u(f),
elementConfig: f,
category: e.value,
onPropertyChange: l,
onTriggerRefreshPanel: c
}, null)]);
}
function s(f) {
var p;
return E("div", {
class: "propertyCascadeItem farris-panel px-2 mb-2"
}, [E("div", {
class: ["farris-panel-item card", {
hidden: !f.isExpand
}]
}, [E("div", {
class: "card-header",
onClick: (k) => r(k, f)
}, [E("div", {
class: "panel-item-title"
}, [E("div", {
class: "form-group farris-form-group line-item"
}, [a(f), o(f), i(f)])])]), E("div", {
class: ["card-body", {
hidden: !f.isExpand
}]
}, [(p = f.cascadeConfig) == null ? void 0 : p.map((k) => d(k))])])]);
}
ke(() => t.category, () => {
e.value = t.category;
});
function m(f) {
return f.propertyType === "cascade" ? s : d;
}
return () => E($t, null, [e.value.properties.map((f) => m(f)(f))]);
}
}), An = /* @__PURE__ */ Ze({
name: "FPropertyPanel",
props: pa,
emits: ["propertyChanged"],
setup(t, n) {
const e = C(t.width), o = C(t.isWidePanel), r = C(t.enableSearch), i = C(t.mode), a = C(t.isPersitOpenState), u = C(t.isShowPanel), l = C(), c = C(), d = C(t.showCloseBtn), s = C(t.selectedTabId), m = C(!0), f = C(t.isWhiteTheme);
let p = [], k = [];
const b = C(""), v = C(), w = C(), y = Nt("SchemaService");
let x = [], T = null, F = "";
const h = C(), S = C(0);
function _() {
k = [], h.value && h.value.categoryList && Array.isArray(h.value.categoryList) && h.value.categoryList.length > 0 && h.value.categoryList.forEach((oe) => {
if (oe.properties && Array.isArray(oe.properties) && oe.properties.length > 0) {
const ie = oe.properties.map((Fe) => (Fe.category = oe, Fe.propertyType === "cascade" && Fe.cascadeConfig && Fe.cascadeConfig.map((Ne) => {
Ne.category = oe, Ne.cascadeParent = Fe, k = k.concat(Ne);
}), Fe));
k = k.concat(ie);
}
});
}
function M(Z) {
let oe = Z.offsetTop, ie = Z.offsetParent;
for (; ie !== null; )
oe += ie.offsetTop, ie = ie.offsetParent;
return oe;
}
function g(Z, oe) {
Z && oe && Object.keys(oe).length > 0 && Object.keys(oe).forEach((ie) => {
var Ne;
const Fe = oe[ie];
(Ne = Z.style) == null || Ne.setProperty(ie, Fe);
});
}
function D() {
return k.filter((oe) => {
if (typeof oe.visible == "function" && !oe.visible() || typeof oe.visible == "boolean" && !oe.visible)
return !1;
const ie = oe.propertyID.toLowerCase(), Fe = oe.propertyName.toLowerCase();
return !!(ie && ie.includes(b.value.toLowerCase()) || Fe && Fe.includes(b.value.toLowerCase()));
});
}
function N(Z, oe, ie) {
if (Z === 0) {
const Fe = M(oe), et = M(ie) - Fe - 5;
oe == null || oe.scroll({
top: et,
behavior: "smooth"
});
}
}
function I(Z) {
x && x.length > 0 && (x.forEach((ie) => {
ie.style.cssText = "";
}), x = []);
const oe = w.value;
if (!b.value)
v.value && oe && (oe.scrollTop = 0);
else if (_(), k && k.length > 0) {
const ie = D();
ie && ie.length > 0 && setTimeout(() => {
let Fe = null, Ne = -1, et = !1;
ie.forEach((K, Ee) => {
const Oe = K.propertyType === "cascade" ? `.${K.category.categoryId}-${K.propertyID} .farris-label-text` : `.property-item .${K.category.categoryId}-${K.propertyID}.col-form-label`, $e = document.querySelector(Oe);
$e && (K.category.status !== "open" && (K.category.status = "open", et = Ne < 0), K.cascadeParent && (K.cascadeParent.isExpand = !0), Ne < 0 && (Fe = $e, Ne = Ee), g($e, {
color: "#5B89FE"
}), x.push($e));
}), Ne > -1 && (et ? Qt(() => {
N(Ne, oe, Fe);
}) : N(Ne, oe, Fe));
}, 50);
}
}
function O(Z) {
I();
}
const G = lr(O, 200);
function H(Z) {
const {
value: oe
} = Z.target;
G(oe);
}
function R(Z) {
O(b.value);
}
function W() {
a.value || (m.value = !1), n.emit("closePropertyPanel");
}
function Q(Z) {
b.value = "", I();
}
function B(Z) {
!Z.status || Z.status === "open" ? Z.status = "closed" : Z.status = "open";
}
function V() {
var Z, oe;
if (p = [], !l.value || l.value.length === 0) {
p = [{
tabId: "default",
tabName: "属性",
categoryList: []
}], h.value = null;
return;
}
if ((Z = l == null ? void 0 : l.value) == null || Z.forEach((ie) => {
if (ie.tabId) {
const Fe = p.find((Ne) => Ne.tabId === ie.tabId);
Fe ? (Fe.categoryList.push(ie), Fe.hide && (Fe.hide = ie.hide || ie.properties.length === 0)) : p.push({
tabId: ie.tabId,
tabName: ie.tabName,
categoryList: [ie],
hide: ie.hide || ie.properties.length === 0
});
} else {
const Fe = p.find((Ne) => Ne.tabId === "default");
Fe ? Fe.categoryList.push(ie) : p.push({
tabId: "default",
tabName: "属性",
categoryList: [ie]
});
}
}), s.value) {
const ie = p == null ? void 0 : p.find((Fe) => Fe.tabId === s.value && !Fe.hide);
h.value = ie || p[0];
} else
h.value = p[0];
s.value = (oe = h.value) == null ? void 0 : oe.tabId;
}
ke(() => [t.schema, t.isShowPanel], () => {
c.value = t.schema, !t.schema || !t.schema.type ? l.value = [] : l.value = fn(c.value, y, T, F), V(), Q(b.value), S.value++;
}), Et(() => {
V();
});
function X(Z, oe, ie = !0) {
(!c.value || oe) && (c.value = oe || t.schema), l.value = fn(c.value, y, T, F, Z), V(), r.value && Q(b.value), ie && S.value++;
}
function j(Z, oe) {
T = Z, F = oe;
}
function L() {
i.value = i.value === "panel" ? "sidebar" : "panel", i.value === "panel" ? (setTimeout(() => {
O();
}, 100), e.value = "300px") : e.value = "41px";
}
function z() {
if (d.value)
return E("div", {
class: "title-actions"
}, [E("div", {
class: "monaco-toolbar"
}, [E("div", {
class: "monaco-action-bar animated"
}, [E("ul", {
class: "actions-container",
role: "toolbar"
}, [E("li", {
class: "action-item",
onClick: W
}, [E("span", {
class: "f-icon f-icon-close"
}, null)])])])])]);
}
function J() {
l.value = fn(c.value, y, T, F), V();
}
function se() {
var Z;
if (r.value && ((Z = h.value) == null ? void 0 : Z.tabId) !== "commands")
return E("div", {
class: "search"
}, [E("div", {
class: "input-group f-state-editable border-left-0 border-right-0"
}, [_n(E("input", {
class: "form-control f-utils-fill text-left pt-3 pb-3 textbox",
type: "text",
placeholder: "输入属性名称或编号快速定位",
autocomplete: "off",
onKeyup: (oe) => H(oe),
"onUpdate:modelValue": (oe) => b.value = oe
}, null), [[er, b.value]]), E("div", {
class: "input-group-append",
style: "margin-left: 0px; background:none;"
}, [E("span", {
class: "input-group-text input-group-clear",
style: [{
display: b.value && b.value.length > 0 ? "" : "none"
}],
onClick: (oe) => Q()
}, [E("i", {
class: "f-icon modal_close"
}, null)]), E("span", {
class: "input-group-text input-group-clear",
onClick: (oe) => R()
}, [E("i", {
class: "f-icon f-icon-search"
}, null)])])])]);
}
function ee(Z) {
return `${t.propertyName}_${Z.categoryId}`;
}
function he(Z) {
n.emit("propertyChanged", {
...Z,
designerItem: T
});
}
function be() {
var Z, oe;
if (h.value)
return E("div", {
class: "panel-body",
ref: w
}, [E("ul", {
class: ["property-grid", {
"wide-panel": o.value
}]
}, [(oe = (Z = h.value) == null ? void 0 : Z.categoryList) == null ? void 0 : oe.map((ie) => !ie.hide && E("li", {
key: ee(ie),
"data-category-id": ie == null ? void 0 : ie.categoryId
}, [!ie.hideTitle && E("span", {
class: "group-label",
onClick: () => B(ie)
}, [E("span", {
class: ["f-icon mr-2", {
"f-legend-show": ie.status === "closed"
}, {
"f-legend-collapse": ie.status === "open" || ie.status === void 0
}]
}, null), ie.categoryName]), E("div", {
hidden: ie.status === "closed"
}, [E(ts, {
key: `${ie == null ? void 0 : ie.categoryId}-${S.value}`,
category: ie,
propertyData: c.value,
onTriggerRefreshPanel: J,
onValueChanged: he
}, null)])]))])]);
}
function Te() {
if (i.value === "sidebar")
return E("div", {
class: "side-panel h-100",
onClick: L
}, [E("i", {
class: "f-icon f-icon-engineering w-100 icon"
}, null), E("span", null, [Tt("属性")])]);
}
function Ve() {
return {
display: m.value ? "block" : "none",
width: e.value
};
}
function Be() {
return E("div", {
class: "switcher"
}, [E("i", {
class: "f-icon f-icon-exhale-discount",
style: [{
transform: i.value === "sidebar" ? "none" : "rotate(180deg)"
}],
onClick: L
}, null)]);
}
function Y(Z) {
h.value && h.value.tabId === Z.tabId || (h.value = Z, s.value = h.value.tabId, b.value = "");
}
function de() {
return p.map((Z) => E("div", {
class: ["title-label", {
active: h.value && h.value.tabId === Z.tabId
}, {
hidden: Z.hide
}],
onClick: () => Y(Z)
}, [E("span", null, [Z.tabName])]));
}
Et(() => {
O(b.value);
}), Kn(() => {
a.value && (m.value = u.value), V(), O(b.value);
});
function A() {
S.value++;
}
function ne() {
J();
}
return n.expose({
updatePropertyConfig: X,
updateDesignerItem: j,
reloadPropertyPanel: A,
refreshPanel: ne
}), () => E($t, null, [E("div", {
ref: v,
class: ["property-panel", {
"white-theme": f.value
}],
style: Ve()
}, [E("div", {
class: "propertyPanel panel flex-column",
hidden: i.value !== "panel"
}, [E("div", {
class: ["title d-flex", {
"p-right": d.value
}, {
only: p.length === 1
}]
}, [de(), z()]), se(), be()]), Be(), Te()])]);
}
}), ns = C(0);
function os() {
ns.value++;
}
const Lt = C(0);
function rs(t, n) {
const e = n.getBoundingClientRect(), o = t.getBoundingClientRect(), r = o.top >= e.top, i = o.top <= e.bottom;
return r && i;
}
function is(t) {
const n = t.querySelector(".component-btn-group");
if (!n)
return;
n.style.display = "";
const e = n.getBoundingClientRect();
if (!(e.top === 0 && e.left === 0)) {
const o = n.querySelector("div");
if (o) {
const r = o.getBoundingClientRect();
o.style.top = e.top + "px";
let i = e.left - r.width;
const a = document.querySelector(".editorDiv");
if (a) {
const u = a.getBoundingClientRect();
i < u.left && ({ left: i } = t.getBoundingClientRect());
}
o.style.left = i + "px";
}
}
}
function as(t) {
if (!window.scrollContainerList)
return;
const n = Array.from(window.scrollContainerList);
if (n.length && n.length === 1) {
const e = n[0], o = document.querySelector(`[id=${e}]`);
if (o && o.contains(t))
return o;
}
}
function co(t) {
if (!t)
return;
const n = t.getBoundingClientRect();
if (n.width === 0 && n.height === 0)
return;
const e = t.querySelector(".component-btn-group");
if (e) {
let o = !0;
const r = as(t);
if (r && (o = rs(t, r)), !o) {
e.style.display = "none";
return;
}
is(t);
}
}
function ss(t) {
if (!t)
return;
let n;
t.className.includes("dgComponentSelected") ? n = t : n = t.querySelector(".dgComponentSelected"), n && co(n);
}
function ls(t) {
const { formSchemaUtils: n, formStateMachineUtils: e } = t;
function o(l, c = "") {
return {
path: c + l.code,
field: l.id,
fullPath: l.code
};
}
function r(l, c = "") {
return n.getViewModelById(l).states.map((s) => o(s, c));