@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,513 lines • 254 kB
JavaScript
var po = Object.defineProperty;
var vo = (e, t, n) => t in e ? po(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var ce = (e, t, n) => vo(e, typeof t != "symbol" ? t + "" : t, n);
import { defineComponent as je, ref as I, onBeforeMount as Ot, onMounted as et, createVNode as g, computed as Z, watch as Se, Fragment as Ke, reactive as Kt, createApp as Tn, onUnmounted as Nt, Transition as Sn, mergeProps as Dt, nextTick as ct, createTextVNode as Te, watchEffect as go, Teleport as ho, shallowRef as yo, render as Wt, h as bo, cloneVNode as Co, inject as Bt, withDirectives as Vt, resolveDirective as en, vModelText as wo } from "vue";
import { resolveAppearance as rn, createPropsResolver as gt, schemaResolverMap as Fo, propertyEffectMap as To, propertyConfigSchemaMap as So, schemaMap as xn, getSchemaByType as Yt } from "../dynamic-resolver/index.esm.js";
import { DgControl as j, canvasChanged as En, refreshCanvas as In, useDesignerComponent as kn, UseTemplateDragAndDropRules as xo } from "../designer-canvas/index.esm.js";
import { cloneDeep as Ze, isUndefined as We, isPlainObject as fn, mergeWith as Eo, merge as Io } from "lodash-es";
import { EVENT_PROPERTY_TAB_IDS as Mn, getCustomClass as Tt, withInstall as ko, useThirdComponent as Bn, isMobilePhone as tn, getMaxZIndex as mn, FormSchemaEntityField$Type as pn, FormSchemaEntityFieldTypeName as vn } from "../common/index.esm.js";
import { LocaleService as Ye } from "../locale/index.esm.js";
import "bignumber.js";
import { useResizeObserver as Mo } from "@vueuse/core";
import { getHierarchyRow as Bo, useIdentify as Vo, useGroupData as Po, useFilter as Ro, useHierarchy as Oo, useLoading as No, useDataView as Do, useSelection as jo, useSelectHierarchyItem as Lo, usePagination as $o, useDataViewContainerStyle as Ao, useCommandColumn as Uo, useSettingColumn as zo, useColumn as _o, useSort as Ho, useGroupColumn as Go, useRow as qo, useEdit as Wo, useVisualDataBound as Yo, useVisualDataCell as Xo, useVisualDataRow as Qo, useVisualData as Jo, useCellPosition as Zo, useSidebar as Ko, useVirtualScroll as ei, useFitColumn as ti, useFilterHistory as ni, useColumnFilter as oi, useDragColumn as ii, getColumnHeader as ri, getSidebar as ai, getDisableMask as li, getHorizontalScrollbar as si, getVerticalScrollbar as ci, getEmpty as ui, getPagination as di, getSummary as fi, ColumnSettingSolution as mi, COMMAND_COLUMN_DATA_TYPE as Xt, SETTING_COLUMN_DATA_TYPE as Qt } from "../data-view/index.esm.js";
import pi from "../input-group/index.esm.js";
import Vn from "../button/index.esm.js";
import { loadRegister as vi, useComponentManager as gi, useEntityState as hi, useDynamicViewUtils as yi, componentMap as Jt, resolverMap as bi, componentPropsConverter as Ci } from "../dynamic-view/index.esm.js";
import wi from "../section/index.esm.js";
import Fi from "../accordion/index.esm.js";
import Ti from "../../designer/avatar/index.esm.js";
import Si from "../../designer/approval-logs/index.esm.js";
import xi from "../../designer/button-edit/index.esm.js";
import Ei from "../button-group/index.esm.js";
import Ii from "../calendar/index.esm.js";
import ki from "../../designer/capsule/index.esm.js";
import gn from "../../designer/checkbox/index.esm.js";
import hn from "../../designer/checkbox-group/index.esm.js";
import Mi from "../combo-list/index.esm.js";
import Bi from "../combo-tree/index.esm.js";
import Vi from "../component/index.esm.js";
import Pi from "../color-picker/index.esm.js";
import Ri from "../content-container/index.esm.js";
import Oi from "../../designer/date-picker/index.esm.js";
import Ni from "../../designer/data-grid/index.esm.js";
import Di from "../dropdown/index.esm.js";
import ji from "../../designer/dynamic-form/index.esm.js";
import Li from "../events-editor/index.esm.js";
import $i from "../filter-bar/index.esm.js";
import Ai from "../field-selector/index.esm.js";
import Ui from "../binding-selector/index.esm.js";
import zi from "../image-cropper/index.esm.js";
import _i from "../../designer/input-group/index.esm.js";
import Hi from "../layout/index.esm.js";
import Gi from "../list-nav/index.esm.js";
import qi from "../../designer/list-view/index.esm.js";
import Wi from "../lookup/index.esm.js";
import Yi from "../mapping-editor/index.esm.js";
import Xi from "../../designer/nav/index.esm.js";
import Qi from "../number-range/index.esm.js";
import Ji from "../../designer/number-spinner/index.esm.js";
import Zi from "../order/index.esm.js";
import Ki from "../page-header/index.esm.js";
import er from "../page-footer/index.esm.js";
import tr from "../pagination/index.esm.js";
import nr from "../progress/index.esm.js";
import or from "../query-solution/index.esm.js";
import ir from "../../designer/radio-group/index.esm.js";
import rr from "../../designer/rate/index.esm.js";
import ar from "../../designer/response-toolbar/index.esm.js";
import lr from "../response-layout/index.esm.js";
import sr from "../../designer/response-layout-editor/index.esm.js";
import cr from "../search-box/index.esm.js";
import ur from "../../designer/section/index.esm.js";
import dr from "../smoke-detector/index.esm.js";
import fr from "../splitter/index.esm.js";
import mr from "../step/index.esm.js";
import pr from "../../designer/switch/index.esm.js";
import vr from "../../designer/tabs/index.esm.js";
import gr from "../../designer/tags/index.esm.js";
import hr from "../text/index.esm.js";
import yr from "../../designer/time-picker/index.esm.js";
import br from "../transfer/index.esm.js";
import Cr from "../tree-view/index.esm.js";
import wr from "../uploader/index.esm.js";
import Fr from "../verify-detail/index.esm.js";
import Tr from "../video/index.esm.js";
import Sr from "../../designer/textarea/index.esm.js";
import xr from "../schema-selector/index.esm.js";
import Er from "../../designer/tree-grid/index.esm.js";
import Ir from "../event-parameter/index.esm.js";
import kr from "../filter-condition-editor/index.esm.js";
import Mr from "../fieldset/index.esm.js";
import Br from "../sort-condition-editor/index.esm.js";
import Vr from "../menu-lookup/index.esm.js";
import Pr from "../../designer/drawer/index.esm.js";
import Rr from "../json-editor/index.esm.js";
import Or from "../property-editor/index.esm.js";
import Nr from "../expression-editor/index.esm.js";
import Dr from "../code-editor/index.esm.js";
import jr from "../html-template/index.esm.js";
import Lr from "../collection-property-editor/index.esm.js";
import $r from "../../designer/modal/index.esm.js";
import Ar from "../external-container/index.esm.js";
import Ur from "../language-textbox/index.esm.js";
import zr from "../image/index.esm.js";
import _r from "../comment/index.esm.js";
import Hr from "../../designer/wizard/index.esm.js";
import Gr from "../tooltip/index.esm.js";
import { FormBindingType as qr } from "../property-panel/index.esm.js";
import { FNotifyService as Wr } from "../notify/index.esm.js";
import "../collection-property-editor/index.esm.js/src/use-button-items.designer";
import Yr from "../tree-grid/index.esm.js";
const Pn = /* @__PURE__ */ new Map([
["appearance", rn]
]), Xr = "https://json-schema.org/draft/2020-12/schema", Qr = "https://farris-design.gitee.io/component.schema.json", Jr = "component", Zr = "A Farris Visual Component", Kr = "object", ea = {
id: {
description: "The unique identifier for a component",
type: "string"
},
type: {
description: "The type string of component",
type: "string",
default: "component"
},
componentType: {
description: "The type string of component",
type: "string"
},
viewModel: {
description: "The viewModel string of component",
type: "string"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
contents: {
description: "",
type: "array",
default: []
},
visible: {
description: "",
type: "boolean",
default: !0
},
onInit: {
description: "初始化事件",
type: "string",
default: ""
},
onAfterViewInit: {
description: "视图初始化后事件",
type: "string",
default: ""
}
}, ta = [
"id",
"type",
"contents"
], na = {
onInit: "初始化事件",
onAfterViewInit: "视图初始化后事件"
}, oa = {
$schema: Xr,
$id: Qr,
title: Jr,
description: Zr,
type: Kr,
properties: ea,
required: ta,
events: na
};
function Rn(e, t, n) {
return t;
}
const jt = {
id: { type: String, default: "" },
customClass: { type: String, default: "" },
customStyle: { type: String, default: "" },
componentType: { type: String, default: "" },
formColumns: { type: Number, default: 4 },
code: { type: String, default: "" }
}, yn = gt(jt, oa, Pn, Rn), iu = Object.assign({}, jt, { componentId: { type: String, default: "" } }), Zt = /* @__PURE__ */ je({
name: "FComponent",
props: jt,
emits: ["init", "afterViewInit"],
setup(e, t) {
const n = I();
return Ot(() => {
t.emit("init", e.id);
}), et(() => {
n.value && e.code && n.value.setAttribute("scope-" + e.code.toLowerCase(), ""), t.emit("afterViewInit", e.id);
}), () => g("div", {
ref: n,
class: e.id + " " + e.customClass,
style: e.customStyle,
id: e.id
}, [t.slots.default && t.slots.default()]);
}
});
function ia(e) {
const { formSchemaUtils: t, formStateMachineUtils: n } = e;
function o(l, s = "") {
return {
path: s + l.code,
field: l.id,
fullPath: l.code
};
}
function i(l, s = "") {
const m = t.getViewModelById(l);
return m ? m.states.map((d) => o(d, s)) : [];
}
function r(l) {
const s = t.getRootViewModelId(), m = i(l);
if (l === s)
return m;
const d = i(s, "root-component.");
return [...m, ...d];
}
function a(l) {
return l.binding && l.binding.path || l.id || "";
}
function c() {
return n && n.getRenderStates() || [];
}
return { getVariables: r, getControlName: a, getStateMachines: c };
}
class ra {
constructor(t) {
ce(this, "sessionVariables", [
{
key: "CurrentSysOrgName",
name: "当前组织Name",
description: "当前组织Name"
},
// {
// key: "CurrentSysOrgCode",
// name: "当前组织Code",
// description: "当前组织Code"
// },
{
key: "CurrentSysOrgId",
name: "当前组织Id",
description: "当前组织Id"
},
{
key: "CurrentUserName",
name: "当前用户Name",
description: "当前用户Name"
},
{
key: "CurrentUserCode",
name: "当前用户Code",
description: "当前用户Code"
},
{
key: "CurrentUserId",
name: "当前用户Id",
description: "当前用户Id"
},
{
key: "CurrentLanguage",
name: "当前语言编号",
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
}
]);
ce(this, "expressionNames", {
compute: "计算表达式",
dependency: "依赖表达式",
validate: "验证表达式",
dataPicking: "帮助前表达式",
visible: "可见表达式",
readonly: "只读表达式",
required: "必填表达式"
});
ce(this, "getExpressionConverter", (t, n) => ({
convertFrom: (o, i, r, a) => {
const c = r.getExpressionRuleValue(t, n || i);
return c && c.value || "";
},
convertTo: (o, i, r, a, c) => {
var l;
if (i === "dataPicking" && (r != null && r.target)) {
const s = `${r.target}_dataPicking`;
((l = r.rules) == null ? void 0 : l.some(
(d) => d.id === s && d.value
)) ? o.dictPickingExpressionId = s : delete o.dictPickingExpressionId;
}
a.updateExpression(r);
}
}));
this.formSchemaService = t;
}
getExpressionRule(t, n) {
const o = this.getExpressionData();
if (!o)
return "";
const i = o.find((a) => a.target === t);
if (!i)
return "";
const r = i.rules.find((a) => a.type === n);
return r || "";
}
// 获取上下文表单变量
getContextFormVariables() {
const { module: t } = this.formSchemaService.getFormSchema();
if (!t.viewmodels || t.viewmodels.length === 0)
return [];
const n = this.formSchemaService.getRootViewModelId(), o = this.formSchemaService.getViewModelById(n);
if (!o || !o.states || o.states.length === 0)
return [];
const i = [];
return o.states.filter((r) => r.category === "remote").forEach((r) => {
i.push({
key: r.code,
name: r.name,
description: r.name,
category: r.category
});
}), i;
}
createTreeNode(t, n, o = "label") {
return {
id: t.id,
name: t.name,
bindingPath: t[o],
parents: n,
type: "field"
};
}
buildEntityFieldsTreeData(t = null, n) {
const o = [];
return t == null || t.forEach((i) => {
var c;
const r = this.createTreeNode(i, n);
let a = [];
(c = i.type) != null && c.fields && (a = this.buildEntityFieldsTreeData(i.type.fields, [...n, i.label])), o.push({
data: r,
children: a,
expanded: !0
});
}), o;
}
buildChildEntityTreeData(t = null, n) {
const o = [];
return t == null || t.forEach((i) => {
var l, s;
const r = this.createTreeNode(i, n);
r.type = "entity";
const a = this.buildEntityFieldsTreeData((l = i.type) == null ? void 0 : l.fields, [...n, i.label]), c = this.buildChildEntityTreeData((s = i.type) == null ? void 0 : s.entities, [...n, i.label]);
c != null && c.length && (a == null || a.push(...c)), o.push({
data: r,
children: a || [],
// 空值回退
expanded: !0
});
}), o;
}
getEntitiesTreeData() {
const t = this.formSchemaService.getSchemaEntities();
if (!(t != null && t.length))
return [];
const n = t[0];
if (!(n != null && n.type))
return [];
const o = this.buildEntityFieldsTreeData(n.type.fields, [n.code]), i = this.buildChildEntityTreeData(n.type.entities, [n.code]);
return i != null && i.length && (o == null || o.push(...i)), {
entityCode: n.code,
fields: [{
data: this.createTreeNode(n, [], "code"),
children: o || []
}]
};
}
getEntitiesAndVariables() {
return {
entities: this.getEntitiesTreeData(),
variables: {
session: {
name: "系统变量",
items: this.sessionVariables,
visible: !1
},
forms: {
name: "表单变量",
items: this.getContextFormVariables(),
visible: !0
}
}
};
}
onBeforeOpenExpression(t, n, o) {
const i = o === "Field" ? t.binding.field : t.id, r = this.getExpressionRule(i, n), a = this.getEntitiesAndVariables(), c = {
message: ["validate", "required", "dataPicking"].includes(n) && r ? r.message : "",
...a
};
return r.messageType != null && (c.messageType = r.messageType), c;
}
buildRule(t, n, o, i) {
const { expression: r, message: a, messageType: c } = n, l = {
id: `${t}_${o}`,
type: o,
value: r
};
return (o === "validate" || o === "dataPicking" || o === "required") && (l.message = a), o === "dataPicking" && (l.messageType = c), o === "validate" && i && (l.elementId = i), l;
}
getExpressionData() {
const { expressions: t } = this.formSchemaService.getFormSchema().module;
return t || [];
}
updateExpression(t, n, o, i) {
const r = n === "Field" ? t.binding.field : t.id, a = this.buildRule(r, o, i, t.type === "form-group" ? t.id : "");
let l = this.getExpressionData().find((m) => m.targetType === n && m.target === r);
const s = (m) => m.value.trim() === "";
if (l) {
const m = l.rules.find((d) => d.id === a.id);
if (m)
s(a) ? l.rules = l.rules.filter((d) => d.id !== a.id) : (Object.assign(m, a), i === "validate" && t.type === "form-group" && (m.elementId = t.id));
else {
if (s(a))
return null;
l.rules = l.rules || [], l.rules.push(a);
}
} else {
if (s(a))
return null;
l = {
target: `${r}`,
rules: [a],
targetType: n
};
}
return l;
}
getExpressionEditorOptions(t, n, o, i) {
return o.reduce((r, a) => {
var l, s;
const c = n === "Field" ? (l = t == null ? void 0 : t.binding) == null ? void 0 : l.field : t.id;
return r[a] = {
hide: n === "Field" ? !!((s = t == null ? void 0 : t.binding) != null && s.field) : !1,
description: "",
title: this.expressionNames[a],
type: "string",
$converter: this.getExpressionConverter(c),
refreshPanelAfterChanged: !0,
editor: {
type: "expression-editor",
singleExpand: !1,
dialogTitle: `${this.expressionNames[a]}编辑器`,
showMessage: a === "validate" || a === "dataPicking" || a === "required",
showMessageType: a === "dataPicking",
beforeOpen: () => this.onBeforeOpenExpression(t, a, n),
onSubmitModal: (m) => {
const d = this.updateExpression(t, n, m, a);
if (i) {
const p = this.buildRule(c, m, a);
i(p);
}
return d;
}
}
}, r;
}, {});
}
getExpressionInfo(t, n, o) {
const i = n === "Field" ? t.binding.field : t.id, r = this.getExpressionRule(i, o), a = {
value: r && r.value,
targetId: i,
targetType: n,
expressionType: o
};
return r && r.message && (a.message = r.message), a;
}
getExpressionConfig(t, n, o = ["compute", "dependency", "validate"], i) {
var r;
return {
description: "表达式",
title: "表达式",
hide: !(t.binding && ((r = t.binding) == null ? void 0 : r.type) === "Form"),
properties: {
...this.getExpressionEditorOptions(t, n, o, i)
}
};
}
getExpressionOptions(t, n, o) {
const i = this.getExpressionInfo(t, n, o);
return {
dialogTitle: `${this.expressionNames[o] || "表达式"}编辑器`,
singleExpand: !1,
showMessage: o === "required",
beforeOpen: () => this.onBeforeOpenExpression(t, o, n),
expressionInfo: i
};
}
}
class On {
constructor(t, n) {
ce(this, "componentId");
ce(this, "viewModelId");
ce(this, "eventsEditorUtils");
ce(this, "formSchemaUtils");
ce(this, "formMetadataConverter");
ce(this, "designViewModelUtils");
ce(this, "designViewModelField");
ce(this, "controlCreatorUtils");
ce(this, "designerHostService");
ce(this, "designerContext");
ce(this, "modalService", null);
/** 表单规则 */
ce(this, "formRule", null);
ce(this, "schemaService", null);
ce(this, "metadataService", null);
ce(this, "propertyConfig", {
type: "object",
categories: {}
});
ce(this, "expressionProperty");
var o;
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService, this.designerContext = n.designerContext, this.modalService = n.modalService, this.expressionProperty = new ra(this.formSchemaUtils);
}
/**
* 是否在响应式表单中
*/
inResponsiveForm() {
var t;
return !!((t = this.designerContext) != null && t.responsiveForm);
}
getFormDesignerInstance() {
var t, n;
return (n = (t = this.designerContext) == null ? void 0 : t.instances) == null ? void 0 : n.formDesigner.value;
}
getTableInfo() {
var t;
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(t) {
var o;
const n = t.binding && t.binding.type === "Form" && t.binding.field;
if (n) {
if (!this.designViewModelField) {
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = i.fields.find((r) => r.id === n);
}
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
}
}
getBasicPropConfig(t) {
return {
description: "Basic Information",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "combo-list",
textField: "name",
valueField: "value",
idField: "value",
editable: !1,
data: [{ value: t.type, name: j[t.type] && j[t.type].name }]
}
}
}
};
}
getAppearanceConfig(t = null, n = {}, o) {
const i = {
title: "外观",
description: "Appearance"
}, r = {
class: {
title: "class样式",
type: "string",
description: "组件的CSS样式",
$converter: "/converter/appearance.converter",
parentPropertyID: "appearance"
},
style: {
title: "style样式",
type: "string",
description: "组件的样式",
$converter: "/converter/appearance.converter",
parentPropertyID: "appearance"
}
};
for (const a in n)
r[a] = Object.assign(r[a] || {}, n[a]);
return {
...i,
properties: { ...r },
setPropertyRelates(a, c) {
if (a) {
switch (a && a.propertyID) {
case "class":
case "style": {
En.value++;
break;
}
}
o && o(a, t, c);
}
}
};
}
/**
*
* @param propertyData
* @param propertyTypes
* @param propertyName
* @param constInfos
* @param variableInfos
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
* @returns
*/
getPropertyEditorParams(t, n = [], o = "visible", i = {}, r = {}, a = "") {
const { getVariables: c, getControlName: l, getStateMachines: s } = ia(this.designerHostService), m = this.getRealTargetType(t), d = n && n.length > 0 ? n : ["Const", "Variable", "StateMachine", "Expression"], p = {
type: "property-editor",
propertyTypes: d
};
return d.map((h) => {
switch (h) {
case "Const":
Object.assign(p, {
constType: "enum",
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
}, i);
break;
case "Expression":
p.expressionConfig = this.getExpressionOptions(t, m, a || o);
break;
case "StateMachine":
p.stateMachines = s();
break;
case "Variable":
Object.assign(p, {
controlName: l(t),
newVariablePrefix: "is",
newVariableType: "Boolean",
variables: c(this.viewModelId),
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
onBeforeOpenVariables: (f) => {
f.value = c(this.viewModelId);
}
}, r), this.designerContext.designerMode === "PC_RTC" && (p.newVariablePrefix = "ext_" + p.newVariablePrefix);
break;
}
}), p;
}
getVisibleProperty(t, n = "") {
var r;
let o = ["Const", "Variable", "StateMachine", "Expression"];
return n === "gridFieldEditor" ? o = ["Const", "Expression"] : n === "form-group" && !((r = t.binding) != null && r.field) ? o = ["Const", "Variable", "StateMachine", "Custom"] : n === "dataGrid" || n === "treeGrid" || n === "wizard" ? o = ["Const", "Variable", "Expression"] : (t.type.indexOf("toolbar-item") > -1 || n === "form-group") && (o = ["Const", "Variable", "StateMachine", "Custom", "Expression"]), {
visible: {
title: "是否可见",
type: "boolean",
description: "运行时组件是否可见",
editor: this.getPropertyEditorParams(t, o, "visible")
}
};
}
/**
* 获取行为
* @param propertyData
* @param viewModelId
* @returns
*/
getBehaviorConfig(t, n = "", o = {}, i) {
const r = {
title: "行为",
description: ""
}, a = this.getVisibleProperty(t, n);
for (const l in o)
a[l] = Object.assign(a[l] || {}, o[l]);
const c = this;
return {
...r,
properties: { ...a },
setPropertyRelates(l, s) {
if (l) {
switch (l.propertyID) {
case "disabled":
case "readonly":
case "visible":
c.afterMutilEditorChanged(t, l);
break;
}
i && i(l, s);
}
}
};
}
/**
* 当多值编辑器变更时
* @param propertyData
* @param changeObject
*/
afterMutilEditorChanged(t, n) {
this.addNewVariableToViewModel(n, this.viewModelId), this.updateExpressionValue(n, t), this.clearExpression(n, t);
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(t, n) {
const o = n && n.parent && n.parent.schema;
if (!o)
return;
const i = o.contents.findIndex((a) => a.id === t), r = Ze(o.contents[i]);
o.contents.splice(i, 1), o.contents.splice(i, 0, r), In();
}
/**
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
* @param changeObject
* @param viewModelId
* @returns
*/
addNewVariableToViewModel(t, n) {
const o = t.propertyValue;
if (!(o && typeof o == "object") || !(o.type === "Variable" && o.isNewVariable))
return;
const a = {
id: o.field,
category: "locale",
code: o.fullPath,
name: o.fullPath,
type: o.newVariableType || "String",
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
};
delete o.newVariableType, delete o.isNewVariable, this.formSchemaUtils.getVariableByCode(a.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(a);
}
getExpressions() {
let t = [];
return this.formRule ? (this.formRule.expressions = this.formRule.expressions || [], t = this.formRule.expressions || []) : t = this.formSchemaUtils.getExpressions(), t;
}
/**
* 更新表达式到expressions节点
* @param changeObject
*/
updateExpressionValue(t, n) {
const o = t.propertyValue;
if (!((o && o.type) === "Expression" && o.expressionInfo))
return;
const { expressionId: a, expressionInfo: c } = o, { targetId: l, targetType: s, expressionType: m, value: d, message: p } = c, h = this.getExpressions();
let f = h.find((T) => T.target === l);
f || (f = { target: l, rules: [], targetType: s }, h.push(f));
const b = f.rules.find((T) => T.type === m);
if (b)
b.id = a, b.value = d, b.message = p, (m === "minDate" || m === "maxDate" || m === "defaultTime") && (b.elementId = n.id);
else {
const T = { id: a, type: m, value: d, message: p, elementId: n.id };
f.rules.push(T);
}
delete o.expressionInfo;
}
/**
* 属性类型切换为非表达式后,清除原表达式
* @param changeObject
* @param propertyData
* @returns
*/
clearExpression(t, n) {
const o = t.propertyValue;
if (o && o.type === "Expression")
return;
const r = t.propertyID, a = this.getExpressions(), c = n.binding ? n.binding.field : n.id, l = a.find((s) => s.target === c);
!l || !l.rules || (l.rules = l.rules.filter((s) => s.type !== r));
}
getExpressionOptions(t, n, o) {
return this.expressionProperty.getExpressionOptions(t, n, o);
}
getRealTargetType(t) {
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
}
createBaseEventProperty(t) {
const n = {};
return n[this.viewModelId] = {
type: "events-editor",
editor: {
initialData: t,
viewSourceHandle: (o) => {
var i;
((i = o.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(o);
}
}
}, n;
}
}
class aa extends On {
constructor(t, n) {
super(t, n);
}
getPropertyConfig(t) {
return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.appearance = this.getAppearancePropConfig(t), this.getBehaviorConfig(t), this.getEventPropConfig(t), this.propertyConfig;
}
getAppearancePropConfig(t) {
const n = this.formSchemaUtils.getViewModelById(this.viewModelId);
t.name = n ? n.name : null;
const o = this;
return this.getAppearanceConfig(t, {
name: {
title: "组件名称",
type: "string",
description: "组件名称",
defaultValue: t.name
}
}, (r, a, c) => {
switch (r.propertyID) {
case "name":
o.syncChangesToViewModel({ name: r.propertyValue }), delete a.name;
break;
}
});
}
getEventPropConfig(t) {
const n = [
{
label: "onInit",
name: "初始化事件"
},
{
label: "onAfterViewInit",
name: "视图初始化后事件"
}
];
this.designerContext && this.designerContext.responsiveForm && t.componentType === "frame" && n.push({
label: "goBack",
name: "原生返回事件"
});
const o = this, i = o.eventsEditorUtils.formProperties(t, o.viewModelId, n), r = o.createBaseEventProperty(i);
this.propertyConfig.categories.eventsEditor = {
title: "事件",
hideTitle: !0,
properties: r,
// 这个属性,标记当属性变更得时候触发重新更新属性
refreshPanelAfterChanged: !0,
tabId: Mn,
tabName: "交互",
setPropertyRelates(a, c) {
const l = a.propertyValue;
delete t[o.viewModelId], l && (l.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, l.events, l));
}
};
}
getBehaviorConfig(t) {
const n = this.formSchemaUtils.getViewModelById(this.viewModelId), o = n ? n.enableValidation : null, i = this;
this.propertyConfig.categories.behavior = {
title: "行为",
description: "",
properties: {
enableValidation: {
title: "启用校验",
type: "boolean",
description: "运行时组件是否启用校验",
defaultValue: o
}
},
setPropertyRelates: (r) => {
if (r)
switch (r.propertyID) {
case "enableValidation": {
i.syncChangesToViewModel({ enableValidation: r.propertyValue }), delete t.enableValidation;
break;
}
}
}
};
}
/**
* 将变更的属性值同步到ViewModel上
*/
syncChangesToViewModel(t) {
const n = this.formSchemaUtils.getViewModelById(this.viewModelId);
n && Object.assign(n, t);
}
}
const la = {
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 }
}, sa = {
showCloseButton: { type: Boolean, default: !0 },
animate: { type: String, default: "fadeIn" },
options: { type: Object }
}, nn = /* @__PURE__ */ je({
name: "Toast",
props: sa,
emits: ["close", "click"],
setup: (e, t) => {
const n = I(e.animate), o = "fadeOut", i = Z(() => e.options), r = I(!1), a = Z(() => i.value.title && i.value.message), c = Z(() => !i.value.title && i.value.message), l = Z(() => {
const y = {
animated: r.value,
toast: !0,
"toast--only-content": !a.value
};
return y[e.animate] = !1, y[o] = r.value, y["toasty-type-" + i.value.type] = !0, i.value.theme && (y[i.value.theme] = !0), y;
}), s = Z(() => {
const M = `f-icon-${i.value && i.value.type ? i.value.type.replace("toasty-type-", "") : "default"}`, k = {
"f-icon": !0
};
return k[M] = !0, k;
}), m = Z(() => i.value.title || i.value.message), d = Z(() => e.showCloseButton), p = Z(() => !!i.value.buttons || !!t.slots.default), h = Z(() => Ye.getLocale() === "en" ? {
wordBreak: "keep-all",
overflowWrap: "break-word"
} : {});
function f(y) {
y.stopPropagation(), y.preventDefault(), r.value = !1, setTimeout(() => {
t.emit("close", i.value);
}, 200);
}
function b(y, w) {
}
function T(y) {
return `f-preten-link ${y.customClass ? y.customClass : ""}`;
}
Se(n, () => {
n.value;
});
const E = () => {
var y;
return g(Ke, null, [g("div", {
class: "after-toast-msg text-right"
}, [!t.slots.default && ((y = i.value.buttons) == null ? void 0 : y.map((w) => g("span", {
class: T(w),
onClick: (M) => void 0
}, [w.text]))), t.slots.default && t.slots.default()])]);
};
return () => g("div", {
class: l.value,
style: "min-height:44px"
}, [d.value && g("button", {
title: Ye.getLocaleValue("messageBox.close"),
class: "toast-close f-btn-icon f-bare",
onClick: f
}, [g("span", {
class: "f-icon modal_close"
}, null)]), m.value && g("section", {
class: "modal-tips"
}, [!a.value && g("div", {
class: "float-left modal-tips-iconwrap"
}, [g("span", {
class: s.value
}, null)]), g("div", {
class: "modal-tips-content"
}, [a.value && g(Ke, null, [g("h5", {
class: "toast-title modal-tips-title",
innerHTML: i.value.title
}, null), g("p", {
class: "toast-msg",
innerHTML: i.value.message,
style: h.value
}, null), p.value && E()]), c.value && (i.value.buttons ? g("div", {
class: "toast-title-btns-wrapper d-flex"
}, [g("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: h.value,
innerHTML: i.value.message
}, null), g("div", {
class: "after-toast-title text-right ml-auto"
}, [E()])]) : g("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: h.value,
innerHTML: i.value.message
}, null))])])]);
}
});
function bn() {
function e() {
const n = (o) => {
const i = Math.random() * 16 | 0;
return (o === "x" ? i : i & 3 | 8).toString(16);
};
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, n);
}
function t(n, o) {
const i = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), r = [];
let a;
if (o = o || i.length, n)
for (a = 0; a < n; a++)
r[a] = i[0 | Math.random() * o];
else {
let c;
for (r[8] = r[13] = r[18] = r[23] = "-", r[14] = "4", a = 0; a < 36; a++)
r[a] || (c = 0 | Math.random() * 16, r[a] = i[a === 19 ? c & 3 | 8 : c]);
}
return r.join("");
}
return { guid: e, uuid: t };
}
const ca = ["moz", "ms", "webkit"];
function ua() {
let e = 0;
return (t) => {
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), i = setTimeout(() => {
t(n + o);
}, o);
return e = n + o, i;
};
}
function da() {
if (typeof window > "u")
return () => 0;
if (window.requestAnimationFrame)
return window.requestAnimationFrame.bind(window);
const e = ca.filter((t) => `${t}RequestAnimationFrame` in window)[0];
return e ? window[`${e}RequestAnimationFrame`] : ua();
}
da();
I("");
function fa() {
const e = navigator.userAgent || navigator.vendor || window.opera, t = [
/iPhone/i,
/iPod/i,
/Android.*Mobile/i,
// Android 手机通常包含 "Mobile" 字样,而平板不包含
/webOS/i,
/BlackBerry/i,
/IEMobile/i,
/Opera Mini/i,
/Harmony/i
], n = [
/iPad/i,
/Android(?!.*Mobile)/i,
// Android 平板通常不含 "Mobile"
/Tablet/i,
/PlayBook/i,
/Kindle/i,
/Silk/i
];
for (const c of n)
if (c.test(e))
return !1;
for (const c of t)
if (c.test(e))
return !0;
const o = "ontouchstart" in window || navigator.maxTouchPoints > 0, i = screen.width, r = screen.height, a = Math.min(i, r);
return !!(o && a <= 768);
}
const It = /* @__PURE__ */ je({
name: "Notify",
props: la,
emits: ["close", "empty"],
setup(e, t) {
var b;
const n = fa(), i = `farris-notify-${(b = e.options) != null && b.type ? e.options.type : "info"}}`, r = Z(() => ({
"farris-notify": !0,
[i]: n
})), a = {
left: 12,
right: 12,
top: 20,
bottom: 12
}, c = I(), l = I(e.options), s = I(e.showCloseButton), m = Z(() => e.position || "bottom-right"), d = Z(() => e.timeout != null ? e.timeout : 3e3), p = Z(() => {
const T = e.bottom ? e.bottom : a.bottom, E = e.top ? e.top : a.top, y = {
transition: "all 0.2s ease",
left: m.value.indexOf("left") > -1 ? `${e.left ? e.left : a.left}px` : "",
right: m.value.indexOf("right") > -1 ? `${e.right ? e.right : a.right}px` : "",
top: m.value.indexOf("top") > -1 ? `${E}px` : "",
bottom: m.value.indexOf("bottom") > -1 ? `${T}px` : ""
};
return m.value.indexOf("center") > -1 && (y.left = "50%", y.marginLeft = "calc(-24rem / 2)", m.value === "center-center" && (y.top = "50%", y.transform = "translate(-50%, -50%)")), y;
});
function h(T) {
t.emit("close");
}
d.value && setTimeout(() => {
h();
}, d.value), t.expose({
closeToast: h,
container: c,
notifyPosition: m
});
function f(T, E) {
h();
}
return () => {
var T;
return n ? g("div", {
class: r.value,
ref: c
}, [(T = e.options) == null ? void 0 : T.message]) : g("div", {
class: r.value,
style: p.value,
ref: c
}, [g(nn, {
options: l.value,
showCloseButton: s.value,
animate: e.animate,
onClose: (E) => f(E, l.value)
}, null)]);
};
}
});
class an {
constructor() {
ce(this, "notifyRefs", []);
ce(this, "globalConfig", Kt({}));
}
escapeAllHtml(t) {
if (typeof t != "string" || !t)
return "";
const n = document.createElement("div");
return n.textContent = t || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
}
createNotifyInstance(t) {
const n = this, i = Object.assign({
timeout: 3e3,
position: "bottom-right",
showCloseButton: !0,
safeHtml: !0
}, this.globalConfig, {
...t
}), r = document.createElement("div");
r.style.display = "contents";
const a = Tn({
setup() {
var s;
const c = I();
function l() {
c.value.container.style.transform = "scale(0)", setTimeout(() => {
n.updateNotifyPositionForClose(i, c), a.unmount();
}, 220);
}
if (i.position.indexOf("top") > -1) {
const m = n.getNotifyInstances(i.position), d = m[m.length - 1];
if (d) {
const p = d.value.container.getBoundingClientRect();
i.top = p.bottom;
}
}
return i.safeHtml && ((s = i.options) != null && s.message) && (i.options.message = n.escapeAllHtml(i.options.message)), Nt(() => {
document.body.removeChild(r);
}), et(() => {
n.updateNotifyPositionForCreate(i, c);
}), () => g(Sn, {
mode: "out-in",
name: "fade",
appear: !0
}, {
default: () => [g(It, Dt({
ref: c
}, i, {
onClose: l
}), null)]
});
}
});
return a.provide("NotifyService", this), document.body.appendChild(r), a.use(Ye.i18n), a.mount(r), a;
}
getNotifyInstances(t) {
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
}
updateNotifyPositionForCreate(t, n) {
if (this.notifyRefs && this.notifyRefs.length) {
const o = window.innerHeight;
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((i) => {
const r = i.value.container.getBoundingClientRect();
i.value.container.style.bottom = r.height + o - r.bottom + "px";
});
}
this.notifyRefs = [...this.notifyRefs, n];
}
updateNotifyPositionForClose(t, n) {
const o = this.notifyRefs.indexOf(n);
if (t.position.indexOf("top") > -1) {
const i = this.getNotifyInstances(t.position), r = i.indexOf(n);
i.slice(r + 1).forEach((a) => {
a.value.container.style.top = a.value.container.offsetTop - a.value.container.offsetHeight + "px";
});
}
o > -1 && this.notifyRefs.splice(o, 1);
}
show(t) {
return this.createNotifyInstance(t);
}
buildNotifyProps(t, n) {
let o = "", i = "", r, a, c;
typeof n == "string" ? o = n : n && (o = n.message || "", i = n.title || "", a = n.position || null, c = n.showCloseButton != null ? n.showCloseButton : null, r = n.timeout != null ? n.timeout : null);
const s = {
options: {
type: t,
message: o,
title: i
}
};
return a != null && (s.position = a), c != null && (s.showCloseButton = c), r != null && (s.timeout = r), s;
}
info(t) {
const n = this.buildNotifyProps("info", t);
return this.show(n);
}
success(t) {
const n = this.buildNotifyProps("success", t);
return this.show(n);
}
warning(t) {
const n = this.buildNotifyProps("warning", t);
return this.show(n);
}
error(t) {
const n = this.buildNotifyProps("error", t);
return this.show(n);
}
close(t) {
t && t.unmount();
}
closeAll() {
this.notifyRefs.forEach((t) => {
t == null || t.value.closeToast();
}), this.notifyRefs.length = 0;
}
}
const ma = Symbol("NOTIFY_SERVICE_TOKEN");
It.install = (e) => {
e.component(It.name, It), e.component(nn.name, nn);
const t = new an();
e.provide(ma, t), e.provide("FNotifyService", t);
};
const pa = {
designerHostService: { type: Object, default: {} },
/** 预设的控件类型 */
componentType: { type: String, default: "" },
/** 预设绑定的实体id */
bindingEntityId: { type: String, default: "" },
/** 绑定步骤 */
steps: { type: Array, default: ["selectEntity", "selectFields"] },
/** 目标区域的控件实例 */
targetComponentInstance: { type: Object, default: {} }
};
`${Ye.getLocaleValue("datagrid.loadingMessage")}`;
const va = {
/** 自定义样式 */
customClass: { type: String, default: "" },
/** 排序配置 */
sort: { type: Object },
/** 筛选配置 */
filter: { type: Object },
/** 自动勾选子节点 */
autoCheckChildren: { type: Boolean, default: !1 },
/** 列集合 */
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" },
/** 用于显示信息的字段 */
displayField: { type: String, default: "name" },
/** 允许编辑 */
editable: { type: Boolean, default: !1 },
/** 编辑配置 */
editOption: { type: Object, default: { selectOnEditing: !1, editMode: "cell" } },
/** 适配父组件尺寸 */
fit: { type: Boolean, default: !1 },
/** 列标题配置 */
header: { type: Object },
/** 高度 */
height: { type: Number, default: -1 },
/** 层级关系配置对象 */
hierarchy: {
type: Object,
default: {
cascadeOption: {
autoCancelParent: !0,
autoCheckChildren: !1,
autoCheckParent: !1,
selectionRange: "All"
},
parentIdField: "parent"
}
},
/** DataGrid组件唯一标识 */
id: { type: String, default: "" },
/** 被绑定数据的标识字段 */
idField: { type: String, default: "id", require: !0 },
/** async loading data */
loadData: { type: Function },
// 是否展示 loading
loading: {
type: Boolean,
default: !1
},
/** 最小高度 */
minHeight: { type: Number, default: 300 },
/** 最小宽度 */
minWidth: { type: Number, default: 400 },
/** 新建数据 */
newDataItem: {
type: Function,
default: () => {
}
},
/** 分页配置 */
pagination: {
type: Object,
default: {
enable: !1,
mode: "server",
size: -1
}
},
/** 行号配置 */
rowNumber: {
type: Object,
default: {
enable: !0,
width: 36,
heading: "序号"
}
},
/** 行配置 */
rowOption: {
type: Object,
default: {
wrapContent: !1
}
},
/** 选择配置 */
selection: {
type: Object,
default: {
enableSelectRow: !0,
multiSelect: !1,
multiSelectMode: "DependOnCheck",
showCheckbox: !1,
showSelectAll: !1,
showSelection: !1
}
},
/** 已选数据标识 */
selectionValues: { type: Array, default: [] },
/** 显示边框 */
showBorder: { type: Boolean, default: !1 },
/** 显示列头 */
showHeader: { type: Boolean, default: !0 },
/** 显示横向行分割线 */
showHorizontalLines: { type: Boolean, default: !0 },
/** 显示节点连接线 */
showLines: { type: Boolean, default: !1 },
/** 显示配置按钮 */
showOptions: { type: Boolean, default: !1 },
/** 显示滚动条 */
showScrollBar: { type: String, default: "auto" },
/** 显示设置按钮 */
showSetting: { type: Boolean, default: !1 },
/** 显示条纹 */
showStripe: { type: Boolean, default: !0 },
/** 显示树节点图标 */
showTreeNodeIcons: { type: Boolean, default: !1 },
/** 显示纵向列分割线 */
showVerticallLines: { type: Boolean, default: !1 },
/** 树节点图标数据 */
treeNodeIconsData: { type: [Object, String], default: {} },
/** 宽度 */
width: { type: Number, default: -1 },
/** 启用虚拟渲染 */
virtualized: { type: Boolean, default: !1 },
/** 空数据模板 */
emptyTemplate: { type: Object },
/** 合计配置 */
summary: {
type: Object,
default: {
// 默认合计行开启后,后面不展示值,所以默认不开启
enable: !1,
groupFields: ["numericField1", "numericField2"]
}
},
/** 自动高度 **/
autoHeight: { type: Boolean, default: !1 },
/** 是否可见, 为了适配低代码表单,该属性不应该属于表格组件的行为 */
visible: { type: Boolean, default: !0 },
/** 复选框位置 */
checkboxPosition: { type: String, default: "after-expand" },
enableColumnSettingSolution: { type: Boolean, default: !1 },
/** 搜索配置 */
searchable: {
type: Boolean,
default: !1
},
customSearch: { type: Function }
};
function ga(e, t, n, o, i, r, a, c, l, s, m, d, p, h, f, b, T, E, y) {
const {
calculateCellPositionInRow: w
} = r, {
columnContext: M,
hasLeftFixedColumn: k,
hasRightFixedColumn: B
} = a, {
gridDataStyle: S,
leftFixedGridDataStyle: u,
rightFixedGridDataStyle: C
} = h, {
renderDataRow: v
} = Bo(e, t, M, T, c, l, s, m, d, p, h, f, b, E, y), F = [v];
function P(q, A) {
const $ = w(q);
return T.value.filter((oe) => oe.visible !== !1).map((oe, Y) => F[oe.type](oe, $, A, Y));
}
function O() {
return g("div", {
ref: o,
class: "fv-grid-content-left-fixed"
}, [g("div", {
class: "fv-grid-data",
style: u.value
}, [P(M.value.leftColumns.filter((q) => q.visible), "left")])]);
}
function R() {
return g("div", {
ref: n,
class: "fv-grid-content-primary"
}, [g("div", {
class: "fv-grid-data",
style: S.value
}, [P(M.value.primaryColumns.filter((q) => q.visible), "primary")])]);
}
function L() {
return g("div", {
ref: i,
class: "fv-grid-content-right-fixed"
}, [g("div", {
class: "fv-grid-data",
style: C.value
}, [P(M.value.rightColumns.filter((q) => q.visible), "right")])]);
}
function Q() {
const q = [];
return k.value && q.push(O()), q.push(R()), B.value && q.push(L()), q;
}
return {
renderDataArea: Q
};
}
const on = /* @__PURE__ */ je({
name: "FTreeGrid",
props: va,
emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode", "doubleClickRow", "unSelectItem", "selectItem", "filterChanged", "unSelectAll", "selectAll", "sortChanged", "selectionUpdate", "endEditCell"],
setup(e, t) {
var un, dn;
const n = I(!1), o = I(!1), i = 0, r = I(((un = e.rowOption) == null ? void 0 : un.height) || 28);
let a = [], c = [];
const l = I(20), s = I(e.columns), m = Vo(e), {
idField: d
} = m, p = I(), h = I(), f = I(), b = I(), T = I(), E = I([]), y = I(!1), w = I(((dn = e.rowOption) == null ? void 0 : dn.wrapContent) || !1), M = Po(e, m), k = Ro(e, t), B = Oo(e), {
collapseField: S
} = B, {
showLoading: u,
renderLoading: C
} = No(e, p), v = Do(e, /* @__PURE__ */ new Map(), k, B, m), {
dataView: F
} = v, P = jo(e, v, m, E, t), {
showSelection: O,
selectedValues: R
} = P, L = Lo(e, E, v, m, P, t), Q = Z(() => e.disabled), q = Z(() => e.virtualized ? Math.min(v.dataView.value.length, l.value) : v.dataView.value.length), A = $o(e, v), {
shouldRenderPagination: $
} = A, {
containerStyleObject: oe
} = Ao(e, E), Y = I(""), ee = I([]), pe = Z(() => e.searchable || !1), he = I(0), re = Uo(e), {
applyCommands: Fe
} = re;
Fe(s);
const {
applyColumnSetting: Ie,
removeColumnSetting: be
} = zo(e);
e.showSetting && Ie(s);
const J = _o(e, t), x = Ho(e), {
applyColumnSorter: te,
columnContext: K,
updateColumnRenderContext: ae
} = J;
te(v, x);
const de = Go(e, K), xe = qo(e, t, P, m), ke = Wo(e, t, m, xe, E), Re = Yo(e, v, r), Ce = Xo(e, ke, Re), Me = Qo(e, v, ke, B, m, Re, Ce, r), Be = Jo(e, s, v, q, i, Me), {
getVisualData: Ve
} = Be, Oe = Zo(e, K, r, n), it = Ko(e, P), {
sidebarWidth: dt
} = it, Ee = ei(e, v, E, K, Be, q, i, dt, r, n), {
onWheel: tt,
dataGridWidth: rt,
viewPortHeight: at,
viewPortWidth: Xe,
resetScroll: Qe,
updateVisibl