UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,525 lines 77 kB
import { useCommonUtils as bt, resolveField as fn, getCustomClass as mn, withInstall as vn } from "../common/index.esm.js"; import { ref as ae, computed as ee, reactive as nt, watch as ze, createVNode as m, isVNode as at, Comment as St, Fragment as ot, createTextVNode as Xe, defineComponent as wt, onMounted as gn, nextTick as pn, onUnmounted as yn, provide as Cn, getCurrentInstance as hn } from "vue"; import { useResizeObserver as bn } from "@vueuse/core"; import { isPlainObject as yt, cloneDeep as Ct } from "lodash-es"; import { SETTING_COLUMN_FIELD as Sn, COMMAND_COLUMN_FIELD as wn, CellMode as Ft, SETTING_COLUMN_DATA_TYPE as _e, COMMAND_COLUMN_DATA_TYPE as He, useMobile as Fn, useIdentify as xn, useGroupData as Tn, useFilter as On, useHierarchy as kn, useLoading as Bn, useDataView as En, usePagination as Pn, useSelection as Dn, useDataViewContainerStyle as In, useCommandColumn as Gn, useSettingColumn as Mn, useColumn as Nn, useSort as jn, useGroupColumn as Vn, useRow as _n, useEdit as Hn, useVisualDataBound as zn, useVisualDataCell as An, useVisualDataRow as Ln, useVisualGroupRow as Rn, useVisualSummaryRow as Wn, useVisualData as $n, useCellContentStyle as Un, useCellPosition as Yn, useSidebar as qn, useVirtualScroll as Xn, useFitColumn as Jn, useFilterHistory as Qn, useColumnFilter as Zn, useDragColumn as Kn, getColumnHeader as eo, getPagination as to, getSidebar as no, getDisableMask as oo, getSummary as ro, getHorizontalScrollbar as io, getVerticalScrollbar as lo, getFilterPanel as ao, getGroupPanel as uo, useNavigation as so, getEmpty as co, ColumnSettingSolution as fo } from "../data-view/index.esm.js"; import mo, { FDynamicForm as vo, FDynamicFormLabel as go } from "../dynamic-form/index.esm.js"; import ht from "../button/index.esm.js"; import po from "../drawer/index.esm.js"; function xt(e, t) { let i; function u(d) { const { properties: y, title: g, ignore: l } = d, s = l && Array.isArray(l), C = Object.keys(y).reduce((v, P) => ((!s || !l.find((W) => W === P)) && (v[P] = y[P].type === "object" && y[P].properties ? u(y[P]) : Ct(y[P].default)), v), {}); if (g && (!s || !l.find((v) => v === "id"))) { const v = g.toLowerCase().replace(/-/g, "_"); C.id = `${v}_${Math.random().toString().slice(2, 6)}`; } return C; } function B(d) { const { properties: y, title: g, required: l } = d; if (l && Array.isArray(l)) { const s = l.reduce((C, v) => (C[v] = y[v].type === "object" && y[v].properties ? u(y[v]) : Ct(y[v].default), C), {}); if (g && l.find((C) => C === "id")) { const C = g.toLowerCase().replace(/-/g, "_"); s.id = `${C}_${Math.random().toString().slice(2, 6)}`; } return s; } return { type: g }; } function q(d, y = {}, g) { const l = e[d]; if (l) { let s = B(l); const C = t[d]; return s = C ? C({ getSchemaByType: q }, s, y, g) : s, i != null && i.appendIdentifyForNewControl && i.appendIdentifyForNewControl(s), s; } return null; } function z(d, y) { const g = u(y); return Object.keys(g).reduce((l, s) => (Object.prototype.hasOwnProperty.call(d, s) && (l[s] && yt(l[s]) && yt(d[s] || !d[s]) ? Object.assign(l[s], d[s] || {}) : l[s] = d[s]), l), g), g; } function A(d, y) { return Object.keys(d).filter((l) => d[l] != null).reduce((l, s) => { if (y.has(s)) { const C = y.get(s); if (typeof C == "string") l[C] = d[s]; else { const v = C(s, d[s], d); Object.assign(l, v); } } else l[s] = d[s]; return l; }, {}); } function _(d, y, g = /* @__PURE__ */ new Map()) { const l = z(d, y); return A(l, g); } function F(d) { var g; const y = d.type; if (y) { const l = e[y]; if (!l) return d; const s = z(d, l), C = ((g = d.editor) == null ? void 0 : g.type) || ""; if (C) { const v = e[C], P = z(d.editor, v); s.editor = P; } return s; } return d; } function h(d) { i = d; } return { getSchemaByType: q, resolveSchemaWithDefaultValue: F, resolveSchemaToProps: _, mappingSchemaToProps: A, setDesignerContext: h }; } const yo = {}, Co = {}, { resolveSchemaWithDefaultValue: ho } = xt(yo, Co); function bo(e = {}) { function t(F, h, d, y) { if (typeof d == "number") return y[F].length === d; if (typeof d == "object") { const g = Object.keys(d)[0], l = d[g]; if (g === "not") return Number(y[F].length) !== Number(l); if (g === "moreThan") return Number(y[F].length) >= Number(l); if (g === "lessThan") return Number(y[F].length) <= Number(l); } return !1; } function i(F, h, d, y) { return y[F] && y[F].propertyValue && String(y[F].propertyValue.value) === String(d); } const u = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", i] ]); Object.keys(e).reduce((F, h) => (F.set(h, e[h]), F), u); function B(F, h) { const d = F; return typeof h == "number" ? [{ target: d, operator: "length", param: null, value: Number(h) }] : typeof h == "boolean" ? [{ target: d, operator: "getProperty", param: F, value: !!h }] : typeof h == "object" ? Object.keys(h).map((y) => { if (y === "length") return { target: d, operator: "length", param: null, value: h[y] }; const g = y, l = h[y]; return { target: d, operator: "getProperty", param: g, value: l }; }) : []; } function q(F) { return Object.keys(F).reduce((d, y) => { const g = B(y, F[y]); return d.push(...g), d; }, []); } function z(F, h) { if (u.has(F.operator)) { const d = u.get(F.operator); return d && d(F.target, F.param, F.value, h) || !1; } return !1; } function A(F, h) { return q(F).reduce((g, l) => g && z(l, h), !0); } function _(F, h) { const d = Object.keys(F), y = d.includes("allOf"), g = d.includes("anyOf"), l = y || g, v = (l ? F[l ? y ? "allOf" : "anyOf" : "allOf"] : [F]).map((W) => A(W, h)); return y ? !v.includes(!1) : v.includes(!0); } return { parseValueSchema: _ }; } const So = { convertTo: (e, t, i, u) => { e.appearance || (e.appearance = {}), e.appearance[t] = i; }, convertFrom: (e, t, i) => e.appearance ? e.appearance[t] : e[t] }, wo = { convertFrom: (e, t, i) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无" }, Fo = { convertTo: (e, t, i, u) => { e.editor && (e.editor[t] = i); }, convertFrom: (e, t, i) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t] }, xo = { 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: "标签页工具栏按钮" }, "drawer-toolbar-item": { type: "drawer-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: "标签页工具栏" }, "drawer-toolbar": { type: "drawer-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: "列表导航" }, "list-view": { type: "list-view", name: "列表" }, "filter-bar": { type: "filter-bar", name: "筛选条" }, "language-textbox": { type: "language-textbox", name: "多语输入框" }, image: { type: "image", name: "图像" }, "discussion-editor": { type: "discussion-editor", name: "评论编辑区" }, "discussion-list": { type: "discussion-list", name: "评论列表" }, comment: { type: "comment", name: "评论区" }, "rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" }, calendar: { type: "calendar", name: "日历", icon: "date-picker" }, wizard: { type: "wizard", name: "向导", icon: "wizard" }, "wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" }, "wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" }, step: { type: "step", name: "步骤条", icon: "step" }, "dynamic-form": { type: "dynamic-form", name: "动态表单" } }, To = { convertFrom: (e, t, i) => { var B; const u = e.editor && e.editor[t] ? e.editor[t] : e[t]; return ((B = xo[u]) == null ? void 0 : B.name) || u; } }, Oo = { convertTo: (e, t, i, u) => { e[t] = e[t]; }, convertFrom: (e, t, i) => e.editor ? i.getRealEditorType(e.editor.type) : "" }, ko = { convertTo: (e, t, i, u) => { (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = i : e.formatter = { [t]: i }); }, convertFrom: (e, t, i) => { if (e.formatter) { if (t === "trueText") return e.formatter.trueText; if (t === "falseText") return e.formatter.falseText; if (t === "prefix") return e.formatter.prefix; if (t === "suffix") return e.formatter.suffix; if (t === "precision") return e.formatter.precision; if (t === "decimal") return e.formatter.decimal; if (t === "thousand") return e.formatter.thousand; if (t === "dateFormat") return e.formatter.dateFormat || "yyyy-MM-dd"; if (t === "customFormat") return e.formatter.customFormat; if (t === "type") return e.formatter.type || "none"; if (t === "customFormat") return e.formmater.customFormat; } return "none"; } }, Bo = { convertTo: (e, t, i, u) => { e.command ? e.command[t] = i : e.command = { [t]: i }, t === "enableType" && i === "default" && (e.command.enable = !0, e.command.commands = [ { text: "编辑", type: "primary", command: "edit" }, { text: "删除", type: "danger", command: "remove" } ]), t === "enableType" && i === "custom" && (e.command.enable = !0, e.command.commands = [ { value: "add", text: "增加", type: "link" }, { value: "edit", text: "编辑", type: "danger" }, { value: "remove", text: "删除", type: "remove" } ]), t === "enableType" && i === "unable" && (e.command.enable = !1); }, convertFrom: (e, t, i) => { var u, B; if (e.command) { if (t === "enableType") { const q = (B = (u = e.command) == null ? void 0 : u.commands) == null ? void 0 : B.find((z) => z.command === "edit" && z.type === "primary"); return e.command.enable ? q ? "default" : "custom" : "unable"; } if (t === "commands") return e.command.enableType === "custom" ? e.command.commands : []; if (t === "formatter") return e.command.formatter; if (t === "count") return e.command.count; if (t === "columnWidth") return e.command.columnWidth || 200; } return ""; } }, Eo = { convertTo: (e, t, i, u) => { e.column ? e.column[t] = i : e.column = { [t]: i }, t === "fitColumns" && i && (e.column.fitMode || (e.column.fitMode = "average")); }, convertFrom: (e, t, i) => { if (e.column) { if (t === "fitColumns") return e.column.fitColumns; if (t === "fitMode") return e.column.fitMode; } return ""; } }, Po = { convertTo: (e, t, i, u) => { e.summary ? e.summary[t] = i : e.summary = { [t]: i }, t === "enable" && i && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = { enable: i, groupFields: [] }); }, convertFrom: (e, t, i) => { var u, B; return t === "customSummaryStyle" ? e.summary.customSummaryStyle : t === "position" ? ((u = e.summary) == null ? void 0 : u[t]) || "bottom" : t === "customRender" ? ((B = e.summary) == null ? void 0 : B[t]) || "" : e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""; } }, Do = { convertTo: (e, t, i, u) => { e.group ? e.group[t] = i : e.group = { [t]: i }, t === "enable" && i && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = { enable: i, groupFields: [], showSummary: !1, customRender: "" }); }, convertFrom: (e, t, i) => { if (e.group) { if (t === "enable") return e.group.enable; if (t === "showSummary") return e.group.showSummary; if (t === "customRender") return e.group.customRender; if (t === "groupFields") return e.group.groupFields; } } }, Io = { convertFrom: (e, t) => e.binding ? e.binding.path : "", convertTo: (e, t, i) => { if (i && i.length > 0) { const u = i[0]; e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = u.bindingField, e.binding.field = u.id, e.binding.fullPath = u.path, e.path = u.bindingPath; } } }, Go = { convertTo: (e, t, i, u) => { e.pagination || (e.pagination = {}), t === "sizeLimits" ? e.pagination.sizeLimits = i.split(",") : e.pagination[t] = i; }, convertFrom: (e, t, i) => e.pagination ? t === "sizeLimits" ? e.pagination.sizeLimits.join(",") : e.pagination[t] : e[t] }, Mo = { convertTo: (e, t, i, u) => { e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = i; }, convertFrom: (e, t, i) => e.rowNumber ? e.rowNumber[t] : e[t] }, No = { convertTo: (e, t, i, u) => { e.selection || (e.selection = {}), e.selection[t] = i; }, convertFrom: (e, t, i) => { var u, B; return t === "showCheckbox" ? (u = e.selection) != null && u.multiSelect ? !0 : (B = e.selection) == null ? void 0 : B.showCheckbox : e.selection ? e.selection[t] : e[t]; } }, jo = { convertFrom: (e, t, i) => e[t] && e[t].length ? `共 ${e[t].length} 项` : "" }, Vo = { convertFrom: (e, t) => e[t] || "", convertTo: (e, t, i) => { e[t] = i; } }, _o = { convertTo: (e, t, i, u) => { e.size || (e.size = {}), e.size[t] = i; }, convertFrom: (e, t, i) => e.size ? e.size[t] : e[t] }, Ho = { convertFrom: (e, t, i) => { var u, B; return (u = e.formatter) != null && u.data && t === "formatterEnumData" && !e.formatterEnumData ? (B = e.formatter) == null ? void 0 : B.data : e.formatterEnumData; } }, zo = { convertTo: (e, t, i, u) => { e.sort || (e.sort = {}), e.sort[t] = i; }, convertFrom: (e, t, i) => { var u, B; if (t === "mode") return ((u = e.sort) == null ? void 0 : u.mode) || "client"; if (t === "multiSort") return !!((B = e.sort) != null && B.multiSort); } }, Ao = { convertTo: (e, t, i, u) => { e.filter || (e.filter = {}), e.filter[t] = i; }, convertFrom: (e, t, i) => { var u; if (t === "mode") return ((u = e.filter) == null ? void 0 : u.mode) || "client"; } }, Lo = { convertTo: (e, t, i, u) => { e.rowOption ? e.rowOption[t] = i : e.rowOption = { [t]: i }; }, convertFrom: (e, t, i) => { if (e.rowOption) { if (t === "customRowStyle") return e.rowOption.customRowStyle; if (t === "customCellStyle") return e.rowOption.customCellStyle; if (t === "height") return e.rowOption.height; } return ""; } }, Ro = { convertTo: (e, t, i, u) => { (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = i, t === "columnTemplateType" && i === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = ` <span class="f-pretend-link f-cursor-pointer" @click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})"> {{rowData.${e.field}}} </span>` : e.columnTemplate = ` <span class="f-pretend-link f-cursor-pointer"> {{rowData.${e.field}}} </span>`), t === "columnTemplateType" && i === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && i === "custom" && (e.columnTemplate = "")); }, convertFrom: (e, t, i) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : "" }; function Tt(e, t, i) { const u = /* @__PURE__ */ new Map([ ["/converter/appearance.converter", So], ["/converter/buttons.converter", wo], ["/converter/property-editor.converter", Fo], ["/converter/items-count.converter", jo], ["/converter/type.converter", To], ["/converter/change-editor.converter", Oo], ["/converter/change-formatter.converter", ko], ["/converter/column-command.converter", Bo], ["/converter/column-option.converter", Eo], ["/converter/summary.converter", Po], ["/converter/group.converter", Do], ["/converter/form-group-label.converter", Vo], ["/converter/field-selector.converter", Io], ["/converter/pagination.converter", Go], ["/converter/row-number.converter", Mo], ["/converter/grid-selection.converter", No], ["/converter/size.converter", _o], ["/converter/change-formatter-enum.converter", Ho], ["/converter/grid-sort.converter", zo], ["/converter/grid-filter.converter", Ao], ["/converter/row-option.converter", Lo], ["/converter/change-formatter-type.converter", Ro] ]), B = /* @__PURE__ */ new Map([ ["string", { type: "input-group", enableClear: !1 }], ["boolean", { type: "combo-list", textField: "name", valueField: "value", idField: "value", enableClear: !1, editable: !1, data: [ { value: !0, name: "是" }, { value: !1, name: "否" } ] }], ["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }], ["array", { type: "button-edit" }], ["number", { type: "number-spinner", placeholder: "" }], ["events-editor", { type: "events-editor", hide: !0 }], ["multiLanguage", { type: "language-textbox" }] ]), q = bo(); function z(l, s) { return () => q.parseValueSchema(l, s); } function A(l, s, C) { return l.includes("visible") && s.visible !== void 0 ? typeof s.visible == "boolean" ? () => !!s.visible : s.visible === void 0 ? !0 : z(s.visible, C) : () => !0; } function _(l, s, C) { return l.includes("readonly") && s.readonly !== void 0 ? typeof s.readonly == "boolean" ? () => !!s.readonly : z(s.readonly, C) : () => !1; } function F(l, s) { const C = l.$converter || s; return typeof C == "string" && C && u.has(C) ? u.get(C) || null : C || null; } function h(l, s, C, v, P, W = "", $ = "") { return Object.keys(l).map((D) => { const X = ae(1), Y = D, I = l[D], c = Object.keys(I), ve = I.title, Q = I.type, M = B.get(Q) || { type: "input-group", enableClear: !1 }, te = I.editor ? Object.assign({}, M, I.editor) : Object.assign({}, M), Z = A(c, I, s), ne = _(c, I, s); te.readonly = te.readonly === void 0 ? ne() : te.readonly; const be = I.type === "cascade" ? h(I.properties, s, C, v, P, W, $) : [], ge = !0; let H = F(I, $); const ue = ee({ get() { if (X.value) { if (["class", "style"].find((Ge) => Ge === Y) && !H && (H = u.get("/converter/appearance.converter") || null), H && H.convertFrom) return H.convertFrom(C, D, P, W); const J = C[D]; return Object.prototype.hasOwnProperty.call(I, "defaultValue") && (J === void 0 || typeof J == "string" && J === "") ? I.type === "boolean" ? I.defaultValue : I.defaultValue || "" : J; } return null; }, set(J) { X.value += 1, H && H.convertTo ? (H.convertTo(v, D, J, P, W), H.convertTo(C, D, J, P, W)) : (v[D] = J, C[D] = J); } }), { refreshPanelAfterChanged: oe, description: pe, isExpand: ke, parentPropertyID: de } = I, ye = { propertyID: Y, propertyName: ve, propertyType: Q, propertyValue: ue, editor: te, visible: Z, readonly: ne, cascadeConfig: be, hideCascadeTitle: ge, refreshPanelAfterChanged: oe, description: pe, isExpand: ke, parentPropertyID: de }; return s[Y] = ye, ye; }); } function d(l, s, C = {}) { const v = {}, P = e[l]; return P && P.categories ? Object.keys(P.categories).map(($) => { const L = P.categories[$], D = L == null ? void 0 : L.title, X = h(L.properties || {}, v, {}, C, s); return { categoryId: $, categoryName: D, properties: X }; }) : []; } function y(l, s, C, v, P = "") { const W = s.$ref.schema, $ = s.$ref.converter, L = C[W], D = L.type, X = i(L), Y = {}, I = e[D]; if (I && I.categories) { const c = I.categories[l], ve = c == null ? void 0 : c.title; $ && Object.keys(c.properties).forEach((te) => { c.properties[te].$converter = $; }); const Q = (c == null ? void 0 : c.properties) || {}, M = h(Q, Y, X, L, v, P); return { categoryId: l, categoryName: ve, properties: M }; } return { categoryId: l, categoryName: "", properties: [] }; } function g(l, s, C, v, P) { const W = l.type, $ = i(l), L = {}; let D = P || e[W]; if (!(D && Object.keys(D).length > 0) && C && C.getPropConfig && (D = C.getPropConfig(v)), D && D.categories) { const Y = []; return Object.keys(D.categories).map((I) => { const c = D.categories[I]; if (c.$ref) { Y.push(y(I, c, l, s, v)); return; } const ve = c == null ? void 0 : c.title, Q = c == null ? void 0 : c.tabId, M = c == null ? void 0 : c.tabName, te = c == null ? void 0 : c.hide, Z = c == null ? void 0 : c.hideTitle, ne = h(c.properties || {}, L, $, l, s, v, c.$converter), { setPropertyRelates: be } = c, ge = c == null ? void 0 : c.parentPropertyID; Y.push({ categoryId: I, categoryName: ve, tabId: Q, tabName: M, hide: te, properties: ne, hideTitle: Z, setPropertyRelates: be, parentPropertyID: ge }); }), Y; } return []; } return { getPropertyConfigBySchema: g, getPropertyConfigByType: d, propertyConverterMap: u }; } const Wo = {}, $o = {}; Tt(Wo, $o, ho); const Uo = {}, Yo = {}, { resolveSchemaWithDefaultValue: qo } = xt(Uo, Yo), Xo = {}, Jo = {}; Tt(Xo, Jo, qo); function Qo(e, t) { if (!e || e.length < 1) return null; for (const i of e) { if (i.id === t) return i; if (i.children) { const u = i.children.find((B) => B.id === t); if (u) return u; } } return null; } function Zo() { function e(t, i) { const { name: u } = i; if (u !== "fieldsClick") return t[`on${u.charAt(0).toUpperCase()}${u.slice(1)}`] || t[u]; const B = t.cardToolbar; if (!B || B.length < 1) return null; const [q, z] = i.payloads, A = Qo(B, z); return A ? A.onClick || A.click : null; } return { resolve: e }; } function Ko(e, t) { return null; } const gr = { /** 启用分页 */ enable: { type: Boolean, default: !1 }, /** 当前页码 */ index: { type: Number, default: 1 }, /** 分页交互模式 */ mode: { type: String, default: "client" }, /** 显示页码输入框 */ showGoto: { type: Boolean, default: !1 }, /** 显示页码 */ showIndex: { type: Boolean, default: !0 }, /** 显示每页记录数 */ showLimits: { type: Boolean, default: !1 }, /** 显示分页汇总信息 */ showPageInfo: { type: Boolean, default: !0 }, /** 默认每页记录数 */ size: { type: Number, default: 20 }, /** 可选择的没有记录数据 */ sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] }, /** 总记录数 */ total: { type: Number, default: 0 }, /** 禁用分页 */ disabled: { type: Boolean, default: !1 } }, pr = { /** 启用排序 */ enable: { type: Boolean, default: !1 }, /** 排序字段集合 */ fields: { type: Array, default: [] }, /** 排序交互模式 */ mode: { type: String, default: "client" }, /** 多列排序 */ multiSort: { type: Boolean, default: !1 } }, yr = { /** 自定义分组合计内容 */ customGroupRow: { type: Function, default: () => { } }, /** 自定义分组行样式 */ customGroupRowStyle: { type: Function, default: () => { } }, /** 自行分组合计行样式 */ customSummaryStyle: { type: Function, default: () => { } }, /** 启用行数据分组 */ enable: { type: Boolean, default: !1 }, /** 分组行合并列数 */ groupColSpan: { type: Number, default: 1 }, /** 行数据分组字段;多字段分组以英文逗号分隔 */ groupFields: { type: Array, default: [] }, /** 在DataGrid中显示被分组的列 */ showGroupedColumn: { type: Boolean, default: !0 }, /** 显示分组面板 */ showGroupPanel: { type: Boolean, default: !1 }, /** 启用合计行 */ showSummary: { type: Boolean, default: !1 }, /** 显示合计行位置; */ summaryPosition: { type: String, default: "separate" }, /** 自定义分组行内容 */ customRender: { type: Function, default: () => { } } }, Cr = { /** 启用筛选 */ enable: { type: Boolean, default: !1 }, /** DataGrid筛选风格 */ filterStyle: { type: String, default: "filter-column" }, /** 筛选交互模式 */ mode: { type: String, default: "server" }, /** 显示过滤条件工具条 */ showSummary: { type: Boolean, default: !0 } }, hr = { /** 允许折行显示列标题 */ wrapHeadings: { type: Boolean, default: !1 } }, br = { /** 显示行号 */ enable: { type: Boolean, default: !1 }, /** 行号列表头标题 */ heading: { type: String, default: "序号" }, /** 行号宽度,默认为 36px */ width: { type: Number, default: 36 }, /** 是否展示省略号 */ showEllipsis: { type: Boolean, default: !0 } }, Sr = { /** 自定义行样式 */ customRowStyle: { type: Function, default: () => { } }, /** 自定义单元格样式 */ customCellStyle: { type: Function, default: () => { } }, /** 自定义行状态 */ customRowStatus: { type: Function, default: () => { } }, /** 禁止行选中表达式 */ disable: { type: Function, default: () => { } }, /** 默认行高度为 29px */ height: { type: Number, default: 28 }, /** 鼠标滑过行效果 */ showHovering: { type: Boolean, default: !0 }, /** 禁止数据折行 */ wrapContent: { type: Boolean, default: !1 } }, wr = { /** 显示合计信息 */ enable: { type: Boolean, default: !1 }, /** 合计行自定义样式,对启用合计行模板无效 */ customSummaryStyle: { type: Function, default: () => { } }, /** 分组合计字段 */ groupFields: { type: Array, default: [] }, /** 合计交互模式 */ mode: { type: String, default: "client" }, /** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */ position: { type: String, default: "bottom" }, /** 自定义分组合行内容 */ customRender: { type: Function, default: () => { } } }, Fr = { /** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */ fitColumns: { type: Boolean, default: !1 }, /** 自动适配列宽度模式 */ fitMode: { type: String, default: "average" }, groups: { type: Array, defaut: [] }, /** 允许拖动表头改变列显示顺序 */ reorderColumn: { type: Boolean, default: !1 }, /** 允许拖动改变列宽度 */ resizeColumn: { type: Boolean, default: !0 }, /** 双击表头列自适应内容宽度 */ resizeColumnOnDoubleClick: { type: Boolean, default: !0 } }; function tt(e) { const t = e == null ? void 0 : e.fitColumns; return t === !0 || typeof t == "object" && t !== null && "enable" in t && t.enable === !0; } const xr = { /** 启用多选且显示checkbox, 选中行后勾选前面的checkbox */ checkOnSelect: { type: Boolean, default: !1 }, /** 当数据源为空时,清空已选记录 */ clearSelectionOnEmpty: { type: Boolean, default: !0 }, /** 自定义已选记录列表中的显示内容 */ customSelectionItem: { type: Function, default: () => { } }, /** 允许选中行 */ enabelSelectRow: { type: Boolean, default: !0 }, /** 允许重复点击行是保留选中状态 */ keepSelectingOnClick: { type: Boolean, default: !0 }, /** 允许跨页多选 */ keepSelectingOnPaging: { type: Boolean, default: !0 }, /** 启用多选 */ multiSelect: { type: Boolean, default: !1 }, /** 启用多选时,点击行选中,只允许且只有一行被选中 */ focusSelection: { type: String, default: "current" }, /** 启用多选且显示checkbox, 勾选后并且选中行 */ selectOnCheck: { type: Boolean, default: !1 }, /** 每行前边显示 checkbox */ showCheckbox: { type: Boolean, default: !1 }, /** 显示全选checkbox */ showSelectAll: { type: Boolean, default: !1 }, /** 显示已选数据 */ showSelection: { type: Boolean, default: !1 } }, Tr = { /** 编辑时选中文本 */ selectOnEditing: { type: Boolean, default: !1 }, /** 编辑模式; row:整行编辑,cell: 单元格编辑 */ editMode: { type: String, default: "cell" } }, Or = { /** show loading */ show: { type: Boolean, default: !1 }, /** message on display when loading */ message: { type: String, default: "加载中..." } }, er = { /** 自定义样式 */ customClass: { type: String, default: "" }, /** 允许在最后一个单元回车新增一行 */ appendOnEnterAtLastCell: { type: Boolean, default: !1 }, /** 编辑单元格前事件 */ beforeEditCell: { type: Function, default: (e) => !0 }, /** 结束编辑前校验 */ beforeEndEditCell: { type: Function, default: () => !0 }, /** 列集合 */ columns: { type: Array, default: [] }, /** 列配置 */ columnOption: { type: Object }, /** 列配置 */ commandOption: { type: Object, default: { enable: !1, commands: [], halign: "center" } }, /** 被绑定数据 */ data: { type: Array, default: [] }, /** 禁用组件 */ disabled: { type: Boolean, default: !1 }, /** 行数据禁用属性 */ disabledField: { type: String, default: "disabled" }, /** 允许编辑 */ editable: { type: Boolean, default: !1 }, /** 编辑配置 */ editOption: { type: Object, default: { selectOnEditing: !1, editMode: "cell" } }, enableCommands: { type: Boolean, default: !1 }, /** 表格启用过滤 */ enableFilter: { type: Boolean, default: !1 }, /** 筛选配置 */ filter: { type: Object }, /** 适配父组件尺寸 ---此属性没有实际效用*/ fit: { type: Boolean, default: !1 }, /** 编辑单元格时默认获得焦点 */ focusOnEditingCell: { type: Boolean, default: !0 }, /** 分组配置 */ group: { type: Object }, /** 列标题配置 */ header: { type: Object }, /** 高度 */ height: { type: Number, default: -1 }, /** DataGrid组件唯一标识 */ id: { type: String, default: "" }, /** 被绑定数据的标识字段 */ idField: { type: String, default: "id", require: !0 }, /** 展示loading */ loading: { type: Boolean, default: !1 }, /** 纵向合并具有相同值的单元格 */ mergeCell: { type: Boolean, default: !1 }, /** 最小高度 */ minHeight: { type: Number, default: 300 }, /** 最小宽度 */ minWidth: { type: Number, default: 400 }, /** 新建数据 */ newDataItem: { type: Function, default: () => { } }, /** 分页配置 */ pagination: { type: Object, default: { enable: !1, size: 20 } }, /** 行号配置 */ rowNumber: { type: Object, default: { enable: !0, width: 36, showEllipsis: !0, heading: "序号" } }, /** 行配置 */ rowOption: { type: Object, default: { wrapContent: !1 } }, /** 选择配置 */ selection: { type: Object, default: { enableSelectRow: !0, multiSelect: !1, multiSelectMode: "DependOnCheck", showCheckbox: !1, showSelectAll: !1, showSelection: !1, keepSelectingOnClick: !0 } }, /** 已选数据标识 */ selectionValues: { type: Array, default: [] }, /** 编辑单元格时默认选中单元格文本 */ selectOnEditingCell: { type: Boolean, default: !1 }, /** 显示边框 */ showBorder: { type: Boolean, default: !1 }, /** 显示底部面板 */ showFooter: { type: Boolean, default: !1 }, /** 显示顶部面板 */ showHeader: { type: Boolean, default: !0 }, /** 显示横向行分割线 */ showHorizontalLines: { type: Boolean, default: !0 }, /** 显示滚动条 */ showScrollBar: { type: String, default: "auto" }, /** 显示设置按钮 */ showSetting: { type: Boolean, default: !1 }, /** 显示条纹 */ showStripe: { type: Boolean, default: !0 }, /** 显示纵向列分割线 */ showVerticallLines: { type: Boolean, default: !1 }, /** 排序配置 */ sort: { type: Object }, /** 合计配置 */ summary: { type: Object, default: { // 默认合计行开启后,后面不展示值,所以默认不开启 enable: !1, groupFields: ["numericField1", "numericField2"] } }, /** 启用虚拟渲染 */ virtualized: { type: Boolean, default: !0 }, /** 宽度 */ width: { type: Number, default: -1 }, /** 空数据模板 */ emptyTemplate: { type: Object }, beforeUpdate: { type: Function }, /** 绑定动态字段的解析器 */ fieldsResolver: { type: Function, default: Ko }, /** 绑定动态字段的值*/ fieldsCallback: { type: Function, default: () => { } }, displayType: { type: String, default: "List" }, /** 是否显示表头 */ showCardHeader: { type: Boolean, default: !0 }, /** 是否显示底部模板 */ showCardFooter: { type: Boolean, default: !0 }, /** 自定义表头内容渲染函数 */ cardHeaderTemplate: { type: Function, default: () => null }, /** 自定义底部内容渲染函数 */ cardFooterTemplate: { type: Function, default: () => null }, /** 自定义头部标题渲染函数 */ cardTitleTemplate: { type: Function, default: () => null }, /** 自定义工具栏渲染函数 */ cardToolbar: { type: [Array, Function], default: () => [] }, /** 主标题 */ cardMainTitle: { type: String, default: "" }, formId: { type: String, default: "" }, /** 启用列设置方案 */ enableColumnSettingSolution: { type: Boolean, default: !1 } }, kr = Zo(); function tr() { const e = /* @__PURE__ */ new Map([ ["boolean", "check-box"], ["datetime", "date-picker"], ["enum", "combo-list"], ["number", "number-spinner"], ["string", "input-group"], ["text", "text"] ]); function t(i) { if (!i.editor) { const u = i.dataType, B = { type: e.get(u) || "input-group", readonly: !0 }; return { ...i, type: "form-group", label: i.title, editor: B }; } return { ...i, type: "form-group", label: i.title }; } return { transformColumnToField: t }; } function nr(e, t, i, u, B, q, z, A, _, F, h, d, y, g, l, s, C) { const { isNull: v, isUndefined: P } = bt(), { totalItems: W, rawView: $ } = s, { calculateCellPositionInRow: L, cellKey: D, cellPosition: X, rowKey: Y, rowPosition: I, rowSpanCellPosition: c, groupCellPosition: ve, summaryCellPosition: Q } = z, { cellContentClass: M, cellContentPosition: te, cellContentClassWithEllipsis: Z } = q, { collpaseGroupIconClass: ne } = F, { gridCellClass: be, gridRowClass: ge, onClickRow: H, onMouseoverRow: ue, onMouseoutRow: oe } = d, { onClickCell: pe } = _, { toggleGroupRow: ke } = y, { columnContext: de, hasLeftFixedColumn: ye, hasRightFixedColumn: J } = A, { navigateOnKeyUp: Ge, navigateOnKeyDown: ie } = h, Se = (o) => (o || []).some((b) => at(b) ? !(b.type === St || b.type === ot && !Se(b.children)) : !0) ? o : null, Ae = (o) => { var b, G, n; return ((G = (b = o.column) == null ? void 0 : b.editor) == null ? void 0 : G.type) === "switch" || ((n = o.column) == null ? void 0 : n.dataType) === "boolean" ? { display: "flex", flexGrow: "1", overflow: "hidden" } : { flexGrow: "1" }; }, se = nt({ "fv-grid-content-left-fixed": !0 }), Be = nt({ "fv-grid-content-right-fixed": !0 }); ze([W, $], (o) => { !o[0] && !o[1].length ? (se["fv-grid-content-left-fixed"] = !1, Be["fv-grid-content-right-fixed"] = !1) : (se["fv-grid-content-left-fixed"] = !0, Be["fv-grid-content-right-fixed"] = !0); }); const { gridDataStyle: Fe, gridMergedDataStyle: ce, leftFixedGridDataStyle: U, leftFixedGridMergedDataStyle: Le, rightFixedGridDataStyle: xe, rightFixedGridMergedDataStyle: Me } = g; function Je(o, b) { o.stopPropagation(), b.collapse = !b.collapse, l.value = ke(b.collapse ? "collapse" : "expand", b, l.value); } function Qe(o, b, G) { var a, f; const n = []; if (o.groupField) { const S = b[o.groupField], x = o.data[o.groupField]; if (G === "primary") for (let w = 0; w <= o.layer; w++) n.push(m("div", { class: "fv-grid-group-row-icon", style: { position: "relative", zIndex: 10 }, onClick: (T) => Je(T, o) }, [m("span", { class: ne(o) }, null)])); G === "primary" && ((a = e.group) != null && a.customRender) ? n.push(m("div", { ref: x == null ? void 0 : x.setRef, key: D(o, o.layer + 1), style: { flex: "1", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "4px" } }, [e.group.customRender(o)])) : (f = e.group) != null && f.customRender || (G === "primary" && x && n.push(m("div", { ref: x.setRef, key: D(o, o.layer + 1), style: { flex: "1", minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", lineHeight: "26px", padding: "0 0.75rem" }, title: x.data }, [x.data])), Object.values(o.data).filter((w) => w.field !== o.groupField && b[w.field] && w.colSpan !== 0 && w.field !== Sn && w.field !== wn).forEach((w) => { var le; const T = X(o, w, b); if (!S) { const K = (o.layer + 1) * (((le = x == null ? void 0 : x.parent) == null ? void 0 : le.height) || 0); T.left = `${Number(T.left.replace("px", "")) + K}px`; } n.push(m("div", { ref: w.setRef, key: D(o, w.index), class: "fv-grid-cell", style: T }, [w.data])); })); } return n; } function Te(o, b, G, n) { return o.layer > -1 && m("div", { ref: o.setRef, key: Y(o), class: { ...ge(o, G), "d-flex": !0, "align-items-center": !0 }, style: I(o), onClick: (a) => H(a, o), onMouseover: (a) => ue(a, o) }, [Qe(o, b, n)]); } function Ne(o, b) { const G = []; if (o.groupField && b[o.groupField]) { const n = o.data[o.groupField]; G.push(m("div", { ref: n.setRef, key: D(o, o.layer + 1), class: "fv-grid-cell", style: Q(n, b, o.layer) }, [n.data])); } return G; } function je(o, b, G, n) { return o.layer > -1 && m("div", { ref: o.setRef, key: Y(o), class: ge(o, G), style: I(o), onClick: (a) => H(a, o), onMouseover: (a) => ue(a, o) }, [Ne(o, b)]); } function Ve(o, b) { var G, n, a; return o.showTips && typeof ((G = o.column) == null ? void 0 : G.formatter) != "function" && ((n = o.column) == null ? void 0 : n.dataType) !== "commands" && ((a = o.column) == null ? void 0 : a.dataType) !== "setting" ? m("div", { class: Z(o), title: o.formatter(o, b) }, [o.formatter(o, b)]) : m("div", { class: Z(o) }, [o.formatter(o, b)]); } function Ee() { return m("div", null, [Xe("******")]); } function Re(o) { var n, a; const b = !v(o.data) && !P(o.data) ? o.data.toString() : o.data; return ((a = (n = o.column) == null ? void 0 : n.editor) == null ? void 0 : a.showType) === "password" ? Ee() : o.showTips ? m("div", { class: Z(o), title: b }, [b]) : m("div", { class: Z(o) }, [b]); } function We(o, b) { return o.mode === Ft.editing ? m("div", { style: Ae(o) }, [o.getEditor(o)]) : o.column.columnTemplate ? o.column.columnTemplate(o, b) : o.formatter ? Ve(o, b) : Re(o); } function V(o, b, G, n, a) { return m("div", { ref: o.setRef, key: Y(o), class: ge(o, G), style: n, onClick: (f) => H(f, o), onMouseover: (f) => ue(f, o), onMouseout: (f) => oe(f, o) }, [Object.values(o.data).filter((f) => b[f.field] && f.rowSpan === 1).map((f) => { var x, w; const S = t.slots.cellTemplate && Se(t.slots.cellTemplate({ cell: f, row: o })); return m("div", { ref: f.setRef, key: D(o, f.index), class: be(f, o), style: X(o, f, b), onClick: (T) => { pe(T, f, o, f.column); }, onKeydown: (T) => Ge(T, f) }, [m("div", { class: M(f), style: te(f) }, [S ? (w = (x = t.slots).cellTemplate) == null ? void 0 : w.call(x, { cell: f, row: o }) : We(f, o)])]); })]); } function $e(o, b, G, n) { return V(o, b, G, I(o)); } const Pe = [$e, Te, je]; function Oe(o, b) { const G = L(o); return l.value.map((n, a) => Pe[n.type](n, G, a, b)); } function Ce(o) { const b = L(o); return l.value.map((G) => Object.values(G.data).filter((n) => b[n.field] && n.rowSpan > 1).map((n) => m("div", { key: D(G, n.index), class: "fv-grid-cell fv-grid-merged-cell", style: c(G, n, b) }, [n.data]))); } function he() { return m("div", { ref: u, class: se }, [m("div", { class: "fv-grid-data", style: U.value }, [Oe(de.value.leftColumns.filter((o) => o.visible), "left")]), m("div", { class: "fv-grid-merge-date", style: Le.value }, [Ce(de.value.leftColumns.filter((o) => o.visible))])]); } function Ue() { return m("div", { ref: i, class: "fv-grid-content-primary" }, [m("div", { class: "fv-grid-data", style: Fe.value }, [Oe(de.value.primaryColumns.filter((o) => o.visible), "primary")]), m("div", { class: "fv-grid-merge-date", style: ce.value }, [Ce(de.value.primaryColumns.filter((o) => o.visible))])]); } function De() { return m("div", { ref: B, class: Be }, [m("div", { class: "fv-grid-data", style: xe.value }, [Oe(de.value.rightColumns.filter((o) => o.visible), "right")]), m("div", { class: "fv-grid-merge-date", style: Me.value }, [Ce(de.value.rightColumns.filter((o) => o.visible))])]); } function Ie() { const o = []; return ye.value && o.push(he()), o.push(Ue()), J.value && o.push(De()), o; } return { renderDataArea: Ie }; } const or = /* @__PURE__ */ wt({ name: "FDataGridRowForm", props: { columns: { type: Array, required: !0 }, /** 绑定动态字段 */ fields: { type: Array, required: !0 }, data: { type: Object, default: null }, /** 绑定动态字段的值*/ formData: { type: Object, default: null }, /** 绑定动态字段的解析器 */ fieldsCallback: { type: Function, default: () => { } }, /** 是否显示表头 */ showHeader: { type: Boolean, default: !0 }, /** 是否显示底部模板 */ showFooter: { type: Boolean, default: !0 }, /** 自定义工具栏渲染函数 */ toolbar: { type: [Array, Function], default: () => [] }, /** 主标题 */ mainTitle: { type: String, default: "" }, /** 自定义表头标题渲染函数 */ headerTitleRenderFunction: { type: Function }, /** 自定义表头内容渲染函数 */ headerContentRenderFunction: { type: Function }, /** 自定义底部模板渲染函数 */ footerRenderFunction: { type: Function } }, emits: ["fieldsValueChange", "fieldsEvent", "click"], setup(e, { emit: t }) { return () => m(vo, { fields: e.fields, formData: e.formData, showHeader: e.showHeader, showFooter: e.showFooter, mainTitle: e.mainTitle, toolbar: e.toolbar, mode: "full", headerTitleRenderFunction: e.headerTitleRenderFunction, headerContentRenderFunction: e.headerContentRenderFunction, footerRenderFunction: e.footerRenderFunction, callback: (...i) => e.fieldsCallback(...i), "onUpdate:modelValue": (i) => { t("fieldsValueChange", i, e.data); }, onEvent: (i) => { t("fieldsEvent", i); }, onClick: (...i) => { t("click", ...i); } }, null); } }); function rr(e, t, i, u, B, q, z, A, _, F, h, d, y, g, l, s, C) { const { transformColumnToField: v } = tr(), { isNull: P, isUndefined: W } = bt(), { totalItems: $, rawView: L } = s, { calculateCellPositionInRow: D, cellKey: X, cellPosition: Y, rowKey: I, rowPosition: c, rowSpanCellPosition: ve, groupCellPosition: Q, summaryCellPosition: M } = z, { cellContentClass: te, cellContentPosition: Z, cellContentClassWithEllipsis: ne } = q, { collpaseGroupIconClass: be } = F, { gridCellClass: ge, gridRowClass: H, onClickRow: ue, onMouseoverRow: oe, onMouseoutRow: pe } = d, { onClickCell: ke } = _, { toggleGroupRow: de } = y, { columnContext: ye, hasLeftFixedColumn: J, hasRightFixedColumn: Ge } = A, ie = ee(() => { var a; if (e.displayType !== "Card" || (((a = e.columns) == null ? void 0 : a.length) ?? 0) === 0 || e.fit && tt(e.columnOption)) return; const n = ye.value.primaryColumnsWidth || 0; return n > 0 ? `${n}px` : void 0; }), { navigateOnKeyUp: Se, navigateOnKeyDown: Ae } = h, se = (n) => (n || []).some((a) => at(a) ? !(a.type === St || a.type === ot && !se(a.children)) : !0) ? n : null, Be = (n) => { var a, f, S; return ((f = (a = n.column) == null ? void 0 : a.editor) == null ? void 0 : f.type) === "switch" || ((S = n.column) == null ? void 0 : S.dataType) === "boolean" ? { display: "flex", flexGrow: "1", overflow: "hidden" } : { flexGrow: "1" }; }, Fe = nt({ "fv-grid-content-left-fixed": !0 }), ce = nt({ "fv-grid-content-right-fixed": !0 }); ze([$, L], (n) => { !n[0] && !n[1].length ? (Fe["fv-grid-content-left-fixed"] = !1, ce["fv-grid-content-right-fixed"] = !1) : (Fe["fv-grid-content-left-fixed"] = !0, ce["fv-grid-content-right-fixed"] = !0); }); const { gridDataStyle: U, gridMergedDataStyle: Le, leftFixedGridDataStyle: xe, leftFixedGridMergedDataStyle: Me, rightFixedGridDataStyle: Je, rightFixedGridMergedDataStyle: Qe } = g; function Te(n, a) { n.stopPropagation(), a.collapse = !a.collapse, l.value = de(a.collapse ? "collapse" : "expand", a, l.value); } function Ne(n, a) { var x; const f = []; if (!n.groupField) return f; const S = !!a[n.groupField]; for (let w = 0; w <= n.layer; w++) f.push(m("div", { class: "fv-grid-group-row-icon", style: { position: "relative", zIndex: 10 }, onClick: (T) => Te(T, n) }, [m("span", { class: be(n) }, null)])); if ((x = e.group) != null && x.customRender) f.push(e.group.customRender(n)); else { const w = n.data[n.groupField]; if (w) { const T = { flex: "1", wordBreak: "break-all", minWidth: 0 }; f.push(m("div", { ref: w.setRef, key: X(n, n.layer + 1), class: e.displayType !== "Card" ? "fv-grid-cell" : void 0, style: e.displayType === "Card" ? T : S ? Q(w, a, n.layer) : { flex: "1", minWidth: 0 }, title: w.data }, [w.data])); } Object.values(n.data).filter((T) => T.field !== n.groupField && T.colSpan !== 0).filter((T) => !!a[T.field]).forEach((T) => { f.push(m("div", { ref: T.setRef, key: X(n, T.index), class: "fv-grid-cell", style: Y(n, T, a), title: T.data }, [T.data])); }); } return f; } function je(n, a, f) { var x; n.height = ((x = e.rowOption) == null ? void 0 : x.height) || 28, n.raw.__fv_data_height__ = n.height; const S = (n.layer + 1) * 18; return n.layer > -1 && m("div", { ref: n.setRef, key: I(n), class: { ...H(n, f), "d-flex": !0, "align-items-center": !0 }, style: { minHeight: `${n.height}px`, position: "relative", paddingLeft: `${S}px`, width: "100%" }, onClick: (w) => ue(w, n), onMouseover: (w) => oe(w, n) }, [Ne(n, a)]); } function Ve(n, a) { const f = []; if (!n.groupField) return f; const S = n.data[n.groupField]; if (!S) return f; const x = !!a[n.groupField], w = e.displayType === "Card" ? { flex: "1", minWidth: 0, lineHeight: "26px" } : x ? M(S, a, n.layer) : { flex: "1", minWidth: 0, lineHeight: "26px" }; return f.push(m("div", { ref: S.setRef, key: X(n, n.layer + 1), class: { "fv-grid-cell": e.displayType !== "Card" }, style: w }, [S.data])), f; } function Ee(n, a, f) { var S; r