UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,524 lines 321 kB
var To = Object.defineProperty; var Fo = (e, t, n) => t in e ? To(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var ne = (e, t, n) => Fo(e, typeof t != "symbol" ? t + "" : t, n); import { ref as C, computed as $, createVNode as S, Fragment as bt, watch as _e, withModifiers as ko, withDirectives as sn, vModelText as Io, defineComponent as $e, createTextVNode as Ze, reactive as lt, createApp as un, onUnmounted as Dt, onMounted as mt, Transition as cn, mergeProps as ht, onBeforeUnmount as dn, resolveDirective as Eo, nextTick as Yt, inject as gt, provide as Oo, triggerRef as Mo, isVNode as Vo, onBeforeMount as Do, Teleport as Bo, shallowRef as Ro, render as Pt, h as No, cloneVNode as $o } from "vue"; import { isPlainObject as en, cloneDeep as pt, isUndefined as tn } from "lodash-es"; import { useFilter as fn, useIdentify as pn, useHierarchy as mn, useGroupData as vn, useDataView as hn, useSelection as gn, useRow as yn, useEdit as bn, useVisualDataBound as Cn, useVisualDataCell as wn, useVisualDataRow as _n, useVisualGroupRow as jo, useVisualSummaryRow as Po, useVisualData as Sn, useLoading as Ho, useSelectHierarchyItem as Lo, useDataViewContainerStyle as Wo, useCommandColumn as Ao, useColumn as zo, useSort as Go, useGroupColumn as qo, useCellPosition as Uo, useSidebar as Yo, useVirtualScroll as Xo, useFitColumn as Ko, useFilterHistory as Qo, useColumnFilter as Jo, useDragColumn as Zo, getColumnHeader as ea, getSidebar as ta, getDisableMask as na, getHorizontalScrollbar as oa, getVerticalScrollbar as aa, getEmpty as ia } from "../data-view/index.esm.js"; import ra, { FCheckbox as Bt } from "../checkbox/index.esm.js"; import "../modal/index.esm.js"; import la from "../transfer/index.esm.js"; import sa from "../tabs/index.esm.js"; import ua from "../order/index.esm.js"; import "../condition/index.esm.js"; import ca from "../filter-bar/index.esm.js"; import nn from "../tooltip/index.esm.js"; import da from "../pagination/index.esm.js"; import fa from "../button/index.esm.js"; import pa from "../search-box/index.esm.js"; import ma from "../tags/index.esm.js"; import va, { FDynamicFormGroup as ha, FDynamicFormInput as ga } from "../dynamic-form/index.esm.js"; import "../designer-canvas/index.esm.js"; import { useResizeObserver as xn } from "@vueuse/core"; import { getCustomClass as Ht, withInstall as ya, useDateFormat as ba, useNumberFormat as Ca, resolveField as Xe, setFieldValue as Wt } from "../common/index.esm.js"; import wa from "../accordion/index.esm.js"; import _a from "../avatar/index.esm.js"; import Sa from "../button-edit/index.esm.js"; import xa from "../button-group/index.esm.js"; import Ta from "../calendar/index.esm.js"; import Fa from "../capsule/index.esm.js"; import ka from "../color-picker/index.esm.js"; import At from "../combo-list/index.esm.js"; import Ia from "../content-container/index.esm.js"; import Ea from "../data-grid/index.esm.js"; import Oa from "../date-picker/index.esm.js"; import Ma from "../dropdown/index.esm.js"; import "../external-container/index.esm.js"; import Va from "../events-editor/index.esm.js"; import Da from "../image-cropper/index.esm.js"; import Ba from "../input-group/index.esm.js"; import Ra from "../layout/index.esm.js"; import Na from "../list-nav/index.esm.js"; import $a from "../list-view/index.esm.js"; import ja from "../lookup/index.esm.js"; import Pa from "../nav/index.esm.js"; import Ha from "../number-spinner/index.esm.js"; import La from "../number-range/index.esm.js"; import Wa from "../page-header/index.esm.js"; import Aa from "../page-footer/index.esm.js"; import za from "../progress/index.esm.js"; import Ga from "../query-solution/index.esm.js"; import qa from "../radio-group/index.esm.js"; import Ua from "../rate/index.esm.js"; import Ya from "../response-toolbar/index.esm.js"; import Xa from "../response-layout/index.esm.js"; import Ka from "../response-layout-editor/index.esm.js"; import Qa from "../section/index.esm.js"; import Ja from "../smoke-detector/index.esm.js"; import Za from "../splitter/index.esm.js"; import ei from "../step/index.esm.js"; import ti from "../switch/index.esm.js"; import ni from "../text/index.esm.js"; import oi from "../time-picker/index.esm.js"; import ai from "../tree-view/index.esm.js"; import ii from "../uploader/index.esm.js"; import ri from "../verify-detail/index.esm.js"; import li from "../component/index.esm.js"; import si from "../video/index.esm.js"; import ui from "../textarea/index.esm.js"; import ci from "../tree-grid/index.esm.js"; import di from "../fieldset/index.esm.js"; import fi from "../drawer/index.esm.js"; import pi from "../binding-selector/index.esm.js"; import "../notify/index.esm.js"; import mi from "../combo-tree/index.esm.js"; import vi from "../field-selector/index.esm.js"; import hi from "../mapping-editor/index.esm.js"; import gi from "../schema-selector/index.esm.js"; import yi from "../event-parameter/index.esm.js"; import bi from "../filter-condition-editor/index.esm.js"; import Ci from "../sort-condition-editor/index.esm.js"; import wi from "../menu-lookup/index.esm.js"; import { createPropsResolver as _i } from "../dynamic-resolver/index.esm.js"; const Tn = {}, Fn = {}; function Xt(e) { const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), r = Object.keys(t).reduce((i, s) => ((!a || !o.find((c) => c === s)) && (i[s] = t[s].type === "object" && t[s].properties ? Xt(t[s]) : pt(t[s].default)), i), {}); if (n && (!a || !o.find((i) => i === "id"))) { const i = n.toLowerCase().replace(/-/g, "_"); r.id = `${i}_${Math.random().toString().slice(2, 6)}`; } return r; } function Si(e) { const { properties: t, title: n, required: o } = e; if (o && Array.isArray(o)) { const a = o.reduce((r, i) => (r[i] = t[i].type === "object" && t[i].properties ? Xt(t[i]) : pt(t[i].default), r), {}); if (n && o.find((r) => r === "id")) { const r = n.toLowerCase().replace(/-/g, "_"); a.id = `${r}_${Math.random().toString().slice(2, 6)}`; } return a; } return { type: n }; } function kn(e, t = {}, n) { const o = Tn[e]; if (o) { let a = Si(o); const r = Fn[e]; return a = r ? r({ getSchemaByType: kn }, a, t, n) : a, a; } return null; } function xi(e, t) { const n = Xt(t); return Object.keys(n).reduce((o, a) => (Object.prototype.hasOwnProperty.call(e, a) && (o[a] && en(o[a]) && en(e[a] || !e[a]) ? Object.assign(o[a], e[a] || {}) : o[a] = e[a]), o), n), n; } function In(e, t) { return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => { if (t.has(a)) { const r = t.get(a); if (typeof r == "string") o[r] = e[a]; else { const i = r(a, e[a], e); Object.assign(o, i); } } else o[a] = e[a]; return o; }, {}); } function Ti(e, t, n = /* @__PURE__ */ new Map()) { const o = xi(e, t); return In(o, n); } function Fi(e = {}) { function t(p, f, d, u) { if (typeof d == "number") return u[p].length === d; if (typeof d == "object") { const y = Object.keys(d)[0], w = d[y]; if (y === "not") return Number(u[p].length) !== Number(w); if (y === "moreThan") return Number(u[p].length) >= Number(w); if (y === "lessThan") return Number(u[p].length) <= Number(w); } return !1; } function n(p, f, d, u) { return u[p] && u[p].propertyValue && String(u[p].propertyValue.value) === String(d); } const o = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", n] ]); Object.keys(e).reduce((p, f) => (p.set(f, e[f]), p), o); function a(p, f) { const d = p; return typeof f == "number" ? [{ target: d, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: d, operator: "getProperty", param: p, value: !!f }] : typeof f == "object" ? Object.keys(f).map((u) => { if (u === "length") return { target: d, operator: "length", param: null, value: f[u] }; const y = u, w = f[u]; return { target: d, operator: "getProperty", param: y, value: w }; }) : []; } function r(p) { return Object.keys(p).reduce((d, u) => { const y = a(u, p[u]); return d.push(...y), d; }, []); } function i(p, f) { if (o.has(p.operator)) { const d = o.get(p.operator); return d && d(p.target, p.param, p.value, f) || !1; } return !1; } function s(p, f) { return r(p).reduce((y, w) => y && i(w, f), !0); } function c(p, f) { const d = Object.keys(p), u = d.includes("allOf"), y = d.includes("anyOf"), w = u || y, v = (w ? p[w ? u ? "allOf" : "anyOf" : "allOf"] : [p]).map((T) => s(T, f)); return u ? !v.includes(!1) : v.includes(!0); } return { parseValueSchema: c }; } const le = { button: { type: "button", name: "按钮" }, "response-toolbar": { type: "response-toolbar", name: "工具栏" }, "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" }, "content-container": { type: "content-container", name: "容器" }, "input-group": { type: "input-group", name: "文本" }, textarea: { type: "textarea", name: "多行文本" }, lookup: { type: "lookup", name: "帮助" }, "number-spinner": { type: "number-spinner", name: "数值" }, "date-picker": { type: "date-picker", name: "日期" }, switch: { type: "switch", name: "开关" }, "radio-group": { type: "radio-group", name: "单选组" }, "check-box": { type: "check-box", name: "复选框" }, "check-group": { type: "check-group", name: "复选框组" }, "combo-list": { type: "combo-list", name: "下拉列表" }, "response-form": { type: "response-form", name: "卡片面板" }, "response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" }, "response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" }, "tree-grid": { type: "tree-grid", name: "树表格" }, "tree-grid-column": { type: "tree-grid-column", name: "树表格列" }, "data-grid": { type: "data-grid", name: "表格" }, "data-grid-column": { type: "data-grid-column", name: "表格列" }, module: { type: "Module", name: "模块" }, component: { type: "component", name: "组件" }, tabs: { type: "tabs", name: "标签页" }, "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" }, "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" }, "time-picker": { type: "time-picker", name: "时间选择" }, section: { type: "section", name: "分组面板" }, "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" }, "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" }, splitter: { type: "splitter", name: "分栏面板" }, "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" }, "component-ref": { type: "component-ref", name: "组件引用节点" }, uploader: { type: "uploader", name: "附件上传" }, "page-header": { type: "page-header", name: "页头" }, "page-footer": { type: "page-footer", name: "页脚" }, "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" }, fieldset: { type: "fieldset", name: "分组" }, "query-solution": { type: "query-solution", name: "筛选方案" }, drawer: { type: "drawer", name: "抽屉" } }, ki = {}, Ii = {}; Fi(); function st(e, t, n = /* @__PURE__ */ new Map(), o = (i, s, c, p) => s, a = {}, r = (i) => i) { return Tn[t.title] = t, Fn[t.title] = o, ki[t.title] = a, Ii[t.title] = r, (i = {}, s = !0) => { if (!s) return In(i, n); const c = Ti(i, t, n), p = Object.keys(e).reduce((f, d) => (f[d] = e[d].default, f), {}); return Object.assign(p, c); }; } function xt(e, t) { return { customClass: t.class, customStyle: t.style }; } function Ei() { function e(t, n) { const { dataSource: o } = t || {}; return o === void 0 ? {} : {}; } return { resolve: e }; } function Oi() { function e(t, n) { return t.selectItemById(n); } return { selectItemById: e }; } function Mi() { function e(t, n) { const { columns: o } = n; return t.updateColumns(o); } return { updateColumns: e }; } const En = /* @__PURE__ */ new Map([ ["appearance", xt] ]); function On(e, t, n) { return t; } const Vi = "https://json-schema.org/draft/2020-12/schema", Di = "https://farris-design.gitee.io/list-view.schema.json", Bi = "list-view", Ri = "A Farris Component", Ni = "object", $i = { id: { description: "The unique identifier for list-view", type: "string" }, type: { description: "The type string of list-view", type: "string", default: "list-view" }, appearance: { description: "", type: "object", properties: { class: { type: "string" }, style: { type: "string" } }, default: {} }, binding: { description: "", type: "object", default: {} }, disable: { type: "string", default: !1 }, editable: { description: "", type: "boolean", default: !0 }, placeholder: { description: "", type: "string", default: "" }, readonly: { description: "", type: "boolean", default: !1 }, require: { description: "", type: "boolean", default: !1 }, tabindex: { description: "", type: "number", default: -1 }, visible: { description: "", type: "boolean", default: !0 } }, ji = [ "id", "type" ], Pi = { $schema: Vi, $id: Di, title: Bi, description: Ri, type: Ni, properties: $i, required: ji }, Hi = "list-view", Li = "A Farris Component", Wi = "object", Ai = { basic: { description: "Basic Infomation", title: "基本信息", properties: { id: { description: "组件标识", title: "标识", type: "string", readonly: !0 }, type: { description: "组件类型", title: "控件类型", type: "select", editor: { type: "waiting for modification", enum: [] } } } } }, zi = { title: Hi, description: Li, type: Wi, categories: Ai }, Rt = { /** 列集合 */ columns: { type: Array, default: [ { field: "name", title: "", dataType: "string" } ] }, data: { type: Array, default: [] }, draggable: { type: Boolean, default: !1 }, multiSelect: { Type: Boolean, default: !1 }, multiSelectMode: { Type: String, default: "OnCheck" }, idField: { Type: String, default: "id" }, valueField: { Type: String, default: "id" }, textField: { Type: String, default: "name" }, titleField: { Type: String, default: "name" }, view: { Type: String, default: "ContentView" }, size: { Type: String, default: "default" }, placeholder: { type: String, default: "" }, header: { Type: String, default: "ContentHeader" }, headerClass: { Type: String, default: "" }, itemClass: { Type: String, default: "" }, itemContentClass: { Type: String, default: "" }, selectionValues: { type: Array, default: [] }, /** 分组配置 */ group: { type: Object }, /** 选择配置 */ selection: { type: Object, default: { enableSelectRow: !0, multiSelect: !1, multiSelectMode: "DependOnCheck", showCheckbox: !1, showSelectAll: !1, showSelection: !0 } }, keepOrder: { type: Boolean, default: !1 }, disableField: { type: String, default: "disabled" }, // 搜索启用高亮 enableHighlightSearch: { type: Boolean, default: !0 }, /** 虚拟化渲染数据 */ virtualized: { type: Boolean, default: !0 } }, Mn = st(Rt, Pi, En, On, zi); function Vn(e, t) { function n(r) { const i = []; let s = r.nextNode(); for (; s; ) i.push(s), s = r.nextNode(); return i; } function o(r, i) { const s = document.createTreeWalker(r, NodeFilter.SHOW_TEXT); return n(s).map((d) => ({ textNode: d, text: (d.textContent || "").toLocaleLowerCase() })).map(({ textNode: d, text: u }) => { const y = []; let w = 0; for (; w < u.length; ) { const D = u.indexOf(i, w); if (D === -1) break; y.push(D), w = D + i.length; } return y.map((D) => { const x = new Range(); return x.setStart(d, D), x.setEnd(d, D + i.length), x; }); }).flat(); } function a(r) { if (!CSS.highlights || (CSS.highlights.clear(), !r || !t)) return; const i = o(t.value, r.toLocaleLowerCase()), s = new Highlight(...i); CSS.highlights.set("search-result", s); } return { search: a }; } function on(e, t, n, o, a, r, i, s, c, p) { const f = C(e.size), d = C(e.textField), u = C(e.titleField), y = C(e.disableField), w = $(() => { var g, h; return ((g = e.selection) == null ? void 0 : g.multiSelect) && ((h = e.selection) == null ? void 0 : h.showCheckbox); }), { onMouseenterItem: D, onMouseoverItem: x, onMouseoutItem: v } = r, { getKey: b, listViewItemClass: T, onCheckItem: m, onClickItem: F } = i, k = $(() => e.itemClass ? {} : { margin: f.value === "small" ? "0.25rem 0" : "8px 0" }); function l(g, h, E) { return g.checked = s.findIndexInSelectedItems(g) > -1, S("li", { class: T(g, h), id: b(g, h), key: b(g, h), onClick: (_) => F(_, g, h), onMouseenter: (_) => D(_, g, h), onMouseover: (_) => x(_, g, h), onMouseout: (_) => v(_, g, h) }, [w.value && S("div", { class: "f-list-select", onClick: (_) => _.stopPropagation() }, [S(Bt, { id: "list-" + b(g, h), customClass: "listview-checkbox", disabled: g[y.value], checked: g.checked, "onUpdate:checked": (_) => g.checked = _, onChange: (_) => { m(g, h, !_.checked); } }, null)]), S("div", { class: "f-list-content" }, [S("div", { class: e.itemContentClass, style: k.value, title: g.raw[u.value] || g.raw[d.value] }, [g.raw[d.value]])])]); } return { renderItem: l }; } function Gi(e, t, n, o, a, r, i, s, c, p) { const f = C(e.multiSelect), d = C(e.disableField), u = C(e.textField), { onMouseenterItem: y, onMouseoverItem: w, onMouseoutItem: D } = r, { getKey: x, listViewItemClass: v, onCheckItem: b, onClickItem: T } = i; function m(k, l, g) { return t.slots.content ? S(bt, null, [t.slots.content && t.slots.content({ item: k.raw, index: l, selectedItem: g })]) : S("div", { style: "margin: 10px 0;" }, [k.raw[u.value || "name"]]); } function F(k, l, g) { return S("li", { class: v(k, l), id: x(k, l), key: x(k, l), onClick: (h) => T(h, k, l), onMouseenter: (h) => y(h, k, l), onMouseover: (h) => w(h, k, l), onMouseout: (h) => D(h, k, l) }, [f.value && S("div", { class: "f-list-select", onClick: (h) => h.stopPropagation() }, [S(Bt, { id: "list-" + x(k, l), customClass: "listview-checkbox", disabled: k[d.value] || !k.checked, checked: k.checked, "onUpdate:checked": (h) => k.checked = h, onChange: (h) => b(k, l, !h.checked) }, null)]), S("div", { class: "f-list-content" }, [m(k, l, g)])]); } return { renderItem: F }; } function qi(e, t, n, o, a, r, i, s, c, p) { const f = C(e.multiSelect), d = C(e.disableField), u = C(e.textField), { onMouseenterItem: y, onMouseoverItem: w, onMouseoutItem: D } = r, { getKey: x, listViewItemClass: v, onCheckItem: b, onClickItem: T } = i, { dragstart: m, dragenter: F, dragover: k, dragend: l } = o, { removeItem: g } = c, h = $(() => ({ margin: f.value ? "10px 0" : "10px 0px 10px 14px" })); function E(I, O = "") { const M = I.target; M.title = M.scrollWidth > M.clientWidth ? O : ""; } function _(I) { return S("div", { style: h.value, onMouseenter: (O) => E(O, I.raw[u.value || "name"]) }, [I.raw[u.value || "name"]]); } function N() { return t.slots.itemContent ? t.slots.itemContent : _; } const R = N(); function V(I, O, M) { return S("li", { class: v(I, O), id: x(I, O), key: x(I, O), onClick: (B) => T(B, I, O), onMouseenter: (B) => y(B, I, O), onMouseover: (B) => w(B, I, O), onMouseout: (B) => D(B, I, O), draggable: "true", onDragstart: (B) => m(B, I, O), onDragenter: (B) => F(B, O), onDragend: (B) => l(B, I), onDragover: (B) => k(B) }, [f.value && S("div", { class: "f-list-select", onClick: (B) => B.stopPropagation() }, [S(Bt, { id: "list-" + x(I, O), customClass: "listview-checkbox", disabled: I[d.value] || !I.checked, checked: I.checked, "onUpdate:checked": (B) => I.checked = B, onChange: (B) => b(I, O, !B.checked) }, null)]), S("div", { class: "f-list-content" }, [R(I)]), S("div", { class: "f-list-remove", onClick: (B) => g(O) }, [S("div", { class: "f-list-remove-icon" }, [S("i", { class: "f-icon f-icon-remove_face" }, null)])]), S("div", { class: "f-list-handle" }, [S("div", null, [S("i", { class: "f-icon f-icon-drag-vertical" }, null)])])]); } return { renderItem: V }; } function Ui(e, t, n, o, a, r, i, s, c, p) { var D; const f = C(((D = e.group) == null ? void 0 : D.groupFields) || []), { collpaseGroupIconClass: d } = a, { toggleGroupRow: u } = p; function y(x, v) { v.collapse = !v.collapse, n.value = u(v.collapse ? "collapse" : "expand", v, n.value); } function w(x, v, b) { return x.layer > -1 && S("div", { class: "f-navlookup-recentHeader", onClick: (T) => y(T, x) }, [S("div", { class: "fv-grid-group-row-icon" }, [S("span", { class: d(x) }, null)]), S("div", { class: "f-navlookup-recommandLabel" }, [x.raw[f.value[x.layer]]])]); } return { renderItem: w }; } function Yi(e, t, n, o) { const { dataView: a } = n, { updateSelectedItems: r } = o; function i(s) { if (s > -1 && s < a.value.length) { const c = a.value.splice(s, 1); r(), t.emit("removeItem", c[0]); } } return { removeItem: i }; } function Dn(e, t, n, o, a, r, i, s, c, p) { const f = C(e.view), d = C(e.view === "CardView"), u = C({}), y = C("暂无数据"), w = Yi(e, t, o, c), D = $(() => ({ "f-list-view-group": !0, "f-list-view-group-multiselect": e.multiSelect, "d-flex": d.value, "flex-wrap": d.value })), x = $(() => !!n.value && n.value.length > 0), v = $(() => n.value.length === 0); $(() => v.value && !t.slots.empty); function b() { return f.value === "SingleView" ? on : f.value === "DraggableView" ? qi : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? Gi : on; } const T = b(), { renderItem: m } = T(e, t, n, p, a, r, c, i, w, s), { renderItem: F } = Ui(e, t, n, p, a, r, c, i, w, s), k = [m, F]; function l() { return n.value.filter((E) => E.visible !== !1).map((E, _) => k[E.type](E, _, u)); } function g() { return S("div", { class: "f-list-view-emptydata" }, [S("p", { class: "f-empty-title" }, [t.slots.empty ? t.slots.empty() : y.value])]); } function h() { return S("ul", { class: D.value, style: "list-style: none;" }, [x.value && l(), v.value && g()]); } return { renderListArea: h }; } function Bn(e, t, n) { function o() { return t.slots.header && S("div", { class: "f-list-view-header" }, [t.slots.header()]); } return { renderHeader: o }; } function Et(e, t, n) { const o = C(e.headerClass), a = C(e.placeholder), r = C(""), i = $(() => !r.value), s = $(() => !!r.value); function c(u) { r.value = ""; } _e(r, (u) => { e.enableHighlightSearch && n.search(u), t.emit("afterSearch", u); }); const p = $(() => { const u = { "form-group": !0, "farris-form-group": !0 }; return o.value && o.value.split(" ").reduce((w, D) => (w[D] = !0, w), u), u; }); function f(u) { } function d() { return S("div", { class: "f-list-view-header", onClick: ko(() => f, ["prevent", "stop"]) }, [S("div", { class: p.value }, [S("div", { class: "farris-input-wrap" }, [S("div", { class: "f-cmp-inputgroup" }, [S("div", { class: "input-group f-state-editable" }, [sn(S("input", { class: "form-control f-utils-fill text-left", "onUpdate:modelValue": (u) => r.value = u, name: "input-group-value", type: "text", placeholder: a.value, autocomplete: "off" }, null), [[Io, r.value]]), S("div", { class: "input-group-append" }, [s.value && S("span", { class: "input-group-text input-group-clear", onClick: (u) => c() }, [S("i", { class: "f-icon f-icon-close-circle" }, null)]), i.value && S("span", { class: "input-group-text" }, [S("span", { class: "f-icon f-icon-search" }, null)])])])])])])]); } return { renderHeader: d }; } function Rn() { const e = C(""), t = C(-1), n = C(""), o = C(-1), a = C(!1); function r(d, u, y) { o.value = y; } function i(d, u, y) { a.value || (o.value = y); } function s(d, u, y) { o.value = -1; } function c() { a.value = !0; } function p() { a.value = !1; } function f() { t.value = -1, e.value = ""; } return { activeIndex: t, focusedItemId: n, hoverIndex: o, clearActiveItem: f, onMouseenterItem: r, onMouseoverItem: i, onMouseoutItem: s, resumeHover: p, suspendHover: c }; } function Nn(e, t, n, o) { const a = C(e.idField), { dataView: r } = n, i = C(-1), s = C(!1), { activeIndex: c, focusedItemId: p, hoverIndex: f, resumeHover: d, suspendHover: u } = o; let y, w = 0, D = 0; function x(k, l) { const g = k - w, h = l - D; y.style.left = parseInt(y.style.left) + g + "px", y.style.top = parseInt(y.style.top) + h + "px", w = k, D = l; } function v(k) { const { left: l, top: g } = k.getBoundingClientRect(), h = k.cloneNode(!0); return h.style.cssText = ` position:absolute; left:${l}px; top:${g}px; z-index: 999999; border: 1px solid #e2e3e5; pointer-events: none; background-color: #edf5ff; border-radius: 10px; margin: 4px 2px; display: flex; align-items: center; float: none; text-align: initial; width:${getComputedStyle(k).width}; height:${getComputedStyle(k).height}; `, h.children[0].style.cssText = "flex: 1 1 auto;width: 100%;", h.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", h.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(h), h; } function b(k, l, g) { if (k.stopPropagation(), u(), l) { if (y = v(k.target), k.dataTransfer) { const h = new Image(); h.src = "", k.dataTransfer.setDragImage(h, 0, 0); } w = k.pageX, D = k.pageY, setTimeout(() => { i.value = g, s.value = !0, l.moving = !0; }); } } function T(k, l) { if (k.preventDefault(), i.value !== l) { const g = r.value[i.value], h = r.value; h.splice(i.value, 1), h.splice(l, 0, g), i.value = l, x(k.pageX, k.pageY); } } function m(k) { k.preventDefault(), k.dataTransfer && (k.dataTransfer.dropEffect = "move"), x(k.pageX, k.pageY); } function F(k, l) { l && (l.moving = !1, y && (document.body.removeChild(y), y = null)), r.value.forEach((g, h) => { g.__fv_index__ = h; }), s.value = !1, d(), f.value = l.raw.__fv_index__, c.value = l.raw.__fv_index__, p.value = l.raw[a.value], t.emit("change", r.value), t.emit("activeChange", [l.raw]); } return { dragstart: b, dragenter: T, dragover: m, dragend: F, isDragging: s }; } function $n(e, t, n, o, a, r) { const i = C(e.idField), s = C(e.disableField), c = C(e.draggable), p = C(e.itemClass), f = C(e.selection.multiSelect ?? !1), d = C(e.selection.multiSelectMode), { isDragging: u } = o, { activeIndex: y, focusedItemId: w, hoverIndex: D } = a, { clearSelection: x, getSelectedItems: v, toggleSelectItem: b, currentSelectedDataId: T } = r, m = C(v()), F = (V) => m.value.length === 0 ? !1 : m.value.some((I) => { let O = ""; return I.data ? O = I.data[i.value] : O = I[i.value], O === V; }); function k() { m.value = v(); } function l(V, I) { return V.raw[i.value] != null ? V.raw[i.value] : ""; } function g(V, I) { const O = { "f-list-view-group-item": !0, "f-list-view-draggable-item": c.value, "f-un-click": !V.checked, "f-un-select": !!V.raw[s.value], "f-listview-active": ( // 多选 f.value && F(l(V)) || // 单选 V.raw[i.value] === T.value ), "f-listview-hover": !u.value && I === D.value, moving: !!V.moving }; return p.value.split(" ").reduce((B, W) => (B[W] = !0, B), O), O; } const h = $(() => !f.value); function E(V, I, O) { V.checked = O, !V.raw[s.value] && (h.value && (w.value = V.raw[i.value]), b(V)); } const _ = $(() => f.value && d.value === "OnCheckClearByClick"), N = $(() => !f.value || f.value && (d.value === "OnCheckAndClick" || d.value === "OnClick")); function R(V, I, O) { if (I.raw[s.value]) { V.preventDefault(), V.stopPropagation(); return; } w.value = I.raw[i.value], y.value = O, _.value && x(), N.value && (b(I), k()), t.emit("clickItem", { data: m.value, index: O }), t.emit("activeChange", m.value); } return { getKey: l, selectedItems: m, listViewItemClass: g, updateSelectedItems: k, onCheckItem: E, onClickItem: R }; } const wt = /* @__PURE__ */ $e({ name: "FListView", props: Rt, emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"], setup(e, t) { const n = C(), o = C(!0), a = C(!1), r = C([]), i = 0, s = C(e.columns), c = fn(), p = pn(e), f = mn(e), d = vn(e, p), u = hn(e, /* @__PURE__ */ new Map(), c, f, p), y = gn(e, u, p, r, t), w = Vn(e, n), D = $(() => u.dataView.value.length), x = yn(e, t, y, p), v = bn(e, t, p, x), b = Cn(e), T = wn(e, {}, b), m = _n(e, u, v, f, p, b, T), F = jo(e, p, T, m), k = Po(e, p, T, m), l = Sn(e, s, u, D, i, m, F, k), { getVisualData: g } = l; r.value = g(0, D.value + i - 1); const h = $(() => { const A = { "f-list-view": !0, "f-list-view-multiple": e.multiSelect }; return e.size !== "default" && (A[`${e.size}-item`] = !0), A; }), E = $(() => !!t.slots.footer || o.value); function _() { return e.header === "SearchBar" ? Et : e.header === "ContentHeader" ? Bn : Et; } const N = _(), { renderHeader: R } = N(e, t, w), V = Rn(), I = Nn(e, t, u, V), O = $n(e, t, r, I, V, y), { renderListArea: M } = Dn(e, t, r, u, d, V, y, l, O, I); function B(A) { w.search(A); } function W(A) { A && (u.load(A), r.value = g(0, D.value + i - 1)); } function K() { y.clearSelection(), V.clearActiveItem(); } function te() { return O.selectedItems.value; } function Y() { return O.selectedItems.value.map((A) => A[p.idField.value]); } function pe(A) { y.selectedValues.value = A, O.updateSelectedItems(); } function L() { return y.currentSelectedDataId.value; } function H(A) { x.activeRowById(A); } t.expose({ search: B, updateDataSource: W, clearSelection: K, getSelections: te, updateSelectionByIds: pe, getSelectionIds: Y, activeRowById: H, getCurrentRowId: L }); function z(A) { e.multiSelect && (A.preventDefault(), A.stopPropagation()); } return () => S("div", { class: h.value, onClick: z }, [R(), S("div", { ref: n, class: "f-list-view-content", onMouseover: () => { a.value = !0; }, onMouseleave: () => { a.value = !1; } }, [M()]), E.value && S("div", { class: "f-list-view-footer" }, [t.slots.footer && t.slots.footer()])]); } }); function Kt(e, t, n) { var k; const o = n && n.getStyles && n.getStyles() || "", a = n && n.getDesignerClass && n.getDesignerClass() || "", r = C(); function i() { return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0; } function s() { return !1; } function c() { return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0; } function p() { return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1; } function f(l) { if (!l || !l.value) return null; if (l.value.schema && l.value.schema.type === "component") return l.value; const g = C(l == null ? void 0 : l.value.parent), h = f(g); return h || null; } function d(l = t) { var _; if (n != null && n.getDraggableDesignItemElement) return n.getDraggableDesignItemElement(l); const { componentInstance: g, designerItemElementRef: h } = l; if (!g || !g.value) return null; const { getCustomButtons: E } = g.value; return g.value.canMove || E && ((_ = E()) != null && _.length) ? h : d(l.parent); } function u(l) { return !!n && n.canAccepts(l); } function y() { return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name); } function w() { } function D(l, g) { var h; !l || !g || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(l, g), (h = t == null ? void 0 : t.setupContext) == null || h.emit("dragEnd")); } function x(l, g) { const { componentType: h } = l; let E = kn(h, l, g); n && n.onResolveNewComponentSchema && (E = n.onResolveNewComponentSchema(l, E)); const _ = h.toLowerCase().replace(/-/g, "_"); return E && !E.id && E.type === h && (E.id = `${_}_${Math.random().toString().slice(2, 6)}`), E; } function v(l) { l && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(l); } function b(...l) { if (n && n.getPropsConfig) return n.getPropsConfig(...l); } function T() { n && n.onRemoveComponent && n.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((l) => { let g = l.id; l.type === "component-ref" && (g = l.component); const h = e.value.querySelectorAll(`#${g}-design-item`); h != null && h.length && Array.from(h).map((E) => { var _; (_ = E == null ? void 0 : E.componentInstance) != null && _.value.onRemoveComponent && E.componentInstance.value.onRemoveComponent(); }); }); } function m() { if (n && n.getCustomButtons) return n.getCustomButtons(); } function F(l) { if (n && n.onPropertyChanged) return n.onPropertyChanged(l); } return r.value = { canMove: i(), canSelectParent: s(), canDelete: c(), canNested: !p(), contents: t == null ? void 0 : t.schema.contents, elementRef: e, parent: (k = t == null ? void 0 : t.parent) == null ? void 0 : k.componentInstance, schema: t == null ? void 0 : t.schema, styles: o, designerClass: a, canAccepts: u, getBelongedComponentInstance: f, getDraggableDesignItemElement: d, getDraggingDisplayText: y, getPropConfig: b, getDragScopeElement: w, onAcceptMovedChildElement: D, onChildElementMovedOut: v, addNewChildComponentSchema: x, triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1), triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1), onRemoveComponent: T, getCustomButtons: m, onPropertyChanged: F }, r; } var Ne = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(Ne || {}), at = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(at || {}), yt = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(yt || {}), Le = /* @__PURE__ */ ((e) => (e[e.none = 0] = "none", e[e.filterable = 1] = "filterable", e[e.sortable = 2] = "sortable", e[e.filtered = 4] = "filtered", e[e.sorted = 8] = "sorted", e[e.ascending = 16] = "ascending", e[e.descending = 32] = "descending", e))(Le || {}); function Xi(e, t) { var y; const n = String(Date.now()), o = ((y = e.rowOption) == null ? void 0 : y.height) || 28, a = C(t.value.primaryColumnsWidth); function r(w) { const D = {}; return w.reduce( (x, v, b) => { const T = b < w.length - 1 ? w[b + 1] : null; return b === 0 && (x[v.field] = { left: 0 }), v.actualWidth !== void 0 && (x[v.field].width = v.actualWidth), T && (x[T.field] = { left: x[v.field].left + (v.actualWidth || 0) }), x; }, D ), D; } function i(w, D, x) { const v = o * (x + 1), T = D[w.field].left - v + (D[w.field].width || 0), m = w.parent.height ? `${w.parent.height}px` : ""; return { left: `${v}px`, width: `${T}px`, height: `${m}` }; } function s(w, D, x) { return { right: "0px", height: `${w.parent.height ? `${w.parent.height}px` : ""}` }; } function c(w, D) { const x = w.parent.height ? `${w.parent.height}px` : ""; return { left: `${D[w.field].left}px`, height: `${x}`, width: isNaN(Number(D[w.field].width)) ? "100%" : `${D[w.field].width}px` }; } function p(w, D, x) { const b = (D.spanned || []).reduce((m, F) => m + (F.parent.height || 0), 0) + (w.height || 0); return { top: `${w.top}px`, left: `${x[D.field].left}px`, width: `${x[D.field].width}px`, height: `${b}px`, padding: `calc(${b / 2}px - 1rem) 0` // height: `calc(${rowHeight}px * ${cell.rowSpan})`, // padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0` }; } function f(w, D) { return `${n}_${w.type}_r_${w.index}_c_${D}_${w.refreshKey || ""}`; } function d(w) { return `${n}_${w.type}_r_${w.index}_${w.refreshKey || ""}`; } function u(w) { const D = w.height ? `${w.height}px` : ""; return { top: `${w.top}px`, width: isNaN(a.value) ? "100%" : `${a.value}px`, height: `${D}` }; } return _e(t, () => { a.value = t.value.primaryColumnsWidth; }), { calculateCellPositionInRow: r, cellKey: f, cellPosition: c, groupCellPosition: i, rowKey: d, rowPosition: u, rowSpanCellPosition: p, summaryCellPosition: s }; } function Ki(e, t, n) { const { hasChildrenField: o } = n, a = C("#9399a0"), r = C(28); function i() { return [].concat( ...t.value.filter((u) => u.raw.__fv_descendant_index__.length !== 0).map((u) => [...u.raw.__fv_descendant_index__.slice(-1)]).flat() ).sort((u, y) => Number(u) - Number(y)); } function s(f) { const d = new Array(t.value.length).fill(0); if (e.showLines) { const u = i(); t.value.forEach((y, w) => { const D = u.includes(w), x = y.raw[o.value]; d[w] = `repeating-linear-gradient(90deg, ${a.value} 0 1px, transparent 0px 2px) ${x ? "-10px" : "0px"} ${r.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${a.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${D ? "50%" : "100%"} no-repeat`; }), d[0] = ""; } return d[f]; } function c(f, d, u) { return u[f].parents.set(f, !0).forEach((w) => { u[w].childsLength = u[w].childWithLines.filter((D) => d[D].visible).length; }), d; } function p(f) { const y = f.raw.__fv_parent_index__ === void 0 || f.raw.__fv_parent_index__ === -1 ? 0 : 8, w = 0, D = f.raw[o.value], x = f.visible ? { left: `${f.layer * 10 + f.layer * y + w}px`, // paddingBottom: handlePaddingBottomReturnValue(visualTreeNode.index), background: s(f.index), display: "flex", width: "100%", position: "relative", paddingLeft: "0.75rem" } : { display: "none" }; return D || (x.paddingLeft = "2rem"), x; } return { hierarchyCellContentStyle: p, handleCollapsedPaddingBottom: c }; } function Qi(e, t, n) { const o = C(e.iconField); function a(r, i) { if (o.value) return r.raw[e.iconField]; let s = ""; return r.raw[n.value] !== !0 ? s = t.value.leafnodes : s = r.collapse ? t.value.fold : t.value.unfold, s; } return { treeNodeIconsClass: a }; } function Ji(e, t, n, o, a, r, i, s) { const { dataView: c, fold: p, hasRealChildren: f, unFold: d, reOrderVisibleIndex: u } = o, { collapseField: y, hasChildrenField: w } = a, { reCalculateVisualDataRows: D, updateVirticalScroll: x } = r; function v(b) { if (b.raw[w.value]) { const m = c.value[b.raw.__fv_index__]; m[y.value] = !m[y.value], o.toggleChildrenVisibiltyByCollapseStatus(m), m[w.value] = f(m), u(), D(), x(); } t.emit("expandNode", { row: b }); } return { toggleTreeNode: v }; } function Zi(e) { function t(a) { return {}; } function n(a) { const { valign: r, align: i } = a; return { "d-flex": !0, "h-100": !0, "w-100": !0, "justify-content-start": i !== "center" && i !== "right", "justify-content-center": i === "center", "justify-content-right": i === "right", "align-items-start": r !== "middle" && r !== "bottom", "align-items-center": r === "middle", "align-items-end": r === "bottom" }; } function o(a) { const { align: r, showEllipsis: i } = a; return { "w-100": !0, "text-left": r !== "center" && r !== "right", "text-center": r === "center", "text-right": r === "right", "text-truncate": i }; } return { cellContentPosition: t, cellContentClass: n, cellContentClassWithEllipsis: o }; } function er(e, t, n, o, a, r, i, s, c, p, f, d, u) { const { onClickCell: y } = r, { gridRowClass: w, onClickRow: D, onMouseoverRow: x, onMouseoutRow: v } = s, { enableMultiSelect: b, select: T, unSelect: m, selectItem: F } = c; C(e.cellHeight); const k = C(e.treeNodeIconsData || {}), { hasChildrenField: l, shouldShowCheckBox: g, shouldShowIcon: h } = i, { toggleTreeNode: E } = Ji(e, t, o, a, i, f), { toggleSelectHierarchyItem: _ } = p, { cellKey: N, cellPosition: R, rowKey: V, rowPosition: I } = Xi(e, n), { cellContentClass: O, cellContentPosition: M, cellContentClassWithEllipsis: B } = Zi(), { hierarchyCellContentStyle: W } = Ki(e, o, i), { treeNodeIconsClass: K } = Qi(e, k, l); function te(Z, ee) { const xe = Z.raw[l.value]; return { "fv-tree-node-toggle": xe && Z.collapse, "fv-tree-node-toggle-minus": xe && !Z.collapse }; } function Y(Z, ee) { Z.stopPropagation(), E(ee); } function pe(Z, ee) { return S("div", { class: te(Z), onClick: (xe) => Y(xe, Z) }, null); } function L(Z, ee) { return h.value && S("div", { id: "treeNodeIcons", class: K(Z, ee) }, null); } function H(Z) { b.value ? (Z.checked ? T(Z) : m(Z), _(Z)) : F(Z); } function z(Z, ee) { return g.value && S(Bt, { id: "checkbox_for_" + N(Z, ee.index), indeterminate: Z.indeterminate, disabled: Z.disabled, checked: Z.checked, "onUpdate:checked": (xe) => Z.checked = xe, onChange: () => H(Z) }, null); } function A(Z, ee) { return S("span", { title: ee.data, style: "user-select:none" }, [t.slots.cellTemplate ? t.slots.cellTemplate({ cell: ee, row: Z }) : ee.mode === Ne.editing ? ee.getEditor(ee) : ee.formatter ? ee.formatter(ee, Z) : ee.data != null ? ee.data.toString() : ee.data]); } function J(Z, ee) { return S("div", { class: O(ee), style: M(ee) }, [S("div", { class: B(ee) }, [ee.showTips ? S(nn, null, { default: () => A(Z, ee), contentTemplate: () => A(Z, ee) }) : A(Z, ee)])]); } function X(Z, ee, xe) { return S("div", { ref: ee.setRef, key: N(Z, ee.index), class: "fv-grid-hierarchy-cell", style: R(ee, xe) }, [S("div", { style: W(Z) }, [pe(Z), L(Z, ee), z(Z, ee), J(Z, ee)])]); } function j(Z, ee, xe) { return S("div", { ref: ee.setRef, key: N(Z, ee.index), class: "fv-grid-cell", style: R(ee, xe), onClick: (Fe) => y(Fe, ee, Z, ee.column) }, [S("div", { class: O(ee), style: M(ee) }, [S("div", { class: B(ee) }, [ee.showTips ? S(nn, null, { default: () => A(Z, ee), contentTemplate: () => A(Z, ee) }) : A(Z, ee)])])]); } function q(Z, ee) { return ee === "left" && n.value.leftColumns.length > 0 && n.value.leftColumns[0].field === Z.field || ee === "primary" && n.value.primaryColumns.length > 0 && n.value.primaryColumns[0].field === Z.field; } function ie(Z, ee, xe = "primary", Fe) { return S("div", { ref: Z.setRef, key: V(Z), class: w(Z, Fe), style: I(Z), onMouseover: (Te) => x(Te, Z), onMouseout: (Te) => v(Te, Z), onClick: (Te) => D(Te, Z) }, [Object.values(Z.data).filter((Te) => ee[Te.field] && Te.rowSpan === 1).map((Te) => q(Te, xe) ? X(Z, Te, ee) : j(Z, Te, ee))]); } return { renderDataRow: ie }; } function tr(e, t, n) { const { horizontalScrollThumbStyle: o, onMouseDownScrollThumb: a, shouldShowHorizontalScrollbar: r } = n; function i() { return r.value && S("div", { class: "fv-grid-horizontal-scroll" }, [S("div", { class: "fv-grid-horizontal-scroll-thumb", style: o.value, onMousedown: (s) => a(s, t, "horizontal") }, null)]); } return { renderHorizontalScrollbar: i }; } function nr() { function e(o, a) { switch (o.command) { case "edit": case "remove": return a.status === at.initial; case "accept": case "cancel": return a.status === at.editing; default: return !o.hidden; } } function t(o, a, r) { switch (o.onClick(a, r.dataIndex, r), o.command) { case "edit": r.status, at.editing; break; case "accept": case "cancel": r.status, at.initial; break; } } function n(o, a) { return o.commands && o.commands.map((r) => e(r, a) && S(fa, { class: "ml-2", type: r.type, size: r.size || "small", onClick: (i) => t(r, i, a), style: { "margin-bottom": "3px" } }, { default: () => [Ze(" "), r.text, Ze(" ")] })); } return { renderCommandColumn: n }; } function or(e) { const t = C(e.minHeight), n = C(e.minWidth), o = C(e.height), a = C(e.width), r = $(() => o.value <= 0 ? 0 : Math.max(o.value, t.value)), i = $(() => a.value <= 0 ? 0 : Math.max(a.value, n.value)); return _e([ () => e.height, () => e.width, () => e.minHeight, () => e.minWidth ], ([c, p, f, d]) => { t.value = Number(f), n.value = Number(d), o.value = Number(c), a.value = Number(p); }), { containerStyleObject: $(() => ({ height: r.value > 0 ? `${r.value}px` : e.fit ? "100%" : "", width: i.value > 0 ? `${i.value}px` : e.fit ? "100%" : "", flex: "1 1 0" })) }; } const ar = ""; function ir(e) { const o = C({ defaultColumnWidth: 120, headerDepth: 1, leftColumns: [], leftColumnsMap: /* @__PURE__ */ new Map(), leftColumnsWidth: 0, leftHeaderColumns: [], primaryColumns: [], primaryColumnsMap: /* @__PURE__ */ new Map(), primaryColumnsWidth: 0, primaryHeaderColumns: [], rightColumns: [], rightColumnsMap: /* @__PURE__ */ new Map(), rightColumnsWidth: 0, rightHeaderColumns: [], summaryColumns: [] }); function a() { o.value = { defaultColumnWidth: 120, headerDepth: 1, leftColumns: [], leftColumnsMap: /* @__PURE__ */ new Map(), leftColumnsWidth: 0, leftHeaderColumns: [], primaryColumns: [], primaryColumnsMap: /* @__PURE__ */ new Map(), primaryColumnsWidth: 0, primaryHeaderColumns: [], rightColumns: [], rightColumnsMap: /* @__PURE__ */ new Map(), rightColumnsWidth: 0, rightHeaderColumns: [], summaryColumns: [] }; } const r = C(e.summary), i = $(() => { const T = r.value; return (T == null ? void 0 : T.groupFields) || []; }); function s() { o.value.rightColumns.forEach((F) => { F.showSetting = !1; }), o.value.primaryColumns.forEach((F) => { F.showSetting = !1; }); const T = o.value.rightColumns.filter((F) => F.visible), m = o.value.primaryColumns.filter((F) => F.visible); T.length > 0 ? T[T.length - 1].showSetting = !0 : m.length > 0 && (m[m.length - 1].showSetting = !0); } function c(T) { a(); const m = /* @__PURE__ */ new Map(); return i.value && i.value.reduce((F, k) => (F.set(k, !0), F), m), T.reduce((F, k) => (k.visible = k.visible !== !1, k.filter = k.filter || ar, k.fixed === "left" ? (o.value.leftColumns.push(k), o.value.leftColumnsMap.set(k.field, k), o.value.leftColumnsWidth += k.actualWidth) : k.fixed === "right" ? (o.value.rightColumns.push(k), o.value.rightColumnsMap.set(k.field, k), o.value.rightColumnsWidth += k.actualWidth) : (o.value.primaryColumns.push(k), o.value.primaryColumnsMap.set(k.field, k), o.value.primaryColumnsWidth += k.actualWidth), m.has(k.field) && o.value.summaryColumns.push(k), F), o), s(), o; } c(e.columns); const p = $(() => o.value.leftColumns.length > 0), f = $(() => o.value.rightColumns.length > 0); function d(T, m) { return