UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,149 lines 2.16 MB
var ay = Object.defineProperty; var oy = (e, t, n) => t in e ? ay(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var U = (e, t, n) => oy(e, typeof t != "symbol" ? t + "" : t, n); import { excludeProperties as iy, useNumberFormat as ji, getCustomClass as wt, isMobilePhone as Qt, withInstall as Ot, isImageUrl as ly, urlPrependBasePath as Eo, isBase64ImageUrl as ry, getCustomStyle as mn, FormSchemaEntityField$Type as la, FormSchemaEntityFieldType$Type as to, EVENT_PROPERTY_TAB_IDS as Kn, getMaxZIndex as Oi, useGuid as Sn, resolveField as ut, useDateFormat as Un, useResizeObserver as bs, CHECKBOX_CONTEXT as fu, useCheck as pu, radioCheckboxCommonProps as Pf, useTouchMomentum as sy, useTouch as uy, useCommonUtils as ba, useBem as Pn, useFarrisConfig as cy, useThirdComponent as If, FormSchemaEntityFieldTypeName as Qn, formatTime as dy, getDateObject as Na, isLeapYear as fy, compareDate as Ul, getDaysInMonth as py, useTextBox as Ef, useClear as Bf, encrypt as my, useDelayedRef as hy, RADIOGROUP_CONTEXT as Of, useReqAnimationFrame as vy, getTimeObject as Xr, formatObjecTime as gy, setFieldValue as Cs, useNativeBack as yy } from "../../components/common/index.esm.js"; import Af, { FDataGrid as Hi, dataGridProps as Vf } from "../../components/data-grid/index.esm.js"; import { resolveAppearance as Mt, createPropsResolver as st, getPropsResolverGenerator as Fn, getSchemaByTypeForDesigner as by, schemaResolverMap as Cy, propertyEffectMap as wy, propertyConfigSchemaMap as Sy, schemaMap as xy, getSchemaByType as Ai, resolveToolbar as Df, createPageHeaderEventHandlerResolver as Lf, createEventsResolver as Nf, createFormBindingResolver as Ty, createCollectionBindingResolver as ky, createDataGridSelectionItemResolver as Fy, createDataViewUpdateColumnsResolver as My } from "../../components/dynamic-resolver/index.esm.js"; import { ref as w, computed as D, watch as J, createVNode as u, createTextVNode as Pe, defineComponent as me, provide as nn, inject as Oe, onMounted as He, Fragment as pt, nextTick as yt, Teleport as vo, createApp as Xo, onUnmounted as Zt, onBeforeMount as Jo, watchEffect as Sr, Transition as Gl, shallowRef as Pl, render as Jr, h as Py, cloneVNode as Iy, mergeProps as ln, withDirectives as Gt, vShow as ja, onUpdated as Ey, onBeforeUnmount as Rf, withModifiers as tn, vModelText as za, toRef as By, reactive as gt, resolveDirective as na, isVNode as aa, Comment as $f, getCurrentInstance as xr, resolveComponent as pa, toRefs as _i, toRaw as Oy, vModelCheckbox as mu, vModelSelect as Ay } from "vue"; import { isPlainObject as Gc, cloneDeep as bt, debounce as Wa, isFunction as Zr, isUndefined as jn, mergeWith as Yl, merge as Vi, isNil as Vy, isNaN as Dy, flatten as jf, get as eo, isEmpty as Ly, throttle as Yc } from "lodash-es"; import { useResizeObserver as Tr } from "@vueuse/core"; import { FNotifyService as Ca, F_NOTIFY_SERVICE_TOKEN as zi } from "../../components/notify/index.esm.js"; import Hf, { FCheckbox as hu } from "../../components/checkbox/index.esm.js"; import go from "../../components/popover/index.esm.js"; import { LocaleService as ze } from "../../components/locale/index.esm.js"; import { F_MODAL_SERVICE_TOKEN as vu } from "../../components/modal/index.esm.js"; import Ny from "../../components/transfer/index.esm.js"; import Ry, { FTabPage as $y } from "../../components/tabs/index.esm.js"; import jy from "../../components/filter-bar/index.esm.js"; import { CompareType as Ge, useConditionValue as Hy, useConditionUtils as gu, FConditionFields as Qc, FConditionFieldsDesign as Kc, useCondition as _y, ValueType as sn, TextValue as _f, CheckBoxValue as zy, ComboListValue as Wy, ComboLookupValue as qy, FilterDatePickerValue as Uy, FilterDateTimePickerValue as Gy, MonthPickerValue as Yy, MonthRangeValue as Qy, FilterNumberSpinnerValue as Ky, RadioGroupValue as Xy, FilterInputGroupValue as Jy, FilterDateRangeValue as Zy, NumberRangeValue as eb } from "../../components/condition/index.esm.js"; import zf, { FInputGroup as Ql } from "../../components/input-group/index.esm.js"; import Kl, { FTouchComboListContainer as Wf, useDataSource as tb, FComboListContainer as nb, FComboList as Zo } from "../../components/combo-list/index.esm.js"; import qf, { FButton as Uo } from "../../components/button/index.esm.js"; import Uf, { useNumber as ab, useFormat as ob, useSpinner as ib, useTextBox as lb, getSpinnerRender as rb, getNumberTextBoxRender as sb, FNumberSpinner as Il, useNumberLocales as ub } from "../../components/number-spinner/index.esm.js"; import ws from "../../components/date-picker/index.esm.js"; import Gf from "../../components/pagination/index.esm.js"; import { useFilter as Wi, useIdentify as qi, useHierarchy as Ui, useGroupData as yu, useDataView as Gi, useSelection as Yi, usePagination as bu, useRow as Qi, useEdit as Ki, useVisualDataBound as Xi, useVisualDataCell as Ji, useVisualDataRow as Zi, useVisualGroupRow as Yf, useVisualSummaryRow as Qf, useVisualData as el, useSidebar as kr, useColumn as tl, useVirtualScroll as nl, getHierarchyRow as Kf, useLoading as Xf, useSelectHierarchyItem as Cu, useDataViewContainerStyle as Fr, useCommandColumn as Jf, useSettingColumn as Zf, useSort as ep, useGroupColumn as wu, useCellPosition as Mr, useFitColumn as Su, useFilterHistory as tp, useColumnFilter as np, useDragColumn as ap, getColumnHeader as op, getSidebar as xu, getDisableMask as ip, getHorizontalScrollbar as Tu, getVerticalScrollbar as ku, getEmpty as Fu, getPagination as lp, getSummary as rp, ColumnSettingSolution as sp, COMMAND_COLUMN_DATA_TYPE as Ia, SETTING_COLUMN_DATA_TYPE as Ea, SETTING_COLUMN_FIELD as cb, COMMAND_COLUMN_FIELD as db, CellMode as up, useScreen as Mu, useCellContentStyle as fb, getFilterPanel as pb, getGroupPanel as mb, useAdapt as hb, useNavigation as vb, GridFieldEditorUsage as Bo } from "../../components/data-view/index.esm.js"; import cp from "../../components/button-group/index.esm.js"; import Pu from "../../components/drawer/index.esm.js"; import { FSwitch as gb } from "../../components/switch/index.esm.js"; import yb from "../../components/language-textbox/index.esm.js"; import bb, { radioGroupProps as Cb, FRadioGroup as wb } from "../../components/radio-group/index.esm.js"; import dp from "../../components/list-view/index.esm.js"; import { useDesignerComponent as rn, DgControl as Ve, canvasChanged as Pi, refreshCanvas as Sb, setPositionOfButtonGroup as fp, useDragulaCommonRule as pp, UseTemplateDragAndDropRules as mp, FDesignerItem as xb } from "../../components/designer-canvas/index.esm.js"; import hp from "../../components/color-picker/index.esm.js"; import { BaseControlProperty as Iu, InputBaseProperty as wa, ExpressionProperty as Tb, FormBindingType as yi, SchemaDOMMapping as kb } from "../../components/property-panel/index.esm.js"; import Fb, { FieldSelectorRepositoryToken as El } from "../../components/field-selector/index.esm.js"; import "../../components/collection-property-editor/index.esm.js/src/use-button-items.designer"; import Mb from "../../components/tags/index.esm.js"; import { useInputExpand as Eu } from "../../components/common/index.esm.js/text-box/use-input-expand"; import qa, { FButtonEdit as al } from "../../components/button-edit/index.esm.js"; import Ut from "bignumber.js"; import Bu from "../button-edit/index.esm.js"; import io from "../../components/tree-view/index.esm.js"; import Pb from "../../components/binding-selector/index.esm.js"; import Ib from "../../components/accordion/index.esm.js"; import Eb from "../avatar/index.esm.js"; import Bb from "../approval-logs/index.esm.js"; import Ob from "../../components/calendar/index.esm.js"; import Ab from "../capsule/index.esm.js"; import Xc from "../checkbox/index.esm.js"; import Jc from "../checkbox-group/index.esm.js"; import Vb from "../../components/content-container/index.esm.js"; import Db from "../data-grid/index.esm.js"; import Lb from "../date-picker/index.esm.js"; import Nb from "../../components/dropdown/index.esm.js"; import Rb from "../dynamic-form/index.esm.js"; import $b from "../../components/external-container/index.esm.js"; import jb from "../../components/image-cropper/index.esm.js"; import Hb from "../input-group/index.esm.js"; import Ou, { FLayout as _b, FLayoutPane as Go } from "../../components/layout/index.esm.js"; import zb from "../../components/list-nav/index.esm.js"; import Wb from "../list-view/index.esm.js"; import vp from "../../components/lookup/index.esm.js"; import qb from "../nav/index.esm.js"; import Ub from "../number-spinner/index.esm.js"; import Gb from "../../components/number-range/index.esm.js"; import Yb from "../../components/order/index.esm.js"; import Qb from "../../components/page-header/index.esm.js"; import Kb from "../../components/page-footer/index.esm.js"; import Xb from "../../components/progress/index.esm.js"; import Jb, { useCondition as Zb, useSolutionUtils as gp } from "../../components/query-solution/index.esm.js"; import eC from "../radio-group/index.esm.js"; import tC from "../rate/index.esm.js"; import nC, { commonToolbarItemDesignProps as aC } from "../response-toolbar/index.esm.js"; import oC from "../../components/response-layout/index.esm.js"; import iC from "../response-layout-editor/index.esm.js"; import lC from "../../components/search-box/index.esm.js"; import rC from "../section/index.esm.js"; import sC from "../../components/smoke-detector/index.esm.js"; import uC from "../../components/splitter/index.esm.js"; import yp from "../../components/step/index.esm.js"; import cC from "../switch/index.esm.js"; import dC from "../tabs/index.esm.js"; import fC from "../tags/index.esm.js"; import pC from "../../components/text/index.esm.js"; import mC from "../time-picker/index.esm.js"; import hC from "../../components/uploader/index.esm.js"; import vC from "../../components/verify-detail/index.esm.js"; import gC from "../../components/component/index.esm.js"; import yC from "../../components/video/index.esm.js"; import bC from "../textarea/index.esm.js"; import CC from "../tree-grid/index.esm.js"; import wC from "../../components/fieldset/index.esm.js"; import SC from "../drawer/index.esm.js"; import xC from "../../components/html-template/index.esm.js"; import TC from "../../components/image/index.esm.js"; import kC from "../../components/comment/index.esm.js"; import FC from "../wizard/index.esm.js"; import { loadRegister as MC, useComponentManager as PC, useEntityState as IC, useDynamicViewUtils as EC, componentMap as es, resolverMap as BC, componentPropsConverter as OC } from "../../components/dynamic-view/index.esm.js"; import Ss from "../../components/section/index.esm.js"; import AC from "../../components/combo-tree/index.esm.js"; import VC from "../../components/events-editor/index.esm.js"; import DC from "../../components/mapping-editor/index.esm.js"; import LC from "../../components/schema-selector/index.esm.js"; import bp, { EditorType as NC } from "../../components/event-parameter/index.esm.js"; import RC from "../../components/filter-condition-editor/index.esm.js"; import $C from "../../components/sort-condition-editor/index.esm.js"; import jC from "../../components/menu-lookup/index.esm.js"; import HC from "../../components/json-editor/index.esm.js"; import _C from "../../components/property-editor/index.esm.js"; import zC, { FExpressionTextbox as WC } from "../../components/expression-editor/index.esm.js"; import qC from "../../components/code-editor/index.esm.js"; import UC, { useButtonItemsDesigner as GC } from "../../components/collection-property-editor/index.esm.js"; import YC from "../modal/index.esm.js"; import QC from "../../components/tooltip/index.esm.js"; import KC, { FTreeGrid as Au } from "../../components/tree-grid/index.esm.js"; import XC, { FDynamicForm as JC, FDynamicFormLabel as ZC, FDynamicFormGroup as Xl, useTypeResolver as Cp, FDynamicFormInput as ew } from "../../components/dynamic-form/index.esm.js"; import tw, { FTimePickerTimeView as Zc, convertToDate as nw, FTouchTimePickerTimeView as aw } from "../../components/time-picker/index.esm.js"; import Vu from "../../components/capsule/index.esm.js"; import { createI18n as ow, useI18n as iw } from "vue-i18n"; import { DgControl as lw } from "../../components/designer-canvas/index.esm.js/"; import { FDatePicker as ed } from "../../components/components/index.esm.js"; import { FCheckboxGroup as rw } from "../../components/checkbox-group/index.esm.js"; import { SearchRelation as sw, SearchComparisonOperator as uw } from "../../components/field-search-box/index.esm.js"; import ei from "../../components/scroll-list/index.esm.js"; import Du from "../../components/response-toolbar/index.esm.js"; import cw, { FLoadingService as dw } from "../../components/loading/index.esm.js"; import { FMessageBoxService as fw } from "../../components/message-box/index.esm.js"; import pw from "../../components/textarea/index.esm.js"; import { useColumnOption as mw, useCommandOption as hw, useRowOption as vw, useSummary as gw, useGroup as yw, useSort as bw, useFilter as Cw, useAppearance as ww, useSelection as Sw, useRowNumber as xw, usePagination as Tw, useDataGridEvent as kw } from "../data-view/index.esm.js"; import { useFormRules as Fw } from "../../components/form-rules/index.esm.js/use-formrules"; function wp(e, t) { let n; function a(s) { const { properties: f, title: h, ignore: m } = s, v = m && Array.isArray(m), b = Object.keys(f).reduce((y, g) => ((!v || !m.find((C) => C === g)) && (y[g] = f[g].type === "object" && f[g].properties ? a(f[g]) : bt(f[g].default)), y), {}); if (h && (!v || !m.find((y) => y === "id"))) { const y = h.toLowerCase().replace(/-/g, "_"); b.id = `${y}_${Math.random().toString().slice(2, 6)}`; } return b; } function o(s) { const { properties: f, title: h, required: m } = s; if (m && Array.isArray(m)) { const v = m.reduce((b, y) => (b[y] = f[y].type === "object" && f[y].properties ? a(f[y]) : bt(f[y].default), b), {}); if (h && m.find((b) => b === "id")) { const b = h.toLowerCase().replace(/-/g, "_"); v.id = `${b}_${Math.random().toString().slice(2, 6)}`; } return v; } return { type: h }; } function i(s, f = {}, h) { const m = e[s]; if (m) { let v = o(m); const b = t[s]; return v = b ? b({ getSchemaByType: i }, v, f, h) : v, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(v), v; } return null; } function l(s, f) { const h = a(f); return Object.keys(h).reduce((m, v) => (Object.prototype.hasOwnProperty.call(s, v) && (m[v] && Gc(m[v]) && Gc(s[v] || !s[v]) ? Object.assign(m[v], s[v] || {}) : m[v] = s[v]), m), h), h; } function r(s, f) { return Object.keys(s).filter((m) => s[m] != null).reduce((m, v) => { if (f.has(v)) { const b = f.get(v); if (typeof b == "string") m[b] = s[v]; else { const y = b(v, s[v], s); Object.assign(m, y); } } else m[v] = s[v]; return m; }, {}); } function c(s, f, h = /* @__PURE__ */ new Map()) { const m = l(s, f); return r(m, h); } function p(s) { var h; const f = s.type; if (f) { const m = e[f]; if (!m) return s; const v = l(s, m), b = ((h = s.editor) == null ? void 0 : h.type) || ""; if (b) { const y = e[b], g = l(s.editor, y); v.editor = g; } return v; } return s; } function d(s) { n = s; } return { getSchemaByType: i, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: c, mappingSchemaToProps: r, setDesignerContext: d }; } const Sp = {}, xp = {}, { resolveSchemaWithDefaultValue: Mw, resolveSchemaToProps: Pw, mappingSchemaToProps: Iw } = wp(Sp, xp); function Ew(e = {}) { function t(p, d, s, f) { if (typeof s == "number") return f[p].length === s; if (typeof s == "object") { const h = Object.keys(s)[0], m = s[h]; if (h === "not") return Number(f[p].length) !== Number(m); if (h === "moreThan") return Number(f[p].length) >= Number(m); if (h === "lessThan") return Number(f[p].length) <= Number(m); } return !1; } function n(p, d, s, f) { return f[p] && f[p].propertyValue && String(f[p].propertyValue.value) === String(s); } const a = /* @__PURE__ */ new Map([ ["length", t], ["getProperty", n] ]); Object.keys(e).reduce((p, d) => (p.set(d, e[d]), p), a); function o(p, d) { const s = p; return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((f) => { if (f === "length") return { target: s, operator: "length", param: null, value: d[f] }; const h = f, m = d[f]; return { target: s, operator: "getProperty", param: h, value: m }; }) : []; } function i(p) { return Object.keys(p).reduce((s, f) => { const h = o(f, p[f]); return s.push(...h), s; }, []); } function l(p, d) { if (a.has(p.operator)) { const s = a.get(p.operator); return s && s(p.target, p.param, p.value, d) || !1; } return !1; } function r(p, d) { return i(p).reduce((h, m) => h && l(m, d), !0); } function c(p, d) { const s = Object.keys(p), f = s.includes("allOf"), h = s.includes("anyOf"), m = f || h, y = (m ? p[m ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((C) => r(C, d)); return f ? !y.includes(!1) : y.includes(!0); } return { parseValueSchema: c }; } const Bw = { convertTo: (e, t, n, a) => { e.appearance || (e.appearance = {}), e.appearance[t] = n; }, convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t] }, Ow = { convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无" }, Aw = { 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] }, ea = { 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: "列表导航" }, nav: { type: "nav", name: "标签类导航" }, "list-view": { type: "list-view", name: "列表" }, "filter-bar": { type: "filter-bar", name: "筛选条" }, "language-textbox": { type: "language-textbox", name: "多语输入框" }, image: { type: "image", name: "图像" }, avatar: { type: "avatar", name: "头像" }, "discussion-editor": { type: "discussion-editor", name: "评论编辑区" }, "discussion-list": { type: "discussion-list", name: "评论列表" }, comment: { type: "comment", name: "评论区" }, "approval-logs": { type: "approval-logs", 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: "动态表单" } }, Vw = { convertFrom: (e, t, n) => { var o; const a = e.editor && e.editor[t] ? e.editor[t] : e[t]; return ((o = ea[a]) == null ? void 0 : o.name) || a; } }, Dw = { convertTo: (e, t, n, a) => { e[t] = e[t]; }, convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : "" }, Lw = { 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"; } return "none"; } }, Nw = { 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.formatter = "", 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: "link" }, { value: "remove", text: "删除", type: "link" } ]), t === "enableType" && n === "unable" && (e.command.enable = !1, e.command.formatter = ""); }, convertFrom: (e, t, n) => { var a, o; if (e.command) { if (t === "enableType") { if (e.command.enableType) return e.command.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 ""; } }, Rw = { 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 ""; } }, $w = { 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 : ""; } }, jw = { 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; } } }, Hw = { 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; } } }, _w = { convertTo: (e, t, n, a) => { e.pagination || (e.pagination = {}), t === "sizeLimits" ? e.pagination.sizeLimits = n.split(",") : e.pagination[t] = n; }, convertFrom: (e, t, n) => { var a; return e.pagination ? t === "sizeLimits" ? (a = e.pagination.sizeLimits) == null ? void 0 : a.join(",") : e.pagination[t] : e[t]; } }, zw = { convertTo: (e, t, n, a) => { e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n; }, convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t] }, Ww = { convertTo: (e, t, n, a) => { e.selection || (e.selection = {}), e.selection[t] = n; }, convertFrom: (e, t, n) => { if (!e.selection) return !!e[t]; const a = !!e.selection[t]; return t === "showCheckbox" && a == null && e.selection.multiSelect === !0 ? !0 : a; } }, qw = { convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : "" }, Uw = { convertFrom: (e, t) => e[t] || "", convertTo: (e, t, n) => { e[t] = n; } }, Gw = { convertTo: (e, t, n, a) => { e.size || (e.size = {}), e.size[t] = n; }, convertFrom: (e, t, n) => e.size ? e.size[t] : e[t] }, Yw = { 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; } }, Qw = { 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); } }, Kw = { convertTo: (e, t, n, a) => { e.filter || (e.filter = {}), e.filter[t] = n, t === "enable" && (e.enableFilter = !1); }, convertFrom: (e, t, n) => { var a, o, i, l; return t === "mode" ? ((a = e.filter) == null ? void 0 : a.mode) || "server" : t === "filterStyle" ? ((o = e.filter) == null ? void 0 : o.filterStyle) || "filter-column" : t === "enable" ? ((i = e.filter) == null ? void 0 : i.enable) !== void 0 ? !!e.filter.enable : !!e.enableFilter : ((l = e.filter) == null ? void 0 : l[t]) || void 0; } }, Xw = { 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 ""; } }, Jw = { 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" : "" }, Zw = { convertTo: (e, t, n, a) => { e.hierarchy || (e.hierarchy = { cascadeOption: {} }), e.hierarchy.cascadeOption || (e.hierarchy.cascadeOption = {}), e.hierarchy.cascadeOption[t] = n; }, convertFrom: (e, t, n) => { var a, o; return !!((o = (a = e.hierarchy) == null ? void 0 : a.cascadeOption) != null && o[t]); } }; function Tp(e, t, n) { const a = /* @__PURE__ */ new Map([ ["/converter/appearance.converter", Bw], ["/converter/buttons.converter", Ow], ["/converter/property-editor.converter", Aw], ["/converter/items-count.converter", qw], ["/converter/type.converter", Vw], ["/converter/change-editor.converter", Dw], ["/converter/change-formatter.converter", Lw], ["/converter/column-command.converter", Nw], ["/converter/column-option.converter", Rw], ["/converter/summary.converter", $w], ["/converter/group.converter", jw], ["/converter/form-group-label.converter", Uw], ["/converter/field-selector.converter", Hw], ["/converter/pagination.converter", _w], ["/converter/row-number.converter", zw], ["/converter/grid-selection.converter", Ww], ["/converter/size.converter", Gw], ["/converter/change-formatter-enum.converter", Yw], ["/converter/grid-sort.converter", Qw], ["/converter/grid-filter.converter", Kw], ["/converter/row-option.converter", Xw], ["/converter/change-formatter-type.converter", Jw], ["/converter/tree-auto-check.converter", Zw] ]), 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 = Ew(); function l(m, v) { return () => i.parseValueSchema(m, v); } function r(m, v, b) { return m.includes("visible") && v.visible !== void 0 ? typeof v.visible == "boolean" ? () => !!v.visible : v.visible === void 0 ? !0 : l(v.visible, b) : () => !0; } function c(m, v, b) { return m.includes("readonly") && v.readonly !== void 0 ? typeof v.readonly == "boolean" ? () => !!v.readonly : l(v.readonly, b) : () => !1; } function p(m, v) { const b = m.$converter || v; return typeof b == "string" && b && a.has(b) ? a.get(b) || null : b || null; } function d(m, v, b, y, g, C = "", k = "") { return Object.keys(m).map((F) => { const x = w(1), T = F, I = m[F], M = Object.keys(I), B = I.title, E = I.type, P = o.get(E) || { type: "input-group", enableClear: !1 }, O = I.editor ? Object.assign({}, P, I.editor) : Object.assign({}, P), V = r(M, I, v), A = c(M, I, v); O.readonly = O.readonly === void 0 ? A() : O.readonly; const L = I.type === "cascade" ? d(I.properties, v, b, y, g, C, k) : [], $ = !0; let _ = p(I, k); const H = D({ get() { if (x.value) { if (["class", "style"].find((X) => X === T) && !_ && (_ = a.get("/converter/appearance.converter") || null), _ && _.convertFrom) { const X = _.convertFrom(b, F, g, C); return X === void 0 && Object.prototype.hasOwnProperty.call(I, "defaultValue") ? I.type === "boolean" ? I.defaultValue : I.defaultValue || "" : X; } const Z = b[F]; return Object.prototype.hasOwnProperty.call(I, "defaultValue") && (Z === void 0 || typeof Z == "string" && Z === "") ? I.type === "boolean" ? I.defaultValue : I.defaultValue || "" : Z; } return null; }, set(Z) { x.value += 1, _ && _.convertTo ? (_.convertTo(y, F, Z, g, C), _.convertTo(b, F, Z, g, C)) : (y[F] = Z, b[F] = Z); } }), { refreshPanelAfterChanged: j, description: Y, isExpand: Q, parentPropertyID: z } = I, G = { propertyID: T, propertyName: B, propertyType: E, propertyValue: H, editor: O, visible: V, readonly: A, cascadeConfig: L, hideCascadeTitle: $, refreshPanelAfterChanged: j, description: Y, isExpand: Q, parentPropertyID: z }; return v[T] = G, G; }); } function s(m, v, b = {}) { const y = {}, g = e[m]; return g && g.categories ? Object.keys(g.categories).map((k) => { const S = g.categories[k], F = S == null ? void 0 : S.title, x = d(S.properties || {}, y, {}, b, v); return { categoryId: k, categoryName: F, properties: x }; }) : []; } function f(m, v, b, y, g = "") { const C = v.$ref.schema, k = v.$ref.converter, S = b[C], F = S.type, x = n(S), T = {}, I = e[F]; if (I && I.categories) { const M = I.categories[m], B = M == null ? void 0 : M.title; k && Object.keys(M.properties).forEach((O) => { M.properties[O].$converter = k; }); const E = (M == null ? void 0 : M.properties) || {}, P = d(E, T, x, S, y, g); return { categoryId: m, categoryName: B, properties: P }; } return { categoryId: m, categoryName: "", properties: [] }; } function h(m, v, b, y, g) { const C = m.type, k = n(m), S = {}; let F = g || e[C]; if (!(F && Object.keys(F).length > 0) && b && b.getPropConfig && (F = b.getPropConfig(y)), F && F.categories) { const T = []; return Object.keys(F.categories).map((I) => { const M = F.categories[I]; if (M.$ref) { T.push(f(I, M, m, v, y)); return; } const B = M == null ? void 0 : M.title, E = M == null ? void 0 : M.tabId, P = M == null ? void 0 : M.tabName, O = M == null ? void 0 : M.hide, V = M == null ? void 0 : M.hideTitle, A = d(M.properties || {}, S, k, m, v, y, M.$converter), { setPropertyRelates: L } = M, $ = M == null ? void 0 : M.parentPropertyID; T.push({ categoryId: I, categoryName: B, tabId: E, tabName: P, hide: O, properties: A, hideTitle: V, setPropertyRelates: L, parentPropertyID: $ }); }), T; } return []; } return { getPropertyConfigBySchema: h, getPropertyConfigByType: s, propertyConverterMap: a }; } const kp = {}, Fp = {}; Tp(kp, Fp, Mw); const Mp = {}, Pp = {}, { resolveSchemaWithDefaultValue: eS } = wp(Mp, Pp), Ip = {}, Ep = {}; Tp(Ip, Ep, eS); function ol(e, t, n = /* @__PURE__ */ new Map(), a = (l, r, c, p) => r, o = {}, i = (l) => l) { return Sp[t.title] = t, xp[t.title] = a, kp[t.title] = o, Fp[t.title] = i, Mp[t.title] = t, Pp[t.title] = a, Ip[t.title] = o, Ep[t.title] = i, (l = {}, r = !0) => { if (!r) return Iw(l, n); const c = Pw(l, t, n), p = Object.keys(e).reduce((d, s) => (d[s] = e[s].default, d), {}); return Object.assign(p, c); }; } function Bp(e, t) { return { customClass: t.class, customStyle: t.style }; } function tS() { function e(t, n) { const { id: a } = t || {}, { dataSource: o } = t || {}; return o === void 0 ? {} : { events: n.getValue(a) }; } return { resolve: e }; } function nS(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 aS() { 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 = nS(o, l); return r ? r.onClick || r.click : null; } return { resolve: e }; } function oS(e, t) { return null; } function Bl(e) { const t = e == null ? void 0 : e.fitColumns; return t === !0 || typeof t == "object" && t !== null && "enable" in t && t.enable === !0; } const Op = { /** 自定义样式 */ 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", columnWidth: 150 } }, /** 被绑定数据 */ 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 }, mergeFields: { type: Object, default: [] }, /** 最小高度 */ 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: oS }, /** 绑定动态字段的值*/ 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: "" }, visible: { type: Boolean, default: !0 }, /** 启用列设置方案 */ enableColumnSettingSolution: { type: Boolean, default: !1 } }, iS = aS(), lS = iy(Object.assign({}, Op, { disabled: {}, editable: {}, componentId: { type: String, default: "" } }), "columnOption", "commandOption"); function rS(e, t, n, a, o) { const { getGridHeaderCells: i } = o, l = 120, r = 50, c = D(() => { var x; return ((x = e.rowNumber) == null ? void 0 : x.enable) || !1; }), p = D(() => { var x, T; return ((x = e.selection) == null ? void 0 : x.multiSelect) === !0 || ((T = e.selection) == null ? void 0 : T.showCheckbox) === !0; }), d = D( () => { var x; return 0 + (c.value ? ((x = e.rowNumber) == null ? void 0 : x.width) || 32 : 0) + (p.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 h(x, T, I) { const M = parseInt(x.width, 10) / 100; return I * M; } function m(x, T, I) { return typeof x.width == "string" ? h(x, T, I) : x.width || l; } function v(x, T) { const I = [], M = []; let B = 0; x.value.primaryColumns.forEach((O) => { typeof O.width == "string" ? M.push(O) : (O.width = O.width || l, B += O.width, I.push(O)); }); const E = T * (I.length / x.value.primaryColumns.length); I.forEach((O) => { const V = E * (O.width / B); O.actualWidth = V, x.value.primaryColumnsWidth += O.actualWidth; }); const P = T - E; M.forEach((O) => { const V = h(O, x.value, P); O.actualWidth = V, x.value.primaryColumnsWidth += O.actualWidth; }); } function b(x, T) { const I = [], M = [], B = /* @__PURE__ */ new WeakMap(); let E = 0, P = 0; if (x.value.primaryColumns.forEach((V) => { if (typeof V.width == "string") { const A = h(V, x.value, T); B.set(V, A), E += A, M.push(V); } else V.width = V.width || l, P += V.width, I.push(V); }), T - E > P) { const V = T - E; M.forEach((A) => { A.actualWidth = B.get(A) || l, x.value.primaryColumnsWidth += A.actualWidth; }), I.forEach((A) => { A.actualWidth = V * (A.width / P), x.value.primaryColumnsWidth += A.actualWidth; }); } else v(x, T); } function y(x, T) { x.value.primaryColumns.forEach((I) => { I.actualWidth = m(I, x.value, T), x.value.primaryColumnsWidth += I.actualWidth; }); } const g = { expand: b, none: y, percentage: v }; function C(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 S(x, T, I) { var A; let M = 0; const B = x.value.primaryColumns, E = x.value.rightColumns; x.value.rightColumns.forEach((L) => { L.actualWidth = m(L, x.value, T), M += L.actualWidth; }); const P = I - M, O = g[f.value]; if (O && O(x, P), x.value.primaryColumnsWidth + M <= I) return x.value.primaryColumns = [...B, ...E], x.value.primaryColumnsWidth += M, x.value.rightColumns = [], x.value.rightColumnsWidth = 0, !0; const V = /* @__PURE__ */ new Map(); return V.set("primary", []), V.set("right", []), x.value.primaryColumns.reduce((L, $) => { var _, H; return $.fixed === "right" ? (_ = L.get("right")) == null || _.push($) : (H = L.get("primary")) == null || H.push($), L; }, V), (A = V.get("right")) != null && A.length && (x.value.primaryColumns = [...V.get("primary") || []], x.value.rightColumns = [...V.get("right") || []]), x.value.primaryColumnsWidth = 0, x.value.rightColumnsWidth = 0, !1; } function F() { if (n.value) { t.value.leftColumnsWidth = 0, t.value.primaryColumnsWidth = 0, t.value.rightColumnsWidth = 0; const x = n.value.clientWidth - d.value; t.value.leftColumns.forEach((I) => { I.actualWidth = m(I, t.value, x), t.value.leftColumnsWidth += I.actualWidth; }); const T = x - t.value.leftColumnsWidth; if (S(t, x, T)) a.value = T; else { t.value.rightColumns.forEach((B) => { B.actualWidth = m(B, t.value, x), t.value.rightColumnsWidth += B.actualWidth; }); const I = x - t.value.leftColumnsWidth - t.value.rightColumnsWidth, M = g[f.value]; M && M(t, I), a.value = I; } C(t), t.value = Object.assign({}, t.value); } } return J(() => { var x; return (x = e.columnOption) == null ? void 0 : x.fitColumns; }, (x, T) => { x !== T && x && F(); }), J(f, (x, T) => { x !== T && s.value && F(); }), { calculateColumnHeaders: C, calculateColumnsSize: F, calculateColumnsWidth: k }; } const sS = ""; function uS(e) { const a = w({ 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 = w(e.summary), l = D(() => { const F = i.value; return (F == null ? void 0 : F.groupFields) || []; }); function r() { a.value.rightColumns.forEach((T) => { T.showSetting = !1; }), a.value.primaryColumns.forEach((T) => { T.showSetting = !1; }); const F = a.value.rightColumns, x = a.value.primaryColumns; F.length > 0 ? F[F.length - 1].showSetting = !0 : x.length > 0 && (x[x.length - 1].showSetting = !0); } function c(F) { o(); const x = /* @__PURE__ */ new Map(); return l.value && l.value.reduce((T, I) => (T.set(I, !0), T), x), F.reduce((T, I) => (I.filter = I.filter || sS, I.fixed === "left" ? (a.value.leftColumns.push(I), a.value.leftColumnsMap.set(I.field, I), a.value.leftColumnsWidth += I.actualWidth) : I.fixed ==