UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,180 lines (1,179 loc) 1.91 MB
var Rg = Object.defineProperty; var $g = (e, t, n) => t in e ? Rg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var z = (e, t, n) => $g(e, typeof t != "symbol" ? t + "" : t, n); import { excludeProperties as Lg, useNumberFormat as jl, getCustomClass as Ct, FormSchemaEntityField$Type as Hn, FormSchemaEntityFieldType$Type as Ba, withInstall as Ot, isMobilePhone as Dn, getMaxZIndex as ri, useGuid as pn, resolveField as dt, useDateFormat as zn, useResizeObserver as Ju, getCustomStyle as dn, CHECKBOX_CONTEXT as Fs, useCheck as Ms, radioCheckboxCommonProps as kd, useThirdComponent as Fd, FormSchemaEntityFieldTypeName as An, useCommonUtils as To, formatTime as Ng, useTextBox as Md, useClear as Pd, encrypt as jg, useDelayedRef as _g, RADIOGROUP_CONTEXT as Ed, useReqAnimationFrame as Hg, setFieldValue as Rr } from "../../components/common/index.esm.js"; import Id, { FDataGrid as _l, dataGridProps as Od } from "../../components/data-grid/index.esm.js"; import { resolveAppearance as xt, createPropsResolver as at, getPropsResolverGenerator as vn, getSchemaByTypeForDesigner as Wg, schemaResolverMap as zg, propertyEffectMap as qg, propertyConfigSchemaMap as Ug, schemaMap as Gg, getSchemaByType as si, resolveToolbar as Yg, createPageHeaderEventHandlerResolver as Qg, createEventsResolver as Bd, createFormBindingResolver as Xg, createCollectionBindingResolver as Kg, createDataGridSelectionItemResolver as Jg, createDataViewUpdateColumnsResolver as Zg } from "../../components/dynamic-resolver/index.esm.js"; import { ref as b, computed as D, watch as Z, createVNode as p, createTextVNode as Pe, defineComponent as ge, provide as Zt, inject as Ee, onMounted as je, nextTick as yt, Fragment as vt, Teleport as qa, createApp as mi, onUnmounted as ln, onBeforeMount as hi, watchEffect as Ps, Transition as cl, shallowRef as Qi, render as gr, h as ev, cloneVNode as tv, mergeProps as sn, withDirectives as zt, vShow as ya, onUpdated as nv, onBeforeUnmount as Vd, withModifiers as Yt, vModelText as Ua, reactive as It, resolveDirective as Nn, isVNode as Ga, Comment as Ad, getCurrentInstance as Hl, resolveComponent as Qn, toRefs as gi, toRaw as av, vModelCheckbox as Dd } from "vue"; import { isPlainObject as Zu, cloneDeep as ht, debounce as vi, isFunction as vr, isUndefined as _n, mergeWith as Es, merge as ui, isNil as ov, isNaN as iv, flatten as lv, throttle as $r, get as Oa, isEmpty as rv } from "lodash-es"; import { useResizeObserver as Wl } from "@vueuse/core"; import { FNotifyService as Ya, F_NOTIFY_SERVICE_TOKEN as yi } from "../../components/notify/index.esm.js"; import { FCheckbox as Is } from "../../components/checkbox/index.esm.js"; import ko from "../../components/popover/index.esm.js"; import { LocaleService as st } from "../../components/locale/index.esm.js"; import { F_MODAL_SERVICE_TOKEN as Rd } from "../../components/modal/index.esm.js"; import sv from "../../components/transfer/index.esm.js"; import uv, { FTabPage as cv } from "../../components/tabs/index.esm.js"; import dv from "../../components/filter-bar/index.esm.js"; import $d from "../../components/pagination/index.esm.js"; import { useFilter as bi, useIdentify as Ci, useHierarchy as wi, useGroupData as Os, useDataView as Si, useSelection as xi, usePagination as Bs, useRow as Ti, useEdit as ki, useVisualDataBound as Fi, useVisualDataCell as Mi, useVisualDataRow as Pi, useVisualGroupRow as Ld, useVisualSummaryRow as Nd, useVisualData as Ei, useSidebar as zl, useColumn as Ii, useVirtualScroll as Oi, getHierarchyRow as jd, useLoading as _d, useSelectHierarchyItem as Vs, useDataViewContainerStyle as ql, useCommandColumn as Hd, useSettingColumn as Wd, useSort as zd, useGroupColumn as As, useCellPosition as Ul, useFitColumn as Ds, useFilterHistory as qd, useColumnFilter as Ud, useDragColumn as Gd, getColumnHeader as Yd, getSidebar as Rs, getDisableMask as Qd, getHorizontalScrollbar as $s, getVerticalScrollbar as Ls, getEmpty as Ns, getPagination as Xd, getSummary as Kd, ColumnSettingSolution as Jd, COMMAND_COLUMN_DATA_TYPE as ia, SETTING_COLUMN_DATA_TYPE as la, SETTING_COLUMN_FIELD as fv, COMMAND_COLUMN_FIELD as pv, CellMode as Zd, useMobile as ef, useCellContentStyle as mv, getFilterPanel as hv, getGroupPanel as gv, useNavigation as vv, GridFieldEditorUsage as lo } from "../../components/data-view/index.esm.js"; import Co, { FButton as yv } from "../../components/button/index.esm.js"; import tf from "../../components/button-group/index.esm.js"; import bv from "../../components/drawer/index.esm.js"; import "../../components/switch/index.esm.js"; import Cv from "../../components/language-textbox/index.esm.js"; import wv, { radioGroupProps as Sv } from "../../components/radio-group/index.esm.js"; import nf from "../../components/list-view/index.esm.js"; import { useDesignerComponent as Xt, DgControl as Ie, canvasChanged as ai, refreshCanvas as xv, setPositionOfButtonGroup as Tv, useDragulaCommonRule as af, UseTemplateDragAndDropRules as of, FDesignerItem as kv } from "../../components/designer-canvas/index.esm.js"; import lf from "../../components/color-picker/index.esm.js"; import dl, { useDataSource as Fv, FComboListContainer as Mv, FComboList as Fo } from "../../components/combo-list/index.esm.js"; import rf, { useNumber as Pv, useFormat as Ev, useSpinner as Iv, useTextBox as Ov, getSpinnerRender as Bv, getNumberTextBoxRender as Vv, useNumberLocales as Av, FNumberSpinner as Dv } from "../../components/number-spinner/index.esm.js"; import { BaseControlProperty as js, InputBaseProperty as na, ExpressionProperty as Rv, FormBindingType as Wi, SchemaDOMMapping as $v } from "../../components/property-panel/index.esm.js"; import Lv from "../../components/tags/index.esm.js"; import wa, { FButtonEdit as Gl } from "../../components/button-edit/index.esm.js"; import _s from "../button-edit/index.esm.js"; import Ra from "../../components/tree-view/index.esm.js"; import sf, { FInputGroup as fl } from "../../components/input-group/index.esm.js"; import Nv from "../../components/binding-selector/index.esm.js"; import jv from "../../components/accordion/index.esm.js"; import _v from "../../components/avatar/index.esm.js"; import Hv from "../../components/calendar/index.esm.js"; import Wv from "../capsule/index.esm.js"; import ec from "../checkbox/index.esm.js"; import tc from "../checkbox-group/index.esm.js"; import zv from "../../components/content-container/index.esm.js"; import qv from "../data-grid/index.esm.js"; import Uv from "../date-picker/index.esm.js"; import Gv from "../../components/dropdown/index.esm.js"; import Yv from "../dynamic-form/index.esm.js"; import Qv from "../../components/external-container/index.esm.js"; import Xv from "../../components/image-cropper/index.esm.js"; import Kv from "../input-group/index.esm.js"; import Hs, { FLayout as Jv, FLayoutPane as wo } from "../../components/layout/index.esm.js"; import Zv from "../../components/list-nav/index.esm.js"; import ey from "../list-view/index.esm.js"; import ty from "../../components/lookup/index.esm.js"; import ny from "../../components/nav/index.esm.js"; import ay from "../number-spinner/index.esm.js"; import oy from "../../components/number-range/index.esm.js"; import iy from "../../components/order/index.esm.js"; import ly from "../../components/page-header/index.esm.js"; import ry from "../../components/page-footer/index.esm.js"; import sy from "../../components/progress/index.esm.js"; import uy, { useCondition as cy, useSolutionUtils as uf } from "../../components/query-solution/index.esm.js"; import dy from "../radio-group/index.esm.js"; import fy from "../rate/index.esm.js"; import py from "../response-toolbar/index.esm.js"; import my from "../../components/response-layout/index.esm.js"; import hy from "../response-layout-editor/index.esm.js"; import gy from "../../components/search-box/index.esm.js"; import vy from "../section/index.esm.js"; import yy from "../../components/smoke-detector/index.esm.js"; import by from "../../components/splitter/index.esm.js"; import Cy from "../../components/step/index.esm.js"; import wy from "../switch/index.esm.js"; import Sy from "../tabs/index.esm.js"; import xy from "../tags/index.esm.js"; import Ty from "../../components/text/index.esm.js"; import ky from "../time-picker/index.esm.js"; import Fy from "../../components/uploader/index.esm.js"; import My from "../../components/verify-detail/index.esm.js"; import Py from "../../components/component/index.esm.js"; import Ey from "../../components/video/index.esm.js"; import Iy from "../textarea/index.esm.js"; import Oy from "../tree-grid/index.esm.js"; import By from "../../components/fieldset/index.esm.js"; import Vy from "../drawer/index.esm.js"; import Ay from "../../components/html-template/index.esm.js"; import Dy from "../../components/image/index.esm.js"; import Ry from "../../components/comment/index.esm.js"; import { loadRegister as $y, useComponentManager as Ly, useBindingData as Ny, useEntityState as jy, useDynamicViewUtils as _y, componentMap as yr, resolverMap as Hy, componentPropsConverter as Wy } from "../../components/dynamic-view/index.esm.js"; import Lr from "../../components/section/index.esm.js"; import zy from "../../components/combo-tree/index.esm.js"; import qy from "../../components/events-editor/index.esm.js"; import Uy, { FieldSelectorRepositoryToken as Xi } from "../../components/field-selector/index.esm.js"; import Gy from "../../components/mapping-editor/index.esm.js"; import Yy from "../../components/schema-selector/index.esm.js"; import cf, { EditorType as Qy } from "../../components/event-parameter/index.esm.js"; import Xy from "../../components/filter-condition-editor/index.esm.js"; import Ky from "../../components/sort-condition-editor/index.esm.js"; import Jy from "../../components/menu-lookup/index.esm.js"; import Zy from "../../components/json-editor/index.esm.js"; import eb from "../../components/property-editor/index.esm.js"; import tb, { FExpressionTextbox as nb } from "../../components/expression-editor/index.esm.js"; import ab from "../../components/code-editor/index.esm.js"; import ob, { useButtonItemsDesigner as ib } from "../../components/collection-property-editor/index.esm.js"; import lb from "../modal/index.esm.js"; import rb, { FTreeGrid as Ws } from "../../components/tree-grid/index.esm.js"; import Nt from "bignumber.js"; import sb, { FDynamicForm as ub, FDynamicFormLabel as cb, FDynamicFormGroup as zs, useTypeResolver as df, FDynamicFormInput as db } from "../../components/dynamic-form/index.esm.js"; import fb, { FTimePickerTimeView as nc, convertToDate as pb } from "../../components/time-picker/index.esm.js"; import Nr from "../../components/date-picker/index.esm.js"; import { createI18n as mb, useI18n as hb } from "vue-i18n"; import { useConditionValue as gb, useConditionUtils as qs, useCondition as vb, CompareType as Vn, ValueType as Pa, TextValue as br, RadioGroupValue as yb, NumberSpinnerValue as bb, NumberRangeValue as Cb, MonthRangeValue as wb, MonthPickerValue as Sb, DateRangeValue as ac, DateTimePickerValue as xb, DatePickerValue as Tb, ComboLookupValue as kb, ComboListValue as Fb, CheckBoxValue as Mb } from "../../components/condition/index.esm.js"; import { DgControl as Pb } from "../../components/designer-canvas/index.esm.js/"; import Us from "../../components/response-toolbar/index.esm.js"; import Eb, { FLoadingService as Ib } from "../../components/loading/index.esm.js"; import Ob from "../../components/capsule/index.esm.js"; import "../../components/tooltip/index.esm.js"; import "../../components/checkbox-group/index.esm.js"; import { FMessageBoxService as Bb } from "../../components/message-box/index.esm.js"; import Vb from "../../components/textarea/index.esm.js"; import { useColumnOption as Ab, useCommandOption as Db, useRowOption as Rb, useSummary as $b, useGroup as Lb, useSort as Nb, useFilter as jb, useAppearance as _b, useSelection as Hb, useRowNumber as Wb, usePagination as zb, useDataGridEvent as qb } from "../data-view/index.esm.js"; import { useFormRules as Ub } from "../../components/form-rules/index.esm.js/use-formrules"; function ff(e, t) { let n; function a(s) { const { properties: f, title: m, ignore: h } = s, g = h && Array.isArray(h), v = Object.keys(f).reduce((C, y) => ((!g || !h.find((S) => S === y)) && (C[y] = f[y].type === "object" && f[y].properties ? a(f[y]) : ht(f[y].default)), C), {}); if (m && (!g || !h.find((C) => C === "id"))) { const C = m.toLowerCase().replace(/-/g, "_"); v.id = `${C}_${Math.random().toString().slice(2, 6)}`; } return v; } function o(s) { const { properties: f, title: m, required: h } = s; if (h && Array.isArray(h)) { const g = h.reduce((v, C) => (v[C] = f[C].type === "object" && f[C].properties ? a(f[C]) : ht(f[C].default), v), {}); if (m && h.find((v) => v === "id")) { const v = m.toLowerCase().replace(/-/g, "_"); g.id = `${v}_${Math.random().toString().slice(2, 6)}`; } return g; } return { type: m }; } function i(s, f = {}, m) { const h = e[s]; if (h) { let g = o(h); const v = t[s]; return g = v ? v({ getSchemaByType: i }, g, f, m) : g, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(g), g; } return null; } function l(s, f) { const m = a(f); return Object.keys(m).reduce((h, g) => (Object.prototype.hasOwnProperty.call(s, g) && (h[g] && Zu(h[g]) && Zu(s[g] || !s[g]) ? Object.assign(h[g], s[g] || {}) : h[g] = s[g]), h), m), m; } function r(s, f) { return Object.keys(s).filter((h) => s[h] != null).reduce((h, g) => { if (f.has(g)) { const v = f.get(g); if (typeof v == "string") h[v] = s[g]; else { const C = v(g, s[g], s); Object.assign(h, C); } } else h[g] = s[g]; return h; }, {}); } function u(s, f, m = /* @__PURE__ */ new Map()) { const h = l(s, f); return r(h, m); } function d(s) { var m; const f = s.type; if (f) { const h = e[f]; if (!h) return s; const g = l(s, h), v = ((m = s.editor) == null ? void 0 : m.type) || ""; if (v) { const C = e[v], y = l(s.editor, C); g.editor = y; } return g; } return s; } function c(s) { n = s; } return { getSchemaByType: i, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: u, mappingSchemaToProps: r, setDesignerContext: c }; } const pf = {}, mf = {}, { resolveSchemaWithDefaultValue: Gb, resolveSchemaToProps: Yb, mappingSchemaToProps: Qb } = ff(pf, mf); function Xb(e = {}) { function t(d, c, s, f) { if (typeof s == "number") return f[d].length === s; if (typeof s == "object") { const m = Object.keys(s)[0], h = s[m]; if (m === "not") return Number(f[d].length) !== Number(h); if (m === "moreThan") return Number(f[d].length) >= Number(h); if (m === "lessThan") return Number(f[d].length) <= Number(h); } return !1; } function n(d, c, s, f) { return f[d] && f[d].propertyValue && String(f[d].propertyValue.value) === String(s); } const a = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", n] ]); Object.keys(e).reduce((d, c) => (d.set(c, e[c]), d), a); function o(d, c) { const s = d; return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: d, value: !!c }] : typeof c == "object" ? Object.keys(c).map((f) => { if (f === "length") return { target: s, operator: "length", param: null, value: c[f] }; const m = f, h = c[f]; return { target: s, operator: "getProperty", param: m, value: h }; }) : []; } function i(d) { return Object.keys(d).reduce((s, f) => { const m = o(f, d[f]); return s.push(...m), s; }, []); } function l(d, c) { if (a.has(d.operator)) { const s = a.get(d.operator); return s && s(d.target, d.param, d.value, c) || !1; } return !1; } function r(d, c) { return i(d).reduce((m, h) => m && l(h, c), !0); } function u(d, c) { const s = Object.keys(d), f = s.includes("allOf"), m = s.includes("anyOf"), h = f || m, C = (h ? d[h ? f ? "allOf" : "anyOf" : "allOf"] : [d]).map((S) => r(S, c)); return f ? !C.includes(!1) : C.includes(!0); } return { parseValueSchema: u }; } const Kb = { convertTo: (e, t, n, a) => { e.appearance || (e.appearance = {}), e.appearance[t] = n; }, convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t] }, Jb = { convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无" }, Zb = { convertTo: (e, t, n, a) => { e.editor && (e.editor[t] = n); }, convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t] }, ra = { 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: "动态表单" } }, eC = { convertFrom: (e, t, n) => { var o; const a = e.editor && e.editor[t] ? e.editor[t] : e[t]; return ((o = ra[a]) == null ? void 0 : o.name) || a; } }, tC = { convertTo: (e, t, n, a) => { e[t] = e[t]; }, convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : "" }, nC = { convertTo: (e, t, n, a) => { (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = { [t]: n }); }, convertFrom: (e, t, n) => { 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"; } }, aC = { convertTo: (e, t, n, a) => { e.command ? e.command[t] = n : e.command = { [t]: n }, t === "enableType" && n === "default" && (e.command.enable = !0, e.command.commands = [ { text: "编辑", type: "primary", command: "edit" }, { text: "删除", type: "danger", command: "remove" } ]), t === "enableType" && n === "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" && n === "unable" && (e.command.enable = !1); }, convertFrom: (e, t, n) => { var a, o; if (e.command) { if (t === "enableType") { const i = (o = (a = e.command) == null ? void 0 : a.commands) == null ? void 0 : o.find((l) => l.command === "edit" && l.type === "primary"); return e.command.enable ? i ? "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 ""; } }, oC = { convertTo: (e, t, n, a) => { e.column ? e.column[t] = n : e.column = { [t]: n }, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average")); }, convertFrom: (e, t, n) => { if (e.column) { if (t === "fitColumns") return e.column.fitColumns; if (t === "fitMode") return e.column.fitMode; } return ""; } }, iC = { convertTo: (e, t, n, a) => { e.summary ? e.summary[t] = n : e.summary = { [t]: n }, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = { enable: n, groupFields: [] }); }, convertFrom: (e, t, n) => { var a, o; return t === "customSummaryStyle" ? e.summary.customSummaryStyle : t === "position" ? ((a = e.summary) == null ? void 0 : a[t]) || "bottom" : t === "customRender" ? ((o = e.summary) == null ? void 0 : o[t]) || "" : e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""; } }, lC = { convertTo: (e, t, n, a) => { e.group ? e.group[t] = n : e.group = { [t]: n }, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = { enable: n, groupFields: [], showSummary: !1, customRender: "" }); }, convertFrom: (e, t, n) => { 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; } } }, rC = { convertFrom: (e, t) => e.binding ? e.binding.path : "", convertTo: (e, t, n) => { if (n && n.length > 0) { const a = n[0]; e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = a.bindingField, e.binding.field = a.id, e.binding.fullPath = a.path, e.path = a.bindingPath; } } }, sC = { convertTo: (e, t, n, a) => { e.pagination || (e.pagination = {}), t === "sizeLimits" ? e.pagination.sizeLimits = n.split(",") : e.pagination[t] = n; }, convertFrom: (e, t, n) => e.pagination ? t === "sizeLimits" ? e.pagination.sizeLimits.join(",") : e.pagination[t] : e[t] }, uC = { convertTo: (e, t, n, a) => { e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n; }, convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t] }, cC = { convertTo: (e, t, n, a) => { e.selection || (e.selection = {}), e.selection[t] = n; }, convertFrom: (e, t, n) => { var a, o; return t === "showCheckbox" ? (a = e.selection) != null && a.multiSelect ? !0 : (o = e.selection) == null ? void 0 : o.showCheckbox : e.selection ? e.selection[t] : e[t]; } }, dC = { convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : "" }, fC = { convertFrom: (e, t) => e[t] || "", convertTo: (e, t, n) => { e[t] = n; } }, pC = { convertTo: (e, t, n, a) => { e.size || (e.size = {}), e.size[t] = n; }, convertFrom: (e, t, n) => e.size ? e.size[t] : e[t] }, mC = { convertFrom: (e, t, n) => { var a, o; return (a = e.formatter) != null && a.data && t === "formatterEnumData" && !e.formatterEnumData ? (o = e.formatter) == null ? void 0 : o.data : e.formatterEnumData; } }, hC = { convertTo: (e, t, n, a) => { e.sort || (e.sort = {}), e.sort[t] = n; }, convertFrom: (e, t, n) => { var a, o; if (t === "mode") return ((a = e.sort) == null ? void 0 : a.mode) || "client"; if (t === "multiSort") return !!((o = e.sort) != null && o.multiSort); } }, gC = { convertTo: (e, t, n, a) => { e.filter || (e.filter = {}), e.filter[t] = n; }, convertFrom: (e, t, n) => { var a; if (t === "mode") return ((a = e.filter) == null ? void 0 : a.mode) || "client"; } }, vC = { convertTo: (e, t, n, a) => { e.rowOption ? e.rowOption[t] = n : e.rowOption = { [t]: n }; }, convertFrom: (e, t, n) => { 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 ""; } }, yC = { convertTo: (e, t, n, a) => { (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = n, t === "columnTemplateType" && n === "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" && n === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && n === "custom" && (e.columnTemplate = "")); }, convertFrom: (e, t, n) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : "" }; function hf(e, t, n) { const a = /* @__PURE__ */ new Map([ ["/converter/appearance.converter", Kb], ["/converter/buttons.converter", Jb], ["/converter/property-editor.converter", Zb], ["/converter/items-count.converter", dC], ["/converter/type.converter", eC], ["/converter/change-editor.converter", tC], ["/converter/change-formatter.converter", nC], ["/converter/column-command.converter", aC], ["/converter/column-option.converter", oC], ["/converter/summary.converter", iC], ["/converter/group.converter", lC], ["/converter/form-group-label.converter", fC], ["/converter/field-selector.converter", rC], ["/converter/pagination.converter", sC], ["/converter/row-number.converter", uC], ["/converter/grid-selection.converter", cC], ["/converter/size.converter", pC], ["/converter/change-formatter-enum.converter", mC], ["/converter/grid-sort.converter", hC], ["/converter/grid-filter.converter", gC], ["/converter/row-option.converter", vC], ["/converter/change-formatter-type.converter", yC] ]), o = /* @__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" }] ]), i = Xb(); function l(h, g) { return () => i.parseValueSchema(h, g); } function r(h, g, v) { return h.includes("visible") && g.visible !== void 0 ? typeof g.visible == "boolean" ? () => !!g.visible : g.visible === void 0 ? !0 : l(g.visible, v) : () => !0; } function u(h, g, v) { return h.includes("readonly") && g.readonly !== void 0 ? typeof g.readonly == "boolean" ? () => !!g.readonly : l(g.readonly, v) : () => !1; } function d(h, g) { const v = h.$converter || g; return typeof v == "string" && v && a.has(v) ? a.get(v) || null : v || null; } function c(h, g, v, C, y, S = "", k = "") { return Object.keys(h).map((M) => { const x = b(1), T = M, E = h[M], F = Object.keys(E), I = E.title, P = E.type, B = o.get(P) || { type: "input-group", enableClear: !1 }, O = E.editor ? Object.assign({}, B, E.editor) : Object.assign({}, B), A = r(F, E, g), V = u(F, E, g); O.readonly = O.readonly === void 0 ? V() : O.readonly; const R = E.type === "cascade" ? c(E.properties, g, v, C, y, S, k) : [], j = !0; let N = d(E, k); const U = D({ get() { if (x.value) { if (["class", "style"].find((X) => X === T) && !N && (N = a.get("/converter/appearance.converter") || null), N && N.convertFrom) return N.convertFrom(v, M, y, S); const Y = v[M]; return Object.prototype.hasOwnProperty.call(E, "defaultValue") && (Y === void 0 || typeof Y == "string" && Y === "") ? E.type === "boolean" ? E.defaultValue : E.defaultValue || "" : Y; } return null; }, set(Y) { x.value += 1, N && N.convertTo ? (N.convertTo(C, M, Y, y, S), N.convertTo(v, M, Y, y, S)) : (C[M] = Y, v[M] = Y); } }), { refreshPanelAfterChanged: W, description: K, isExpand: Q, parentPropertyID: H } = E, G = { propertyID: T, propertyName: I, propertyType: P, propertyValue: U, editor: O, visible: A, readonly: V, cascadeConfig: R, hideCascadeTitle: j, refreshPanelAfterChanged: W, description: K, isExpand: Q, parentPropertyID: H }; return g[T] = G, G; }); } function s(h, g, v = {}) { const C = {}, y = e[h]; return y && y.categories ? Object.keys(y.categories).map((k) => { const w = y.categories[k], M = w == null ? void 0 : w.title, x = c(w.properties || {}, C, {}, v, g); return { categoryId: k, categoryName: M, properties: x }; }) : []; } function f(h, g, v, C, y = "") { const S = g.$ref.schema, k = g.$ref.converter, w = v[S], M = w.type, x = n(w), T = {}, E = e[M]; if (E && E.categories) { const F = E.categories[h], I = F == null ? void 0 : F.title; k && Object.keys(F.properties).forEach((O) => { F.properties[O].$converter = k; }); const P = (F == null ? void 0 : F.properties) || {}, B = c(P, T, x, w, C, y); return { categoryId: h, categoryName: I, properties: B }; } return { categoryId: h, categoryName: "", properties: [] }; } function m(h, g, v, C, y) { const S = h.type, k = n(h), w = {}; let M = y || e[S]; if (!(M && Object.keys(M).length > 0) && v && v.getPropConfig && (M = v.getPropConfig(C)), M && M.categories) { const T = []; return Object.keys(M.categories).map((E) => { const F = M.categories[E]; if (F.$ref) { T.push(f(E, F, h, g, C)); return; } const I = F == null ? void 0 : F.title, P = F == null ? void 0 : F.tabId, B = F == null ? void 0 : F.tabName, O = F == null ? void 0 : F.hide, A = F == null ? void 0 : F.hideTitle, V = c(F.properties || {}, w, k, h, g, C, F.$converter), { setPropertyRelates: R } = F, j = F == null ? void 0 : F.parentPropertyID; T.push({ categoryId: E, categoryName: I, tabId: P, tabName: B, hide: O, properties: V, hideTitle: A, setPropertyRelates: R, parentPropertyID: j }); }), T; } return []; } return { getPropertyConfigBySchema: m, getPropertyConfigByType: s, propertyConverterMap: a }; } const gf = {}, vf = {}; hf(gf, vf, Gb); const yf = {}, bf = {}, { resolveSchemaWithDefaultValue: bC } = ff(yf, bf), Cf = {}, wf = {}; hf(Cf, wf, bC); function Bi(e, t, n = /* @__PURE__ */ new Map(), a = (l, r, u, d) => r, o = {}, i = (l) => l) { return pf[t.title] = t, mf[t.title] = a, gf[t.title] = o, vf[t.title] = i, yf[t.title] = t, bf[t.title] = a, Cf[t.title] = o, wf[t.title] = i, (l = {}, r = !0) => { if (!r) return Qb(l, n); const u = Yb(l, t, n), d = Object.keys(e).reduce((c, s) => (c[s] = e[s].default, c), {}); return Object.assign(d, u); }; } function Sf(e, t) { return { customClass: t.class, customStyle: t.style }; } function CC() { function e(t, n) { const { id: a } = t || {}, { dataSource: o } = t || {}; return o === void 0 ? {} : { events: n.getValue(a) }; } return { resolve: e }; } function wC(e, t) { if (!e || e.length < 1) return null; for (const n of e) { if (n.id === t) return n; if (n.children) { const a = n.children.find((o) => o.id === t); if (a) return a; } } return null; } function SC() { function e(t, n) { const { name: a } = n; if (a !== "fieldsClick") return t[`on${a.charAt(0).toUpperCase()}${a.slice(1)}`] || t[a]; const o = t.cardToolbar; if (!o || o.length < 1) return null; const [i, l] = n.payloads, r = wC(o, l); return r ? r.onClick || r.click : null; } return { resolve: e }; } function xC(e, t) { return null; } function Ki(e) { const t = e == null ? void 0 : e.fitColumns; return t === !0 || typeof t == "object" && t !== null && "enable" in t && t.enable === !0; } const xf = { /** 自定义样式 */ 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: xC }, /** 绑定动态字段的值*/ 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 } }, TC = SC(), kC = Lg(Object.assign({}, xf, { disabled: {}, editable: {}, componentId: { type: String, default: "" } }), "columnOption", "commandOption"); function FC(e, t, n, a, o) { const { getGridHeaderCells: i } = o, l = 120, r = 50, u = D(() => { var x; return ((x = e.rowNumber) == null ? void 0 : x.enable) || !1; }), d = D(() => { var x, T; return ((x = e.selection) == null ? void 0 : x.multiSelect) || ((T = e.selection) == null ? void 0 : T.showCheckbox) || !1; }), c = D( () => { var x; return 0 + (u.value ? ((x = e.rowNumber) == null ? void 0 : x.width) || 32 : 0) + (d.value ? r : 0); } ), s = D(() => { var x; return (x = e.columnOption) == null ? void 0 : x.fitColumns; }), f = D(() => { var x; return s.value && ((x = e.columnOption) == null ? void 0 : x.fitMode) || "none"; }); function m(x, T, E) { const F = parseInt(x.width, 10) / 100; return E * F; } function h(x, T, E) { return typeof x.width == "string" ? m(x, T, E) : x.width || l; } function g(x, T) { const E = [], F = []; let I = 0; x.value.primaryColumns.forEach((O) => { typeof O.width == "string" ? F.push(O) : (O.width = O.width || l, I += O.width, E.push(O)); }); const P = T * (E.length / x.value.primaryColumns.length); E.forEach((O) => { const A = P * (O.width / I); O.actualWidth = A, x.value.primaryColumnsWidth += O.actualWidth; }); const B = T - P; F.forEach((O) => { const A = m(O, x.value, B); O.actualWidth = A, x.value.primaryColumnsWidth += O.actualWidth; }); } function v(x, T) { const E = [], F = [], I = /* @__PURE__ */ new WeakMap(); let P = 0, B = 0; if (x.value.primaryColumns.forEach((A) => { if (typeof A.width == "string") { const V = m(A, x.value, T); I.set(A, V), P += V, F.push(A); } else A.width = A.width || l, B += A.width, E.push(A); }), T - P > B) { const A = T - P; F.forEach((V) => { V.actualWidth = I.get(V) || l, x.value.primaryColumnsWidth += V.actualWidth; }), E.forEach((V) => { V.actualWidth = A * (V.width / B), x.value.primaryColumnsWidth += V.actualWidth; }); } else g(x, T); } function C(x, T) { x.value.primaryColumns.forEach((E) => { E.actualWidth = h(E, x.value, T), x.value.primaryColumnsWidth += E.actualWidth; }); } const y = { expand: v, none: C, percentage: g }; function S(x) { x.value.leftHeaderColumns = Array.from(i(x.value.leftColumns).values()), x.value.primaryHeaderColumns = Array.from(i(x.value.primaryColumns).values()), x.value.rightHeaderColumns = Array.from(i(x.value.rightColumns).values()); } function k(x) { x.value.leftColumnsWidth = 0, x.value.primaryColumnsWidth = 0, x.value.rightColumnsWidth = 0, x.value.leftColumns.forEach((T) => { x.value.leftColumnsWidth += T.actualWidth || 0; }), x.value.primaryColumns.forEach((T) => { x.value.primaryColumnsWidth += T.actualWidth || 0; }), x.value.rightColumns.forEach((T) => { x.value.rightColumnsWidth += T.actualWidth || 0; }), x.value = Object.assign({}, x.value); } function w(x, T, E) { var V; let F = 0; const I = x.value.primaryColumns, P = x.value.rightColumns; x.value.rightColumns.forEach((R) => { R.actualWidth = h(R, x.value, T), F += R.actualWidth; }); const B = E - F, O = y[f.value]; if (O && O(x, B), x.value.primaryColumnsWidth + F <= E) return x.value.primaryColumns = [...I, ...P], x.value.primaryColumnsWidth += F, x.value.rightColumns = [], x.value.rightColumnsWidth = 0, !0; const A = /* @__PURE__ */ new Map(); return A.set("primary", []), A.set("right", []), x.value.primaryColumns.reduce((R, j) => { var N, U; return j.fixed === "right" ? (N = R.get("right")) == null || N.push(j) : (U = R.get("primary")) == null || U.push(j), R; }, A), (V = A.get("right")) != null && V.length && (x.value.primaryColumns = [...A.get("primary") || []], x.value.rightColumns = [...A.get("right") || []]), x.value.primaryColumnsWidth = 0, x.value.rightColumnsWidth = 0, !1; } function M() { if (n.value) { t.value.leftColumnsWidth = 0, t.value.primaryColumnsWidth = 0, t.value.rightColumnsWidth = 0; const x = n.value.clientWidth - c.value; t.value.leftColumns.forEach((E) => { E.actualWidth = h(E, t.value, x), t.value.leftColumnsWidth += E.actualWidth; }); const T = x - t.value.leftColumnsWidth; if (w(t, x, T)) a.value = T; else { t.value.rightColumns.forEach((I) => { I.actualWidth = h(I, t.value, x), t.value.rightColumnsWidth += I.actualWidth; }); const E = x - t.value.leftColumnsWidth - t.value.rightColumnsWidth, F = y[f.value]; F && F(t, E), a.value = E; } S(t), t.value = Object.assign({}, t.value); } } return Z(() => { var x; return (x = e.columnOption) == null ? void 0 : x.fitColumns; }, (x, T) => { x !== T && x && M(); }), Z(f, (x, T) => { x !== T && s.value && M(); }), { calculateColumnHeaders: S, calculateColumnsSize: M, calculateColumnsWidth: k }; } const MC = ""; function PC(e) { const a = b({ 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 o() { a.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 i = b(e.summary), l = D(() => { const w = i.value; return (w == null ? void 0 : w.groupFields) || []; }); function r() { a.value.rightColumns.forEach((x) => { x.showSetting = !1; }), a.value.primaryColumns.forEach((x) => { x.showSetting = !1; }); const w = a.value.rightColumns, M = a.value.primaryColumns; w.length > 0 ? w[w.length - 1].showSetting = !0 : M.length > 0 && (M[M.length - 1].showSetting = !0); } function u(w) { o(); const M = /* @__PURE__ */ new Map(); return l.value && l.value.reduce((x, T) => (x.set(T, !0), x), M), w.reduce((x, T) => (T.filter = T.filter || MC, T.fixed === "left" ? (a.value.leftColumns.push(T), a.value.leftColumnsMap.set(T.field, T), a.value.leftColumnsWidth += T.actualWidth) : T.fixed === "right" ? (a.value.rightColumns.push(T), a.value.rightColumnsMap.set(T.field, T), a.value.rightColumnsWidth += T.actualWidth) : (a.value.primaryColumns.push(T), a.value.primaryColumnsMap.set(T.field, T), a.value.primaryColumnsWidth += T.actualWidth), M.has(T.field) && a.value.summaryColumns.push(T), x), a), r(), a; } u(e.columns); const d = D(() => a.value.leftColumns.length > 0), c = D(() => a.value.rightColumns.length > 0); function s(w, M) { return M.sortable && M.sort && M.sort !== "none" && w.push(M), w; } function f(w, M) { return w.sortOrder = w.sortOrder || 0, M.sortOrder = M.sortOrder || 0, w.sortOrder === M.sortOrder ? 0 : w.sortOrder < M.sortOrder ? -1 : 1; } function m(w, M) { return w.sortOrder = w.sortOrder || 0, M.sortOrder = M.sortOrder || 0, w.sortOrder === M.sortOrder ? 0 : w.sortOrder < M.sortOrder ? 1 : -1; } function h(w, M) { return M.filterable && w.push(M), w; } function g() { const w = []; return a.value.leftColumns.reduce(h, w), a.value.primaryColumns.reduce(h, w), a.value.rightColumns.reduce(h, w), w; } function v() { const w = []; a.value.leftColumns.reduce(s, w), a.value.primaryColumns.reduce(s, w), a.value.rightColumns.reduce(s, w); const M = Math.max(...w.map((x) => x.sortOrder || 0)); return w.sort(m).map((x) => { const T = x.sortOrder || M + 1; return x.sortOrder = T, x; }).sort(f).map((x, T) => { const E = T + 1; return x.sortOrder = E, x; }); } function C(w, M, x) { const T = w.map((E) => { const F = x.getSorterByColumn(E), I = E.sort === "asc", P = E.sort === "desc", B = I ? F.ascend : P ? F.decend : void 0; return { field: E.field, compare: B }; }); M.setSorters(T); } function y(w, M) { const x = v(); C(x, w, M); } function S(w) { } function k(w) { } return { applyColumnSorter: y, collectionFilterableColumns: g, applySortableColumns: C, collectionSortableColumns: v, columnContext: a, hasLeftFixedColumn: d, hasRightFixedColumn: c, updateColumnRenderContext: u, updateColumnSettingIcon: r, sortFromServer: S, createSortConditions: k }; } function EC(e, t, n, a, o, i, l, r) { const u = b(a.value - 1 + o), d = b(0), { renderDataRow: c } = i, s = l ? l.renderGroupRow : c, f = r ? r.renderSummaryRow : c; function m(v) {