@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,318 lines • 1.87 MB
JavaScript
var pv = Object.defineProperty;
var mv = (e, t, n) => t in e ? pv(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var K = (e, t, n) => mv(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as C, watch as Z, computed as L, createVNode as u, resolveComponent as On, isVNode as Bn, nextTick as Ct, inject as Ve, Fragment as yt, createTextVNode as De, withDirectives as qt, vModelCheckbox as ws, defineComponent as we, shallowRef as so, onMounted as Ge, onUnmounted as ln, provide as an, Teleport as Wa, createApp as fi, onBeforeMount as pi, watchEffect as Ss, Transition as cl, render as yr, h as hv, cloneVNode as vv, mergeProps as un, vShow as ya, onUpdated as gv, onBeforeUnmount as cd, withModifiers as Qt, vModelText as za, reactive as Et, resolveDirective as jn, Comment as dd, getCurrentInstance as zl, toRefs as mi, toRaw as yv } from "vue";
import bv, { FCheckbox as ba } from "../checkbox/index.esm.js";
import qa from "../popover/index.esm.js";
import { LocaleService as xe } from "../locale/index.esm.js";
import { useCommonUtils as Sa, useNumberFormat as ql, useGuid as hn, getCustomClass as St, FormSchemaEntityField$Type as bo, FormSchemaEntityFieldType$Type as Ko, withInstall as Vt, isMobilePhone as Ln, getMaxZIndex as li, resolveField as ht, useDateFormat as ta, useResizeObserver as Ku, getCustomStyle as fn, CHECKBOX_CONTEXT as xs, useCheck as Ts, radioCheckboxCommonProps as fd, useThirdComponent as pd, FormSchemaEntityFieldTypeName as ti, formatTime as Cv, useTextBox as md, useClear as hd, encrypt as wv, useDelayedRef as Sv, RADIOGROUP_CONTEXT as vd, useReqAnimationFrame as xv, useArrayProcessor as gd, setFieldValue as Nr } from "../common/index.esm.js";
import { F_MODAL_SERVICE_TOKEN as hi } from "../modal/index.esm.js";
import { cloneDeep as mt, isUndefined as _n, isPlainObject as Xu, debounce as vi, isFunction as br, mergeWith as ks, merge as ri, isNil as Tv, isNaN as kv, flatten as Fv, throttle as Rr, get as Da, isEmpty as Pv } from "lodash-es";
import yd from "../transfer/index.esm.js";
import bd, { FTabPage as Cd } from "../tabs/index.esm.js";
import Mv, { FFilterBar as Ov } from "../filter-bar/index.esm.js";
import Fs from "../pagination/index.esm.js";
import { useMobile as Ps, useFilter as gi, useIdentify as yi, useHierarchy as bi, useGroupData as Ms, useDataView as Ci, useSelection as wi, usePagination as Os, useRow as Si, useEdit as xi, useVisualDataBound as Ti, useVisualDataCell as ki, useVisualDataRow as Fi, useVisualGroupRow as wd, useVisualSummaryRow as Sd, useVisualData as Pi, useSidebar as Ul, useColumn as Mi, useVirtualScroll as Oi, getHierarchyRow as xd, useLoading as Td, useSelectHierarchyItem as Is, useDataViewContainerStyle as Gl, useCommandColumn as kd, useSettingColumn as Fd, useSort as Pd, useGroupColumn as Es, useCellPosition as Yl, useFitColumn as Bs, useFilterHistory as Md, useColumnFilter as Od, useDragColumn as Id, getColumnHeader as Ed, getSidebar as Ds, getDisableMask as Bd, getHorizontalScrollbar as Vs, getVerticalScrollbar as As, getEmpty as Ls, getPagination as Dd, getSummary as Vd, ColumnSettingSolution as Ad, COMMAND_COLUMN_DATA_TYPE as oa, SETTING_COLUMN_DATA_TYPE as ia, SETTING_COLUMN_FIELD as Iv, COMMAND_COLUMN_FIELD as Ev, CellMode as Ld, useCellContentStyle as Bv, getFilterPanel as Dv, getGroupPanel as Vv, useNavigation as Av } from "../data-view/index.esm.js";
import ra, { FButton as Nd } from "../button/index.esm.js";
import Ns from "../button-group/index.esm.js";
import Rd from "../drawer/index.esm.js";
import { FNotifyService as Ua, F_NOTIFY_SERVICE_TOKEN as Ga } from "../notify/index.esm.js";
import Lv, { FDataGrid as Ii } from "../data-grid/index.esm.js";
import { FSwitch as Nv } from "../switch/index.esm.js";
import Rv, { FLanguageTextbox as _v } from "../language-textbox/index.esm.js";
import $v, { FRadioGroup as jv, radioGroupProps as Hv } from "../radio-group/index.esm.js";
import xo from "../list-view/index.esm.js";
import { resolveAppearance as Pt, createPropsResolver as dt, getPropsResolverGenerator as xn, getSchemaByTypeForDesigner as Wv, schemaResolverMap as zv, propertyEffectMap as qv, propertyConfigSchemaMap as Uv, schemaMap as Gv, getSchemaByType as si, resolveToolbar as Yv, createPageHeaderEventHandlerResolver as Qv, createEventsResolver as _d, createFormBindingResolver as Kv } from "../dynamic-resolver/index.esm.js";
import { useDesignerComponent as Zt, DgControl as We, canvasChanged as Qi, refreshCanvas as Xv, setPositionOfButtonGroup as Jv, useDragulaCommonRule as $d, UseTemplateDragAndDropRules as jd } from "../designer-canvas/index.esm.js";
import Hd from "../color-picker/index.esm.js";
import dl, { useDataSource as Zv, FComboListContainer as eg, FComboList as To } from "../combo-list/index.esm.js";
import Rs, { useNumber as tg, useFormat as ng, useSpinner as ag, useTextBox as og, getSpinnerRender as ig, getNumberTextBoxRender as lg, useNumberLocales as rg, FNumberSpinner as sg } from "../number-spinner/index.esm.js";
import { BaseControlProperty as Wd, InputBaseProperty as _s, ExpressionProperty as ug, FormBindingType as Wi, SchemaDOMMapping as cg } from "../property-panel/index.esm.js";
import dg from "../tags/index.esm.js";
import xa, { FButtonEdit as Ql } from "../button-edit/index.esm.js";
import $s from "../../designer/button-edit/index.esm.js";
import La from "../tree-view/index.esm.js";
import zd, { FInputGroup as fl } from "../input-group/index.esm.js";
import { useResizeObserver as js } from "@vueuse/core";
import fg from "../binding-selector/index.esm.js";
import pg from "../accordion/index.esm.js";
import mg from "../avatar/index.esm.js";
import hg from "../calendar/index.esm.js";
import vg from "../../designer/capsule/index.esm.js";
import Ju from "../../designer/checkbox/index.esm.js";
import Zu from "../../designer/checkbox-group/index.esm.js";
import gg from "../content-container/index.esm.js";
import yg from "../../designer/data-grid/index.esm.js";
import bg from "../../designer/date-picker/index.esm.js";
import Cg from "../dropdown/index.esm.js";
import wg from "../../designer/dynamic-form/index.esm.js";
import Sg from "../external-container/index.esm.js";
import xg from "../image-cropper/index.esm.js";
import Tg from "../../designer/input-group/index.esm.js";
import Hs, { FLayout as kg, FLayoutPane as Co } from "../layout/index.esm.js";
import Fg from "../list-nav/index.esm.js";
import Pg from "../../designer/list-view/index.esm.js";
import Mg from "../lookup/index.esm.js";
import Og from "../nav/index.esm.js";
import Ig from "../../designer/number-spinner/index.esm.js";
import Eg from "../number-range/index.esm.js";
import Bg from "../order/index.esm.js";
import Dg from "../page-header/index.esm.js";
import Vg from "../page-footer/index.esm.js";
import Ag from "../progress/index.esm.js";
import Lg, { useCondition as Ng, useSolutionUtils as qd } from "../query-solution/index.esm.js";
import Rg from "../../designer/radio-group/index.esm.js";
import _g from "../../designer/rate/index.esm.js";
import $g from "../../designer/response-toolbar/index.esm.js";
import jg from "../response-layout/index.esm.js";
import Hg from "../../designer/response-layout-editor/index.esm.js";
import Wg, { FSearchBox as zg } from "../search-box/index.esm.js";
import qg from "../../designer/section/index.esm.js";
import Ug from "../smoke-detector/index.esm.js";
import Gg from "../splitter/index.esm.js";
import Yg from "../step/index.esm.js";
import Qg from "../../designer/switch/index.esm.js";
import Kg from "../../designer/tabs/index.esm.js";
import Xg from "../../designer/tags/index.esm.js";
import Jg from "../text/index.esm.js";
import Zg from "../../designer/time-picker/index.esm.js";
import ey from "../uploader/index.esm.js";
import ty from "../verify-detail/index.esm.js";
import ny from "../component/index.esm.js";
import ay from "../video/index.esm.js";
import oy from "../../designer/textarea/index.esm.js";
import iy from "../../designer/tree-grid/index.esm.js";
import ly from "../fieldset/index.esm.js";
import ry from "../../designer/drawer/index.esm.js";
import sy from "../html-template/index.esm.js";
import uy from "../image/index.esm.js";
import cy from "../comment/index.esm.js";
import { loadRegister as dy, useComponentManager as fy, useBindingData as py, useEntityState as my, useDynamicViewUtils as hy, componentMap as Cr, resolverMap as vy, componentPropsConverter as gy } from "../dynamic-view/index.esm.js";
import _r from "../section/index.esm.js";
import yy from "../combo-tree/index.esm.js";
import by from "../events-editor/index.esm.js";
import Cy, { FieldSelectorRepositoryToken as Ki } from "../field-selector/index.esm.js";
import wy from "../mapping-editor/index.esm.js";
import Sy from "../schema-selector/index.esm.js";
import Ud, { EditorType as xy } from "../event-parameter/index.esm.js";
import Ty from "../filter-condition-editor/index.esm.js";
import ky from "../sort-condition-editor/index.esm.js";
import Fy from "../menu-lookup/index.esm.js";
import Py from "../json-editor/index.esm.js";
import My from "../property-editor/index.esm.js";
import Oy, { FExpressionTextbox as Iy } from "../expression-editor/index.esm.js";
import Ey from "../code-editor/index.esm.js";
import By from "../collection-property-editor/index.esm.js";
import Dy from "../../designer/modal/index.esm.js";
import Vy, { FTreeGrid as Ws } from "../tree-grid/index.esm.js";
import jt from "bignumber.js";
import Ay, { FDynamicForm as Ly, FDynamicFormLabel as Ny, FDynamicFormGroup as zs, useTypeResolver as Gd, FDynamicFormInput as Ry } from "../dynamic-form/index.esm.js";
import _y, { FTimePickerTimeView as ec, convertToDate as $y } from "../time-picker/index.esm.js";
import pl from "../date-picker/index.esm.js";
import { createI18n as jy, useI18n as Hy } from "vue-i18n";
import { useConditionValue as Wy, useConditionUtils as qs, useCondition as zy, CompareType as An, ValueType as Ia, TextValue as wr, RadioGroupValue as qy, NumberSpinnerValue as Uy, NumberRangeValue as Gy, MonthRangeValue as Yy, MonthPickerValue as Qy, DateRangeValue as tc, DateTimePickerValue as Ky, DatePickerValue as Xy, ComboLookupValue as Jy, ComboListValue as Zy, CheckBoxValue as eb } from "../condition/index.esm.js";
import { DgControl as tb } from "../designer-canvas/index.esm.js/";
import Us from "../response-toolbar/index.esm.js";
import nb, { FLoadingService as ab } from "../loading/index.esm.js";
import ob from "../capsule/index.esm.js";
import "../tooltip/index.esm.js";
import "../checkbox-group/index.esm.js";
import { FMessageBoxService as ib } from "../message-box/index.esm.js";
import lb from "../textarea/index.esm.js";
var rn = /* @__PURE__ */ ((e) => (e[e.readonly = 0] = "readonly", e[e.editable = 1] = "editable", e[e.editing = 2] = "editing", e))(rn || {}), Jn = /* @__PURE__ */ ((e) => (e[e.initial = 0] = "initial", e[e.editing = 1] = "editing", e))(Jn || {}), $t = /* @__PURE__ */ ((e) => (e[e.data = 0] = "data", e[e.group = 1] = "group", e[e.summary = 2] = "summary", e))($t || {});
const YU = {
/** 显示行号 */
enable: { type: Boolean, default: !1 },
/** 行号列表头标题 */
heading: { type: String, default: "序号" },
/** 行号宽度,默认为 36px */
width: { type: Number, default: 36 }
}, QU = {
/** 启用分页 */
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 Be = /* @__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))(Be || {}), rb = /* @__PURE__ */ ((e) => (e.NONE = "none", e.NUMBER = "number", e.DATE = "date", e.TEXT = "boolean", e.IMAGE = "boolean2", e.ENUM = "enum", e.CUSTOM = "custom", e))(rb || {}), Rn = /* @__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))(Rn || {}), sb = /* @__PURE__ */ ((e) => (e.Column = "column", e.Group = "group", e))(sb || {});
function ub(e, t) {
var g, b, y, w, T, S, M, k, x;
const { isUndefined: n } = Sa(), { pageIndex: a, totalItems: o, pagination: i } = t, l = C((g = e.pagination) == null ? void 0 : g.enable), r = C(((b = e.pagination) == null ? void 0 : b.disabled) || !1), c = C((y = e.pagination) == null ? void 0 : y.size), f = C((w = e.pagination) == null ? void 0 : w.sizeLimits), d = C((T = e.pagination) == null ? void 0 : T.mode), s = C((S = e.pagination) == null ? void 0 : S.showIndex), p = C((M = e.pagination) == null ? void 0 : M.showLimits), v = C(((k = e.pagination) == null ? void 0 : k.showGoto) || !1), m = C(((x = e.pagination) == null ? void 0 : x.showPageInfo) || !0);
Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.disabled;
}, (F, P) => {
F !== P && (r.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.sizeLimits;
}, (F, P) => {
f.value = F;
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.showIndex;
}, (F, P) => {
F !== P && (s.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.showLimits;
}, (F, P) => {
F !== P && (p.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.total;
}, (F, P) => {
F !== P && (o.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.enable;
}, (F, P) => {
F !== P && (l.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.showGoto;
}, (F, P) => {
F !== P && (v.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.showPageInfo;
}, (F, P) => {
F !== P && (m.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.index;
}, (F, P) => {
F !== P && (a.value = F);
}), Z(() => {
var F;
return (F = e.pagination) == null ? void 0 : F.size;
}, (F, P) => {
F !== P && (c.value = F);
});
const h = (F) => {
if (!F)
return;
const { enable: P, total: I, size: O, index: V, sizeLimits: E, showGoto: D, showIndex: B, showLimits: _, mode: j, disabled: A } = F;
n(P) || (l.value = P), n(V) || (a.value = V), n(O) || (c.value = O), n(E) || (f.value = E), n(D) || (v.value = D), n(B) || (s.value = B), n(_) || (p.value = _), n(j) || (d.value = j), n(I) || (o.value = I), n(A) || (r.value = A);
};
return Z(() => e.pagination, (F, P) => {
F !== P && (i.value = F, h(F));
}), {
disabled: r,
pageSize: c,
pageList: f,
shouldRenderPagination: l,
showGotoPage: v,
showPageIndex: s,
showPageList: p,
showPageInfo: m,
mode: d,
updatePagination: h
};
}
function nc(e) {
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Bn(e);
}
function cb(e, t, n, a, o, i, l, r, c, f, d) {
const {
updatePagination: s
} = ub(e, n), {
showSidebarCheckBox: p
} = f, {
showSelectAll: v,
showSelection: m,
selectedValues: h,
updateSelectAllStatus: g,
keepSelectingOnPaging: b,
clearSelection: y
} = c, w = C([]), T = C([]), S = [{
name: xe.getLocaleValue("datagrid.settings.asc"),
value: "asc",
icon: "f-icon f-icon-col-ascendingorder"
}, {
name: xe.getLocaleValue("datagrid.settings.summaryNone"),
value: "none"
}, {
name: xe.getLocaleValue("datagrid.settings.desc"),
value: "desc",
icon: "f-icon f-icon-col-descendingorder"
}], M = L(() => {
var $, U;
return (($ = e.filter) == null ? void 0 : $.mode) === "server" || ((U = e.sort) == null ? void 0 : U.mode) === "server";
}), {
addColumnFilter: k,
removeColumnFilter: x,
createFilterConditions: F,
filterFromServer: P
} = o;
function I() {
b.value || y(), n.updateVisibleDataSummary(d.value);
}
function O($) {
T.value = $;
}
function V($) {
w.value = $;
}
function E($) {
const U = $.status, z = (U & Be.sorted) === Be.sorted, W = (U & Be.ascending) === Be.ascending, Y = (U & Be.descending) === Be.descending;
let Q = z ? U ^ Be.sorted : U;
return Q = W ? Q ^ Be.ascending : Q, Q = Y ? Q ^ Be.descending : Q, Q;
}
function D($) {
$.sortType = "none", $.status = E($);
const U = $.column;
U && (U.sort = "none", U.sortOrder = 0, t.applyColumnSorter(n, l));
}
function B($, U) {
U.column && (U.column.filter = null), n.removeFilter(`field_filter_${U.field}`), D(U), U.filterHistory && U.filterHistory.forEach((z) => {
z.checked = !1;
});
}
function _($) {
var Y;
const U = E($), z = $.sortType === "none" ? U : $.sortType === "asc" ? U | Be.sorted | Be.ascending : U | Be.sorted | Be.descending;
$.status = z;
const W = $.column;
W && (W.sort = $.sortType, W.sortOrder = $.sortType !== "none" ? W.sortOrder : 0, $.status = z, V(t.createSortConditions(l)), ((Y = e.sort) == null ? void 0 : Y.mode) !== "server" && (t.applyColumnSorter(n, l), r.reCalculateVisualDataRows(), I()));
}
function j($) {
var W, Y;
const U = ($.status & Be.filtered) === Be.filtered;
$.status = U ? $.status ^ Be.filtered : $.status | Be.filtered, ((W = $.column) == null ? void 0 : W.filter) != null && $.column.filter !== "" && $.filter ? k($) : x($), O(F()), ((Y = e.filter) == null ? void 0 : Y.mode) !== "server" && (n.refresh(), r.reCalculateVisualDataRows(), I());
}
function A($) {
var U;
$.showPopover = !1, $.filterHistory = void 0, i.updateFilterHistory($, (U = $.column) == null ? void 0 : U.filter), j($), _($), M.value && P({
filterConditions: T.value,
sortConditions: w.value
});
}
function G($) {
var W;
let U, z;
return u("div", {
class: "fv-column-sort-filter-container"
}, [((W = $.column) == null ? void 0 : W.sortable) && u("div", {
class: "fv-column-sort-section"
}, [u(On("f-capsule"), {
items: S,
modelValue: $.sortType,
"onUpdate:modelValue": (Y) => $.sortType = Y,
type: "secondary"
}, null)]), u("div", {
class: "fv-column-filter-section"
}, [u("div", {
class: "fv-column-filter-section-title"
}, [xe.getLocaleValue("datagrid.filter.title")]), u("div", {
class: "fv-column-filter-section-editor"
}, [a.getFilterEditor($)])]), u("div", {
class: "fv-column-sort-filter-footer"
}, [u("div", {
class: "fv-column-clear-section"
}, [u(On("f-button"), {
style: "margin: 4px 0;padding-left: 0;",
type: "link",
onClick: (Y) => B(Y, $)
}, nc(U = xe.getLocaleValue("datagrid.filter.clear")) ? U : {
default: () => [U]
})]), u("div", {
class: "fv-column-confirm-section"
}, [u(On("f-button"), {
customClass: {
"f-btn-ml": !0
},
size: "small",
onClick: (Y) => A($)
}, nc(z = xe.getLocaleValue("datagrid.filter.ok")) ? z : {
default: () => [z]
})])])]);
}
return {
renderFilterContainer: G,
onConfirm: A
};
}
function db(e) {
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Bn(e);
}
function fb(e, t, n, a, o, i, l, r, c, f, d, s, p, v, m) {
function h(A) {
const G = A.status;
return {
"fv-column-handler": !0,
"fv-column-handler-active": (G & Be.filtered) === Be.filtered || (G & Be.sorted) === Be.sorted || A.showPopover
};
}
function g(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.none && (A.status & Be.sorted) === Be.none;
}
function b(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.none && (A.status & Be.sorted) === Be.sorted && (A.status & Be.ascending) === Be.ascending;
}
function y(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.none && (A.status & Be.sorted) === Be.sorted && (A.status & Be.descending) === Be.descending;
}
function w(A) {
return (A.status & Be.sortable) === Be.none && (A.status & Be.filterable) === Be.filterable && (A.status & Be.sorted) === Be.none;
}
function T(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.filterable && (A.status & Be.sorted) === Be.none;
}
function S(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.filterable && (A.status & Be.sorted) === Be.sorted && (A.status & Be.ascending) === Be.ascending;
}
function M(A) {
return (A.status & Be.sortable) === Be.sortable && (A.status & Be.filterable) === Be.filterable && (A.status & Be.sorted) === Be.sorted && (A.status & Be.descending) === Be.descending;
}
const k = function(A) {
return {
"f-icon": !0,
"f-icon-col-defaultsort": g(A),
"f-icon-col-ascending": b(A),
"f-icon-col-descending": y(A),
"f-icon-col-filter": w(A),
"f-icon-col-defaultfilterandsort": T(A),
"f-icon-col-filterandascending": S(A),
"f-icon-col-filteranddescending": M(A)
};
}, x = /* @__PURE__ */ new Map([[Be.sortable, Be.sortable | Be.sorted | Be.ascending], [Be.sortable | Be.sorted | Be.ascending, Be.sortable | Be.sorted | Be.descending], [Be.sortable | Be.sorted | Be.descending, Be.sortable]]), {
renderFilterContainer: F,
onConfirm: P
} = cb(e, i, l, r, c, f, d, s, p, v, m), I = C();
function O(A, G) {
G.filter(($) => $ !== A && $.showPopover).forEach(($) => {
$.showPopover = !1;
});
}
function V(A) {
let G;
return u(qa, {
ref: I,
class: "fv-column-handler-popover",
"z-index": 1050,
"right-boundary": o.value,
offsetX: -s.offsetX,
placement: "auto",
visible: !0,
onHidden: () => {
A.showPopover = !1, P(A);
}
}, db(G = F(A)) ? G : {
default: () => [G]
});
}
async function E(A, G) {
G.showPopover = !G.showPopover, await Ct();
const $ = I.value;
$ && $.show(A.target);
}
function D(A, G) {
A.filter(($) => $.field !== G.field);
}
function B(A) {
var z;
const G = A.status;
if ((G & Be.sortable) === Be.sortable && (G & Be.filterable) === Be.none && x.has(G)) {
const W = x.get(G), Y = (W & Be.sorted) === Be.sorted, Q = (W & Be.ascending) === Be.ascending, J = (W & Be.descending) === Be.descending, H = A.column;
H && (H.sort = Q ? "asc" : J ? "desc" : "none", H.sortOrder = Y ? H.sortOrder : 0, A.sortType = H.sort, A.status = W, ((z = e.sort) == null ? void 0 : z.mode) === "server" ? t.emit("sortChanged", {
filterConditions: c.createFilterConditions(),
sortConditions: i.createSortConditions(d)
}) : (i.applyColumnSorter(l, d), s.reCalculateVisualDataRows()));
}
}
function _(A, G, $) {
D($, G), B(G), O(G, $), (G.status & Be.filterable) === Be.filterable && E(A, G);
}
function j(A, G, $) {
return [u("span", {
class: h(A),
onClick: (z) => _(z, A, $)
}, [u("i", {
class: k(A)
}, null), A && A.column && A.sortType !== "none" && (A.column.sortOrder || ""), A.showPopover && V(A)])];
}
return {
renderHeaderCellHandler: j
};
}
const Yd = "__setting__", KU = "设置", pb = 30, mb = "right", Zn = "setting", Qd = "__command__", XU = "操作", hb = 150, vb = "right", sa = "commands";
function gb(e, t, n, a, o, i, l) {
const r = "id", c = C();
let f;
const {
applySortableColumns: d,
collectionFilterableColumns: s,
collectionSortableColumns: p,
columnContext: v,
updateColumnSettingIcon: m
} = e, {
conditions: h
} = n, {
calculateColumnsSize: g
} = a, {
fitHorizontalScroll: b
} = i, y = C([]), w = L(() => !!y.value.length), T = L(() => v.value.primaryColumns.filter(($) => $.dataType !== sa && $.dataType !== Zn));
let S = [];
const M = C(T.value.map(($) => ({
id: $.field,
name: $.title
}))), k = L(() => T.value.filter(($) => $.visible).map(($) => ({
id: $.field,
name: $.title
})));
L(() => p().map(($) => ({
id: $.field,
name: $.title,
order: $.sort
}))), L(() => s().map(($) => ({
id: $.field,
code: $.field,
controlType: "",
labelCode: $.field,
name: $.title,
editor: $.editor,
// || ({ type: useFilterComposition.getFilterEditorType(filterableColumn) } as EditorConfig),
value: {},
visible: !0
})));
function x() {
const $ = /* @__PURE__ */ new Map();
return T.value.reduce((U, z) => (z.visible = !1, U.set(z.field, z), U), $), $;
}
function F($, U) {
return $.map(({
id: W
}) => {
const Y = U.get(W);
return Y.visible = !0, U.delete(W), Y;
});
}
function P($) {
const U = v.value.primaryColumns.filter((Q) => Q.dataType === sa), z = v.value.primaryColumns.filter((Q) => Q.dataType === Zn), W = x(), Y = F($, W);
U.length || z.length ? v.value.primaryColumns = [...Y, ...Array.from(W.values()), ...U, ...z] : v.value.primaryColumns = [...Y, ...Array.from(W.values())], m(), g(), Ct(() => {
b();
});
}
function I() {
P(S), f == null || f.destroy();
}
function O($) {
return u("div", {
class: "fv-grid-settings"
}, [u(bd, {
"tab-type": "pills",
"justify-content": "center"
}, {
headerPrefix: () => u("div", {
class: "modal-title"
}, [u("span", {
class: "modal-title-label"
}, [xe.getLocaleValue("datagrid.settings.title")])]),
default: () => [
u(Cd, {
id: "display-columns",
title: xe.getLocaleValue("datagrid.settings.visible"),
class: "container"
}, {
default: () => [u(yd, {
style: "height: 480px",
displayType: "Tree",
"identify-field": r,
"data-source": M.value,
selections: k.value,
onChange: P
}, 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: () => u("div", {
class: "f-btn-icon f-bare",
onClick: (U) => I()
}, [u("span", {
class: "f-icon modal_close"
}, null)])
})]);
}
function V() {
const $ = /* @__PURE__ */ new Map();
return p().reduce((U, z) => (z.sort = "none", z.sortOrder = 0, U.set(z.field, z), U), $), $;
}
function E($) {
return y.value.filter((z) => z.id && z.order).map((z, W) => {
const Y = W + 1, Q = $.get(z.id);
return Q && (Q.sort = z.order, Q.sortOrder = Y), Q;
});
}
function D() {
if (w.value) {
const $ = V(), U = E($);
d(U, t, o), i.reCalculateVisualDataRows(), g();
}
}
function B() {
c.value && (h.value = c.value.getConditions(), t.refresh(), i.reCalculateVisualDataRows());
}
function _() {
D(), B();
}
function j() {
S = mt(k.value);
}
function A() {
P(S);
}
function G() {
f = l.open({
title: "",
width: 800,
showButtons: !0,
showHeader: !1,
dragHandle: ".farris-tabs-header",
draggable: !0,
render: O,
acceptCallback: _,
rejectCallback: A
}), j();
}
return {
acceptCallback: _,
rejectCallback: A,
renderSettingsPanel: O,
openSettingPanel: G
};
}
function yb(e, t, n, a, o, i, l, r) {
const c = Ve(hi), f = L(() => ({
margin: "0px"
}));
function d(p) {
if (p.stopPropagation(), e.showSetting && e.enableColumnSettingSolution && (r.value = !0), e.showSetting && !e.enableColumnSettingSolution) {
const {
openSettingPanel: v
} = gb(t, n, a, o, i, l, c);
v();
}
}
function s() {
return u("span", {
class: "fv-grid-settings-icon",
style: f.value,
onClick: d
}, [u("i", {
class: "f-icon f-icon-home-setup"
}, null)]);
}
return {
renderGridSettingsIcon: s
};
}
function bb(e, t, n, a) {
const i = C(-1), l = C(0), r = C(!1);
let c = "";
const f = L(() => ({
display: r.value ? "block" : "none",
left: `${l.value}px`
})), d = L(() => ({
display: r.value ? "block" : "none"
}));
function s(m) {
const h = m.target.parentElement;
if (h) {
const { left: g } = h.getBoundingClientRect();
l.value = m.clientX - g;
}
}
function p(m) {
const h = t.value.primaryColumns.filter((b) => b.visible).find((b) => b.field === c) || t.value.leftColumns.filter((b) => b.visible).find((b) => b.field === c) || t.value.rightColumns.filter((b) => b.visible).find((b) => b.field === c), g = m.target.parentElement;
if (h && g) {
const { left: b } = g.getBoundingClientRect(), y = m.clientX - b, w = (h.actualWidth || 0) + (y - i.value);
h.actualWidth = Math.max(40, w), n.calculateColumnsSize();
}
l.value = 0, r.value = !1, document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", p), document.body.style.userSelect = "", c = "";
}
function v(m, h) {
c = h, r.value = !0;
const b = m.composedPath().find((y) => y.className.split(" ")[0] === "fv-grid");
if (b) {
const { left: y } = b.getBoundingClientRect();
l.value = m.clientX - y, i.value = m.clientX - y, document.addEventListener("mousemove", s), document.addEventListener("mouseup", p), document.body.style.userSelect = "none";
}
}
return { onClickColumnResizeBar: v, resizeHandleStyle: f, resizeOverlayStyle: d };
}
function JU(e, t, n, a, o, i, l, r, c, f, d, s, p, v, m, h, g, b, y, w) {
const {
showSelectAll: T,
selectAll: S,
unSelectAll: M,
selectedValues: k,
selectAllStatus: x,
indeterminateStatus: F,
emitSelectionChanged: P
} = v, {
showRowNumer: I,
showSidebarCheckBox: O,
sidebarTitle: V,
sidebarCornerCellStyle: E
} = m, {
columnContext: D,
hasLeftFixedColumn: B,
hasRightFixedColumn: _
} = i, {
onClickColumnResizeBar: j,
resizeHandleStyle: A,
resizeOverlayStyle: G
} = bb(e, D, s), {
gridHeaderColumnsStyle: $,
leftFixedGridHeaderColumnsStyle: U,
rightFixedGridHeaderColumnsStyle: z
} = g, {
dragstart: W,
dragenter: Y,
dragover: Q,
dragend: J
} = r, H = L(() => T.value || O.value || I.value), N = D.value.defaultColumnWidth, R = 32, q = /* @__PURE__ */ new Map([[0, 0]]), X = L(() => e.showHeader);
function ne(Ie, ot) {
var st;
const Ze = ((st = Ie.column) == null ? void 0 : st.dataType) === "setting", gt = q.get(ot) || 0, qe = {
height: `${Ie.depth * R}px`,
left: `${Ie.left}px`,
top: `${(Ie.layer - 1) * R}px`,
width: `${Ie.actualWidth}px`
};
return D.value.headerDepth > 1 && (qe["line-height"] = `${Ie.depth * R}px`), Ze && (qe.paddingLeft = "2px"), e.showBorder && (qe.border = "1px solid #e6e9f0"), q.set(ot + 1, gt + (Ie.actualWidth || N)), qe;
}
function ee(Ie, ot) {
var gt;
const Ze = ne(Ie, ot);
return e.displayType === "Card" && (Ze.position = "relative", Ze.overflow = "visible", delete Ze.left, (gt = e.columnOption) != null && gt.fitColumns && e.fit ? (Ze.flex = "1", Ze.overflow = "hidden", Ze.textOverflow = "ellipsis", Ze.whiteSpace = "nowrap", delete Ze.width) : Ze.flexShrink = "0"), Ze;
}
const oe = L(() => ({
"fv-grid-header": !0,
"fv-grid-header-group-columns": D.value.headerDepth > 1
})), ie = L(() => {
const Ie = {
height: `${D.value.headerDepth * R}px`
};
return g.shouldShowVirticalScrollbar.value && (Ie.paddingRight = "10px"), e.displayType === "Card" && (Ie.overflow = "visible", Ie.position = "sticky", Ie.flexShrink = "0", Ie.left = "0", Ie.top = "0", Ie.zIndex = "3", Ie.width = "100%"), Ie;
}), Ce = L(() => {
var Ie;
return {
width: `${Number((Ie = e.rowNumber) == null ? void 0 : Ie.width)}px`
};
}), Ee = function(Ie) {
return (Ie.status & Be.sortable) === Be.sortable || (Ie.status & Be.filterable) === Be.filterable;
}, {
renderHeaderCellHandler: $e
} = fb(e, t, n, a, o, i, l, c, f, d, h, g, v, m, y), {
renderGridSettingsIcon: tt
} = yb(e, i, l, f, s, h, g, w);
function ze(Ie) {
var Ze;
const ot = {
"fv-grid-header-cell": !0,
"fv-grid-header-cell-border": e.showBorder
};
return ot["text-" + (((Ze = Ie.column) == null ? void 0 : Ze.halign) || "left")] = !0, ot;
}
function pt(Ie) {
if (F.value = !1, Ie) {
if (S(), e.displayType === "Card")
return;
t.emit("selectAll", Ie);
} else {
if (M(), e.displayType === "Card")
return;
t.emit("unSelectAll", Ie);
}
P();
}
function je(Ie) {
return u("span", {
class: "fv-column-title",
title: Ie.title
}, [Ie.title]);
}
function Bt(Ie, ot, Ze) {
var gt, qe, st, ge, Le, ft, ce;
return u("div", {
class: ze(Ie),
style: ee(Ie, Ze),
draggable: Ie.draggable,
onDragstart: (Me) => W(Me, Ie, Ze),
onDragenter: (Me) => Y(Me, Ze),
onDragend: (Me) => J(Me, Ie),
onDragover: (Me) => Q(Me, Ze)
}, [
// 树表第一列全选按钮
e.hierarchy && Ze === 0 && ((gt = Ie.column) == null ? void 0 : gt.dataType) !== Zn && ((qe = Ie.column) == null ? void 0 : qe.dataType) !== sa && T.value && u("span", {
style: "margin-left: .75rem"
}, [u(ba, {
id: "checkbox_for_select_all",
checked: x.value,
"onUpdate:checked": (Me) => x.value = Me,
indeterminate: F.value,
onChangeValue: pt
}, null)]),
((st = Ie.column) == null ? void 0 : st.dataType) === "setting" && e.showSetting && e.displayType !== "Card" ? tt() : t.slots.headerCellTemplate ? t.slots.headerCellTemplate({
headerCell: Ie,
headerCells: ot,
columnIndex: Ze
}) : (ge = Ie.column) != null && ge.headerFormatter ? (ft = (Le = Ie.column).headerFormatter) == null ? void 0 : ft.call(Le, {
headerCell: Ie,
headerCells: ot,
columnIndex: Ze
}) : (ce = Ie.column) != null && ce.showTips ? je(Ie) : u("span", {
class: "fv-column-title"
}, [Ie.title]),
Ee(Ie) && $e(Ie, Ze, ot),
Ie.resizable && u("span", {
class: "fv-column-resize-bar",
onMousedown: (Me) => j(Me, Ie.field)
}, null)
]);
}
function fe(Ie) {
return Ie.map((ot, Ze) => {
const gt = [];
if (gt.push(Bt(ot, Ie, Ze)), ot.children && ot.children.length) {
const qe = fe(ot.children);
gt.push(...qe);
}
return gt;
});
}
function se() {
return u("div", {
class: "fv-grid-header-left-fixed"
}, [u("div", {
class: "fv-grid-header-columns",
style: U.value
}, [fe(D.value.leftHeaderColumns)])]);
}
function ue() {
return u("div", {
class: "fv-grid-header-right-fixed"
}, [u("div", {
class: "fv-grid-header-columns",
style: z.value
}, [fe(D.value.rightHeaderColumns)])]);
}
L(() => k.value.length > 0 && y.value.length !== k.value.length);
function me() {
return u("div", {
class: "fv-grid-header-corner d-flex",
style: E.value
}, [O.value && T.value && !e.hierarchy && u("div", {
class: "d-inline-flex align-items-center"
}, [u(ba, {
id: "checkbox_for_select_all",
checked: x.value,
"onUpdate:checked": (Ie) => x.value = Ie,
indeterminate: F.value,
onChangeValue: pt
}, null)]), O.value && !T.value && !e.hierarchy && u("div", {
class: "d-inline-flex align-items-center",
style: {
opacity: "0"
}
}, [u(ba, {
disabled: !0
}, null)]), I.value && u("div", {
class: "align-items-center fv-grid-sidebar-row-number",
style: Ce.value
}, [u("div", {
title: V.value,
class: {
"text-center": !0,
"text-truncate": !0,
"w-100": !0
}
}, [V.value])])]);
}
function _e() {
return u("div", {
class: oe.value,
style: ie.value
}, [H.value && e.displayType !== "Card" && me(), B.value && se(), u("div", {
class: "fv-grid-header-primary",
style: e.displayType === "Card" ? {
overflow: "visible"
} : void 0
}, [u("div", {
class: "fv-grid-header-columns",
style: $.value
}, [fe(D.value.primaryHeaderColumns)])]), _.value && ue()]);
}
function he() {
return u(yt, null, [u("div", {
class: "fv-datagrid-resize-overlay",
style: G.value
}, null), u("div", {
class: "fv-datagrid-resize-proxy",
style: A.value
}, null)]);
}
return {
renderGridHeader: _e,
renderGridColumnResizeOverlay: he,
shouldShowHeader: X
};
}
function ZU() {
function e() {
return u("div", {
class: "fv-grid-disable"
}, null);
}
return {
renderDisableMask: e
};
}
function e5(e, t, n, a, o) {
const {
columnContext: i
} = t, {
conditions: l,
clearCondition: r,
removeCondition: c
} = a, f = C([]);
function d() {
const h = [];
Array.from(l.value).forEach((g, b) => {
var w;
const y = {
id: g.id,
code: g.fieldCode,
labelCode: g.fieldCode,
name: g.fieldName,
editor: {
type: (w = g.value) == null ? void 0 : w.editorType
}
};
h.push(y);
}), f.value = h;
}
Z(l, () => d());
function s(h) {
if (h && h.column) {
h.column.filter = null;
let g = h.status;
g = (g & Be.filtered) === Be.filtered ? g ^ Be.filtered : g, h.status = g;
}
}
function p(h) {
c(`field_filter_${h}`);
const g = i.value.primaryHeaderColumns.find((b) => b.field === h);
s(g), n.refresh(), o.reCalculateVisualDataRows();
}
function v() {
r(), i.value.primaryHeaderColumns.forEach((h) => s(h)), n.refresh(), o.reCalculateVisualDataRows();
}
function m() {
return u("div", {
class: "fv-grid-filter-panel"
}, [u(Ov, {
data: l.value,
fields: f.value,
mode: "display-only",
"show-reset": !0,
onRemove: p,
onReset: v
}, null)]);
}
return {
renderFilterPanel: m
};
}
function t5(e, t, n, a, o) {
const {
dropOnGroupPanel: i,
groupColumnItems: l
} = n, {
groupFields: r,
shouldGroupingData: c,
showGroupPanel: f
} = a, d = C();
function s(m) {
r.value = m.map((h) => h.value), t.updateDataView(), o.reCalculateVisualDataRows();
}
function p(m) {
m.preventDefault();
}
function v() {
return c.value && f.value && u("div", {
class: "fv-grid-group-panel",
onDrop: i,
onDragover: p
}, [l.value && u(On("f-tags"), {
ref: d,
style: "margin:0.375rem",
"tag-type": "default",
data: l.value,
"tag-style": "capsule",
"show-close": !0,
onChange: s
}, null)]);
}
return {
renderGroupPanel: v
};
}
function Cb(e, t, n, a) {
const o = String(Date.now()), i = C(t.value.primaryColumnsWidth);
function l(m) {
const h = {};
return m.reduce(
(g, b, y) => {
const w = y < m.length - 1 ? m[y + 1] : null;
return y === 0 && (g[b.field] = { left: 0 }), b.actualWidth !== void 0 && (g[b.field].width = b.actualWidth), w && (g[w.field] = {
left: g[b.field].left + (b.actualWidth || 0)
}), g;
},
h
), h;
}
function r(m, h, g) {
const b = n.value * (g + 1), y = m.parent.height ? `${m.parent.height}px` : "", w = h[m.field];
if (!w)
return {
left: `${b}px`,
height: `${y}`
};
const S = w.left - b + (w.width || 0);
return {
left: `${b}px`,
width: `${S}px`,
height: `${y}`
};
}
function c(m, h, g) {
return {
right: "0px",
height: `${m.parent.height ? `${m.parent.height}px` : ""}`
};
}
function f(m, h, g) {
var w;
const b = h.parent.height ? `${h.parent.height}px` : "", y = {
left: `${g[h.field].left}px`,
height: `${b}`,
width: isNaN(Number(g[h.field].width)) ? "100%" : `${g[h.field].width}px`
};
if ((w = e.rowOption) != null && w.customCellStyle && e.displayType !== "Card") {
const T = e.rowOption.customCellStyle(h, m) || {};
return Object.assign({}, y, T.style || {});
}
return y;
}
function d(m, h, g) {
const y = (h.spanned || []).reduce((T, S) => T + (S.parent.height || 0), 0) + (m.height || 0);
return {
top: `${m.top}px`,
left: `${g[h.field].left}px`,
width: `${g[h.field].width}px`,
height: `${y}px`,
padding: `calc(${y / 2}px - 1rem) 0`
// height: `calc(${rowHeight}px * ${cell.rowSpan})`,
// padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0`
};
}
function s(m, h) {
return `${o}_${m.type}_r_${m.index}_c_${h}_${m.refreshKey || ""}`;
}
function p(m) {
return `${o}_${m.type}_r_${m.index}_${m.refreshKey || ""}`;
}
function v(m) {
var b;
const h = m.height ? `${m.height}px` : "", g = {
top: `${m.top}px`,
width: isNaN(i.value) ? "100%" : `${i.value}px`,
height: `${h}`
};
if ((b = e.rowOption) != null && b.customRowStyle && e.displayType !== "Card") {
const y = e.rowOption.customRowStyle(m.raw) || {};
return Object.assign({}, g, y.style || {});
}
return g;
}
return Z(t, () => {
i.value = t.value.primaryColumnsWidth;
}), {
calculateCellPositionInRow: l,
cellKey: s,
cellPosition: f,
groupCellPosition: r,
rowKey: p,
rowPosition: v,
rowSpanCellPosition: d,
summaryCellPosition: c
};
}
function wb(e, t, n) {
const { hasChildrenField: a } = n, o = C("#9399a0"), i = C(28);
function l() {
return [].concat(
...t.value.filter((p) => p.raw.__fv_descendant_index__.length !== 0).map((p) => [...p.raw.__fv_descendant_index__.slice(-1)]).flat()
).sort((p, v) => Number(p) - Number(v));
}
function r(d) {
const s = new Array(t.value.length).fill(0);
if (e.showLines) {
const p = l();
t.value.forEach((v, m) => {
const h = p.includes(m), g = v.raw[a.value];
s[m] = `repeating-linear-gradient(90deg, ${o.value} 0 1px, transparent 0px 2px) ${g ? "-10px" : "0px"} ${i.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${o.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${h ? "50%" : "100%"} no-repeat`;
}), s[0] = "";
}
return s[d];
}
function c(d, s, p) {
return p[d].parents.set(d, !0).forEach((m) => {
p[m].childsLength = p[m].childWithLines.filter((h) => s[h].visible).length;
}), s;
}
function f(d) {
const s = d.raw.__fv_parent_index__ === void 0 || d.raw.__fv_parent_index__ === -1, v = s ? 0 : 8, m = 0, h = d.raw[a.value], g = `${d.layer * 10 + d.layer * v + m}px`, b = d.visible || _n(d.visible) ? {
paddingLeft: `calc(${g})`,
// paddingLeft,
background: r(d.index),
display: "flex",
width: "100%",
position: "relative"
} : {
display: "none"
};
return !h && s && (b.paddingLeft = "calc(1.18rem)"), !h && !s && (b.paddingLeft = `calc(${g} + 1.25rem)`), b;
}
return { hierarchyCellContentStyle: f, handleCollapsedPaddingBottom: c };
}
function Sb(e, t, n) {
const a = C(e.iconField);
function o(i, l) {
if (a.value)
return i.raw[e.iconField];
let r = "";
return i.raw[n.value] !== !0 ? r = t.value.leafnodes : r = i.collapse ? t.value.fold : t.value.unfold, r;
}
return { treeNodeIconsClass: o };
}
function xb(e, t, n, a, o, i, l, r) {
const { dataView: c, hasRealChildren: f, reOrderVisibleIndex: d } = a, { collapseField: s, hasChildrenField: p } = o, { reCalculateVisualDataRows: v, updateVirticalScroll: m } = i;
function h(g) {
if (g.raw[p.value]) {
const y = c.value[g.raw.__fv_index__];
y[s.value] = !y[s.value], a.toggleChildrenVisibiltyByCollapseStatus(y), y[p.value] = f(y), d(), v(), m(), y[s.value] || t.emit("expandNode", { row: g });
}
}
return { toggleTreeNode: h };
}
function Tb(e) {
function t(i) {
return {};
}
function n(i) {
const { valign: l, align: r } = i;
return {
"d-flex": !0,
"h-100": !0,
"w-100": !0,
"justify-content-start": r !== "center" && r !== "right",
"justify-content-center": r === "center",
"justify-content-right": r === "right",
"align-items-start": l !== "middle" && l !== "bottom",
"align-items-center": l === "middle",
"align-items-end": l === "bottom"
};
}
function a(i) {
const { align: l, showEllipsis: r } = i;
return {
"w-100": !0,
"text-left": l !== "center" && l !== "right",
"text-center": l === "center",
"text-right": l === "right",
"text-truncate": r
};
}
function o(i) {
const { valign: l, align: r } = i;
return {
"d-flex": !0,
"h-100": !0,
"flex-grow-1": !0,
"min-w-0": !0,
"justify-content-start": r !== "center" && r !== "right",
"justify-content-center": r === "center",
"justify-content-right": r === "right",
"align-items-start": l !== "middle" && l !== "bottom",
"align-items-center": l === "middle",
"align-items-end": l === "bottom"
};
}
return { cellContentPosition: t, cellContentClass: n, cellContentClassWithEllipsis: a, hierarchyCellTextAreaClass: o };
}
function n5(e, t, n, a, o, i, l, r, c, f, d, s, p, v, m) {
const {
onClickCell: h
} = i, {
gridCellClass: g,
gridRowClass: b,
onClickRow: y,
onMouseoverRow: w,
onMouseoutRow: T
} = r, {
enableMultiSelect: S,
unSelect: M,
selectItem: k,
updateSelectAllStatus: x
} = c;
C(e.cellHeight);
const F = C(e.treeNodeIconsData || {}), {
hasChildrenField: P,
shouldShowCheckBox: I,
shouldShowIcon: O
} = l, {
toggleTreeNode: V
} = xb(e, t, a, o, l, d), {
toggleSelectHierarchyItem: E,
selectTreeNode: D,
unSelectTreeNode: B
} = f, {
cellKey: _,
cellPosition: j,
rowKey: A,
rowPosition: G
} = Cb(e, n, v), {
cellContentClass: $,
cellContentPosition: U,
cellContentClassWithEllipsis: z,
hierarchyCellTextAreaClass: W
} = Tb(), {
hierarchyCellContentStyle: Y
} = wb(e, a, l), {
treeNodeIconsClass: Q
} = Sb(e, F, P);
function J(se, ue) {
const me = se.raw[P.value];
return {
"fv-tree-node-toggle": me && se.collapse,
"fv-tree-node-toggle-minus": me && !se.collapse
};
}
function H(se) {
return se.collapse && e.loadData ? e.loadData(se) : Promise.resolve();
}
function N(se) {
return (se || []).some((ue) => Bn(ue) ? !(ue.type === Comment || ue.type === yt && !N(ue.children)) : !0) ? se : null;
}
function R(se, ue) {
se.stopPropagation(), H(ue).then(() => {
V(ue);
});
}
function q(se) {
se.stopPropagation();
}
function X(se, ue) {
return u("div", {
class: {
...J(se),
"flex-shrink-0": !0
},
onClick: (me) => R(me, se),
onDblclick: q
}, null);
}
function ne(se, ue) {
return O.value && u("div", {
id: "treeNodeIcons",
class: [Q(se, ue), "flex-shrink-0"]
}, null);
}
function ee(se) {
S.value ? (se.checked ? D(se) : B(se), E(se)) : k(se), x();
}
function oe(se, ue) {
return I.value && u("div", {
class: "flex-shrink-0"
}, [u(ba, {
id: "checkbox_for_" + _(se, ue.index),
indeterminate: se.indeterminate,
disabled: se.disabled,
checked: se.checked,
"onUpdate:checked": (me) => se.checked = me,
onChange: () => ee(se)
}, null)]);
}
function ie(se, ue) {
var me, _e;
return u("div", {
class: z(se)
}, [u("span", {
style: "user-select:none"
}, [(_e = (me = t.slots).cellTemplate) == null ? void 0 : _e.call(me, {
cell: se,
row: ue
})])]);
}
function Ce(se, ue) {
var me, _e, he;
return se.showTips && typeof ((me = se.column) == null ? void 0 : me.formatter) != "function" && ((_e = se.column) == null ? void 0 : _e.dataType) !== "commands" && ((he = se.column) == null ? void 0 : he.dataType) !== "setting" ? u("div", {
class: z(se),
title: se.formatter(se, ue)
}, [u("span", {
style: "user-select:none"
}, [se.formatter(se, ue)])]) : u("div", {
class: z(se)
}, [u("span", {
style: "user-select:none"
}, [se.formatter(se, ue)])]);
}
function Ee(se) {
const ue = se.data !== null && se.data !== void 0 ? se.data.toString() : se.data;
return se.showTips ? u("div", {
class: z(se)
}, [u("span", {
style: "user-select:none",
title: ue
}, [ue])]) : u("div", {
class: z(se)
}, [De(" "), u("span", {
style: "user-select:none"
}, [ue])]);
}
functio