UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,364 lines 326 kB
var Yn = Object.defineProperty; var Xn = (t, e, n) => e in t ? Yn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var Y = (t, e, n) => Xn(t, typeof e != "symbol" ? e + "" : e, n); import { defineComponent as Re, computed as W, createVNode as R, ref as I, inject as rt, onMounted as ht, watch as Se, Fragment as Tt, reactive as ut, createApp as pn, onUnmounted as Vt, Transition as mn, mergeProps as yt, createTextVNode as at, onBeforeUnmount as hn, withDirectives as Kn, resolveDirective as Jn, onBeforeMount as Qn, Teleport as Zn, shallowRef as eo, nextTick as Xt, render as $t, h as to, cloneVNode as no, provide as oo, triggerRef as ro, isVNode as ao } from "vue"; import { isPlainObject as on, cloneDeep as mt, isUndefined as rn } from "lodash-es"; import { useResizeObserver as vn } from "@vueuse/core"; import { useIdentify as io, useGroupData as lo, useFilter as so, useHierarchy as uo, useLoading as co, useDataView as fo, useSelection as po, useSelectHierarchyItem as mo, useDataViewContainerStyle as ho, useCommandColumn as vo, useColumn as go, useSort as yo, useGroupColumn as bo, useRow as Co, useEdit as wo, useVisualDataBound as _o, useVisualDataCell as So, useVisualDataRow as To, useVisualData as xo, useCellPosition as Io, useSidebar as Fo, useVirtualScroll as Mo, useFitColumn as ko, useFilterHistory as Eo, useColumnFilter as Oo, useDragColumn as Bo, getColumnHeader as Vo, getSidebar as Do, getDisableMask as Ro, getHorizontalScrollbar as No, getVerticalScrollbar as Lo, getEmpty as $o } from "../data-view/index.esm.js"; import "../modal/index.esm.js"; import Po from "../transfer/index.esm.js"; import jo from "../tabs/index.esm.js"; import Wo 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 an from "../tooltip/index.esm.js"; import Ho from "../pagination/index.esm.js"; import qo from "../button/index.esm.js"; import Uo from "../search-box/index.esm.js"; import Yo from "../tags/index.esm.js"; import Xo, { FDynamicFormGroup as Ko, FDynamicFormInput as Jo } from "../dynamic-form/index.esm.js"; import { DgControl as zt } from "../designer-canvas/index.esm.js"; import Qo from "../binding-selector/index.esm.js"; import "../notify/index.esm.js"; import Zo from "../accordion/index.esm.js"; import er from "../avatar/index.esm.js"; import tr from "../button-edit/index.esm.js"; import nr from "../button-group/index.esm.js"; import or from "../calendar/index.esm.js"; import rr from "../capsule/index.esm.js"; import ar from "../color-picker/index.esm.js"; import Gt from "../combo-list/index.esm.js"; import ir from "../content-container/index.esm.js"; import lr from "../data-grid/index.esm.js"; import sr from "../date-picker/index.esm.js"; import ur from "../dropdown/index.esm.js"; import "../external-container/index.esm.js"; import cr from "../events-editor/index.esm.js"; import dr from "../image-cropper/index.esm.js"; import fr from "../input-group/index.esm.js"; import pr from "../layout/index.esm.js"; import mr from "../list-nav/index.esm.js"; import hr from "../list-view/index.esm.js"; import vr from "../lookup/index.esm.js"; import gr from "../nav/index.esm.js"; import yr from "../number-spinner/index.esm.js"; import br from "../number-range/index.esm.js"; import Cr from "../page-header/index.esm.js"; import wr from "../page-footer/index.esm.js"; import _r from "../progress/index.esm.js"; import Sr from "../query-solution/index.esm.js"; import Tr from "../radio-group/index.esm.js"; import xr from "../rate/index.esm.js"; import Ir from "../response-toolbar/index.esm.js"; import Fr from "../response-layout/index.esm.js"; import Mr from "../response-layout-editor/index.esm.js"; import kr from "../section/index.esm.js"; import Er from "../smoke-detector/index.esm.js"; import Or from "../splitter/index.esm.js"; import Br from "../step/index.esm.js"; import Vr from "../switch/index.esm.js"; import Dr from "../text/index.esm.js"; import Rr from "../time-picker/index.esm.js"; import Nr from "../tree-view/index.esm.js"; import Lr from "../uploader/index.esm.js"; import $r from "../verify-detail/index.esm.js"; import Pr from "../component/index.esm.js"; import jr from "../video/index.esm.js"; import Wr 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 { useDateFormat as Hr, useNumberFormat as qr, resolveField as Ye, setFieldValue as Ht, getCustomClass as Pt, withInstall as Ur } from "../common/index.esm.js"; import Yr from "../combo-tree/index.esm.js"; import Xr from "../field-selector/index.esm.js"; import Kr from "../mapping-editor/index.esm.js"; import Jr from "../schema-selector/index.esm.js"; import Qr from "../event-parameter/index.esm.js"; import Zr from "../filter-condition-editor/index.esm.js"; import ea from "../sort-condition-editor/index.esm.js"; import ta from "../menu-lookup/index.esm.js"; import { createPropsResolver as na } from "../dynamic-resolver/index.esm.js"; const gn = {}, yn = {}; function Kt(t) { const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), i = Object.keys(e).reduce((a, u) => ((!r || !o.find((s) => s === u)) && (a[u] = e[u].type === "object" && e[u].properties ? Kt(e[u]) : mt(e[u].default)), a), {}); if (n && (!r || !o.find((a) => a === "id"))) { const a = n.toLowerCase().replace(/-/g, "_"); i.id = `${a}_${Math.random().toString().slice(2, 6)}`; } return i; } function oa(t) { const { properties: e, title: n, required: o } = t; if (o && Array.isArray(o)) { const r = o.reduce((i, a) => (i[a] = e[a].type === "object" && e[a].properties ? Kt(e[a]) : mt(e[a].default), i), {}); if (n && o.find((i) => i === "id")) { const i = n.toLowerCase().replace(/-/g, "_"); r.id = `${i}_${Math.random().toString().slice(2, 6)}`; } return r; } return { type: n }; } function xt(t, e = {}, n) { const o = gn[t]; if (o) { let r = oa(o); const i = yn[t]; return r = i ? i({ getSchemaByType: xt }, r, e, n) : r, r; } return null; } function ra(t, e) { const n = Kt(e); return Object.keys(n).reduce((o, r) => (Object.prototype.hasOwnProperty.call(t, r) && (o[r] && on(o[r]) && on(t[r] || !t[r]) ? Object.assign(o[r], t[r] || {}) : o[r] = t[r]), o), n), n; } function bn(t, e) { return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => { if (e.has(r)) { const i = e.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 aa(t, e, n = /* @__PURE__ */ new Map()) { const o = ra(t, e); return bn(o, n); } function ia(t = {}) { function e(p, c, l, d) { if (typeof l == "number") return d[p].length === l; if (typeof l == "object") { const h = Object.keys(l)[0], v = l[h]; if (h === "not") return Number(d[p].length) !== Number(v); if (h === "moreThan") return Number(d[p].length) >= Number(v); if (h === "lessThan") return Number(d[p].length) <= Number(v); } return !1; } function n(p, c, l, d) { return d[p] && d[p].propertyValue && String(d[p].propertyValue.value) === String(l); } const o = /* @__PURE__ */ new Map([ ["length", e], ["getProperty", n] ]); Object.keys(t).reduce((p, c) => (p.set(c, t[c]), p), o); function r(p, c) { const l = p; return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: p, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => { if (d === "length") return { target: l, operator: "length", param: null, value: c[d] }; const h = d, v = c[d]; return { target: l, operator: "getProperty", param: h, value: v }; }) : []; } function i(p) { return Object.keys(p).reduce((l, d) => { const h = r(d, p[d]); return l.push(...h), l; }, []); } function a(p, c) { if (o.has(p.operator)) { const l = o.get(p.operator); return l && l(p.target, p.param, p.value, c) || !1; } return !1; } function u(p, c) { return i(p).reduce((h, v) => h && a(v, c), !0); } function s(p, c) { const l = Object.keys(p), d = l.includes("allOf"), h = l.includes("anyOf"), v = d || h, m = (v ? p[v ? d ? "allOf" : "anyOf" : "allOf"] : [p]).map((T) => u(T, c)); return d ? !m.includes(!1) : m.includes(!0); } return { parseValueSchema: s }; } const re = { 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: "抽屉" } }, la = {}, sa = {}; ia(); function it(t, e, n = /* @__PURE__ */ new Map(), o = (a, u, s, p) => u, r = {}, i = (a) => a) { return gn[e.title] = e, yn[e.title] = o, la[e.title] = r, sa[e.title] = i, (a = {}, u = !0) => { if (!u) return bn(a, n); const s = aa(a, e, n), p = Object.keys(t).reduce((c, l) => (c[l] = t[l].default, c), {}); return Object.assign(p, s); }; } function It(t, e) { return { customClass: e.class, customStyle: e.style }; } function ua() { function t(e, n) { const { dataSource: o } = e || {}; return o === void 0 ? {} : {}; } return { resolve: t }; } function ca() { function t(e, n) { return e.selectItemById(n); } return { selectItemById: t }; } function da() { function t(e, n) { const { columns: o } = n; return e.updateColumns(o); } return { updateColumns: t }; } const Cn = /* @__PURE__ */ new Map([ ["appearance", It] ]); function fa(t, e, n) { if (n.componentFeature) { const o = JSON.parse(n.componentFeature); e.appearance = { class: "bg-white" }, e.contents = String(o.splitter).split(":").map((r) => { const i = t.getSchemaByType("response-layout-item"); return i.appearance = { class: `h-100 col-${r} px-0` }, i; }); } return e; } const pa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-design.gitee.io/response-layout.schema.json", ha = "response-layout", va = "A Farris Container Component", ga = "object", ya = { id: { description: "The unique identifier for a Respnse Layout", type: "string" }, type: { description: "The type string of Respnse Layout component", type: "string", default: "response-layout" }, appearance: { description: "", type: "object", properties: { class: { type: "string" }, style: { type: "string" } }, default: {} }, contents: { description: "", type: "array", default: [] }, size: { description: "", type: "object", properties: { width: { type: "number" }, height: { type: "number" } }, default: null }, visible: { description: "", type: "boolean", default: !0 } }, ba = [ "id", "type", "contents" ], Ca = { $schema: pa, $id: ma, title: ha, description: va, type: ga, properties: ya, required: ba }, Jt = { customClass: { type: String, default: "" } }, ln = it(Jt, Ca, Cn, fa), jt = /* @__PURE__ */ Re({ name: "FResponseLayout", props: Jt, emits: [], setup(t, e) { function n(r, i) { r && i && i.split(" ").reduce((u, s) => (u[s] = !0, u), r); } const o = W(() => { const r = { "d-flex": !0 }; return n(r, t.customClass), r; }); return () => R("div", { class: o.value }, [e.slots.default && e.slots.default()]); } }), wa = "https://json-schema.org/draft/2020-12/schema", _a = "https://farris-design.gitee.io/response-layout-item.schema.json", Sa = "response-layout-item", Ta = "A Farris Container Component", xa = "object", Ia = { id: { description: "The unique identifier for a Respnse Layout Item", type: "string" }, type: { description: "The type string of Respnse Layout Item component", type: "string", default: "response-layout-item" }, appearance: { description: "", type: "object", properties: { class: { type: "string" }, style: { type: "string" } }, default: {} }, contents: { description: "", type: "array", default: [] }, size: { description: "", type: "object", properties: { width: { type: "number" }, height: { type: "number" } }, default: null }, visible: { description: "", type: "boolean", default: !0 } }, Fa = [ "id", "type", "contents" ], Ma = { $schema: wa, $id: _a, title: Sa, description: Ta, type: xa, properties: Ia, required: Fa }, Qt = { customClass: { type: String, default: "" } }, sn = it(Qt, Ma, Cn), Wt = /* @__PURE__ */ Re({ name: "FResponseLayoutItem", props: Qt, emits: [], setup(t, e) { return () => R("div", { class: t.customClass }, [e.slots.default && e.slots.default()]); } }); function Zt(t, e, n) { var D; const o = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", i = I(); function a() { return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0; } function u() { return !1; } function s() { return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0; } function p() { return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1; } function c(f) { if (!f || !f.value) return null; if (f.value.schema && f.value.schema.type === "component") return f.value; const C = I(f == null ? void 0 : f.value.parent), w = c(C); return w || null; } function l(f = e) { var _; if (n != null && n.getDraggableDesignItemElement) return n.getDraggableDesignItemElement(f); const { componentInstance: C, designerItemElementRef: w } = f; if (!C || !C.value) return null; const { getCustomButtons: F } = C.value; return C.value.canMove || F && ((_ = F()) != null && _.length) ? w : l(f.parent); } function d(f) { return !!n && n.canAccepts(f); } function h() { return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name); } function v() { } function V(f, C) { var w; !f || !C || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(f, C), (w = e == null ? void 0 : e.setupContext) == null || w.emit("dragEnd")); } function b(f, C) { const { componentType: w } = f; let F = xt(w, f, C); n && n.onResolveNewComponentSchema && (F = n.onResolveNewComponentSchema(f, F)); const _ = w.toLowerCase().replace(/-/g, "_"); return F && !F.id && F.type === w && (F.id = `${_}_${Math.random().toString().slice(2, 6)}`), F; } function m(f) { f && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(f); } function y(...f) { if (n && n.getPropsConfig) return n.getPropsConfig(...f); } function T() { n && n.onRemoveComponent && n.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((f) => { let C = f.id; f.type === "component-ref" && (C = f.component); const w = t.value.querySelectorAll(`#${C}-design-item`); w != null && w.length && Array.from(w).map((F) => { var _; (_ = F == null ? void 0 : F.componentInstance) != null && _.value.onRemoveComponent && F.componentInstance.value.onRemoveComponent(); }); }); } function g() { if (n && n.getCustomButtons) return n.getCustomButtons(); } function S(f) { if (n && n.onPropertyChanged) return n.onPropertyChanged(f); } return i.value = { canMove: a(), canSelectParent: u(), canDelete: s(), canNested: !p(), contents: e == null ? void 0 : e.schema.contents, elementRef: t, parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance, schema: e == null ? void 0 : e.schema, styles: o, designerClass: r, canAccepts: d, getBelongedComponentInstance: c, getDraggableDesignItemElement: l, getDraggingDisplayText: h, getPropConfig: y, getDragScopeElement: v, onAcceptMovedChildElement: V, onChildElementMovedOut: m, addNewChildComponentSchema: b, triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || I(!1), triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || I(!1), onRemoveComponent: T, getCustomButtons: g, onPropertyChanged: S }, i; } const Ct = I(0); function ka(t, e) { const n = e.getBoundingClientRect(), o = t.getBoundingClientRect(), r = o.top >= n.top, i = o.top <= n.bottom; return r && i; } function Ea(t) { const e = t.querySelector(".component-btn-group"); if (!e) return; e.style.display = ""; const n = e.getBoundingClientRect(); if (!(n.top === 0 && n.left === 0)) { const o = e.querySelector("div"); if (o) { const r = o.getBoundingClientRect(); o.style.top = n.top + "px"; let i = n.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 Oa(t) { if (!window.scrollContainerList) return; const e = Array.from(window.scrollContainerList); if (e.length && e.length === 1) { const n = e[0], o = document.querySelector(`[id=${n}]`); if (o && o.contains(t)) return o; } } function wn(t) { if (!t) return; const e = t.getBoundingClientRect(); if (e.width === 0 && e.height === 0) return; const n = t.querySelector(".component-btn-group"); if (n) { let o = !0; const r = Oa(t); if (r && (o = ka(t, r)), !o) { n.style.display = "none"; return; } Ea(t); } } function Ba(t) { if (!t) return; let e; t.className.includes("dgComponentSelected") ? e = t : e = t.querySelector(".dgComponentSelected"), e && wn(e); } const Va = I(0); function Da() { Va.value++; } class Dt { constructor(e, n) { Y(this, "componentId"); Y(this, "viewModelId"); Y(this, "eventsEditorUtils"); Y(this, "formSchemaUtils"); Y(this, "formMetadataConverter"); Y(this, "designViewModelUtils"); Y(this, "designViewModelField"); Y(this, "controlCreatorUtils"); Y(this, "designerHostService"); Y(this, "schemaService", null); Y(this, "metadataService", null); Y(this, "propertyConfig", { type: "object", categories: {} }); var o; this.componentId = e, 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(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService; } getTableInfo() { var e; return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId); } setDesignViewModelField(e) { var o; const n = e.binding && e.binding.type === "Form" && e.binding.field; if (n) { if (!this.designViewModelField) { const r = this.designViewModelUtils.getDgViewModel(this.viewModelId); this.designViewModelField = r.fields.find((i) => i.id === n); } e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn; } } getBasicPropConfig(e) { 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: e.type, name: re[e.type].name }] } } } }; } getAppearanceConfig(e = 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": { Ct.value++; break; } } } }; } /** * * @param propertyId * @param componentInstance * @returns */ updateElementByParentContainer(e, n) { const o = n && n.parent && n.parent.schema; if (!o) return; const r = o.contents.findIndex((a) => a.id === e), i = mt(o.contents[r]); o.contents.splice(r, 1), o.contents.splice(r, 0, i), Da(); } } class Ra extends Dt { constructor(e, n) { super(e, n); } getPropertyConfig(e) { return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.propertyConfig.categories.layout = this.getLayoutPropConfig(e, this.viewModelId), this.propertyConfig; } getLayoutPropConfig(e, n) { return { title: "布局", description: "layout", properties: { layout: { type: "select", description: "配置布局容器内区块个数及比例。", editor: { type: "response-layout-splitter", layout: e.contents || [] } } }, setPropertyRelates(o, r) { Ct.value++; } }; } } function Na(t, e) { const n = t.schema; function o(u) { return !1; } function r(u) { return new Ra(u, e).getPropertyConfig(n); } function i() { var p; const u = t.designerItemElementRef.value.querySelector(`#${n.id}`); if (!u) return; const s = ((p = t.schema.contents) == null ? void 0 : p.map((c) => c.id)) || []; Array.from(u.children).map((c) => { var d; const l = (d = c.componentInstance) == null ? void 0 : d.value; l != null && l.schema && !s.includes(l.schema.id) && l.onRemoveComponent && l.onRemoveComponent(); }); } function a(u) { var s; u && ((s = u == null ? void 0 : u.changeObject) == null ? void 0 : s.propertyID) === "layout" && i(); } return { canAccepts: o, getPropsConfig: r, onPropertyChanged: a }; } const La = /* @__PURE__ */ Re({ name: "FResponseLayoutDesign", props: Jt, emits: [], setup(t, e) { const n = I(), o = rt("design-item-context"), r = rt("designer-host-service"), i = Na(o, r), a = Zt(n, o, i); ht(() => { n.value.componentInstance = a; }), e.expose(a.value); function u(p, c) { p && c && c.split(" ").reduce((d, h) => (d[h] = !0, d), p); } const s = W(() => { const p = { "d-flex": !0, "response-layout": !0 }; return u(p, t.customClass), p; }); return () => R("div", { ref: n, class: s.value, style: "height:inherit;" }, [e.slots.default && e.slots.default()]); } }); var ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Ft(t) { throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var $a = { exports: {} }; (function(t, e) { (function(n) { t.exports = n(); })(function() { return (/* @__PURE__ */ function() { function n(o, r, i) { function a(p, c) { if (!r[p]) { if (!o[p]) { var l = typeof Ft == "function" && Ft; if (!c && l) return l(p, !0); if (u) return u(p, !0); var d = new Error("Cannot find module '" + p + "'"); throw d.code = "MODULE_NOT_FOUND", d; } var h = r[p] = { exports: {} }; o[p][0].call(h.exports, function(v) { var V = o[p][1][v]; return a(V || v); }, h, h.exports, n, o, r, i); } return r[p].exports; } for (var u = typeof Ft == "function" && Ft, s = 0; s < i.length; s++) a(i[s]); return a; } return n; }())({ 1: [function(n, o, r) { var i = {}, a = "(?:^|\\s)", u = "(?:\\s|$)"; function s(l) { var d = i[l]; return d ? d.lastIndex = 0 : i[l] = d = new RegExp(a + l + u, "g"), d; } function p(l, d) { var h = l.className; h.length ? s(d).test(h) || (l.className += " " + d) : l.className = d; } function c(l, d) { l.className = l.className.replace(s(d), " ").trim(); } o.exports = { add: p, rm: c }; }, {}], 2: [function(n, o, r) { (function(i) { var a = n("contra/emitter"), u = n("crossvent"), s = n("./classes"), p = document, c = p.documentElement; function l(_, x) { var M = arguments.length; M === 1 && Array.isArray(_) === !1 && (x = _, _ = []); var B, k, E, O, N, L, z, q, X, pe = null, A, j, G = !1, J = 0, ee, Q = x || {}; Q.moves === void 0 && (Q.moves = y), Q.accepts === void 0 && (Q.accepts = y), Q.invalid === void 0 && (Q.invalid = lt), Q.containers === void 0 && (Q.containers = _ || []), Q.isContainer === void 0 && (Q.isContainer = m), Q.copy === void 0 && (Q.copy = !1), Q.copySortSource === void 0 && (Q.copySortSource = !1), Q.revertOnSpill === void 0 && (Q.revertOnSpill = !1), Q.removeOnSpill === void 0 && (Q.removeOnSpill = !1), Q.direction === void 0 && (Q.direction = "vertical"), Q.ignoreInputTextSelection === void 0 && (Q.ignoreInputTextSelection = !0), Q.mirrorContainer === void 0 && (Q.mirrorContainer = p.body); var $ = a({ containers: Q.containers, start: He, end: oe, cancel: st, remove: Fe, destroy: Te, canMove: Ee, dragging: !1 }); return Q.removeOnSpill === !0 && $.on("over", me).on("out", ve), ie(), $; function U(P) { return $.containers.indexOf(P) !== -1 || Q.isContainer(P); } function ie(P) { var Z = P ? "remove" : "add"; v(c, Z, "mousedown", xe), v(c, Z, "mouseup", Me); } function te(P) { var Z = P ? "remove" : "add"; v(c, Z, "mousemove", We); } function ne(P) { var Z = P ? "remove" : "add"; u[Z](c, "selectstart", Ie), u[Z](c, "click", Ie); } function Te() { ie(!0), Me({}); } function Ie(P) { A && P.preventDefault(); } function xe(P) { O = P.clientX, N = P.clientY; var Z = V(P) !== 1 || P.metaKey || P.ctrlKey; if (!Z) { var K = P.target, ce = Ne(K); ce && (A = ce, te(), P.type === "mousedown" && (D(K) ? K.focus() : P.preventDefault())); } } function We(P) { if (A) { if (V(P) === 0) { Me({}); return; } if (!(P.clientX !== void 0 && Math.abs(P.clientX - O) <= (Q.slideFactorX || 0) && P.clientY !== void 0 && Math.abs(P.clientY - N) <= (Q.slideFactorY || 0))) { if (Q.ignoreInputTextSelection) { var Z = F("clientX", P) || 0, K = F("clientY", P) || 0, ce = p.elementFromPoint(Z, K); if (D(ce)) return; } var ge = A; te(!0), ne(), oe(), ze(ge), s.add(q || E, "gu-transit"), ke(), _e(), J = 0, qe(P); } } } function Ne(P) { if (!($.dragging && B) && !U(P)) { for (var Z = P; S(P) && U(S(P)) === !1; ) if (Q.invalid(P, Z) || (P = S(P), !P)) return; var K = S(P); if (K && !Q.invalid(P, Z)) { var ce = Q.moves(P, K, Z, C(P)); if (ce) return { item: P, source: K }; } } } function Ee(P) { return !!Ne(P); } function He(P) { var Z = Ne(P); Z && ze(Z); } function ze(P) { $e(P.item, P.source) && (q = P.item.cloneNode(!0), $.emit("cloned", q, P.item, "copy")), k = P.source, E = P.item, L = z = C(P.item), $.dragging = !0, $.emit("drag", E, k); } function lt() { return !1; } function oe() { if ($.dragging) { var P = q || E; Ve(P, S(P)); } } function be() { A = !1, te(!0), ne(!0); } function Me(P) { if (be(), !!$.dragging) { var Z = q || E, K = F("clientX", P) || 0, ce = F("clientY", P) || 0, ge = b(B, K, ce), ye = ct(ge, K, ce); ye && (q && Q.copySortSource || !q || ye !== k) ? Ve(Z, ye) : Q.removeOnSpill ? Fe() : st(); } } function Ve(P, Z) { var K = S(P); q && Q.copySortSource && Z === k && K.removeChild(E), et(Z) ? $.emit("cancel", P, k) : $.emit("drop", P, Z, k, z), Ze(); } function Fe() { if ($.dragging) { var P = q || E, Z = S(P); Z && Z.removeChild(P), $.emit(q ? "cancel" : "remove", P, Z, k), Ze(); } } function st(P) { if ($.dragging) { var Z = arguments.length > 0 ? P : Q.revertOnSpill, K = q || E, ce = S(K), ge = et(ce); ge === !1 && Z && (q ? ce && ce.removeChild(q) : k.insertBefore(K, L)), ge || Z ? $.emit("cancel", K, k, k) : $.emit("drop", K, ce, k, z), Ze(); } } function Ze() { var P = q || E; be(), Le(), Ge(), P && s.rm(P, "gu-transit"), X && clearTimeout(X), $.dragging = !1, pe && $.emit("out", P, pe, k), $.emit("dragend", P, J), k = E = q = L = z = X = pe = null; } function et(P, Z) { var K; return Z !== void 0 ? K = Z : B ? K = z : K = C(q || E), P === k && K === L; } function ct(P, Z, K) { for (var ce = P; ce && !ge(); ) ce = S(ce); return ce; function ge() { var ye = U(ce); if (ye === !1) return !1; var le = tt(ce, P), we = Be(ce, le, Z, K), De = et(ce, we); return De ? !0 : Q.accepts(E, ce, k, we); } } function qe(P) { if (!B) return; P.preventDefault(); var Z = F("clientX", P) || 0, K = F("clientY", P) || 0; B.style.left = Z - 2 + "px", B.style.top = K - 2 + "px"; var ce = q || E, ge = b(B, Z, K), ye = ct(ge, Z, K), le = ye !== null && ye !== pe; (le || ye === null) && (Ke(), pe = ye, dt()), Ce(ge, K); var we = S(ce); if (ye === k && q && !Q.copySortSource) { we && we.removeChild(ce); return; } var De, Xe = tt(ye, ge); if (G = nt(Xe, ye), Xe !== null) De = Be(ye, Xe, Z, K); else if (Q.revertOnSpill === !0 && !q) De = L, ye = k; else { q && we && we.removeChild(ce), q && j && (j.style.display = "none"); return; } j.style.display = "block", ae(De, ce, le), De ? H(Xe, De) : he(ye); function Pe(Ae) { $.emit(Ae, ce, pe, k); } function dt() { le && Pe("over"); } function Ke() { pe && Pe("out"); } } function ae(P, Z, K) { (P === Z || P === C(Z)) && (z = C(Z)), (P === null && K || P !== Z && P !== C(Z)) && (z = P); } function me(P) { s.rm(P, "gu-hide"); } function ve(P) { $.dragging && s.add(P, "gu-hide"); } function _e() { B || (B = document.createElement("div"), B.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;", B.innerHTML = Q.getMirrorText && Q.getMirrorText(E) || "控件", s.add(B, "gu-mirror"), Q.mirrorContainer.appendChild(B), v(c, "add", "mousemove", qe), s.add(Q.mirrorContainer, "gu-unselectable"), $.emit("cloned", B, E, "mirror")); } function ke() { if (j = document.createElement("div"), s.add(j, "gu-insertion"), E) { var P = E.getBoundingClientRect(); j.style.left = P.left + "px", j.style.top = P.top + "px"; } G = !1, Q.mirrorContainer.appendChild(j); } function Le() { B && (s.rm(Q.mirrorContainer, "gu-unselectable"), v(c, "remove", "mousemove", qe), S(B).removeChild(B), B = null); } function Ge() { j && (S(j).removeChild(j), j = null); } function tt(P, Z) { for (var K = Z; K !== P && S(K) !== P; ) K = S(K); return K === c ? null : K; } function nt(P, Z) { if (!Z) return G; var K = P || Z && Z.lastElementChild; if (!K) return !0; var ce = getComputedStyle(P), ge = /^inline/.test(ce.getPropertyValue("display")) || /^(left|right)$/.test(ce.getPropertyValue("float")); if (ge) return !0; if (Z) { var ye = getComputedStyle(Z), le = ye.getPropertyValue("display"); if (/flex$/.test(le)) { var we = ye.getPropertyValue("flex-direction") || "row"; if (we === "row" || we === "row-reverse") return !Ue(Z); } return !1; } return !0; } function Ue(P) { if (!P.children || !P.children.length) return !1; for (const Z of Array.from(P.children)) { const ce = (Z.className && Z.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 H(P, Z) { const K = Z.getBoundingClientRect(); if (j.style.left = K.left + "px", j.style.top = K.top + "px", G) { if (j.style.height = K.height + "px", j.style.width = "4px", P) { const ce = P.getBoundingClientRect(); ce.top !== K.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 = K.width + "px", ee) { const ce = ee.getBoundingClientRect(); K.top < ce.top && (j.style.display = "none"); } Z === E && E && (j.style.display = "none"); } function he(P) { z = null; var Z = P.lastElementChild; if (Z) { var K = Z.getBoundingClientRect(); G ? (j.style.left = K.right + "px", j.style.top = K.top + "px", j.style.height = K.height + "px", j.style.width = "4px") : (j.style.left = K.left + "px", j.style.top = K.bottom + "px", j.style.height = "4px", j.style.width = K.width + "px"), Z === E && E && (j.style.display = "none"); } else j.style.display = "none"; } function Ce(P, Z) { if (!Q.mirrorContainer.contains(P) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (ee = d(P), !ee || !ee.contains(P))) return; const K = document.querySelector(".dgComponentSelected"), ce = ee.getBoundingClientRect(); if (Z - 30 < ce.top && ee.scrollTop > 0) { let ge = ee.scrollTop < 10 ? ee.scrollTop : 10; ee.scrollBy(0, -1 * ge), K && ee.contains(K) && (J = J + -1 * ge); } if (Z + 30 > ce.bottom && ee.scrollTop < ee.scrollHeight - ee.clientHeight) { const ge = ee.scrollHeight - ee.clientHeight - ee.scrollTop; let ye = ge < 10 ? ge : 10; ee.scrollBy(0, ye), K && ee.contains(K) && (J = J + ye); } } function Be(P, Z, K, ce) { var ge = Q.direction === "horizontal", ye = Q.direction === "mixed", le = Z !== P ? De() : we(); return le; function we() { var Pe = P.children.length, dt, Ke, Ae; for (dt = 0; dt < Pe; dt++) if (Ke = P.children[dt], Ae = Ke.getBoundingClientRect(), ge && Ae.left + Ae.width / 2 > K || !ye && !ge && Ae.top + Ae.height / 2 > ce || ye && Ae.left + Ae.width > K && Ae.top + Ae.height > ce) return Ke; return null; } function De() { var Pe = Z.getBoundingClientRect(); if (ye) { var dt = ce - Pe.top, Ke = K - Pe.left, Ae = Pe.bottom - ce, Rt = Pe.right - K, Nt = Math.min(Ke, Rt, dt, Ae), Lt; return G ? Lt = Rt < Ke : Lt = Ae === Nt || Rt === Nt || Ke === Nt, Xe(Lt); } return Xe(ge ? K > Pe.left + T(Pe) / 2 : ce > Pe.top + g(Pe) / 2); } function Xe(Pe) { return Pe ? C(Z) : Z; } } function $e(P, Z) { return typeof Q.copy == "boolean" ? Q.copy : Q.copy(P, Z); } } function d(_) { const x = Array.from(window.scrollContainerList); if (x.length === 1) { const B = Array.from(window.scrollContainerList)[0]; return document.getElementById(B); } const M = h(x); for (const B of M) if (B.contains(_)) return B; return null; } function h(_) { const x = []; return _.forEach((M) => { const B = document.getElementById(M); B && x.push(B); }), x.sort((M, B) => M.contains(B) ? 1 : B.contains(M) ? -1 : 0), x; } function v(_, x, M, B) { var k = { mouseup: "touchend", mousedown: "touchstart", mousemove: "touchmove" }, E = { mouseup: "pointerup", mousedown: "pointerdown", mousemove: "pointermove" }, O = { mouseup: "MSPointerUp", mousedown: "MSPointerDown", mousemove: "MSPointerMove" }; i.navigator.pointerEnabled ? u[x](_, E[M], B) : i.navigator.msPointerEnabled ? u[x](_, O[M], B) : (u[x](_, k[M], B), u[x](_, M, B)); } function V(_) { if (_.touches !== void 0) return _.touches.length; if (_.which !== void 0 && _.which !== 0) return _.which; if (_.buttons !== void 0) return _.buttons; var x = _.button; if (x !== void 0) return x & 1 ? 1 : x & 2 ? 3 : x & 4 ? 2 : 0; } function b(_, x, M) { _ = _ || {}; var B = _.className || "", k; return _.className += " gu-hide", k = p.elementFromPoint(x, M), _.className = B, k; } function m() { return !1; } function y() { return !0; } function T(_) { return _.width || _.right - _.left; } function g(_) { return _.height || _.bottom - _.top; } function S(_) { return _.parentNode === p ? null : _.parentNode; } function D(_) { return _.tagName === "INPUT" || _.tagName === "TEXTAREA" || _.tagName === "SELECT" || f(_); } function f(_) { return !_ || _.contentEditable === "false" ? !1 : _.contentEditable === "true" ? !0 : f(S(_)); } function C(_) { return _.nextElementSibling || x(); function x() { var M = _; do M = M.nextSibling; while (M && M.nodeType !== 1); return M; } } function w(_) { return _.targetTouches && _.targetTouches.length ? _.targetTouches[0] : _.changedTouches && _.changedTouches.length ? _.changedTouches[0] : _; } function F(_, x) { var M = w(x), B = { pageX: "clientX", // IE8 pageY: "clientY" // IE8 }; return _ in B && !(_ in M) && B[_] in M && (_ = B[_]), M[_]; } o.exports = l; }).call(this, typeof ft < "u" ? ft : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }], 3: [function(n, o, r) { o.exports = function(a, u) { return Array.prototype.slice.call(a, u); }; }, {}], 4: [function(n, o, r) { var i = n("ticky"); o.exports = function(u, s, p) { u && i(function() { u.apply(p || null, s || []); }); }; }, { ticky: 10 }], 5: [function(n, o, r) { var i = n("atoa"), a = n("./debounce"); o.exports = function(s, p) { var c = p || {}, l = {}; return s === void 0 && (s = {}), s.on = function(d, h) { return l[d] ? l[d].push(h) : l[d] = [h], s; }, s.once = function(d, h) { return h._once = !0, s.on(d, h), s; }, s.off = function(d, h) { var v = arguments.length; if (v === 1) delete l[d]; else if (v === 0) l = {}; else { var V = l[d]; if (!V) return s; V.splice(V.indexOf(h), 1); } return s; }, s.emit = function() { var d = i(arguments); return s.emitterSnapshot(d.shift()).apply(this, d); }, s.emitterSnapshot = function(d) { var h = (l[d] || []).slice(0); return function() { var v = i(arguments), V = this || s; if (d === "error" && c.throws !== !1 && !h.length) throw v.length === 1 ? v[0] : v; return h.forEach(function(m) { c.async ? a(m, v, V) : m.apply(V, v), m._once && s.off(d, m); }), s; }; }, s; }; }, { "./debounce": 4, atoa: 3 }], 6: [function(n, o, r) { (function(i) { var a = n("custom-event"), u = n("./eventmap"), s = i.document, p = d, c = v, l = []; i.addEventListener || (p = h, c = V), o.exports = { add: p, remove: c, fabricate: b }; function d(S, D, f, C) { return S.addEventListener(D, f, C); } function h(S, D, f) { return S.attachEvent("on" + D, y(S, D, f)); } function v(S, D, f, C) { return S.removeEventListener(D, f, C); } function V(S, D, f) { var C = T(S, D, f); if (C) return S.detachEvent("on" + D, C); } function b(S, D, f) { var C = u.indexOf(D) === -1 ? F() : w(); S.dispatchEvent ? S.dispatchEvent(C) : S.fireEvent("on" + D, C); function w() { var _; return s.createEvent ? (_ = s.createEvent("Event"), _.initEvent(D, !0, !0)) : s.createEventObject && (_ = s.createEventObject()), _; } function F() { return new a(D, { detail: f }); } } function m(S, D, f) { return function(w) { var F = w || i.event; F.target = F.target || F.srcElement, F.preventDefault = F.preventDefault || function() { F.returnValue = !1; }, F.stopPropagation = F.stopPropagation || function() { F.cancelBubble = !0; }, F.which = F.which || F.keyCode, f.call(S, F); }; } function y(S, D, f) { var C = T(S, D, f) || m(S, D, f); return l.push({ wrapper: C, element: S, type: D, fn: f }), C; } function T(S, D, f) { var C = g(S, D, f); if (C) { var w = l[C].wrapper; return l.splice(C, 1), w; } } function g(S, D, f) { var C, w; for (C = 0; C < l.length; C++) if (w = l[C], w.element === S && w.type === D && w.fn === f) return C; } }).call(this, typeof ft < "u" ? ft : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, { "./eventmap": 7, "custom-event": 8 }], 7: [function(n, o, r) { (function(i) { var a = [], u = "", s = /^on/; for (u in i) s.test(u)