UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,489 lines 398 kB
var xr = Object.defineProperty; var _r = (n, t, e) => t in n ? xr(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e; var H = (n, t, e) => _r(n, typeof t != "symbol" ? t + "" : t, e); import { useGuid as Sr, resolveField as mt, FormSchemaEntityFieldTypeName as Nn, getCustomClass as mn, withInstall as Un, useCommonUtils as Tr, useDateFormat as kr, useNumberFormat as Fr, setFieldValue as gn } from "../common/index.esm.js"; import { ref as S, watch as Ie, createVNode as E, createTextVNode as Ht, computed as q, defineComponent as dt, Fragment as Gt, reactive as Et, createApp as Xn, onUnmounted as en, onMounted as Lt, Transition as Qn, mergeProps as Wt, onBeforeUnmount as Kn, withDirectives as Er, resolveDirective as Or, nextTick as tn, inject as $t, provide as Mr, triggerRef as Ir, isVNode as Jn, onBeforeMount as Dr, Teleport as Br, shallowRef as Pr, render as pn, h as Nr, cloneVNode as Vr, Comment as Rr } from "vue"; import { useResizeObserver as _n } from "@vueuse/core"; import "../modal/index.esm.js"; import Hr from "../transfer/index.esm.js"; import Wr from "../tabs/index.esm.js"; import Lr from "../order/index.esm.js"; import "../condition/index.esm.js"; import { FCheckbox as jr } from "../checkbox/index.esm.js"; import $r from "../filter-bar/index.esm.js"; import Vn from "../tooltip/index.esm.js"; import { isUndefined as gt, cloneDeep as Dt, isPlainObject as Rn, throttle as Ar } from "lodash-es"; import Gr from "../pagination/index.esm.js"; import zr from "../button/index.esm.js"; import qr from "../search-box/index.esm.js"; import Yr from "../tags/index.esm.js"; import Ur, { FDynamicFormGroup as Xr, FDynamicFormInput as Qr } from "../dynamic-form/index.esm.js"; import { createPropsResolver as Kr } from "../dynamic-resolver/index.esm.js"; import "../designer-canvas/index.esm.js"; import "../property-panel/index.esm.js"; import Jr from "../accordion/index.esm.js"; import Zr from "../avatar/index.esm.js"; import ea from "../../designer/button-edit/index.esm.js"; import ta from "../button-group/index.esm.js"; import na from "../calendar/index.esm.js"; import oa from "../capsule/index.esm.js"; import Hn from "../../designer/checkbox/index.esm.js"; import Wn from "../../designer/checkbox-group/index.esm.js"; import yn from "../combo-list/index.esm.js"; import ra from "../combo-tree/index.esm.js"; import aa from "../component/index.esm.js"; import ia from "../color-picker/index.esm.js"; import sa from "../content-container/index.esm.js"; import la from "../date-picker/index.esm.js"; import ua from "../../designer/data-grid/index.esm.js"; import ca from "../dropdown/index.esm.js"; import da from "../events-editor/index.esm.js"; import fa from "../field-selector/index.esm.js"; import ma from "../binding-selector/index.esm.js"; import pa from "../image-cropper/index.esm.js"; import ha from "../../designer/input-group/index.esm.js"; import va from "../layout/index.esm.js"; import ga from "../list-nav/index.esm.js"; import ya from "../list-view/index.esm.js"; import ba from "../lookup/index.esm.js"; import wa from "../mapping-editor/index.esm.js"; import Ca from "../nav/index.esm.js"; import xa from "../number-range/index.esm.js"; import _a from "../number-spinner/index.esm.js"; import Sa from "../page-header/index.esm.js"; import Ta from "../page-footer/index.esm.js"; import ka from "../progress/index.esm.js"; import Fa from "../query-solution/index.esm.js"; import Ea from "../../designer/radio-group/index.esm.js"; import Oa from "../rate/index.esm.js"; import Ma from "../response-toolbar/index.esm.js"; import Ia from "../response-layout/index.esm.js"; import Da from "../response-layout-editor/index.esm.js"; import Ba from "../section/index.esm.js"; import Pa from "../smoke-detector/index.esm.js"; import Na from "../splitter/index.esm.js"; import Va from "../step/index.esm.js"; import Ra from "../switch/index.esm.js"; import Ha from "../text/index.esm.js"; import Wa from "../time-picker/index.esm.js"; import La from "../tree-view/index.esm.js"; import ja from "../uploader/index.esm.js"; import $a from "../verify-detail/index.esm.js"; import Aa from "../video/index.esm.js"; import Ga from "../textarea/index.esm.js"; import za from "../schema-selector/index.esm.js"; import qa from "../tree-grid/index.esm.js"; import Ya from "../event-parameter/index.esm.js"; import Ua from "../filter-condition-editor/index.esm.js"; import Xa from "../fieldset/index.esm.js"; import Qa from "../sort-condition-editor/index.esm.js"; import Ka from "../menu-lookup/index.esm.js"; import Ja from "../drawer/index.esm.js"; import Za from "../json-editor/index.esm.js"; import ei from "../property-editor/index.esm.js"; import ti from "../expression-editor/index.esm.js"; import ni from "../code-editor/index.esm.js"; import oi from "../html-template/index.esm.js"; import "../external-container/index.esm.js"; import { useIdentify as Zn, useGroupData as eo, useFilter as to, useHierarchy as no, useLoading as oo, useDataView as ro, useSelection as ao, useSelectHierarchyItem as ri, useDataViewContainerStyle as io, useCommandColumn as so, useColumn as lo, useSort as uo, useGroupColumn as co, useRow as fo, useEdit as mo, useVisualDataBound as po, useVisualDataCell as ho, useVisualDataRow as vo, useVisualData as go, useCellPosition as yo, useSidebar as bo, useVirtualScroll as wo, useFitColumn as Co, useFilterHistory as xo, useColumnFilter as _o, useDragColumn as So, getColumnHeader as To, getSidebar as ko, getDisableMask as Fo, getHorizontalScrollbar as Eo, getVerticalScrollbar as Oo, getEmpty as Mo, usePagination as ai, useVisualGroupRow as ii, useVisualSummaryRow as si, useCellContentStyle as li, getPagination as ui, getSummary as ci, getFilterPanel as di, getGroupPanel as fi, useNavigation as mi } from "../data-view/index.esm.js"; import "../notify/index.esm.js"; const dm = { /** 启用分页 */ enable: { type: Boolean, default: !1 }, /** 当前页码 */ index: { type: Number, default: 1 }, /** 分页交互模式 */ mode: { type: String, default: "client" }, /** 显示页码输入框 */ 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 } }, fm = { /** 启用排序 */ enable: { type: Boolean, default: !1 }, /** 排序字段集合 */ fields: { type: Array, default: [] }, /** 排序交互模式 */ mode: { type: String, default: "client" }, /** 多列排序 */ multiSort: { type: Boolean, default: !1 } }, mm = { /** 自定义分组合计内容 */ customGroupRow: { type: Function, default: () => { } }, /** 自定义分组行样式 */ customGroupRowStyle: { type: Function, default: () => { } }, /** 自行分组合计行样式 */ customSummaryStyle: { type: Function, default: () => { } }, /** 启用行数据分组 */ enable: { type: Boolean, default: !1 }, /** 分组行合并列数 */ groupColSpan: { type: Number, default: 1 }, /** 行数据分组字段;多字段分组以英文逗号分隔 */ groupFields: { type: Array, default: [] }, /** 在DataGrid中显示被分组的列 */ showGroupedColumn: { type: Boolean, default: !0 }, /** 显示分组面板 */ showGroupPanel: { type: Boolean, default: !1 }, /** 启用合计行 */ showSummary: { type: Boolean, default: !1 }, /** 显示合计行位置; */ summaryPosition: { type: String, default: "separate" } }, pm = { /** 启用筛选 */ enable: { type: Boolean, default: !1 }, /** DataGrid筛选风格 */ filterStyle: { type: String, default: "filter-column" }, /** 筛选交互模式 */ mode: { type: String, default: "server" }, /** 显示过滤条件工具条 */ showSummary: { type: Boolean, default: !0 } }, hm = { /** 允许折行显示列标题 */ wrapHeadings: { type: Boolean, default: !1 } }, vm = { /** 显示行号 */ enable: { type: Boolean, default: !1 }, /** 行号列表头标题 */ heading: { type: String, default: "序号" }, /** 行号宽度,默认为 36px */ width: { type: Number, default: 36 }, /** 是否展示省略号 */ showEllipsis: { type: Boolean, default: !0 } }, gm = { /** 自定义行样式 */ customRowStyle: { type: Function, default: () => { } }, /** 自定义行状态 */ customRowStatus: { type: Function, default: () => { } }, /** 禁止行选中表达式 */ disable: { type: Function, default: () => { } }, /** 默认行高度为 29px */ height: { type: Number, default: 28 }, /** 鼠标滑过行效果 */ showHovering: { type: Boolean, default: !0 }, /** 禁止数据折行 */ wrapContent: { type: Boolean, default: !1 } }, ym = { /** 显示合计信息 */ enable: { type: Boolean, default: !1 }, /** 合计行自定义样式,对启用合计行模板无效 */ customSummaryStyle: { type: Function, default: () => { } }, /** 分组合计字段 */ groupFields: { type: Array, default: [] }, /** 合计交互模式 */ mode: { type: String, default: "client" }, /** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */ position: { type: String, default: "bottom" } }, bm = { /** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */ fitColumns: { type: Boolean, default: !1 }, /** 自动适配列宽度模式 */ fitMode: { type: String, default: "average" }, groups: { type: Array, defaut: [] }, /** 允许拖动表头改变列显示顺序 */ reorderColumn: { type: Boolean, default: !1 }, /** 允许拖动改变列宽度 */ resizeColumn: { type: Boolean, default: !0 }, /** 双击表头列自适应内容宽度 */ resizeColumnOnDoubleClick: { type: Boolean, default: !0 } }, wm = { /** 启用多选且显示checkbox, 选中行后勾选前面的checkbox */ checkOnSelect: { type: Boolean, default: !1 }, /** 当数据源为空时,清空已选记录 */ clearSelectionOnEmpty: { type: Boolean, default: !0 }, /** 自定义已选记录列表中的显示内容 */ customSelectionItem: { type: Function, default: () => { } }, /** 允许选中行 */ enabelSelectRow: { type: Boolean, default: !0 }, /** 允许重复点击行是保留选中状态 */ keepSelectingOnClick: { type: Boolean, default: !0 }, /** 允许跨页多选 */ keepSelectingOnPaging: { type: Boolean, default: !0 }, /** 启用多选 */ multiSelect: { type: Boolean, default: !1 }, /** 启用多选时,点击行选中,只允许且只有一行被选中 */ focusSelection: { type: String, default: "current" }, /** 启用多选且显示checkbox, 勾选后并且选中行 */ selectOnCheck: { type: Boolean, default: !1 }, /** 每行前边显示 checkbox */ showCheckbox: { type: Boolean, default: !1 }, /** 显示全选checkbox */ showSelectAll: { type: Boolean, default: !1 }, /** 显示已选数据 */ showSelection: { type: Boolean, default: !1 } }, Cm = { /** 编辑时选中文本 */ selectOnEditing: { type: Boolean, default: !1 }, /** 编辑模式; row:整行编辑,cell: 单元格编辑 */ editMode: { type: String, default: "cell" } }, xm = { /** show loading */ show: { type: Boolean, default: !1 }, /** message on display when loading */ message: { type: String, default: "加载中..." } }, pi = { /** 允许在最后一个单元回车新增一行 */ appendOnEnterAtLastCell: { type: Boolean, default: !1 }, /** 编辑单元格前事件 */ beforeEditCell: { type: Function, default: (n) => !0 }, /** 结束编辑前校验 */ beforeEndEditCell: { type: Function, default: () => !0 }, /** 变更策略 默认主动更新 */ changePolicy: { type: String, default: "push" }, /** 列集合 */ columns: { type: Array, default: [] }, /** 列配置 */ columnOption: { type: Object }, /** 列配置 */ commandOption: { type: Object, default: { enable: !1, commands: [] } }, /** 被绑定数据 */ data: { type: Array, default: [] }, /** 禁用组件 */ disabled: { type: Boolean, default: !1 }, /** 行数据禁用属性 */ disabledField: { type: String, default: "disabled" }, /** 允许编辑 */ editable: { type: Boolean, default: !1 }, /** 编辑配置 */ editOption: { type: Object, default: { selectOnEditing: !1, editMode: "cell" } }, enableCommands: { type: Boolean, default: !1 }, /** 表格启用过滤 */ enableFilter: { type: Boolean, default: !1 }, /** 筛选配置 */ filter: { type: Object }, /** 适配父组件尺寸 ---此属性没有实际效用*/ fit: { type: Boolean, default: !1 }, /** 编辑单元格时默认获得焦点 */ focusOnEditingCell: { type: Boolean, default: !0 }, /** 分组配置 */ group: { type: Object }, /** 列标题配置 */ header: { type: Object }, /** 高度 */ height: { type: Number, default: -1 }, /** DataGrid组件唯一标识 */ id: { type: String, default: "" }, /** 被绑定数据的标识字段 */ idField: { type: String, default: "id", require: !0 }, /** 展示loading */ loading: { type: Boolean, default: !1 }, /** 纵向合并具有相同值的单元格 */ mergeCell: { type: Boolean, default: !1 }, /** 最小高度 */ minHeight: { type: Number, default: 300 }, /** 最小宽度 */ minWidth: { type: Number, default: 400 }, /** 新建数据 */ newDataItem: { type: Function, default: () => { } }, /** 分页配置 */ pagination: { type: Object, default: { enable: !1, size: 20 } }, /** 行号配置 */ rowNumber: { type: Object, default: { enable: !0, width: 32, heading: "序号" } }, /** 行配置 */ rowOption: { type: Object, default: { wrapContent: !1 } }, /** 选择配置 */ selection: { type: Object, default: { enableSelectRow: !0, multiSelect: !1, multiSelectMode: "DependOnCheck", showCheckbox: !1, showSelectAll: !1, showSelection: !0, keepSelectingOnClick: !0 } }, /** 已选数据标识 */ selectionValues: { type: Array, default: [] }, /** 编辑单元格时默认选中单元格文本 */ selectOnEditingCell: { type: Boolean, default: !1 }, /** 显示边框 */ showBorder: { type: Boolean, default: !1 }, /** 显示底部面板 */ showFooter: { type: Boolean, default: !1 }, /** 显示顶部面板 */ showHeader: { type: Boolean, default: !0 }, /** 显示横向行分割线 */ showHorizontalLines: { type: Boolean, default: !0 }, /** 显示滚动条 */ showScrollBar: { type: String, default: "auto" }, /** 显示设置按钮 */ showSetting: { type: Boolean, default: !1 }, /** 显示条纹 */ showStripe: { type: Boolean, default: !0 }, /** 显示纵向列分割线 */ showVerticallLines: { type: Boolean, default: !1 }, /** 排序配置 */ sort: { type: Object }, /** 合计配置 */ summary: { type: Object, default: { // 默认合计行开启后,后面不展示值,所以默认不开启 enable: !1, groupFields: ["numericField1", "numericField2"] } }, /** 启用虚拟渲染 */ virtualized: { type: Boolean, default: !0 }, /** 宽度 */ width: { type: Number, default: -1 } }; var it = /* @__PURE__ */ ((n) => (n[n.readonly = 0] = "readonly", n[n.editable = 1] = "editable", n[n.editing = 2] = "editing", n))(it || {}), xt = /* @__PURE__ */ ((n) => (n[n.initial = 0] = "initial", n[n.editing = 1] = "editing", n))(xt || {}), Kt = /* @__PURE__ */ ((n) => (n[n.data = 0] = "data", n[n.group = 1] = "group", n[n.summary = 2] = "summary", n))(Kt || {}), st = /* @__PURE__ */ ((n) => (n[n.none = 0] = "none", n[n.filterable = 1] = "filterable", n[n.sortable = 2] = "sortable", n[n.filtered = 4] = "filtered", n[n.sorted = 8] = "sorted", n[n.ascending = 16] = "ascending", n[n.descending = 32] = "descending", n))(st || {}); function hi(n, t) { var p; const e = String(Date.now()), o = ((p = n.rowOption) == null ? void 0 : p.height) || 28, r = S(t.value.primaryColumnsWidth); function a(h) { const D = {}; return h.reduce( (x, y, w) => { const g = w < h.length - 1 ? h[w + 1] : null; return w === 0 && (x[y.field] = { left: 0 }), y.actualWidth !== void 0 && (x[y.field].width = y.actualWidth), g && (x[g.field] = { left: x[y.field].left + (y.actualWidth || 0) }), x; }, D ), D; } function i(h, D, x) { const y = o * (x + 1), g = D[h.field].left - y + (D[h.field].width || 0), b = h.parent.height ? `${h.parent.height}px` : ""; return { left: `${y}px`, width: `${g}px`, height: `${b}` }; } function l(h, D, x) { return { right: "0px", height: `${h.parent.height ? `${h.parent.height}px` : ""}` }; } function s(h, D) { const x = h.parent.height ? `${h.parent.height}px` : ""; return { left: `${D[h.field].left}px`, height: `${x}`, width: isNaN(Number(D[h.field].width)) ? "100%" : `${D[h.field].width}px` }; } function u(h, D, x) { const w = (D.spanned || []).reduce((b, T) => b + (T.parent.height || 0), 0) + (h.height || 0); return { top: `${h.top}px`, left: `${x[D.field].left}px`, width: `${x[D.field].width}px`, height: `${w}px`, padding: `calc(${w / 2}px - 1rem) 0` // height: `calc(${rowHeight}px * ${cell.rowSpan})`, // padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0` }; } function c(h, D) { return `${e}_${h.type}_r_${h.index}_c_${D}_${h.refreshKey || ""}`; } function d(h) { return `${e}_${h.type}_r_${h.index}_${h.refreshKey || ""}`; } function f(h) { const D = h.height ? `${h.height}px` : ""; return { top: `${h.top}px`, width: isNaN(r.value) ? "100%" : `${r.value}px`, height: `${D}` }; } return Ie(t, () => { r.value = t.value.primaryColumnsWidth; }), { calculateCellPositionInRow: a, cellKey: c, cellPosition: s, groupCellPosition: i, rowKey: d, rowPosition: f, rowSpanCellPosition: u, summaryCellPosition: l }; } function vi(n, t, e) { const { hasChildrenField: o } = e, r = S("#9399a0"), a = S(28); function i() { return [].concat( ...t.value.filter((f) => f.raw.__fv_descendant_index__.length !== 0).map((f) => [...f.raw.__fv_descendant_index__.slice(-1)]).flat() ).sort((f, p) => Number(f) - Number(p)); } function l(c) { const d = new Array(t.value.length).fill(0); if (n.showLines) { const f = i(); t.value.forEach((p, h) => { const D = f.includes(h), x = p.raw[o.value]; d[h] = `repeating-linear-gradient(90deg, ${r.value} 0 1px, transparent 0px 2px) ${x ? "-10px" : "0px"} ${a.value / 2}px/20px 1px no-repeat,repeating-linear-gradient(${r.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${D ? "50%" : "100%"} no-repeat`; }), d[0] = ""; } return d[c]; } function s(c, d, f) { return f[c].parents.set(c, !0).forEach((h) => { f[h].childsLength = f[h].childWithLines.filter((D) => d[D].visible).length; }), d; } function u(c) { const p = c.raw.__fv_parent_index__ === void 0 || c.raw.__fv_parent_index__ === -1 ? 0 : 8, h = 0, D = c.raw[o.value], x = `${c.layer * 10 + c.layer * p + h}px`, y = c.visible || gt(c.visible) ? { paddingLeft: `calc(${x} + 0.75rem)`, // paddingLeft, background: l(c.index), display: "flex", width: "100%", position: "relative" } : { display: "none" }; return D || (y.paddingLeft = `calc(${x} + 2rem)`), y; } return { hierarchyCellContentStyle: u, handleCollapsedPaddingBottom: s }; } function gi(n, t, e) { const o = S(n.iconField); function r(a, i) { if (o.value) return a.raw[n.iconField]; let l = ""; return a.raw[e.value] !== !0 ? l = t.value.leafnodes : l = a.collapse ? t.value.fold : t.value.unfold, l; } return { treeNodeIconsClass: r }; } function yi(n, t, e, o, r, a, i, l) { const { dataView: s, hasRealChildren: u, reOrderVisibleIndex: c } = o, { collapseField: d, hasChildrenField: f } = r, { reCalculateVisualDataRows: p, updateVirticalScroll: h } = a; function D(x) { if (x.raw[f.value]) { const w = s.value[x.raw.__fv_index__]; w[d.value] = !w[d.value], o.toggleChildrenVisibiltyByCollapseStatus(w), w[f.value] = u(w), c(), p(), h(); } t.emit("expandNode", { row: x }); } return { toggleTreeNode: D }; } function bi(n) { function t(r) { return {}; } function e(r) { const { valign: a, align: i } = r; return { "d-flex": !0, "h-100": !0, "w-100": !0, "justify-content-start": i !== "center" && i !== "right", "justify-content-center": i === "center", "justify-content-right": i === "right", "align-items-start": a !== "middle" && a !== "bottom", "align-items-center": a === "middle", "align-items-end": a === "bottom" }; } function o(r) { const { align: a, showEllipsis: i } = r; return { "w-100": !0, "text-left": a !== "center" && a !== "right", "text-center": a === "center", "text-right": a === "right", "text-truncate": i }; } return { cellContentPosition: t, cellContentClass: e, cellContentClassWithEllipsis: o }; } function wi(n, t, e, o, r, a, i, l, s, u, c, d, f) { const { onClickCell: p } = a, { gridCellClass: h, gridHierarchyCellClass: D, gridRowClass: x, onClickRow: y, onMouseoverRow: w, onMouseoutRow: g } = l, { enableMultiSelect: b, select: T, unSelect: k, selectItem: m } = s; S(n.cellHeight); const _ = S(n.treeNodeIconsData || {}), { hasChildrenField: C, shouldShowCheckBox: F, shouldShowIcon: v } = i, { toggleTreeNode: P } = yi(n, t, o, r, i, c), { toggleSelectHierarchyItem: V } = u, { cellKey: O, cellPosition: I, rowKey: Y, rowPosition: $ } = hi(n, e), { cellContentClass: N, cellContentPosition: j, cellContentClassWithEllipsis: K } = bi(), { hierarchyCellContentStyle: R } = vi(n, o, i), { treeNodeIconsClass: B } = gi(n, _, C); function Q(G, te) { const ye = G.raw[C.value]; return { "fv-tree-node-toggle": ye && G.collapse, "fv-tree-node-toggle-minus": ye && !G.collapse }; } function A(G, te) { G.stopPropagation(), P(te); } function W(G) { G.stopPropagation(); } function U(G, te) { return E("div", { class: Q(G), onClick: (ye) => A(ye, G), onDblclick: W }, null); } function J(G, te) { return v.value && E("div", { id: "treeNodeIcons", class: B(G, te) }, null); } function oe(G) { b.value ? (G.checked ? T(G) : k(G), V(G)) : m(G); } function Z(G, te) { return F.value && E(jr, { id: "checkbox_for_" + O(G, te.index), indeterminate: G.indeterminate, disabled: G.disabled, checked: G.checked, "onUpdate:checked": (ye) => G.checked = ye, onChange: () => oe(G) }, null); } function me(G, te) { return E("span", { title: te.data, style: "user-select:none" }, [t.slots.cellTemplate ? t.slots.cellTemplate({ cell: te, row: G }) : te.mode === it.editing ? te.getEditor(te) : te.formatter ? te.formatter(te, G) : te.data != null ? te.data.toString() : te.data]); } function be(G, te) { return E("div", { class: K(te) }, [te.showTips ? E(Vn, null, { default: () => me(G, te), contentTemplate: () => me(G, te) }) : me(G, te)]); } function Se(G, te, ye) { const Fe = R(G); return E("div", { ref: te.setRef, key: O(G, te.index), class: "fv-grid-hierarchy-cell", style: I(te, ye) }, [E("div", { class: N(te), style: Fe }, [U(G), J(G, te), Z(G, te), be(G, te)])]); } function Ne(G, te, ye) { return E("div", { ref: te.setRef, key: O(G, te.index), class: h(te), style: I(te, ye), onClick: (Fe) => p(Fe, te, G, te.column) }, [E("div", { class: N(te) }, [E("div", { class: K(te) }, [te.showTips ? E(Vn, null, { default: () => me(G, te), contentTemplate: () => me(G, te) }) : me(G, te)])])]); } function Re(G, te) { return te === "left" && e.value.leftColumns.length > 0 && e.value.leftColumns[0].field === G.field || te === "primary" && e.value.primaryColumns.length > 0 && e.value.primaryColumns[0].field === G.field; } function z(G, te) { t.emit("dblclickNode", { $event: G, node: te.raw }); } function se(G, te, ye = "primary", Fe) { return E("div", { ref: G.setRef, key: Y(G), class: x(G, Fe), style: $(G), onMouseover: (De) => w(De, G), onMouseout: (De) => g(De, G), onClick: (De) => y(De, G), onDblclick: (De) => z(De, G) }, [Object.values(G.data).filter((De) => te[De.field] && De.rowSpan === 1).map((De) => Re(De, ye) ? Se(G, De, te) : Ne(G, De, te))]); } return { renderDataRow: se }; } function Ci(n, t, e) { const { horizontalScrollThumbStyle: o, onMouseDownScrollThumb: r, shouldShowHorizontalScrollbar: a } = e; function i() { return a.value && E("div", { class: "fv-grid-horizontal-scroll" }, [E("div", { class: "fv-grid-horizontal-scroll-thumb", style: o.value, onMousedown: (l) => r(l, t, "horizontal") }, null)]); } return { renderHorizontalScrollbar: i }; } function xi() { function n(o, r) { switch (o.command) { case "edit": case "remove": return r.status === xt.initial; case "accept": case "cancel": return r.status === xt.editing; default: return !o.hidden; } } function t(o, r, a) { switch (o.onClick(r, a.dataIndex, a), o.command) { case "edit": a.status, xt.editing; break; case "accept": case "cancel": a.status, xt.initial; break; } } function e(o, r) { return o.commands && o.commands.map((a) => n(a, r) && E(zr, { class: "ml-2", type: a.type, size: a.size || "small", onClick: (i) => t(a, i, r), style: { "margin-bottom": "3px" } }, { default: () => [Ht(" "), a.text, Ht(" ")] })); } return { renderCommandColumn: e }; } function _i(n) { const t = S(n.minHeight), e = S(n.minWidth), o = S(n.height), r = S(n.width), a = q(() => o.value <= 0 ? 0 : Math.max(o.value, t.value)), i = q(() => r.value <= 0 ? 0 : Math.max(r.value, e.value)); return Ie([ () => n.height, () => n.width, () => n.minHeight, () => n.minWidth ], ([s, u, c, d]) => { t.value = Number(c), e.value = Number(d), o.value = Number(s), r.value = Number(u); }), { containerStyleObject: q(() => ({ height: a.value > 0 ? `${a.value}px` : n.fit ? "100%" : "", width: i.value > 0 ? `${i.value}px` : n.fit ? "100%" : "", flex: "1 1 0" })) }; } S([{ name: "七天", selectable: !0 }, { name: "一个月", selectable: !0 }, { name: "三个月", selectable: !0 }, { name: "半年", selectable: !0 }]); function Si(n) { const e = S(n.commandOption.enable || !1), o = S(n.commandOption.commands || []); function r(a) { if (e.value && !(a.value.findIndex((l) => l.dataType === "commands") > -1)) { const l = { field: "__commands__", title: "操作", width: 120, fixed: "right", dataType: "commands", commands: o.value, visible: !0 }; a.value.push(l); } } return { applyCommands: r }; } function Ti(n, t) { var u; const e = S((u = n.columnOption) == null ? void 0 : u.groups); function o(c, d, f, p, h) { const D = { actualWidth: 0, children: [], depth: 1, field: c.field, layer: 1, left: 0, parent: f, resizable: !0, title: c.title || "", status: st.none, popoverRef: S(), showPopover: !1, column: null, sortType: "none" }, x = p || D; if (c.group) { let y = 1; c.group.reduce((w, g) => { if (typeof g == "string") { const b = d.get(g); b && (h.fieldToRootMap.set(g, x), w.actualWidth += b.actualWidth, w.children.push(b)); } else { const b = o(g, d, w, x, h); y = Math.max(y, b.depth), w.actualWidth += b.actualWidth, w.children.push(b); } return w; }, D), D.depth += y; } return t.value.headerDepth = Math.max(t.value.headerDepth, D.depth), D; } function r(c) { const d = { groupedCells: /* @__PURE__ */ new Map(), fieldToRootMap: /* @__PURE__ */ new Map() }; return e.value && e.value.reduce((f, p) => { const h = o(p, c, null, null, d); return f.groupedCells.set(p.field, h), f; }, d), d; } function a(c) { if (!c || c.length === 0) return 0; const d = c[0]; return d.children && d.children.length > 0 && (d.left = a(d.children)), d.left; } function i(c, d) { const f = t.value.headerDepth; c.forEach((p) => { p.layer = d ? d.layer + 1 : 1; const h = p.children && p.children.length === 0; p.depth = h ? f - (p.layer - 1) : 1, p.left = h ? p.left : a(p.children), p.children && i(p.children, p); }); } function l(c, d) { const f = /* @__PURE__ */ new Map(); return c.forEach((p) => { const h = d.fieldToRootMap.get(p.field), D = h != null; D && !f.has(h.field) && f.set(h.field, h), D || f.set(p.field, p); }), i(Array.from(f.values())), f; } function s(c) { let d = /* @__PURE__ */ new Map(), f = 0; if (c.reduce((p, h) => { let D = st.none; D = h.filterable ? D | st.filterable : D, D = h.sort && h.sort !== "none" ? D | st.sorted | (h.sort === "asc" ? st.ascending : st.descending) : D; const x = h.field; return p.set(x, { actualWidth: h.actualWidth || 0, children: [], depth: 1, layer: 1, left: f, field: x, parent: null, resizable: h.resizable === void 0 ? !0 : h.resizable, title: h.title, status: D, popoverRef: S(), showPopover: !1, column: h, filterValue: null, sortType: h.sort || "none", showSetting: h.showSetting, draggable: h.draggable }), f += h.actualWidth || 0, p; }, d), e.value) { const p = r(d); d = l(d, p); } return d; } return { getGridHeaderCells: s }; } function ki(n, t) { var w; Sr(); const { idField: e } = t, o = S(n.summary), r = S(n.group), a = S(((w = n.group) == null ? void 0 : w.groupFields) || []), i = q(() => { var g; return (g = n.group) == null ? void 0 : g.enable; }), l = q(() => { var g; return (g = n.group) == null ? void 0 : g.showGroupPanel; }), s = q(() => { const g = o.value; return (g == null ? void 0 : g.groupFields) || []; }), u = q(() => { const g = r.value; return g && g.showSummary; }), c = S(0), d = /* @__PURE__ */ new Map(); let f = []; function p(g, b, T, k, m) { const _ = k[T]; _ && (b.reduce((C, F, v) => { var O; const P = F[_]; let V = C.get(P); if (!V) { const I = s.value.reduce((Y, $) => (Y.set($, 0), Y), /* @__PURE__ */ new Map()); V = { field: _, title: ((O = m.get(_)) == null ? void 0 : O.title) || _, value: P, layer: T, details: [], groupSummaries: I }, C.set(P, V); } return s.value && s.value.forEach((I) => { if (V) { const Y = V.groupSummaries.get(I) || 0; V.groupSummaries.set(I, Y + F[I]); } }), V.details.push(F), C; }, g), T < k.length - 1 && g.forEach((C, F) => { C.nestGroup = /* @__PURE__ */ new Map(), p(C.nestGroup, C.details, T + 1, k, m), C.details = []; })); } function h(g, b) { return n.group && n.group.formatter ? n.group.formatter(g.value, { ...g, total: b }) : `${g.title}:${g.value} (${b})`; } function D(g, b) { const T = []; return g.forEach((k) => { const m = { // 如果存在二级分组,分组行标识保持唯一 [e.value]: `group_of_${b ? b[e.value] + "_" : ""}${k.field}_${k.value}`, __fv_data_grid_group_collapse__: !1, __fv_data_grid_group_field__: k.field, __fv_data_grid_group_layer__: k.layer, __fv_data_grid_group_row__: !0, __fv_data_grid_group_value__: k.value }; let _ = 0; if (T.push(m), k.nestGroup) { const C = D(k.nestGroup, m); T.push(...C), _ += C.length; } if (k.details && k.details.length && (T.push(...k.details), _ += k.details.length), u.value) { const C = { __fv_data_grid_group_field__: k.field, __fv_data_grid_group_layer__: k.layer, __fv_data_grid_group_summary__: !0 }; C[e.value] = `summary_of_${k.field}_${k.value}`, C[k.field] = Array.from(k.groupSummaries.entries()).reduce( (F, [v, P]) => `${F} ${v} total:${P} `, "" ), T.push(C); } k.groupSummaries && k.groupSummaries.size && k.groupSummaries.forEach((C, F) => { m[F] = C; }), m[k.field] = h(k, _), m.value = k.value; }), T.forEach((k, m) => { k.__fv_data_index__ = m; }), T; } function x(g, b, T) { return !g || g.length === 0 || !b.length ? b : (g.join(","), d.clear(), f = [], b = b.filter((k) => !k.__fv_data_grid_group_row__), p(d, b, 0, g, T), f = D(d), f); } function y(g) { return { "f-icon": !0, "f-icon-arrow-chevron-down": !0, "fv-grid-group-row-icon-collapse": g.collapse }; } return { collpaseGroupIconClass: y, generateGroupData: x, groupFields: a, shouldGroupingData: i, showGroupPanel: l, groupRowSize: c }; } function Fi(n, t, e, o) { const r = S(0), a = S(!!n.hierarchy), { idField: i } = o, { collapseField: l, hasChildrenField: s, parentIdField: u } = e, c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(); function p(A, W) { d.clear(), A.reduce((U, J) => { const oe = J[u.value] !== void 0 ? J[u.value] : ""; if (oe && W.has(oe)) { const me = W.get(oe), be = isNaN(Number(me.__fv_layer__)) ? 1 : Number(me.__fv_layer__); J.__fv_layer__ = be + 1, J.__fv_parent_index__ = me.__fv_index__, me.__fv_hasChildren__ = !0; } else J.__fv_layer__ = 1; const Z = U.has(oe) ? U.get(oe) : []; return Z.push(J), U.set(oe, Z), U; }, d); } function h(A) { f.clear(), A.reduce((W, U) => { const J = U[i.value]; return W.set(J, U), W; }, f); } function D(A) { A.forEach((W) => { const U = W[i.value]; W.__fv_children_index__.map((oe) => A[oe]).forEach((oe) => { oe.__fv_parents__ = new Map([ ...W.__fv_parents__.entries(), [U, !0] ]); }); }); } function x(A) { A.forEach((W) => { const U = new Set(W.__fv_children_index__); W.__fv_children_index__ = [...U].sort((J, oe) => J - oe); }); } function y(A) { A.forEach((W) => { const U = W.__fv_parents__; Array.from(U.keys()).map((J) => f.get(J)).forEach((J) => { J.__fv_children_index__.push(W.__fv_index__); }); }), x(A); } function w(A) { A.forEach((W) => { W.__fv_child_with_lines__ = [], W.__fv_child_length__ = W.__fv_descendant_index__.length, W.__fv_descendant_index__.map((U) => A[U]).reduce((U, J) => (U.__fv_child_length__ += J.__fv_children_index__.length, U.__fv_child_with_lines__.push(...J.__fv_children_index__, J.__fv_index__), U), W); }); } function g(A, W) { return { id: A, index: W, parentId: "", parentIndex: -1, parents: /* @__PURE__ */ new Map(), children: /* @__PURE__ */ new Map(), descendant: /* @__PURE__ */ new Map(), collapsed: !1, visibleInHierarchy: !0 }; } function b(A, W, U) { Array.from(W.keys()).forEach((J) => { W.get(J).reduce((Z, me) => { const be = me[i.value], Se = A.get(me[i.value]), Ne = A.get(J), Re = U.get(J); return Ne && Re && (Ne.children.set(be, Se), Ne.children.set(be, Se), Se.parentId = J, Se.parentIndex = Ne.index, Se.parents.set(J, Ne)), Z; }, A); }); } function T(A) { A.children.forEach((U) => { U.parents = new Map([ ...A.parents.entries(), [A.id, A] ]), T(U); }); } function k(A, W) { A.filter((U) => U[u.value] === void 0 || U[u.value] === "").forEach((U) => { const J = U[i.value], oe = W.get(J); T(oe); }); } function m(A) { Array.from(A.values()).forEach((W) => { Array.from(W.parents.values()).forEach((U) => { U.descendant.set(W.id, W); }); }); } function _(A) { c.clear(), A.forEach((W, U) => { const J = W[i.value]; c.set(J, g(J, U)); }), h(A), p(A, f), b(c, d, f), k(A, c), m(c); } function C(A) { const W = A[i.value], U = c.get(W); return U && U.children.size > 0; } function F(A) { return A[s.value] && !C(A); } function v(A) { const W = A[i.value], U = c.get(W); return U && U.visibleInHierarchy; } function P() { r.value = Date.now(); } function V(A, W) { W.forEach((U) => { const J = c.get(U[i.value]), oe = c.get(A), Z = f.get(A); oe && Z && (J.visibleInHierarchy = !Z[l.value] && oe.visibleInHierarchy); }), P(); } function O(A) { if (d.has(A)) { const U = d.get(A); V(A, U), U.map((J) => J[i.value]).forEach((J) => O(J)); } } function I(A) { const W = A[i.value]; O(W); } function Y(A, W, U = 0) { A.forEach((J) => { const oe = F(J), Z = J.__fv_layer__ <= U, me = W === "ToCollapse" ? J.__fv_layer__ <= U : !(J.__fv_layer__ <= U), be = Z ? me : J[l.value]; J[l.value] = oe || be; }); for (const [J, oe] of d.entries()) V(J, oe); return A; } function $(A, W) { Y(A, "ToCollapse", W); } function N(A, W) { Y(A, "ToExpand", W); } function j(A) { A.forEach((W, U) => { var me; const J = W[i.value], oe = d.has(J) ? (me = d.get(J)) == null ? void 0 : me.map((be) => be.__fv_index__) : [], Z = g(J, U); W.__fv_graph_node__ = Z, W.__fv_children_index__ = oe, W.__fv_descendant_index__ = [...oe], W.__fv_parents__ = /* @__PURE__ */ new Map(), F(W) && (W[l.value] = !0); }); } function K(A) { var J, oe; _(t.value), j(A), D(A), y(A), n.showLines && w(A); const U = ((J = n.hierarchy) == null ? void 0 : J.collapseTo) !== void 0 ? Number((oe = n.hierarchy) == null ? void 0 : oe.collapseTo) : 0; return Y(A, "ToCollapse", U), A; } function R(A, W, U) { const oe = U.value[A][i.value], Z = c.get(oe); if (Z) { const me = c.get(Z.parentId); let be = U.value.length - 1; if (me) { const Se = Array.from(me.children.keys()).indexOf(Z.id); if (Se === me.children.size - 1) { const Re = Array.from(me.descendant.values())[me.descendant.size - 1]; be = U.value.findIndex((se) => se[i.value] === Re.id) + 1; } else { const Re = Array.from(me.children.values())[Se + 1]; be = U.value.findIndex((se) => se[i.value] === Re.id); } W[s.value] = !1, W[u.value] = me.id, U.value.splice(be, 0, W); } } } function B(A, W, U) { const J = U.value[A], oe = J[i.value]; if (c.get(oe)) { const be = U.value.findIndex((Se) => Se[i.value] === oe) + 1; J[s.value] = !0, J[l.value] = !1, W[s.value] = !1, W[u.value] = oe, U.value.splice(be, 0, W); } } function Q(A, W) { const U = A[i.value], J = c.get(U), oe = Array.from(J.descendant.keys()); oe.unshift(U); const Z = c.get(J.parentId); if (Z && (Z.children.delete(U), Z.children.size === 0)) { const be = W.find((Se) => Se[i.value] === J.parentId); be[s.value] = !1, be[l.value] = !1; } return W.filter((be) => oe.indexOf(be.id) === -1); } return { checkVisibleInHierarchy: r, collapseTo: $, expandTo: N, generateHierarchyData: K, hasRealChildren: C, insertSibling: R, insertChild: B, isVisibleInTree: v, shouldStratifyData: a, toggleChildrenVisibiltyByCollapseStatus: I, trimmedOriginalData: Q }; } const Ei = { showCloseButton: { type: Boolean, default: !0 }, position: { type: String, default: "top-center" }, timeout: { type: Number, default: 3e3 }, theme: { type: String, default: "bootstrap" }, left: { type: Number }, right: { type: Number }, top: { type: Number }, bottom: { type: Number }, id: { type: String }, animate: { type: String, default: "fadeIn" }, options: { type: Object }, safeHtml: { type: Boolean, default: !0 } }, Oi = { showCloseButton: { type: Boolean, default: !0 }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, bn = /* @__PURE__ */ dt({ name: "Toast", props: Oi, emits: ["close", "click"], setup: (n, t) => { const e = S(n.animate), o = "fadeOut", r = q(() => n.options), a = S(!1), i = q(() => { const y = { animated: a.value, toast: !0 }; return y[n.animate] = !1, y[o] = a.value, y[r.value.type] = !0, r.value.theme && (y[r.value.theme] = !0), y; }), l = q(() => { const g = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, b = { "f-icon": !0 }; return b[g] = !0, b; }), s = q(() => r.value.title || r.value.message), u = q(() => r.value.title && r.value.message), c = q(() => !r.value.title && r.value.message), d = q(() => n.showCloseButton), f = q(() => !!r.value.buttons || !!t.slots.default); function p(y) { y.stopPropagation(), y.preventDefault(), a.value = !1, setTimeout(() => { t.emit("close", r.value); }, 200); } function h(y, w) { } function D(y) { return `f-preten-link ${y.customClass ? y.customClass : ""}`; } Ie(e, () => { e.value; }); const x = () => { var y; return E(Gt, null, [E("div", { class: "after-toast-msg text-right" }, [!t.slots.default && ((y = r.value.buttons) == null ? void 0 : y.map((w) => E("span", { class: D(w), onClick: (g) => void 0 }, [w.text]))), t.slots.default && t.slots.default()])]); }; return () => E("div", { class: i.value, style: "min-height:44px" }, [d.value && E("button", { title: "关闭", class: "toast-close f-btn-icon f-bare", onClick: p }, [E("span", { class: "f-icon modal_close" }, null)]), s.value && E("section", { class: "modal-tips" }, [E("div", { class: "float-left modal-tips-iconwrap" }, [E("span", { class: l.value }, null)]), E("div", { class: "modal-tips-content" }, [u.value && E(Gt, null, [E("h5", { class: "toast-title modal-tips-title", innerHTML: r.value.title }, null), E("p", { class: "toast-msg", innerHTML: r.value.message }, null), f.value && x()]), c.value && (r.value.buttons ? E("div", { class: "toast-title-btns-wrapper d-flex" }, [E("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }, null), E("div", { class: "after-toast-title text-right ml-auto" }, [x()])]) : E("h5", { class: "toast-title modal-tips-title only-toast-msg", innerHTML: r.value.message }, null))])])]); } }), on = /* @__PURE__ */ dt({ name: "Notify", props: Ei, emits: ["close", "empty"], setup(n, t) { const e = q(() => ({ "farris-notify": !0 })), o = { left: 12, right: 12, top: 20, bottom: 12 }, r = S(), a = S(n.options), i = S(n.showCloseButton), l = q(() => n.position || "bottom-right"), s = q(() => n.timeout != null ? n.timeout : 3e3), u = q(() => { const f = n.bottom ? n.bottom : o.bottom, p = n.top ? n.top : o.top, h = { transition: "all 0.2s ease", left: l.value.indexOf("left") > -1 ? `${n.left ? n.left : o.left}px` : "", right: l.value.indexOf("right") > -1 ? `${n.right ? n.right : o.right}px` : "", top: l.value.indexOf("top") > -1 ? `${p}px` : "", bottom: l.value.indexOf("bottom") > -1 ? `${f}px` : "" }; return l.value.indexOf("center") > -1 && (h.left = "50%", h.marginLeft = "calc(-24rem / 2)", l.value === "center-center" && (h.top = "50%", h.transform = "translate(-50%, -50%)")), h; }); function c(f) { t.emit("close"); } s.value && setTimeout(() => { c(); }, s.value), t.expose({ closeToast: c, container: r, notifyPosition: l }); function d(f, p) { c(); } return () => E("div", { class: e.value, style: u.value, ref: r }, [E(bn, { options: a.value, showCloseButton: i.value, animate: n.animate, onClose: (f) => d(f, a.value) }, null)]); } }); class Io { constructor() { H(this, "notifyRefs", []); H(this, "globalConfig", Et({})); } escapeAllHtml(t) { if (typeof t != "string" || !t) return ""; const e = document.createElement("div"); return e.textContent = t || "", e.innerHTML.replace(/ /g, "&nbsp;").replace(/\\n/g, "<br>").replace(/\\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g, ""); } createNotifyInstance(t) { const e = this, r = Object.assign({ timeout: 3e3, position: "bottom-right", showCloseButton: !0, safeHtml: !0 }, this.globalConfig, { ...t }), a = document.createElement("div"); a.style.display = "contents"; const i = Xn({ setup() { var u; const l = S(); function s() { l.value.container.style.transform = "scale(0)", setTimeout(() => { e.updateNotifyPositionForClose(r, l), i.unmount(); }, 220); } if (r.position.indexOf("top") > -1) { const c = e.getNotifyInstances(r.position), d = c[c.length - 1]; if (d) { const f = d.value.container.getBoundingClientRect(); r.top = f.bottom; } } return r.safeHtml && ((u = r.options) != null && u.message) && (r.options.message = e.escapeAllHtml(r.options.message)), en(() => { document.body.removeChild(a); }), Lt(() => { e.updateNotifyPositionForCreate(r, l); }), () => E(Qn, { mode: "out-in", name: "fade", appear: !0 }, { default: () => [E(on, Wt({ ref: l }, r, { onClose: s }), null)] }); } }); return i.provide("NotifyService", this), document.body.appendChild(a), i.mount(a), i; } getNotifyInstances(t) { return this.notifyRefs.filter((e) => e.value.notifyPosition === t); } updateNotifyPositionForCreate(t, e) { if (this.notifyRefs && this.notifyRefs.length) { const o = window.innerHeight; t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((r) => { const a = r.value.container.getBoundingClientRect(); r.value.container.style.bottom = a.height + o - a.bottom + "px"; }); } this.notifyRefs = [...this.notifyRefs, e]; } updateNotifyPositionForClose(t, e) { const o = this.notifyRefs.indexOf(e); if (t.position.indexOf("top") > -1) { const r = this.getNotifyInstances(t.position), a = r.indexOf(e); r.slice(a + 1).forEach((i) => { i.value.container.style.top = i.value.container.offsetTop - i.value.container.offsetHeight + "px"; }); } o > -1 && this.notifyRefs.splice(o, 1); } show(t) { return this.createNotifyInstance(t); } buildNotifyProps(t, e) { let o = "", r = "", a, i, l; typeof e == "string" ? o = e : e && (o = e.message || "", r = e.title || "", i = e.position || null, l = e.showCloseButton != null ? e.showCloseButton : null, a = e.timeout != null ? e.timeout : null); const u = { options: { type: t, message: o, title: r } }; return i != null && (u.position = i), l != null && (u.showCloseButton = l), a != null && (u.timeout = a), u; } info(t) { const e = this.buildNotifyProps("info", t); return this.show(e); } success(t) { const e = this.buildNotifyProps("success", t); return this.show(e); } warning(t) { const e = this.buildNotifyProps("warning", t); return this.show(e); } error(t) { const e = this.buildNotifyProps("error", t); return this.show(e); } close(t) { t && t.unmount(); } closeAll() { this.notifyRefs.forEach((t) => { t == null || t.value.closeToast(); }), this.notifyRefs.length = 0; } } const Mi = Symbol("NOTIFY_SERVICE_TOKEN"); on.install = (n) => { n.component(on.name, on), n.component(bn.name, bn); const t = new Io(); n.provide(Mi, t), n.provide("FNotifyService", t); }; function Ii(n, t, e, o, r) { var tt; const a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = S([]), d = S([]), f = ki(n, r), { generateGroupData: p, groupFields: h, shouldGroupingData: D } = f, x = S(n.data), y = Fi(n, x, o, r), { collapseTo: w, expandTo: g, generateHierarchyData: b, hasRealChildren: T, insertSibling: k, insertChild: m, isVisibleInTree: _, shouldStratifyData: C, toggleChildrenVisibiltyByCollapseStatus: F, trimmedOriginalData: v, checkVisibleInHierarchy: P } = y, { idField: V, reviseIdentifyField: O } = r, I = S(n.newDataItem), Y = S(n.data || []), $ = S(n.data), { flatTreeData: N } = Ed(n); function j(X) { return N(X); } if (n.hierarchy && n.data && ((tt = n.data[0]) != null && tt.children)) { const X = j(n.data); x.value = X, Y.value = X, $.value = X; } const K = S(n.summary), R = q(() => { const X = K.value; return (X == null ? void 0 : X.groupFields) || []; }); let B = /* @__PURE__ */ new Map(); const Q = S(Y.value.length), A = S(n.pagination); function W() { return A.value && A.value.enable && A.value.size > 0 ? A.value.size : Y.value.length; } const U = S(1), J = q(() => A.value && A.value.enable && A.value.mode !== "server"), oe = q(() => A.value && A.value.enable && A.value.mode === "server"), Z = new Io(); function me(X, ve) { const Te = Math.ceil(X.length / ve); let Be = 0; const L = [], ee = [], re = []; for (; Be < Te; ) { const ne = X.slice(Be * ve, (Be + 1) * ve), _e = p(h.value, ne, t); ee[Be] = _e.filter((xe) => xe.__fv_data_grid_group_row__).length, L.push(..._e), Be++; } return ee.reduce((ne, _e, xe) => (ne = ne + _e, re.push(ne), ne), 0), { groupData: L, groupRowSizeList: ee, accumulateGroupRowSize: re }; } function be() { var _e; Y.value = x.value, J.value && (Q.value = Y.value.length), D.value && !J.value && (Y.value = p(h.value, x.value, t)), B = R.value.reduce((xe, We) => (xe.set(We, 0), xe), B); const X = 0, ve = W(), Te = (U.val