UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,110 lines 2.22 MB
var vy = Object.defineProperty; var gy = (e, t, n) => t in e ? vy(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Y = (e, t, n) => gy(e, typeof t != "symbol" ? t + "" : t, n); import { excludeProperties as yy, useNumberFormat as qi, getCustomClass as Et, isMobilePhone as Yt, withInstall as Nt, isImageUrl as by, urlPrependBasePath as Eo, isBase64ImageUrl as Cy, getCustomStyle as dn, FormSchemaEntityField$Type as Xn, FormSchemaEntityFieldType$Type as Xa, EVENT_PROPERTY_TAB_IDS as _n, getMaxZIndex as Ni, useGuid as bn, resolveField as mt, useDateFormat as jn, useResizeObserver as Ms, CHECKBOX_CONTEXT as Cu, useCheck as wu, radioCheckboxCommonProps as Wf, useTouchMomentum as wy, useTouch as Sy, useCommonUtils as fa, useBem as kn, useFarrisConfig as xy, useThirdComponent as qf, FormSchemaEntityFieldTypeName as Hn, formatTime as Ty, getDateObject as Oa, isLeapYear as ky, compareDate as Kl, getDaysInMonth as Fy, useTextBox as Uf, useClear as Gf, encrypt as My, useDelayedRef as Py, RADIOGROUP_CONTEXT as Yf, useReqAnimationFrame as Ey, getTimeObject as as, formatObjecTime as Iy, setFieldValue as Ps, useNativeBack as By } from "../../components/common/index.esm.js"; import Xl, { FDataGrid as Ui, dataGridProps as Qf } from "../../components/data-grid/index.esm.js"; import { resolveAppearance as At, createPropsResolver as ft, getPropsResolverGenerator as Cn, getSchemaByTypeForDesigner as Oy, schemaResolverMap as Ay, propertyEffectMap as Vy, propertyConfigSchemaMap as Dy, schemaMap as Ly, getSchemaByType as Ri, resolveToolbar as Kf, createPageHeaderEventHandlerResolver as Xf, createEventsResolver as Jf, createFormBindingResolver as Ny, createCollectionBindingResolver as Ry, createDataGridSelectionItemResolver as $y, createDataViewUpdateColumnsResolver as jy } from "../../components/dynamic-resolver/index.esm.js"; import { ref as w, computed as D, watch as Z, createVNode as u, createTextVNode as Me, defineComponent as pe, provide as Zt, inject as De, onMounted as _e, Fragment as yt, nextTick as St, Teleport as fo, createApp as Ko, onUnmounted as Ut, onBeforeMount as Xo, watchEffect as Mr, Transition as Jl, shallowRef as Ol, render as os, h as Hy, cloneVNode as _y, mergeProps as an, withDirectives as qt, vShow as Da, onUpdated as zy, onBeforeUnmount as Zf, withModifiers as Jt, vModelText as $a, toRef as Wy, reactive as kt, resolveDirective as Yn, isVNode as Qn, Comment as ep, getCurrentInstance as Pr, resolveComponent as la, toRefs as Gi, toRaw as qy, vModelCheckbox as Su, vModelSelect as Uy, isRef as Gy } from "vue"; import { isPlainObject as od, cloneDeep as Pt, debounce as xa, isFunction as is, isUndefined as Vn, mergeWith as Zl, merge as $i, isNil as Yy, isNaN as Qy, flatten as tp, get as Ka, isEmpty as Ky, throttle as id } from "lodash-es"; import { useResizeObserver as Er } from "@vueuse/core"; import { FNotifyService as pa, F_NOTIFY_SERVICE_TOKEN as Yi } from "../../components/notify/index.esm.js"; import Ir, { FCheckbox as xu } from "../../components/checkbox/index.esm.js"; import po from "../../components/popover/index.esm.js"; import { LocaleService as We } from "../../components/locale/index.esm.js"; import { F_MODAL_SERVICE_TOKEN as Tu } from "../../components/modal/index.esm.js"; import Xy from "../../components/transfer/index.esm.js"; import Jy, { FTabPage as Zy } from "../../components/tabs/index.esm.js"; import eb from "../../components/filter-bar/index.esm.js"; import { CompareType as ut, useConditionValue as tb, useConditionUtils as ku, FConditionFields as ld, FConditionFieldsDesign as rd, useCondition as nb, ValueType as ln, TextValue as np, CheckBoxValue as ab, ComboListValue as ob, ComboLookupValue as ib, FilterDatePickerValue as lb, FilterDateTimePickerValue as rb, MonthPickerValue as sb, MonthRangeValue as ub, FilterNumberSpinnerValue as cb, RadioGroupValue as db, FilterInputGroupValue as fb, FilterDateRangeValue as pb, NumberRangeValue as mb } from "../../components/condition/index.esm.js"; import ap, { FInputGroup as er } from "../../components/input-group/index.esm.js"; import tr, { FTouchComboListContainer as op, useDataSource as hb, FComboListContainer as vb, FComboList as Jo } from "../../components/combo-list/index.esm.js"; import Ei, { FButton as Uo } from "../../components/button/index.esm.js"; import ip, { useNumber as gb, useFormat as yb, useSpinner as bb, useTextBox as Cb, getSpinnerRender as wb, getNumberTextBoxRender as Sb, FNumberSpinner as Al, useNumberLocales as xb } from "../../components/number-spinner/index.esm.js"; import Es from "../../components/date-picker/index.esm.js"; import lp from "../../components/pagination/index.esm.js"; import { useFilter as Qi, useIdentify as Ki, useHierarchy as Xi, useGroupData as Fu, useDataView as Ji, useSelection as Zi, usePagination as Mu, useRow as el, useEdit as tl, useVisualDataBound as nl, useVisualDataCell as al, useVisualDataRow as ol, useVisualGroupRow as rp, useVisualSummaryRow as sp, useVisualData as il, useSidebar as Br, useColumn as ll, useVirtualScroll as rl, getHierarchyRow as up, useLoading as cp, useSelectHierarchyItem as Pu, useDataViewContainerStyle as Or, useCommandColumn as dp, useSettingColumn as fp, useSort as pp, useGroupColumn as Eu, useCellPosition as Ar, useFitColumn as Iu, useFilterHistory as mp, useColumnFilter as hp, useDragColumn as vp, getColumnHeader as gp, getSidebar as Bu, getDisableMask as yp, getHorizontalScrollbar as Ou, getVerticalScrollbar as Au, getEmpty as Vu, getPagination as bp, getSummary as Cp, ColumnSettingSolution as wp, refreshScrollAfterDataSourceLoad as Sp, COMMAND_COLUMN_DATA_TYPE as Ca, SETTING_COLUMN_DATA_TYPE as wa, SETTING_COLUMN_FIELD as Tb, COMMAND_COLUMN_FIELD as kb, CellMode as xp, useScreen as Du, useCellContentStyle as Fb, getFilterPanel as Mb, getGroupPanel as Pb, useAdapt as Eb, useNavigation as Ib, GridFieldEditorUsage as Io } from "../../components/data-view/index.esm.js"; import Tp from "../../components/button-group/index.esm.js"; import Lu from "../../components/drawer/index.esm.js"; import { FSwitch as Bb } from "../../components/switch/index.esm.js"; import Ob from "../../components/language-textbox/index.esm.js"; import Ab, { radioGroupProps as Vb, FRadioGroup as Db } from "../../components/radio-group/index.esm.js"; import kp from "../../components/list-view/index.esm.js"; import { useDesignerComponent as on, DgControl as Ae, canvasChanged as Ai, refreshCanvas as Lb, setPositionOfButtonGroup as Fp, useDragulaCommonRule as Mp, UseTemplateDragAndDropRules as Pp, FDesignerItem as Nb } from "../../components/designer-canvas/index.esm.js"; import Ep from "../../components/color-picker/index.esm.js"; import { BaseControlProperty as Nu, InputBaseProperty as ma, ExpressionProperty as Rb, FormBindingType as Si, SchemaDOMMapping as $b } from "../../components/property-panel/index.esm.js"; import jb, { FieldSelectorRepositoryToken as Vl } from "../../components/field-selector/index.esm.js"; import "../../components/collection-property-editor/index.esm.js/src/use-button-items.designer"; import Hb from "../../components/tags/index.esm.js"; import { useInputExpand as Ru } from "../../components/common/index.esm.js/text-box/use-input-expand"; import ja, { FButtonEdit as sl } from "../../components/button-edit/index.esm.js"; import Wt from "bignumber.js"; import $u from "../button-edit/index.esm.js"; import La from "../../components/tree-view/index.esm.js"; import { resolveField as _b } from "../../components/common/index.esm.js/utils/resolve-field"; import zb from "../../components/binding-selector/index.esm.js"; import Wb from "../../components/accordion/index.esm.js"; import qb from "../avatar/index.esm.js"; import Ub from "../approval-logs/index.esm.js"; import Gb from "../../components/calendar/index.esm.js"; import Yb from "../capsule/index.esm.js"; import sd from "../checkbox/index.esm.js"; import ud from "../checkbox-group/index.esm.js"; import Qb from "../../components/content-container/index.esm.js"; import Kb from "../../components/table/index.esm.js"; import Xb from "../data-grid/index.esm.js"; import Jb from "../date-picker/index.esm.js"; import Zb from "../../components/dropdown/index.esm.js"; import eC from "../dynamic-form/index.esm.js"; import tC from "../../components/external-container/index.esm.js"; import nC from "../../components/image-cropper/index.esm.js"; import aC from "../input-group/index.esm.js"; import ju, { FLayout as oC, FLayoutPane as Go } from "../../components/layout/index.esm.js"; import iC from "../../components/list-nav/index.esm.js"; import lC from "../list-view/index.esm.js"; import Ip from "../../components/lookup/index.esm.js"; import rC from "../nav/index.esm.js"; import sC from "../number-spinner/index.esm.js"; import uC from "../../components/number-range/index.esm.js"; import cC from "../../components/order/index.esm.js"; import dC from "../../components/page-header/index.esm.js"; import fC from "../../components/page-footer/index.esm.js"; import pC from "../../components/progress/index.esm.js"; import mC, { useCondition as hC, useSolutionUtils as Bp } from "../../components/query-solution/index.esm.js"; import vC from "../radio-group/index.esm.js"; import gC from "../rate/index.esm.js"; import yC, { commonToolbarItemDesignProps as bC } from "../response-toolbar/index.esm.js"; import CC from "../../components/response-layout/index.esm.js"; import wC from "../response-layout-editor/index.esm.js"; import SC from "../../components/search-box/index.esm.js"; import xC from "../section/index.esm.js"; import TC from "../../components/smoke-detector/index.esm.js"; import kC from "../../components/splitter/index.esm.js"; import Op from "../../components/step/index.esm.js"; import FC from "../switch/index.esm.js"; import MC from "../tabs/index.esm.js"; import PC from "../tags/index.esm.js"; import EC from "../../components/text/index.esm.js"; import IC from "../time-picker/index.esm.js"; import BC from "../../components/uploader/index.esm.js"; import OC from "../../components/verify-detail/index.esm.js"; import AC from "../../components/component/index.esm.js"; import VC from "../../components/video/index.esm.js"; import DC from "../textarea/index.esm.js"; import LC from "../tree-grid/index.esm.js"; import NC from "../../components/fieldset/index.esm.js"; import RC from "../drawer/index.esm.js"; import $C from "../../components/html-template/index.esm.js"; import jC from "../../components/image/index.esm.js"; import HC from "../../components/comment/index.esm.js"; import _C from "../wizard/index.esm.js"; import { loadRegister as zC, useComponentManager as WC, useEntityState as qC, useDynamicViewUtils as UC, componentMap as ls, resolverMap as GC, componentPropsConverter as YC } from "../../components/dynamic-view/index.esm.js"; import Is from "../../components/section/index.esm.js"; import QC from "../../components/combo-tree/index.esm.js"; import KC from "../../components/events-editor/index.esm.js"; import XC from "../../components/mapping-editor/index.esm.js"; import JC from "../../components/schema-selector/index.esm.js"; import Ap, { EditorType as ZC } from "../../components/event-parameter/index.esm.js"; import ew from "../../components/filter-condition-editor/index.esm.js"; import tw from "../../components/sort-condition-editor/index.esm.js"; import nw from "../../components/menu-lookup/index.esm.js"; import aw from "../../components/json-editor/index.esm.js"; import ow from "../../components/property-editor/index.esm.js"; import iw, { FExpressionTextbox as lw } from "../../components/expression-editor/index.esm.js"; import rw from "../../components/code-editor/index.esm.js"; import sw, { useButtonItemsDesigner as uw } from "../../components/collection-property-editor/index.esm.js"; import cw from "../modal/index.esm.js"; import dw from "../../components/tooltip/index.esm.js"; import fw, { FTreeGrid as Hu } from "../../components/tree-grid/index.esm.js"; import pw, { FDynamicForm as mw, FDynamicFormLabel as hw, FDynamicFormGroup as nr, useTypeResolver as Vp, FDynamicFormInput as vw } from "../../components/dynamic-form/index.esm.js"; import gw, { FTimePickerTimeView as cd, convertToDate as yw, FTouchTimePickerTimeView as bw } from "../../components/time-picker/index.esm.js"; import _u from "../../components/capsule/index.esm.js"; import { createI18n as Cw, useI18n as ww } from "vue-i18n"; import { DgControl as Sw } from "../../components/designer-canvas/index.esm.js/"; import { FDatePicker as dd } from "../../components/components/index.esm.js"; import { FCheckboxGroup as xw } from "../../components/checkbox-group/index.esm.js"; import { SearchRelation as rs, SearchComparisonOperator as ss } from "../../components/field-search-box/index.esm.js"; import Zo from "../../components/scroll-list/index.esm.js"; import zu from "../../components/response-toolbar/index.esm.js"; import Tw, { FLoadingService as kw } from "../../components/loading/index.esm.js"; import { FMessageBoxService as Fw } from "../../components/message-box/index.esm.js"; import Mw from "../../components/textarea/index.esm.js"; import "../../components/avatar/index.esm.js/src/property-config/avatar.property-config"; import "../../components/checkbox-group/index.esm.js/src/property-config/check-group.property-config"; import "../../components/checkbox/index.esm.js/src/property-config/checkbox.property-config"; import "../../components/combo-list/index.esm.js/src/property-config/combo-list.property-config"; import "../../components/date-picker/index.esm.js/src/property-config/date-picker.property-config"; import "../../components/input-group/index.esm.js/src/property-config/input-group.property-config"; import "../../components/language-textbox/index.esm.js/src/property-config/language-textbox.property-config"; import "../../components/lookup/index.esm.js/src/property-config/lookup.property-config"; import "../../components/number-range/index.esm.js/src/property-config/number-range.property-config"; import "../../components/number-spinner/index.esm.js/src/property-config/number-spinner.property-config"; import "../../components/radio-group/index.esm.js/src/property-config/radio-group.property-config"; import "../../components/switch/index.esm.js/src/property-config/switch.property-config"; import "../../components/textarea/index.esm.js/src/property-config/textarea.property-config"; import "../../components/time-picker/index.esm.js/src/property-config/time-picker.property-config"; import { useColumnOption as Pw, useCommandOption as Ew, useRowOption as Iw, useSummary as Bw, useGroup as Ow, useSort as Aw, useFilter as Vw, useAppearance as Dw, useSelection as Lw, useRowNumber as Nw, usePagination as Rw, useDataGridEvent as $w } from "../data-view/index.esm.js"; import { useFormRules as jw } from "../../components/form-rules/index.esm.js/use-formrules"; function Dp(e, t) { let n; function a(s) { const { properties: f, title: h, ignore: m } = s, v = m && Array.isArray(m), y = Object.keys(f).reduce((b, g) => ((!v || !m.find((C) => C === g)) && (b[g] = f[g].type === "object" && f[g].properties ? a(f[g]) : Pt(f[g].default)), b), {}); if (h && (!v || !m.find((b) => b === "id"))) { const b = h.toLowerCase().replace(/-/g, "_"); y.id = `${b}_${Math.random().toString().slice(2, 6)}`; } return y; } function o(s) { const { properties: f, title: h, required: m } = s; if (m && Array.isArray(m)) { const v = m.reduce((y, b) => (y[b] = f[b].type === "object" && f[b].properties ? a(f[b]) : Pt(f[b].default), y), {}); if (h && m.find((y) => y === "id")) { const y = h.toLowerCase().replace(/-/g, "_"); v.id = `${y}_${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 y = t[s]; return v = y ? y({ 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] && od(m[v]) && od(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 y = f.get(v); if (typeof y == "string") m[y] = s[v]; else { const b = y(v, s[v], s); Object.assign(m, b); } } 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), y = ((h = s.editor) == null ? void 0 : h.type) || ""; if (y) { const b = e[y], g = l(s.editor, b); v.editor = g; } return v; } return s; } function d(s) { n = s; } return { getSchemaByType: i, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: c, mappingSchemaToProps: r, setDesignerContext: d }; } const Lp = {}, Np = {}, { resolveSchemaWithDefaultValue: Hw, resolveSchemaToProps: _w, mappingSchemaToProps: zw } = Dp(Lp, Np); function Ww(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, b = (m ? p[m ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((C) => r(C, d)); return f ? !b.includes(!1) : b.includes(!0); } return { parseValueSchema: c }; } const qw = { convertTo: (e, t, n, a) => { e.appearance || (e.appearance = {}), e.appearance[t] = n; }, convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t] }, Uw = { convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无" }, Gw = { 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] }, Un = { button: { type: "button", name: "按钮" }, "response-toolbar": { type: "response-toolbar", name: "工具栏" }, "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" }, "content-container": { type: "content-container", name: "容器" }, table: { type: "table", name: "表格布局" }, "table-td": { type: "table-td", 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: "动态表单" } }, Yw = { convertFrom: (e, t, n) => { var o; const a = e.editor && e.editor[t] ? e.editor[t] : e[t]; return ((o = Un[a]) == null ? void 0 : o.name) || a; } }, Qw = { convertTo: (e, t, n, a) => { e[t] = e[t]; }, convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : "" }, Kw = { 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"; } }, Xw = { 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 ""; } }, Jw = { convertTo: (e, t, n, a) => { if (e.column || (e.column = {}), t === "fitMode") { n && n !== "none" ? (e.column.fitColumns = !0, e.column.fitMode = n) : (e.column.fitColumns = !1, e.column.fitMode = "average"); return; } if (t === "fitColumns") { e.column.fitColumns = n, n && !e.column.fitMode && (e.column.fitMode = "average"); return; } e.column[t] = n; }, convertFrom: (e, t, n) => { if (e.column) { if (t === "fitMode") return e.column.fitColumns ? e.column.fitMode || "average" : "none"; if (t === "fitColumns") return e.column.fitColumns; } return t === "fitMode" ? "none" : ""; } }, Zw = { 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 : ""; } }, eS = { 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; } } }, tS = { 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; } } }, nS = { convertTo: (e, t, n, a) => { if (e.pagination || (e.pagination = {}), t === "sizeLimits") if (n == null) delete e.pagination.sizeLimits; else { const o = [...new Set( String(n).split(",").map((i) => i.trim()).filter((i) => i !== "").map((i) => parseInt(i, 10)).filter((i) => !Number.isNaN(i) && i > 0) )]; o.length > 0 ? e.pagination.sizeLimits = o : delete e.pagination.sizeLimits; } else 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]; } }, aS = { convertTo: (e, t, n, a) => { e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n; }, convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t] }, oS = { 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; } }, iS = { convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : "" }, lS = { convertFrom: (e, t) => e[t] || "", convertTo: (e, t, n) => { e[t] = n; } }, rS = { convertTo: (e, t, n, a) => { e.size || (e.size = {}), e.size[t] = n; }, convertFrom: (e, t, n) => e.size ? e.size[t] : e[t] }, sS = { 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; } }, uS = { 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); } }, cS = { 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; } }, dS = { 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 ""; } }, fS = { 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" : "" }, pS = { 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 Rp(e, t, n) { const a = /* @__PURE__ */ new Map([ ["/converter/appearance.converter", qw], ["/converter/buttons.converter", Uw], ["/converter/property-editor.converter", Gw], ["/converter/items-count.converter", iS], ["/converter/type.converter", Yw], ["/converter/change-editor.converter", Qw], ["/converter/change-formatter.converter", Kw], ["/converter/column-command.converter", Xw], ["/converter/column-option.converter", Jw], ["/converter/summary.converter", Zw], ["/converter/group.converter", eS], ["/converter/form-group-label.converter", lS], ["/converter/field-selector.converter", tS], ["/converter/pagination.converter", nS], ["/converter/row-number.converter", aS], ["/converter/grid-selection.converter", oS], ["/converter/size.converter", rS], ["/converter/change-formatter-enum.converter", sS], ["/converter/grid-sort.converter", uS], ["/converter/grid-filter.converter", cS], ["/converter/row-option.converter", dS], ["/converter/change-formatter-type.converter", fS], ["/converter/tree-auto-check.converter", pS] ]), 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 = Ww(); function l(m, v) { return () => i.parseValueSchema(m, v); } function r(m, v, y) { return m.includes("visible") && v.visible !== void 0 ? typeof v.visible == "boolean" ? () => !!v.visible : v.visible === void 0 ? !0 : l(v.visible, y) : () => !0; } function c(m, v, y) { return m.includes("readonly") && v.readonly !== void 0 ? typeof v.readonly == "boolean" ? () => !!v.readonly : l(v.readonly, y) : () => !1; } function p(m, v) { const y = m.$converter || v; return typeof y == "string" && y && a.has(y) ? a.get(y) || null : y || null; } function d(m, v, y, b, g, C = "", F = "") { return Object.keys(m).map((k) => { const x = w(1), T = k, P = m[k], M = Object.keys(P), E = P.title, I = P.type, B = o.get(I) || { type: "input-group", enableClear: !1 }, V = P.editor ? Object.assign({}, B, P.editor) : Object.assign({}, B), O = r(M, P, v), A = c(M, P, v); V.readonly = V.readonly === void 0 ? A() : V.readonly; const L = P.type === "cascade" ? d(P.properties, v, y, b, g, C, F) : [], R = !0; let H = p(P, F); const _ = D({ get() { if (x.value) { if (["class", "style"].find((K) => K === T) && !H && (H = a.get("/converter/appearance.converter") || null), H && H.convertFrom) { const K = H.convertFrom(y, k, g, C); return K === void 0 && Object.prototype.hasOwnProperty.call(P, "defaultValue") ? P.type === "boolean" ? P.defaultValue : P.defaultValue || "" : K; } const J = y[k]; return Object.prototype.hasOwnProperty.call(P, "defaultValue") && (J === void 0 || typeof J == "string" && J === "") ? P.type === "boolean" ? P.defaultValue : P.defaultValue || "" : J; } return null; }, set(J) { x.value += 1, H && H.convertTo ? (H.convertTo(b, k, J, g, C), H.convertTo(y, k, J, g, C)) : (b[k] = J, y[k] = J); } }), { refreshPanelAfterChanged: j, description: G, isExpand: X, parentPropertyID: U } = P, q = { propertyID: T, propertyName: E, propertyType: I, propertyValue: _, editor: V, visible: O, readonly: A, cascadeConfig: L, hideCascadeTitle: R, refreshPanelAfterChanged: j, description: G, isExpand: X, parentPropertyID: U }; return v[T] = q, q; }); } function s(m, v, y = {}) { const b = {}, g = e[m]; return g && g.categories ? Object.keys(g.categories).map((F) => { const S = g.categories[F], k = S == null ? void 0 : S.title, x = d(S.properties || {}, b, {}, y, v); return { categoryId: F, categoryName: k, properties: x }; }) : []; } function f(m, v, y, b, g = "") { const C = v.$ref.schema, F = v.$ref.converter, S = y[C], k = S.type, x = n(S), T = {}, P = e[k]; if (P && P.categories) { const M = P.categories[m], E = M == null ? void 0 : M.title; F && Object.keys(M.properties).forEach((V) => { M.properties[V].$converter = F; }); const I = (M == null ? void 0 : M.properties) || {}, B = d(I, T, x, S, b, g); return { categoryId: m, categoryName: E, properties: B }; } return { categoryId: m, categoryName: "", properties: [] }; } function h(m, v, y, b, g) { const C = m.type, F = n(m), S = {}; let k = g || e[C]; if (!(k && Object.keys(k).length > 0) && y && y.getPropConfig && (k = y.getPropConfig(b)), k && k.categories) { const T = []; return Object.keys(k.categories).map((P) => { const M = k.categories[P]; if (M.$ref) { T.push(f(P, M, m, v, b)); return; } const E = M == null ? void 0 : M.title, I = M == null ? void 0 : M.tabId, B = M == null ? void 0 : M.tabName, V = M == null ? void 0 : M.hide, O = M == null ? void 0 : M.hideTitle, A = d(M.properties || {}, S, F, m, v, b, M.$converter), { setPropertyRelates: L } = M, R = M == null ? void 0 : M.parentPropertyID; T.push({ categoryId: P, categoryName: E, tabId: I, tabName: B, hide: V, properties: A, hideTitle: O, setPropertyRelates: L, parentPropertyID: R }); }), T; } return []; } return { getPropertyConfigBySchema: h, getPropertyConfigByType: s, propertyConverterMap: a }; } const $p = {}, jp = {}; Rp($p, jp, Hw); const Hp = {}, _p = {}, { resolveSchemaWithDefaultValue: mS } = Dp(Hp, _p), zp = {}, Wp = {}; Rp(zp, Wp, mS); function ul(e, t, n = /* @__PURE__ */ new Map(), a = (l, r, c, p) => r, o = {}, i = (l) => l) { return Lp[t.title] = t, Np[t.title] = a, $p[t.title] = o, jp[t.title] = i, Hp[t.title] = t, _p[t.title] = a, zp[t.title] = o, Wp[t.title] = i, (l = {}, r = !0) => { if (!r) return zw(l, n); const c = _w(l, t, n), p = Object.keys(e).reduce((d, s) => (d[s] = e[s].default, d), {}); return Object.assign(p, c); }; } function qp(e, t) { return { customClass: t.class, customStyle: t.style }; } function hS() { function e(t, n) { const { id: a } = t || {}, { dataSource: o } = t || {}; return o === void 0 ? {} : { events: n.getValue(a) }; } return { resolve: e }; } function vS(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 gS() { 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 = vS(o, l); return r ? r.onClick || r.click : null; } return { resolve: e }; } function yS(e, t) { return null; } function Dl(e) { const t = e == null ? void 0 : e.fitColumns; return t === !0 || typeof t == "object" && t !== null && "enable" in t && t.enable === !0; } const Up = { /** 自定义表格 CSS 类名。 */ 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 }, /** 表格高度,单位 px。 */ 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: [] }, /** 最小高度,单位 px。 */ minHeight: { type: Number, default: 300 }, /** 最小宽度,单位 px。 */ 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 }, /** 是否显示滚动条,可选 `auto`、`always`、`never`。 */ 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 }, /** 表格宽度,单位 px。 */ width: { type: Number, default: -1 }, /** 空数据模板渲染函数。 */ emptyTemplate: { type: Object }, /** 数据更新前的回调函数。 */ beforeUpdate: { type: Function }, /** 绑定动态字段的解析器。 */ fieldsResolver: { type: Function, default: yS }, /** 绑定动态字段的值回调函数。 */ fieldsCallback: { type: Function, default: () => { } }, /** 展示模式,可选 `List` 或 `Card`。 */ 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 } }, bS = gS(), CS = yy(Object.assign({}, Up, { disabled: {}, editable: {}, componentId: { type: String, default: "" } }), "columnOption", "commandOption"); function wS(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, P) { const M = parseInt(x.width, 10) / 100; return P * M; } function m(x, T, P) { return typeof x.width == "string" ? h(x, T, P) : x.width || l; } function v(x, T) { const P = [], M = []; let E = 0; x.value.primaryColumns.forEach((V) => { typeof V.width == "string" ? M.push(V) : (V.width = V.width || l, E += V.width, P.push(V)); }); const I = T * (P.length / x.value.primaryColumns.length); P.forEach((V) => { const O = I * (V.width / E); V.actualWidth = O, x.value.primaryColumnsWidth += V.actualWidth; }); const B = T - I; M.forEach((V) => { const O = h(V, x.value, B); V.actualWidth = O, x.value.primaryColumnsWidth += V.actualWidth; }); } function y(x, T) { const P = [], M = [], E = /* @__PURE__ */ new WeakMap(); let I = 0, B = 0; if (x.value.primaryColumns.forEach((O) => { if (typeof O.width == "string") { const A = h(O, x.value, T); E.set(O, A), I += A, M.push(O); } else O.width = O.width || l, B += O.width, P.push(O); }), T - I > B) { const O = T - I; M.forEach((A) => { A.actualWidth = E.get(A) || l, x.value.primaryColumnsWidth += A.actualWidth; }), P.forEach((A) => { A.actualWidth = O * (A.width / B), x.value.primaryColumnsWidth += A.actualWidth; }); } else v(x, T); } function b(x, T) { x.value.primaryColumns.forEach((P) => { P.actualWidth = m(P, x.value, T), x.value.primaryColumnsWidth += P.actualWidth; }); } const g = { expand: y, none: b, 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 F(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, P) { var A; let M = 0; const E = x.value.primaryColumns, I = x.value.rightColumns; x.value.rightColumns.forEach((L) => { L.actualWidth = m(L, x.value, T), M += L.actualWidth; }); const B = P - M, V = g[f.value]; if (V && V(x, B), x.value.primaryColumnsWidth + M <= P) return x.value.primaryColumns = [...E, ...I], x.value.primaryColumnsWidth += M, x.value.rightColumns = [], x.value.rightColumnsWidth = 0, !0; const O = /* @__PURE__ */ new Map(); return O.set("primary", []), O.set("right", []), x.value.primaryColumns.reduce((L, R) => { var H, _; return R.fixed === "right" ? (H = L.get("right")) == null || H.push(R) : (_ = L.get("primary")) == null || _.push(R), L; }, O), (A = O.get("right")) != null && A.length && (x.value.primaryColumns = [...O.get("primary") || []], x.value.rightColumns = [...O.get("right") || []]), x.value.primaryColumnsWidth = 0, x.value.rightColumnsWidth = 0, !1; } function k() { 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((P) => { P.actualWi