UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,276 lines 2.22 MB
var ly = Object.defineProperty; var oy = (e, t, n) => t in e ? ly(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var J = (e, t, n) => oy(e, typeof t != "symbol" ? t + "" : t, n); import { ref as w, watch as Z, computed as V, createVNode as r, resolveComponent as _n, isVNode as Tn, nextTick as Tt, inject as $e, Fragment as St, defineComponent as de, createTextVNode as Me, withDirectives as Wt, vModelCheckbox as Br, shallowRef as Ll, onMounted as Ge, onUnmounted as Gt, provide as ln, Teleport as fl, createApp as Xl, onBeforeMount as Jl, watchEffect as Dr, Transition as er, render as us, h as Af, cloneVNode as iy, mergeProps as on, vShow as Va, onUpdated as ry, onBeforeUnmount as Vf, withModifiers as Zt, vModelText as ja, toRef as sy, reactive as Et, resolveDirective as Kn, Comment as Lf, getCurrentInstance as Ar, toRefs as Zl, toRaw as uy, vModelSelect as cy, isRef as dy } from "vue"; import Ko, { FCheckbox as La } from "../checkbox/index.esm.js"; import Sa from "../popover/index.esm.js"; import { LocaleService as ve } from "../locale/index.esm.js"; import { useCommonUtils as zn, useNumberFormat as Qo, useFarrisConfig as Nf, useGuid as xn, getCustomClass as Bt, isMobilePhone as Qt, withInstall as $t, isImageUrl as fy, urlPrependBasePath as Il, isBase64ImageUrl as py, getCustomStyle as pn, FormSchemaEntityField$Type as Gl, FormSchemaEntityFieldType$Type as Do, EVENT_PROPERTY_TAB_IDS as Ca, getMaxZIndex as Ho, resolveField as gt, useDateFormat as Wn, useResizeObserver as As, CHECKBOX_CONTEXT as xu, useCheck as Tu, radioCheckboxCommonProps as Rf, useTouchMomentum as my, useTouch as vy, useBem as Fn, useThirdComponent as _f, FormSchemaEntityFieldTypeName as Ro, formatTime as hy, getDateObject as Ba, isLeapYear as gy, compareDate as tr, getDaysInMonth as yy, useTextBox as $f, useClear as jf, encrypt as by, useDelayedRef as Cy, RADIOGROUP_CONTEXT as Hf, useReqAnimationFrame as wy, getTimeObject as cs, formatObjecTime as Sy, useArrayProcessor as zf, setFieldValue as Vs, useNativeBack as xy } from "../common/index.esm.js"; import { F_MODAL_SERVICE_TOKEN as eo } from "../modal/index.esm.js"; import { cloneDeep as Mt, isUndefined as Dn, isPlainObject as ld, debounce as xa, isFunction as ds, mergeWith as nr, merge as zo, isNil as Ty, isNaN as ky, flatten as Wf, get as Ja, isEmpty as Fy, throttle as od } from "lodash-es"; import qf from "../transfer/index.esm.js"; import Uf, { FTabPage as Gf } from "../tabs/index.esm.js"; import Py, { FFilterBar as My } from "../filter-bar/index.esm.js"; import { CompareType as Je, useConditionValue as Iy, useConditionUtils as ku, FConditionFields as id, FConditionFieldsDesign as rd, useCondition as Ey, ValueType as rn, TextValue as Yf, CheckBoxValue as Oy, ComboListValue as By, ComboLookupValue as Dy, FilterDatePickerValue as Ay, FilterDateTimePickerValue as Vy, MonthPickerValue as Ly, MonthRangeValue as Ny, FilterNumberSpinnerValue as Ry, RadioGroupValue as _y, FilterInputGroupValue as $y, FilterDateRangeValue as jy, NumberRangeValue as Hy } from "../condition/index.esm.js"; import Vr, { FInputGroup as ar } from "../input-group/index.esm.js"; import rl, { FComboList as pl, FTouchComboListContainer as Kf, useDataSource as zy, FComboListContainer as Wy } from "../combo-list/index.esm.js"; import Bn, { FButton as sl } from "../button/index.esm.js"; import Nl, { useNumber as qy, useFormat as Uy, useSpinner as Gy, useTextBox as Yy, getSpinnerRender as Ky, getNumberTextBoxRender as Qy, FNumberSpinner as Vi, useNumberLocales as Xy } from "../number-spinner/index.esm.js"; import tl from "../date-picker/index.esm.js"; import Fu from "../pagination/index.esm.js"; import { useScreen as Lr, useFilter as Xo, useIdentify as Jo, useHierarchy as Zo, useGroupData as Pu, useDataView as ei, useSelection as ti, usePagination as Mu, useRow as ni, useEdit as ai, useVisualDataBound as li, useVisualDataCell as oi, useVisualDataRow as ii, useVisualGroupRow as Qf, useVisualSummaryRow as Xf, useVisualData as ri, useSidebar as Nr, useColumn as si, useVirtualScroll as ui, getHierarchyRow as Jf, useLoading as Zf, useSelectHierarchyItem as Iu, useDataViewContainerStyle as Rr, useCommandColumn as ep, useSettingColumn as tp, useSort as np, useGroupColumn as Eu, useCellPosition as _r, useFitColumn as Ou, useFilterHistory as ap, useColumnFilter as lp, useDragColumn as op, getColumnHeader as ip, getSidebar as Bu, getDisableMask as rp, getHorizontalScrollbar as Du, getVerticalScrollbar as Au, getEmpty as Vu, getPagination as sp, getSummary as up, ColumnSettingSolution as cp, refreshScrollAfterDataSourceLoad as dp, COMMAND_COLUMN_DATA_TYPE as ga, SETTING_COLUMN_DATA_TYPE as ya, SETTING_COLUMN_FIELD as Jy, COMMAND_COLUMN_FIELD as Zy, CellMode as fp, useCellContentStyle as eb, getFilterPanel as tb, getGroupPanel as nb, useAdapt as ab, useNavigation as lb } from "../data-view/index.esm.js"; import Lu from "../button-group/index.esm.js"; import $r from "../drawer/index.esm.js"; import { FNotifyService as da, F_NOTIFY_SERVICE_TOKEN as ml } from "../notify/index.esm.js"; import Ls, { FDataGrid as to } from "../data-grid/index.esm.js"; import { FSwitch as pp } from "../switch/index.esm.js"; import ob, { FLanguageTextbox as ib } from "../language-textbox/index.esm.js"; import rb, { FRadioGroup as mp, radioGroupProps as sb } from "../radio-group/index.esm.js"; import ci from "../list-view/index.esm.js"; import { resolveAppearance as Rt, createPropsResolver as ht, getPropsResolverGenerator as Pn, getSchemaByTypeForDesigner as ub, schemaResolverMap as cb, propertyEffectMap as db, propertyConfigSchemaMap as fb, schemaMap as pb, getSchemaByType as Wo, resolveToolbar as vp, createPageHeaderEventHandlerResolver as hp, createEventsResolver as gp, createFormBindingResolver as mb } from "../dynamic-resolver/index.esm.js"; import { useDesignerComponent as cn, DgControl as ze, canvasChanged as Li, refreshCanvas as vb, setPositionOfButtonGroup as yp, useDragulaCommonRule as bp, UseTemplateDragAndDropRules as Cp } from "../designer-canvas/index.esm.js"; import wp from "../color-picker/index.esm.js"; import { BaseControlProperty as Sp, InputBaseProperty as Nu, ExpressionProperty as hb, FormBindingType as Fo, SchemaDOMMapping as gb } from "../property-panel/index.esm.js"; import yb, { FieldSelectorRepositoryToken as Ni } from "../field-selector/index.esm.js"; import "../collection-property-editor/index.esm.js/src/use-button-items.designer"; import bb from "../tags/index.esm.js"; import { useInputExpand as Ru } from "../common/index.esm.js/text-box/use-input-expand"; import Ha, { FButtonEdit as di } from "../button-edit/index.esm.js"; import Ut from "bignumber.js"; import _u from "../../designer/button-edit/index.esm.js"; import Na from "../tree-view/index.esm.js"; import { useResizeObserver as $u } from "@vueuse/core"; import { resolveField as Cb } from "../common/index.esm.js/utils/resolve-field"; import wb from "../binding-selector/index.esm.js"; import Sb from "../accordion/index.esm.js"; import xb from "../../designer/avatar/index.esm.js"; import Tb from "../../designer/approval-logs/index.esm.js"; import kb from "../calendar/index.esm.js"; import Fb from "../../designer/capsule/index.esm.js"; import sd from "../../designer/checkbox/index.esm.js"; import ud from "../../designer/checkbox-group/index.esm.js"; import Pb from "../content-container/index.esm.js"; import Mb from "../table/index.esm.js"; import Ib from "../../designer/data-grid/index.esm.js"; import Eb from "../../designer/date-picker/index.esm.js"; import Ob from "../dropdown/index.esm.js"; import Bb from "../../designer/dynamic-form/index.esm.js"; import Db from "../external-container/index.esm.js"; import Ab from "../image-cropper/index.esm.js"; import Vb from "../../designer/input-group/index.esm.js"; import ju, { FLayout as Lb, FLayoutPane as Yl } from "../layout/index.esm.js"; import Nb from "../list-nav/index.esm.js"; import Rb from "../../designer/list-view/index.esm.js"; import xp from "../lookup/index.esm.js"; import _b from "../../designer/nav/index.esm.js"; import $b from "../../designer/number-spinner/index.esm.js"; import jb from "../number-range/index.esm.js"; import Hb from "../order/index.esm.js"; import zb from "../page-header/index.esm.js"; import Wb from "../page-footer/index.esm.js"; import qb from "../progress/index.esm.js"; import Ub, { useCondition as Gb, useSolutionUtils as Tp } from "../query-solution/index.esm.js"; import Yb from "../../designer/radio-group/index.esm.js"; import Kb from "../../designer/rate/index.esm.js"; import Qb, { commonToolbarItemDesignProps as Xb } from "../../designer/response-toolbar/index.esm.js"; import Jb from "../response-layout/index.esm.js"; import Zb from "../../designer/response-layout-editor/index.esm.js"; import eC, { FSearchBox as tC } from "../search-box/index.esm.js"; import nC from "../../designer/section/index.esm.js"; import aC from "../smoke-detector/index.esm.js"; import lC from "../splitter/index.esm.js"; import kp from "../step/index.esm.js"; import oC from "../../designer/switch/index.esm.js"; import iC from "../../designer/tabs/index.esm.js"; import rC from "../../designer/tags/index.esm.js"; import sC from "../text/index.esm.js"; import uC from "../../designer/time-picker/index.esm.js"; import cC from "../uploader/index.esm.js"; import dC from "../verify-detail/index.esm.js"; import fC from "../component/index.esm.js"; import pC from "../video/index.esm.js"; import mC from "../../designer/textarea/index.esm.js"; import vC from "../../designer/tree-grid/index.esm.js"; import hC from "../fieldset/index.esm.js"; import gC from "../../designer/drawer/index.esm.js"; import yC from "../html-template/index.esm.js"; import bC from "../image/index.esm.js"; import CC from "../comment/index.esm.js"; import wC from "../../designer/wizard/index.esm.js"; import { loadRegister as SC, useComponentManager as xC, useEntityState as TC, useDynamicViewUtils as kC, componentMap as fs, resolverMap as FC, componentPropsConverter as PC } from "../dynamic-view/index.esm.js"; import Ns from "../section/index.esm.js"; import MC from "../combo-tree/index.esm.js"; import IC from "../events-editor/index.esm.js"; import EC from "../mapping-editor/index.esm.js"; import OC from "../schema-selector/index.esm.js"; import Fp, { EditorType as BC } from "../event-parameter/index.esm.js"; import DC from "../filter-condition-editor/index.esm.js"; import AC from "../sort-condition-editor/index.esm.js"; import VC from "../menu-lookup/index.esm.js"; import LC from "../json-editor/index.esm.js"; import NC from "../property-editor/index.esm.js"; import RC, { FExpressionTextbox as _C } from "../expression-editor/index.esm.js"; import $C from "../code-editor/index.esm.js"; import jC from "../collection-property-editor/index.esm.js"; import HC from "../../designer/modal/index.esm.js"; import zC from "../tooltip/index.esm.js"; import WC, { FTreeGrid as Hu } from "../tree-grid/index.esm.js"; import qC, { FDynamicForm as UC, FDynamicFormLabel as GC, FDynamicFormGroup as lr, useTypeResolver as Pp, FDynamicFormInput as YC } from "../dynamic-form/index.esm.js"; import KC, { FTimePickerTimeView as cd, convertToDate as QC, FTouchTimePickerTimeView as XC } from "../time-picker/index.esm.js"; import zu from "../capsule/index.esm.js"; import { createI18n as JC, useI18n as ZC } from "vue-i18n"; import { DgControl as ew } from "../designer-canvas/index.esm.js/"; import { FDatePicker as dd } from "../components/index.esm.js"; import { FCheckboxGroup as tw } from "../checkbox-group/index.esm.js"; import { SearchRelation as ps, SearchComparisonOperator as ms } from "../field-search-box/index.esm.js"; import no from "../scroll-list/index.esm.js"; import Wu from "../response-toolbar/index.esm.js"; import nw, { FLoadingService as aw } from "../loading/index.esm.js"; import { FMessageBoxService as lw } from "../message-box/index.esm.js"; import ow from "../textarea/index.esm.js"; import "../avatar/index.esm.js/src/property-config/avatar.property-config"; import "../checkbox-group/index.esm.js/src/property-config/check-group.property-config"; import "../checkbox/index.esm.js/src/property-config/checkbox.property-config"; import "../combo-list/index.esm.js/src/property-config/combo-list.property-config"; import "../date-picker/index.esm.js/src/property-config/date-picker.property-config"; import "../input-group/index.esm.js/src/property-config/input-group.property-config"; import "../language-textbox/index.esm.js/src/property-config/language-textbox.property-config"; import "../lookup/index.esm.js/src/property-config/lookup.property-config"; import "../number-range/index.esm.js/src/property-config/number-range.property-config"; import "../number-spinner/index.esm.js/src/property-config/number-spinner.property-config"; import "../radio-group/index.esm.js/src/property-config/radio-group.property-config"; import "../switch/index.esm.js/src/property-config/switch.property-config"; import "../textarea/index.esm.js/src/property-config/textarea.property-config"; import "../time-picker/index.esm.js/src/property-config/time-picker.property-config"; var sn = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(sn || {}), El = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(El || {}), Kt = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))(Kt || {}); const G4 = { /** 显示行号 */ enable: { type: Boolean, default: !1 }, /** 行号列表头标题 */ heading: { type: String, default: "序号" }, /** 行号宽度,默认为 36px */ width: { type: Number, default: 36 } }, Y4 = { /** 启用分页 */ enable: { type: Boolean, default: !1 }, /** 当前页码 */ index: { type: Number, default: 1 }, /** 分页交互模式 */ mode: { type: String, default: "server" }, /** 显示页码输入框 */ showGoto: { type: Boolean, default: !1 }, /** 显示页码 */ showIndex: { type: Boolean, default: !0 }, /** 显示每页记录数 */ showLimits: { type: Boolean, default: !1 }, /** 显示分页汇总信息 */ showPageInfo: { type: Boolean, default: !0 }, /** 默认每页记录数 */ size: { type: Number, default: 20 }, /** 可选择的没有记录数据 */ sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] }, /** 总记录数 */ total: { type: Number, default: 0 }, /** 禁用分页 */ disabled: { type: Boolean, default: !1 } }; var Ie = /* @__PURE__ */ ((e) => (e[e.none = 0] = "none", e[e.filterable = 1] = "filterable", e[e.sortable = 2] = "sortable", e[e.filtered = 4] = "filtered", e[e.sorted = 8] = "sorted", e[e.ascending = 16] = "ascending", e[e.descending = 32] = "descending", e))(Ie || {}), iw = /* @__PURE__ */ ((e) => (e.NONE = "none", e.NUMBER = "number", e.DATE = "date", e.TEXT = "boolean", e.IMAGE = "boolean2", e.ENUM = "enum", e.CUSTOM = "custom", e))(iw || {}), Gn = /* @__PURE__ */ ((e) => (e.DATE = "date", e.DATE_TIME = "datetime", e.NUMBER = "number", e.ENUM = "enum", e.IMAGE = "image", e.BOOLEAN = "boolean", e.BOOLEAN2 = "boolean2", e.TIMEAGO = "timeago", e.NONE = "none", e.CUSTOM = "custom", e.MULTI_LINGUAL = "multilingual", e))(Gn || {}), rw = /* @__PURE__ */ ((e) => (e.Column = "column", e.Group = "group", e))(rw || {}); function sw(e, t) { var b, y, g, C, x, S, P, T, k; const { isUndefined: n } = zn(), { pageIndex: a, totalItems: l, pagination: o } = t, i = w((b = e.pagination) == null ? void 0 : b.enable), s = w(((y = e.pagination) == null ? void 0 : y.disabled) || !1), c = w((g = e.pagination) == null ? void 0 : g.size), f = w((C = e.pagination) == null ? void 0 : C.sizeLimits), d = w((x = e.pagination) == null ? void 0 : x.mode), u = w((S = e.pagination) == null ? void 0 : S.showIndex), p = w((P = e.pagination) == null ? void 0 : P.showLimits), v = w(((T = e.pagination) == null ? void 0 : T.showGoto) || !1), m = w(((k = e.pagination) == null ? void 0 : k.showPageInfo) || !0); Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.disabled; }, (M, F) => { M !== F && (s.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.sizeLimits; }, (M, F) => { f.value = M; }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.showIndex; }, (M, F) => { M !== F && (u.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.showLimits; }, (M, F) => { M !== F && (p.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.total; }, (M, F) => { M !== F && (l.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.enable; }, (M, F) => { M !== F && (i.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.showGoto; }, (M, F) => { M !== F && (v.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.showPageInfo; }, (M, F) => { M !== F && (m.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.index; }, (M, F) => { M !== F && (a.value = M); }), Z(() => { var M; return (M = e.pagination) == null ? void 0 : M.size; }, (M, F) => { M !== F && (c.value = M); }); const h = (M) => { if (!M) return; const { enable: F, total: E, size: I, index: O, sizeLimits: A, showGoto: B, showIndex: D, showLimits: N, mode: _, disabled: $ } = M; n(F) || (i.value = F), n(O) || (a.value = O), n(I) || (c.value = I), n(A) || (f.value = A), n(B) || (v.value = B), n(D) || (u.value = D), n(N) || (p.value = N), n(_) || (d.value = _), n(E) || (l.value = E), n($) || (s.value = $); }; return Z(() => e.pagination, (M, F) => { M !== F && (o.value = M, h(M)); }), { disabled: s, pageSize: c, pageList: f, shouldRenderPagination: i, showGotoPage: v, showPageIndex: u, showPageList: p, showPageInfo: m, mode: d, updatePagination: h }; } function fd(e) { return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Tn(e); } function uw(e, t, n, a, l, o, i, s, c, f, d) { const { updatePagination: u } = sw(e, n), { showSidebarCheckBox: p } = f, { showSelectAll: v, showSelection: m, selectedValues: h, updateSelectAllStatus: b, keepSelectingOnPaging: y, clearSelection: g } = c, C = w([]), x = w([]), S = [{ name: ve.getLocaleValue("datagrid.settings.asc"), value: "asc", icon: "f-icon f-icon-col-ascendingorder" }, { name: ve.getLocaleValue("datagrid.settings.summaryNone"), value: "none" }, { name: ve.getLocaleValue("datagrid.settings.desc"), value: "desc", icon: "f-icon f-icon-col-descendingorder" }], P = V(() => { var z, q; return ((z = e.filter) == null ? void 0 : z.mode) === "server" || ((q = e.sort) == null ? void 0 : q.mode) === "server"; }), { addColumnFilter: T, removeColumnFilter: k, createFilterConditions: M, filterFromServer: F } = l; function E() { y.value || g(), n.updateVisibleDataSummary(d.value); } function I(z) { x.value = z; } function O(z) { C.value = z; } function A(z) { const q = z.status, G = (q & Ie.sorted) === Ie.sorted, U = (q & Ie.ascending) === Ie.ascending, X = (q & Ie.descending) === Ie.descending; let Q = G ? q ^ Ie.sorted : q; return Q = U ? Q ^ Ie.ascending : Q, Q = X ? Q ^ Ie.descending : Q, Q; } function B(z) { z.sortType = "none", z.status = A(z); const q = z.column; q && (q.sort = "none", q.sortOrder = 0, t.applyColumnSorter(n, i)); } function D(z, q) { q.column && (q.column.filter = null), k(q), n.refresh(), B(q), q.filterHistory && q.filterHistory.forEach((G) => { G.checked = !1; }); } function N(z, q) { var U; const G = z.filter((X) => X.field !== q.field); (U = e.sort) != null && U.multiSort || G.forEach((X) => { const Q = X.status, Y = (Q & Ie.sortable) === Ie.sortable, R = (Q & Ie.sorted) === Ie.sorted, L = (Q & Ie.filtered) === Ie.filtered; Y && R && (X.status = Q & Ie.sortable, X.column.sort = "none", X.column.sortOrder = 0), L && (X.status = Q & Ie.filtered); }); } function _(z) { var X; const q = A(z), G = z.sortType === "none" ? q : z.sortType === "asc" ? q | Ie.sorted | Ie.ascending : q | Ie.sorted | Ie.descending; z.status = G; const U = z.column; U && (U.sort = z.sortType, U.sortOrder = z.sortType !== "none" ? U.sortOrder : 0, z.status = G, O(t.createSortConditions(i)), ((X = e.sort) == null ? void 0 : X.mode) !== "server" && (t.applyColumnSorter(n, i), s.resetScroll(), E())); } function $(z) { var U, X; const q = (z.status & Ie.filtered) === Ie.filtered; z.status = q ? z.status ^ Ie.filtered : z.status | Ie.filtered, ((U = z.column) == null ? void 0 : U.filter) != null && z.column.filter !== "" && z.filter ? T(z) : k(z), I(M()), ((X = e.filter) == null ? void 0 : X.mode) !== "server" && (n.refresh(), s.reCalculateVisualDataRows(), E()); } function H(z, q) { var G; q.showPopover = !1, q.filterHistory = void 0, o.updateFilterHistory(q, (G = q.column) == null ? void 0 : G.filter), $(q), N(z, q), _(q), P.value && F({ filterConditions: x.value, sortConditions: C.value }); } function j(z, q) { var X, Q; let G, U; return r("div", { class: "fv-column-sort-filter-container" }, [((X = q.column) == null ? void 0 : X.sortable) && r("div", { class: "fv-column-sort-section" }, [r(_n("f-capsule"), { items: S, modelValue: q.sortType, "onUpdate:modelValue": (Y) => q.sortType = Y, type: "secondary" }, null)]), r("div", { class: "fv-column-filter-section" }, [r("div", { class: "fv-column-filter-section-title" }, [ve.getLocaleValue("datagrid.filter.title")]), r("div", { class: "fv-column-filter-section-editor" }, [a.getFilterEditor(q)])]), r("div", { class: "fv-column-sort-filter-footer" }, [((Q = q.column) == null ? void 0 : Q.dataType) !== "enum" && r("div", { class: "fv-column-clear-section" }, [r(_n("f-button"), { style: "margin: 4px 0;padding-left: 0;", type: "link", onClick: (Y) => D(Y, q) }, fd(G = ve.getLocaleValue("datagrid.filter.clear")) ? G : { default: () => [G] })]), r("div", { class: "fv-column-confirm-section" }, [r(_n("f-button"), { customClass: { "f-btn-ml": !0 }, size: "small", onClick: (Y) => H(z, q) }, fd(U = ve.getLocaleValue("datagrid.filter.ok")) ? U : { default: () => [U] })])])]); } return { renderFilterContainer: j, onConfirm: H }; } function cw(e) { return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Tn(e); } function dw(e, t, n, a, l, o, i, s, c, f, d, u, p, v, m) { const h = V(() => { var $; return (($ = e.filter) == null ? void 0 : $.filterStyle) !== "filter-row" && e.displayType !== "Card"; }); function b($) { const H = $.status; return { "fv-column-handler": !0, "fv-column-handler-active": (H & Ie.filtered) === Ie.filtered || (H & Ie.sorted) === Ie.sorted || $.showPopover }; } function y($) { return ($.status & Ie.sortable) === Ie.sortable && (h.value ? ($.status & Ie.filterable) === Ie.none : !0) && ($.status & Ie.sorted) === Ie.none; } function g($) { return ($.status & Ie.sortable) === Ie.sortable && (h.value ? ($.status & Ie.filterable) === Ie.none : !0) && ($.status & Ie.sorted) === Ie.sorted && ($.status & Ie.ascending) === Ie.ascending; } function C($) { return ($.status & Ie.sortable) === Ie.sortable && (h.value ? ($.status & Ie.filterable) === Ie.none : !0) && ($.status & Ie.sorted) === Ie.sorted && ($.status & Ie.descending) === Ie.descending; } function x($) { return ($.status & Ie.sortable) === Ie.none && ($.status & Ie.filterable) === Ie.filterable && ($.status & Ie.sorted) === Ie.none; } function S($) { return ($.status & Ie.sortable) === Ie.sortable && ($.status & Ie.filterable) === Ie.filterable && ($.status & Ie.sorted) === Ie.none; } function P($) { return ($.status & Ie.sortable) === Ie.sortable && ($.status & Ie.filterable) === Ie.filterable && ($.status & Ie.sorted) === Ie.sorted && ($.status & Ie.ascending) === Ie.ascending; } function T($) { return ($.status & Ie.sortable) === Ie.sortable && ($.status & Ie.filterable) === Ie.filterable && ($.status & Ie.sorted) === Ie.sorted && ($.status & Ie.descending) === Ie.descending; } const k = function($) { return { "f-icon": !0, "f-icon-col-defaultsort": y($), "f-icon-col-ascending": g($), "f-icon-col-descending": C($), "f-icon-col-filter": h.value && x($), "f-icon-col-defaultfilterandsort": h.value && S($), "f-icon-col-filterandascending": h.value && P($), "f-icon-col-filteranddescending": h.value && T($) }; }, M = /* @__PURE__ */ new Map([[Ie.sortable, Ie.sortable | Ie.sorted | Ie.ascending], [Ie.sortable | Ie.sorted | Ie.ascending, Ie.sortable | Ie.sorted | Ie.descending], [Ie.sortable | Ie.sorted | Ie.descending, Ie.sortable]]), { renderFilterContainer: F } = uw(e, o, i, s, c, f, d, u, p, v, m), E = w(); function I($, H) { H.filter((j) => j !== $ && j.showPopover).forEach((j) => { j.showPopover = !1; }); } function O($, H) { let j; return r(Sa, { ref: E, class: "fv-column-handler-popover", "z-index": 1050, "right-boundary": l.value, offsetX: -u.offsetX, placement: "auto", visible: !0, onHidden: () => { H.showPopover = !1; } }, cw(j = F($, H)) ? j : { default: () => [j] }); } async function A($, H) { H.showPopover = !H.showPopover, await Tt(); const j = E.value; j && j.show($.target); } function B($, H) { var z; const j = $.filter((q) => q.field !== H.field); (z = e.sort) != null && z.multiSort || j.forEach((q) => { const G = q.status, U = (G & Ie.sortable) === Ie.sortable, X = (G & Ie.sorted) === Ie.sorted; U && X && (q.status = G & ~(Ie.sorted | Ie.ascending | Ie.descending) | Ie.sortable, q.status = G & ~(Ie.sorted | Ie.ascending | Ie.descending), q.column.sort = "none", q.column.sortOrder = 0); }); } function D($) { var q; const H = $.status; if ((H & Ie.sortable) === Ie.sortable && (h.value ? (H & Ie.filterable) === Ie.none : !0)) { const G = H & ~Ie.filterable & ~Ie.filtered, U = M.get(G); if (U !== void 0) { const X = H & (Ie.filterable | Ie.filtered), Q = U & ~X | X, Y = (Q & Ie.sorted) === Ie.sorted, R = (Q & Ie.ascending) === Ie.ascending, L = (Q & Ie.descending) === Ie.descending, W = $.column; W && (W.sort = R ? "asc" : L ? "desc" : "none", W.sortOrder = Y ? W.sortOrder : 0, $.sortType = W.sort, $.status = Q, ((q = e.sort) == null ? void 0 : q.mode) === "server" ? t.emit("sortChanged", { filterConditions: c.createFilterConditions(), sortConditions: o.createSortConditions(d) }) : (o.applyColumnSorter(i, d), u.resetScroll())); } } } function N($, H, j) { B(j, H), D(H), I(H, j), h.value && (H.status & Ie.filterable) === Ie.filterable && A($, H); } function _($, H, j) { return [r("span", { class: b($), onClick: (q) => N(q, $, j) }, [r("i", { class: k($) }, null), $ && $.column && $.sortType !== "none" && ($.column.sortOrder || "") && r("span", { class: "fv-column-sort-number" }, [$.column.sortOrder]), $.showPopover && h.value && O(j, $)])]; } return { renderHeaderCellHandler: _ }; } const Mp = "__setting__", K4 = "设置", fw = 30, pw = "right", ua = "setting", Ip = "__command__", Q4 = "操作", mw = 150, vw = "right", wa = "commands"; function hw(e, t, n, a, l, o, i) { const s = "id", c = w(); let f; const { applySortableColumns: d, collectionFilterableColumns: u, collectionSortableColumns: p, columnContext: v, updateColumnSettingIcon: m } = e, { conditions: h } = n, { calculateColumnsSize: b } = a, { fitHorizontalScroll: y } = o, g = w([]), C = V(() => !!g.value.length), x = V(() => v.value.primaryColumns.filter((j) => j.dataType !== wa && j.dataType !== ua)); let S = []; const P = w(x.value.map((j) => ({ id: j.field, name: j.title }))), T = V(() => x.value.filter((j) => j.visible).map((j) => ({ id: j.field, name: j.title }))); V(() => p().map((j) => ({ id: j.field, name: j.title, order: j.sort }))), V(() => u().map((j) => ({ id: j.field, code: j.field, controlType: "", labelCode: j.field, name: j.title, editor: j.editor, // || ({ type: useFilterComposition.getFilterEditorType(filterableColumn) } as EditorConfig), value: {}, visible: !0 }))); function k() { const j = /* @__PURE__ */ new Map(); return x.value.reduce((z, q) => (q.visible = !1, z.set(q.field, q), z), j), j; } function M(j, z) { return j.map(({ id: G }) => { const U = z.get(G); return U.visible = !0, z.delete(G), U; }); } function F(j) { const z = v.value.primaryColumns.filter((X) => X.dataType === wa), q = v.value.primaryColumns.filter((X) => X.dataType === ua), G = k(), U = M(j, G); z.length || q.length ? v.value.primaryColumns = [...U, ...Array.from(G.values()), ...z, ...q] : v.value.primaryColumns = [...U, ...Array.from(G.values())], m(), b(), Tt(() => { y(); }); } function E() { F(S), f == null || f.destroy(); } function I(j) { return r("div", { class: "fv-grid-settings" }, [r(Uf, { "tab-type": "pills", "justify-content": "center" }, { headerPrefix: () => r("div", { class: "modal-title" }, [r("span", { class: "modal-title-label" }, [ve.getLocaleValue("datagrid.settings.title")])]), default: () => [ r(Gf, { id: "display-columns", title: ve.getLocaleValue("datagrid.settings.visible"), class: "container" }, { default: () => [r(qf, { style: "height: 480px", displayType: "Tree", "identify-field": s, "data-source": P.value, selections: T.value, onChange: F }, null)] }) // <FTabPage id="column-order" title="列排序" class="container"> // <FOrder // style="height: 480px" // data-source={dataSoruce.value} // items={sortedColumns.value} // onChange={onSortedColumnsChange}></FOrder> // </FTabPage> // FConditionList组件功能不完善,先把表格筛选特性隐藏掉 // <FTabPage id="column-filter" title="筛选" class="container"> // <FConditionList // ref={conditionListRef} // style="height: 480px" // fields={filterableColumns.value} // conditions={conditions.value}></FConditionList> // </FTabPage> ], headerSuffix: () => r("div", { class: "f-btn-icon f-bare", onClick: (z) => E() }, [r("span", { class: "f-icon modal_close" }, null)]) })]); } function O() { const j = /* @__PURE__ */ new Map(); return p().reduce((z, q) => (q.sort = "none", q.sortOrder = 0, z.set(q.field, q), z), j), j; } function A(j) { return g.value.filter((q) => q.id && q.order).map((q, G) => { const U = G + 1, X = j.get(q.id); return X && (X.sort = q.order, X.sortOrder = U), X; }); } function B() { if (C.value) { const j = O(), z = A(j); d(z, t, l), o.reCalculateVisualDataRows(), b(); } } function D() { c.value && (h.value = c.value.getConditions(), t.refresh(), o.reCalculateVisualDataRows()); } function N() { B(), D(); } function _() { S = Mt(T.value); } function $() { F(S); } function H() { f = i.open({ title: "", width: 800, showButtons: !0, showHeader: !1, dragHandle: ".farris-tabs-header", draggable: !0, render: I, acceptCallback: N, rejectCallback: $ }), _(); } return { acceptCallback: N, rejectCallback: $, renderSettingsPanel: I, openSettingPanel: H }; } function gw(e, t, n, a, l, o, i, s) { const c = $e(eo), f = V(() => ({ margin: "0px" })); function d(p) { if (p.stopPropagation(), e.showSetting && e.enableColumnSettingSolution && (s.value = !0), e.showSetting && !e.enableColumnSettingSolution) { const { openSettingPanel: v } = hw(t, n, a, l, o, i, c); v(); } } function u() { return r("span", { class: "fv-grid-settings-icon", style: f.value, onClick: d }, [r("i", { class: "f-icon f-icon-home-setup" }, null)]); } return { renderGridSettingsIcon: u }; } function yw(e, t, n, a) { const o = w(-1), i = w(0), s = w(!1); let c = ""; const f = V(() => ({ display: s.value ? "block" : "none", left: `${i.value}px` })), d = V(() => ({ display: s.value ? "block" : "none" })); function u(m) { const h = m.target.parentElement; if (h) { const { left: b } = h.getBoundingClientRect(); i.value = m.clientX - b; } } function p(m) { const h = t.value.primaryColumns.filter((y) => y.visible).find((y) => y.field === c) || t.value.leftColumns.filter((y) => y.visible).find((y) => y.field === c) || t.value.rightColumns.filter((y) => y.visible).find((y) => y.field === c), b = m.target.parentElement; if (h && b) { const { left: y } = b.getBoundingClientRect(), g = m.clientX - y, C = (h.actualWidth || 0) + (g - o.value); h.actualWidth = Math.max(40, C), n.calculateColumnsWidth(t), n.calculateColumnHeaders(t); try { a.reCalculateVisualDataRows(!0); } catch { } } i.value = 0, s.value = !1, document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", p), document.body.style.userSelect = "", c = ""; } function v(m, h) { c = h, s.value = !0; const y = m.composedPath().find((g) => g.className.split(" ")[0] === "fv-grid"); if (y) { const { left: g } = y.getBoundingClientRect(); i.value = m.clientX - g, o.value = m.clientX - g, document.addEventListener("mousemove", u), document.addEventListener("mouseup", p), document.body.style.userSelect = "none"; } } return { onClickColumnResizeBar: v, resizeHandleStyle: f, resizeOverlayStyle: d }; } function X4(e, t, n, a, l, o, i, s, c, f, d, u, p, v, m, h, b, y, g, C) { const { showSelectAll: x, selectAll: S, unSelectAll: P, selectedValues: T, selectAllStatus: k, indeterminateStatus: M, emitSelectionChanged: F } = v, { showRowNumer: E, showSidebarCheckBox: I, sidebarTitle: O, sidebarCornerCellStyle: A } = m, { columnContext: B, hasLeftFixedColumn: D, hasRightFixedColumn: N } = o, { onClickColumnResizeBar: _, resizeHandleStyle: $, resizeOverlayStyle: H } = yw(e, B, u, b), { gridHeaderColumnsStyle: j, leftFixedGridHeaderColumnsStyle: z, rightFixedGridHeaderColumnsStyle: q } = b, { dragstart: G, dragenter: U, dragover: X, dragend: Q } = s, Y = V(() => x.value || I.value || E.value), R = B.value.defaultColumnWidth, { shouldShowFilterRow: L, renderHeaderFilterStrip: W, renderActiveFilterPopover: K, gridHeaderFilterStripHeight: ee } = Lw(e, o, i, f, h, b, l), ne = V(() => e.displayType === "Card" ? 30 : 35), le = V(() => B.value.headerDepth * ne.value + ee.value), te = /* @__PURE__ */ new Map([[0, 0]]), ie = V(() => e.showHeader); function ge(fe, it) { var We; const re = ((We = fe.column) == null ? void 0 : We.dataType) === "setting", Ye = te.get(it) || 0, ue = ne.value, Se = ee.value, Ze = { height: `${fe.depth * ue + Se}px`, left: `${fe.left}px`, top: `${(fe.layer - 1) * ue}px`, width: `${fe.actualWidth}px` }; return B.value.headerDepth > 1 && !L.value && (Ze["line-height"] = `${fe.depth * ue}px`), re && (Ze.paddingLeft = "2px"), e.showBorder && (Ze.border = "1px solid #e6e9f0"), te.set(it + 1, Ye + (fe.actualWidth || R)), Ze; } function Ve(fe, it) { var Ye; const re = ge(fe, it); return e.displayType === "Card" && (re.position = "relative", re.overflow = "visible", delete re.left, (Ye = e.columnOption) != null && Ye.fitColumns && e.fit ? (re.flex = "1", re.overflow = "hidden", re.textOverflow = "ellipsis", re.whiteSpace = "nowrap", delete re.width) : re.flexShrink = "0"), re; } const et = V(() => { var it; return { "fv-grid-header": !0, "fv-grid-header-group-columns": B.value.headerDepth > 1, "fv-grid-scrollbar-visible": b.shouldShowVirticalScrollbar.value && ((it = b.mouseInContent) == null ? void 0 : it.value) }; }), Ee = V(() => { var it; const fe = { height: `${le.value}px` }; return b.shouldShowVirticalScrollbar.value && ((it = b.mouseInContent) != null && it.value), e.displayType === "Card" && (fe.overflow = "visible", fe.position = "sticky", fe.flexShrink = "0", fe.left = "0", fe.top = "0", fe.zIndex = "3", fe.width = "100%"), fe; }); V(() => { var fe; return { width: `${Number((fe = e.rowNumber) == null ? void 0 : fe.width)}px` }; }); const oe = function(fe) { const it = (fe.status & Ie.sortable) === Ie.sortable, re = (fe.status & Ie.filterable) === Ie.filterable; return L.value ? it : it || re; }, { renderHeaderCellHandler: me } = dw(e, t, n, a, l, o, i, c, f, d, h, b, v, m, g), { renderGridSettingsIcon: se } = gw(e, o, i, f, u, h, b, C); function De(fe) { var re; const it = { "fv-grid-header-cell": !0, "fv-grid-header-cell-border": e.showBorder, "fv-grid-header-cell--filter-row": L.value }; return it["text-" + (((re = fe.column) == null ? void 0 : re.halign) || "left")] = !0, it; } function he(fe) { if (M.value = !1, fe) { if (S(), e.displayType === "Card") return; t.emit("selectAll", fe); } else { if (P(), e.displayType === "Card") return; t.emit("unSelectAll", fe); } F(); } function Oe(fe) { return r("span", { class: "fv-column-title", title: fe.title }, [fe.title]); } function vt(fe, it, re) { var Ye, ue, Se, Ze, We, Qe, bt; return r(St, null, [e.hierarchy && re === 0 && ((Ye = fe.column) == null ? void 0 : Ye.dataType) !== ua && ((ue = fe.column) == null ? void 0 : ue.dataType) !== wa && x.value && r("span", { style: "margin-left: .75rem; margin-right: .5rem" }, [r(La, { id: "checkbox_for_select_all", checked: k.value, "onUpdate:checked": (yt) => k.value = yt, indeterminate: M.value, onChangeValue: he }, null)]), ((Se = fe.column) == null ? void 0 : Se.dataType) === "setting" && e.showSetting && e.displayType !== "Card" ? se() : t.slots.headerCellTemplate ? t.slots.headerCellTemplate({ headerCell: fe, headerCells: it, columnIndex: re }) : (Ze = fe.column) != null && Ze.headerFormatter ? (Qe = (We = fe.column).headerFormatter) == null ? void 0 : Qe.call(We, { headerCell: fe, headerCells: it, columnIndex: re }) : (bt = fe.column) != null && bt.showTips ? Oe(fe) : r("span", { class: "fv-column-title" }, [fe.title]), oe(fe) && me(fe, re, it)]); } function Dt(fe, it, re) { var Ze; const Ye = fe.depth * ne.value, ue = L.value ? { height: `${Ye}px` } : void 0, Se = L.value && B.value.headerDepth > 1 && ((Ze = fe.children) != null && Ze.length) ? { lineHeight: `${Ye}px` } : void 0; if (L.value) { const We = { display: "flex", flexDirection: "column", alignItems: "stretch", padding: 0, whiteSpace: "normal" }; return r("div", { class: De(fe), style: { ...Ve(fe, re), ...We }, draggable: fe.draggable, onDragstart: (Qe) => G(Qe, fe, re), onDragenter: (Qe) => U(Qe, re), onDragend: (Qe) => Q(Qe, fe), onDragover: (Qe) => X(Qe, re) }, [r("div", { class: "fv-grid-header-title", style: { ...ue, ...Se } }, [vt(fe, it, re)]), r("div", { class: "fv-grid-header-filter" }, [W(fe) ?? r("div", { class: "fv-grid-header-filter-placeholder" }, null)]), fe.resizable && r("span", { class: "fv-column-resize-bar", onMousedown: (Qe) => _(Qe, fe.field) }, null)]); } return r("div", { class: De(fe), style: Ve(fe, re), draggable: fe.draggable, onDragstart: (We) => G(We, fe, re), onDragenter: (We) => U(We, re), onDragend: (We) => Q(We, fe), onDragover: (We) => X(We, re) }, [vt(fe, it, re), fe.resizable && r("span", { class: "fv-column-resize-bar", onMousedown: (We) => _(We, fe.field) }, null)]); } function wt(fe) { return fe.map((it, re) => { const Ye = []; if (Ye.push(Dt(it, fe, re)), it.children && it.children.length) { const ue = wt(it.children); Ye.push(...ue); } return Ye; }); } function kt() { return r("div", { class: "fv-grid-header-left-fixed" }, [r("div", { class: "fv-grid-header-columns", style: z.value }, [wt(B.value.leftHeaderColumns)])]); } function Te() { return r("div", { class: "fv-grid-header-right-fixed" }, [r("div", { class: "fv-grid-header-columns", style: q.value }, [wt(B.value.rightHeaderColumns)])]); } V(() => T.value.length > 0 && g.value.length !== T.value.length); function ut() { const fe = { ...A.value, ...L.value ? { height: `${le.value}px` } : {} }; return r("div", { class: "fv-grid-header-corner d-flex", style: fe }, [I.value && x.value && !e.hierarchy && r("div", { class: "d-inline-flex align-items-center flex-shrink-0" }, [r(La, { id: "checkbox_for_select_all", checked: k.value, "onUpdate:checked": (it) => k.value = it, indeterminate: M.value, onChangeValue: he }, null)]), I.value && !x.value && !e.hierarchy && r("div", { class: "d-inline-flex align-items-center flex-shrink-0", style: { opacity: "0" } }, [r(La, { disabled: !0 }, null)]), E.value && r("div", { class: "d-flex align-items-center justify-content-center flex-fill fv-grid-sidebar-row-number", style: { width: "auto" } }, [r("div", { title: O.value, class: { "text-center": !0, "text-truncate": !0, "w-100": !0 } }, [O.value])])]); } function It() { return r(St, null, [r("div", { class: et.value, style: Ee.value }, [Y.value && e.displayType !== "Card" && ut(), D.value && kt(), r("div", { class: "fv-grid-header-primary", style: e.displayType === "Card" ? { overflow: "visible" } : void 0 }, [r("div", { class: "fv-grid-header-columns", style: j.value }, [wt(B.value.primaryHeaderColumns)])]), N.value && Te()]), L.value && K()]); } function je() { return r(St, null, [r("div", { class: "fv-datagrid-resize-overlay", style: H.value }, null), r("div", { class: "fv-datagrid-resize-proxy", style: $.value }, null)]); } return { renderGridHeader: It, renderGridColumnResizeOverlay: je, shouldShowHeader: ie }; } function J4() { function e() { return r("div", { class: "fv-grid-disable" }, null); } return { renderDisableMask: e }; } function Z4(e, t, n, a, l, o) { const { columnContext: i } = t, { conditions: s, clearCondition: c, removeCondition: f, filterFromServer: d, createFilterConditions: u } = a, p = w([]); function v(C) { return C.reduce((x, S) => { var P; return (P = S.children) != null && P.length ? x.push(...v(S.children)) : x.push(S), x; }, []); } function m() { const C = []; Array.from(s.value).forEach((x, S) => { var T; const P = { id: x.id, code: x.fieldCode, labelCode: x.fieldCode, name: x.fieldName, editor: { type: (T = x.value) == null ? void 0 : T.editorType } }; C.push(P); }), p.value = C; } Z(s, () => m()); function h(C) { if (C && C.column) { C.column.filter = null; let x = C.status; x = (x & Ie.filtered) === Ie.filtered ? x ^ Ie.filtered : x, C.status = x; } } function b(C) { var P; f(`field_filter_${C}`); const S = v([...i.value.leftHeaderColumns, ...i.value.primaryHeaderColumns, ...i.value.rightHeaderColumns]).find((T) => T.field === C); h(S), ((P = e.filter) == null ? void 0 : P.mode) === "server" ? d({ filterConditions: u(), sortConditions: t.createSortConditions(l) }) : (n.refresh(), o.reCalculateVisualDataRows()); } function y() { var C; c(), v([...i.value.leftHeaderColumns, ...i.value.primaryHeaderColumns, ...i.value.rightHeaderColumns]).forEach((x) => h(x)), ((C = e.filter) == null ? void 0 : C.mode) === "server" ? d({ filterConditions: [], sortConditions: t.createSortConditions(l) }) : (n.refresh(), o.reCalculateVisualDataRows()); } function g() { return r("div", { class: "fv-grid-filter-panel" }, [r(My, { data: s.value, fields: p.value, mode: "display-only", "show-reset": !0, onRemove: b, onReset: y }, null)]); } return { renderFilterPanel: g }; } const bw = [{ id: String(Je.Equal), name: "等于", value: String(Je.Equal) }, { id: String(Je.NotEqual), name: "不等于", value: String(Je.NotEqual) }, { id: String(Je.Like), name: "包含", value: String(Je.Like) }, { id: String(Je.LikeStartWith), name: "开始是", value: String(Je.LikeStartWith) }, { id: String(Je.LikeEndWith), name: "结束是", value: String(Je.LikeEndWith) }, { id: String(Je.Is), name: "为空", value: String(Je.Is) }, { id: String(Je.IsNot), name: "非空", value: String(Je.IsNot) }]; function Cw(e) { var n; const t = (n = e.column) == null ? void 0 : n.filter; return t && typeof t == "object" && "compareType" in t ? { compareType: String(t.compareType) || String(Je.Like), value: t.value || "" } : typeof t == "string" ? { compareType: String(Je.Like), value: t } : { compareType: String(Je.Like), value: "" }; } const ww = /* @__PURE__ */ de({ name: "TextFilterRow", props: { headerCell: { type: Object, required: !0 }, onChange: { type: Function, required: !0 }, onClear: { type: Function, required: !0 }, onConfirm: { type: Function, default: void 0 } }, setup(e) { const t = Cw(e.headerCell), n = w(t.compareType), a = w(t.value), l = V(() => n.value === String(Je.Is) || n.value === String(Je.IsNot)); function o() { var c; const s = { compareType: n.value, value: a.value }; e.onChange(s), (c = e.onConfirm) == null || c.call(e); } function i() { var s; n.value = String(Je.Like), a.value = "", e.onClear(), (s = e.onConfirm) == null || s.call(e); } return () => r("div", { style: { display: "flex", flexDirection: "column", width: "100%", boxSizing: "border-box", gap: "16px" } }, [r("div", { style: { display: "flex", alignItems: "center", gap: "8px", width: "100%" } }, [r(rl, { modelValue: n.value, data: bw, valueField: "value", textField: "name", placeholder: "请选择", style: { width: "100px", flexShrink: 0 }, enableClear: !1, "onUpdate:modelValue": (s) => { n.value = s; } }, null), l.value ? r("div", { style: { flex: 1, minWidth: "100px" } }, null) : r(Vr, { modelValue: a.value, updateOn: "change", enableClear: !0, placeholder: ve.getLocaleValue("datagrid.filter.searchBoxPlaceholder"), style: { flex: 1, minWidth: "100px" }, "onUpdate:modelValue": (s) => { a.value = s; } }, null)]), r("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center", gap: "8px", paddingTop: "4px", borderTop: "1px solid var(--f-border-color, #e6e9f0)" } }, [r(Bn, { type: "primary", size: "small", onClick: o }, { default: () => [Me("确定")] }), r(Bn, { type: "default", size: "small", onClick: i }, { default: () => [Me("重置")] })])]); } }), Sw = [{ id: "0", name: "等于", value: "0" }, { id: "1", name: "不等于", value: "1" }, { id: "2", name: "大于", value: "2" }, { id: "3", name: "大于等于", value: "3" }, { id: "4", name: "小于", value: "4" }, { id: "5", name: "小于等于", value: "5" }, { id: "12", name: "为空", value: "12" }, { id: "13", name: "非空", value: "13" }, { id: "range", name: "范围", value: "range" }]; function xw(e) { var n, a, l; const t = (n = e.column) == null ? void 0 : n.filter; return t && typeof t == "object" && "compareType" in t ? { compareType: String(t.compareType) || "0", singleValue: t.value ?? null, rangeBegin: ((a = t.range) == null ? void 0 : a.begin) ?? null, rangeEnd: ((l = t.range) == null ? void 0 : l.end) ?? null } : { compareType: "0", sin