@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,486 lines • 408 kB
JavaScript
var Jo = Object.defineProperty;
var Zo = (n, t, e) => t in n ? Jo(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
var V = (n, t, e) => Zo(n, typeof t != "symbol" ? t + "" : t, e);
import { computed as $, ref as T, createVNode as M, defineComponent as nt, onMounted as Ot, watch as Te, createTextVNode as wt, Fragment as Qt, reactive as bt, createApp as Xn, onUnmounted as pn, Transition as Qn, mergeProps as Lt, onBeforeUnmount as Kn, withDirectives as er, resolveDirective as tr, nextTick as mn, onBeforeMount as nr, Teleport as or, shallowRef as rr, render as gn, h as ir, cloneVNode as ar, inject as Ft, provide as sr, triggerRef as lr, isVNode as ur } from "vue";
import { isPlainObject as Dn, cloneDeep as kt, isUndefined as ct, throttle as cr } from "lodash-es";
import Ke from "bignumber.js";
import { DgControl as Bn } from "../designer-canvas/index.esm.js";
import { useGuid as dr, resolveField as it, FormSchemaEntityFieldTypeName as Rn, useCommonUtils as fr, useDateFormat as pr, useNumberFormat as mr, setFieldValue as wn, getCustomClass as vn, withInstall as Jn, FormSchemaEntityField$Type as Ln, FormSchemaEntityFieldType$Type as hr } from "../common/index.esm.js";
import { useResizeObserver as Zn } from "@vueuse/core";
import { useIdentify as gr, useGroupData as vr, useFilter as yr, useHierarchy as br, useLoading as wr, useDataView as Cr, useSelection as xr, useSelectHierarchyItem as _r, useDataViewContainerStyle as Sr, useCommandColumn as Tr, useColumn as Er, useSort as Fr, useGroupColumn as kr, useRow as Mr, useEdit as Or, useVisualDataBound as Ir, useVisualDataCell as Vr, useVisualDataRow as Nr, useVisualData as Pr, useCellPosition as Dr, useSidebar as Br, useVirtualScroll as Rr, useFitColumn as Lr, useFilterHistory as Wr, useColumnFilter as Hr, useDragColumn as $r, getColumnHeader as jr, getSidebar as Ar, getDisableMask as qr, getHorizontalScrollbar as Gr, getVerticalScrollbar as zr, getEmpty as Yr } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import Ur from "../transfer/index.esm.js";
import Xr from "../tabs/index.esm.js";
import Qr from "../order/index.esm.js";
import "../condition/index.esm.js";
import { FCheckbox as Kr } from "../checkbox/index.esm.js";
import Jr from "../filter-bar/index.esm.js";
import Wn from "../tooltip/index.esm.js";
import Zr from "../pagination/index.esm.js";
import ei from "../button/index.esm.js";
import ti from "../search-box/index.esm.js";
import ni from "../tags/index.esm.js";
import oi, { FDynamicFormGroup as ri, FDynamicFormInput as ii } from "../dynamic-form/index.esm.js";
import { createPropsResolver as ai } from "../dynamic-resolver/index.esm.js";
import "../property-panel/index.esm.js";
import si from "../accordion/index.esm.js";
import li from "../avatar/index.esm.js";
import ui from "../../designer/button-edit/index.esm.js";
import ci from "../button-group/index.esm.js";
import di from "../calendar/index.esm.js";
import fi from "../capsule/index.esm.js";
import Hn from "../../designer/checkbox/index.esm.js";
import $n from "../../designer/checkbox-group/index.esm.js";
import Cn from "../combo-list/index.esm.js";
import pi from "../combo-tree/index.esm.js";
import mi from "../component/index.esm.js";
import hi from "../color-picker/index.esm.js";
import gi from "../content-container/index.esm.js";
import vi from "../date-picker/index.esm.js";
import yi from "../../designer/data-grid/index.esm.js";
import bi from "../dropdown/index.esm.js";
import wi from "../events-editor/index.esm.js";
import Ci from "../field-selector/index.esm.js";
import xi from "../binding-selector/index.esm.js";
import _i from "../image-cropper/index.esm.js";
import Si from "../../designer/input-group/index.esm.js";
import Ti from "../layout/index.esm.js";
import Ei from "../list-nav/index.esm.js";
import Fi from "../list-view/index.esm.js";
import ki from "../lookup/index.esm.js";
import Mi from "../mapping-editor/index.esm.js";
import Oi from "../nav/index.esm.js";
import Ii from "../number-range/index.esm.js";
import Vi from "../number-spinner/index.esm.js";
import Ni from "../page-header/index.esm.js";
import Pi from "../page-footer/index.esm.js";
import Di from "../progress/index.esm.js";
import Bi from "../query-solution/index.esm.js";
import Ri from "../../designer/radio-group/index.esm.js";
import Li from "../rate/index.esm.js";
import Wi from "../response-toolbar/index.esm.js";
import Hi from "../response-layout/index.esm.js";
import $i from "../response-layout-editor/index.esm.js";
import ji from "../section/index.esm.js";
import Ai from "../smoke-detector/index.esm.js";
import qi from "../splitter/index.esm.js";
import Gi from "../step/index.esm.js";
import zi from "../switch/index.esm.js";
import Yi from "../text/index.esm.js";
import Ui from "../time-picker/index.esm.js";
import Xi from "../tree-view/index.esm.js";
import Qi from "../uploader/index.esm.js";
import Ki from "../verify-detail/index.esm.js";
import Ji from "../video/index.esm.js";
import Zi from "../textarea/index.esm.js";
import ea from "../schema-selector/index.esm.js";
import ta from "../tree-grid/index.esm.js";
import na from "../event-parameter/index.esm.js";
import oa from "../filter-condition-editor/index.esm.js";
import ra from "../fieldset/index.esm.js";
import ia from "../sort-condition-editor/index.esm.js";
import aa from "../menu-lookup/index.esm.js";
import sa from "../drawer/index.esm.js";
import la from "../json-editor/index.esm.js";
import ua from "../property-editor/index.esm.js";
import ca from "../expression-editor/index.esm.js";
import da from "../code-editor/index.esm.js";
import fa from "../html-template/index.esm.js";
import "../external-container/index.esm.js";
import "../notify/index.esm.js";
function pa(n, t, e) {
return t;
}
const eo = {}, to = {};
function En(n) {
const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((a, s) => ((!r || !o.find((l) => l === s)) && (a[s] = t[s].type === "object" && t[s].properties ? En(t[s]) : kt(t[s].default)), a), {});
if (e && (!r || !o.find((a) => a === "id"))) {
const a = e.toLowerCase().replace(/-/g, "_");
i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
}
return i;
}
function ma(n) {
const { properties: t, title: e, required: o } = n;
if (o && Array.isArray(o)) {
const r = o.reduce((i, a) => (i[a] = t[a].type === "object" && t[a].properties ? En(t[a]) : kt(t[a].default), i), {});
if (e && o.find((i) => i === "id")) {
const i = e.toLowerCase().replace(/-/g, "_");
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
}
return r;
}
return {
type: e
};
}
function no(n, t = {}, e) {
const o = eo[n];
if (o) {
let r = ma(o);
const i = to[n];
return r = i ? i({ getSchemaByType: no }, r, t, e) : r, r;
}
return null;
}
function ha(n, t) {
const e = En(t);
return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(n, r) && (o[r] && Dn(o[r]) && Dn(n[r] || !n[r]) ? Object.assign(o[r], n[r] || {}) : o[r] = n[r]), o), e), e;
}
function oo(n, t) {
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
if (t.has(r)) {
const i = t.get(r);
if (typeof i == "string")
o[i] = n[r];
else {
const a = i(r, n[r], n);
Object.assign(o, a);
}
} else
o[r] = n[r];
return o;
}, {});
}
function ga(n, t, e = /* @__PURE__ */ new Map()) {
const o = ha(n, t);
return oo(o, e);
}
function va(n = {}) {
function t(u, d, c, f) {
if (typeof c == "number")
return f[u].length === c;
if (typeof c == "object") {
const p = Object.keys(c)[0], m = c[p];
if (p === "not")
return Number(f[u].length) !== Number(m);
if (p === "moreThan")
return Number(f[u].length) >= Number(m);
if (p === "lessThan")
return Number(f[u].length) <= Number(m);
}
return !1;
}
function e(u, d, c, f) {
return f[u] && f[u].propertyValue && String(f[u].propertyValue.value) === String(c);
}
const o = /* @__PURE__ */ new Map([
["length", t],
["getProperty", e]
]);
Object.keys(n).reduce((u, d) => (u.set(d, n[d]), u), o);
function r(u, d) {
const c = u;
return typeof d == "number" ? [{ target: c, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: c, operator: "getProperty", param: u, value: !!d }] : typeof d == "object" ? Object.keys(d).map((f) => {
if (f === "length")
return { target: c, operator: "length", param: null, value: d[f] };
const p = f, m = d[f];
return { target: c, operator: "getProperty", param: p, value: m };
}) : [];
}
function i(u) {
return Object.keys(u).reduce((c, f) => {
const p = r(f, u[f]);
return c.push(...p), c;
}, []);
}
function a(u, d) {
if (o.has(u.operator)) {
const c = o.get(u.operator);
return c && c(u.target, u.param, u.value, d) || !1;
}
return !1;
}
function s(u, d) {
return i(u).reduce((p, m) => p && a(m, d), !0);
}
function l(u, d) {
const c = Object.keys(u), f = c.includes("allOf"), p = c.includes("anyOf"), m = f || p, g = (m ? u[m ? f ? "allOf" : "anyOf" : "allOf"] : [u]).map((v) => s(v, d));
return f ? !g.includes(!1) : g.includes(!0);
}
return { parseValueSchema: l };
}
const de = {
button: { type: "button", name: "按钮" },
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
"content-container": { type: "content-container", name: "容器" },
"input-group": { type: "input-group", name: "文本" },
textarea: { type: "textarea", name: "多行文本" },
lookup: { type: "lookup", name: "帮助" },
"number-spinner": { type: "number-spinner", name: "数值" },
"date-picker": { type: "date-picker", name: "日期" },
switch: { type: "switch", name: "开关" },
"radio-group": { type: "radio-group", name: "单选组" },
"check-box": { type: "check-box", name: "复选框" },
"check-group": { type: "check-group", name: "复选框组" },
"combo-list": { type: "combo-list", name: "下拉列表" },
"response-form": { type: "response-form", name: "卡片面板" },
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
"tree-grid": { type: "tree-grid", name: "树表格" },
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
"data-grid": { type: "data-grid", name: "表格" },
"data-grid-column": { type: "data-grid-column", name: "表格列" },
module: { type: "Module", name: "模块" },
component: { type: "component", name: "组件" },
tabs: { type: "tabs", name: "标签页" },
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
"html-template": { type: "html-template", name: "模板容器" },
"time-picker": { type: "time-picker", name: "时间选择" },
section: { type: "section", name: "分组面板" },
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
splitter: { type: "splitter", name: "分栏面板" },
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
"component-ref": { type: "component-ref", name: "组件引用节点" },
uploader: { type: "uploader", name: "附件上传" },
"page-header": { type: "page-header", name: "页头" },
"page-footer": { type: "page-footer", name: "页脚" },
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
fieldset: { type: "fieldset", name: "分组" },
"query-solution": { type: "query-solution", name: "筛选方案" },
drawer: { type: "drawer", name: "抽屉" },
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
"list-nav": { type: "list-nav", name: "列表导航" },
"filter-bar": { type: "filter-bar", name: "筛选条" }
}, ya = {}, ba = {};
va();
function Ht(n, t, e = /* @__PURE__ */ new Map(), o = (a, s, l, u) => s, r = {}, i = (a) => a) {
return eo[t.title] = t, to[t.title] = o, ya[t.title] = r, ba[t.title] = i, (a = {}, s = !0) => {
if (!s)
return oo(a, e);
const l = ga(a, t, e), u = Object.keys(n).reduce((d, c) => (d[c] = n[c].default, d), {});
return Object.assign(u, l);
};
}
function hn(n, t) {
return { customClass: t.class, customStyle: t.style };
}
function wa() {
function n(t, e) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: n
};
}
function Ca() {
function n(t, e) {
return t.selectItemById(e);
}
return {
selectItemById: n
};
}
function xa() {
function n(t, e) {
const { columns: o } = e;
return t.updateColumns(o);
}
return {
updateColumns: n
};
}
const _a = /* @__PURE__ */ new Map([
["appearance", hn]
]), Sa = "https://json-schema.org/draft/2020-12/schema", Ta = "https://farris-design.gitee.io/number-range.schema.json", Ea = "number-range", Fa = "A Farris Component", ka = "object", Ma = {
id: {
description: "The unique identifier for a number-range",
type: "string"
},
type: {
description: "The type string of number-range component",
type: "string",
default: "number-range"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
binding: {
description: "",
type: "object",
default: {}
},
disabled: {
type: "boolean",
default: !1
},
editable: {
description: "",
type: "boolean",
default: !0
},
placeholder: {
description: "",
type: "string",
default: ""
},
readonly: {
description: "",
type: "boolean",
default: !1
},
required: {
description: "",
type: "boolean",
default: !1
},
precision: {
description: "",
type: "number",
default: 0
},
tabindex: {
description: "",
type: "number",
default: -1
},
visible: {
description: "",
type: "boolean",
default: !0
},
beginValue: {
description: "",
type: "number"
},
endValue: {
description: "",
type: "number"
},
nullable: {
description: "",
type: "boolean",
default: !1
},
min: {
description: "",
type: "string"
},
max: {
description: "",
type: "string"
}
}, Oa = [
"type"
], Ia = {
$schema: Sa,
$id: Ta,
title: Ea,
description: Fa,
type: ka,
properties: Ma,
required: Oa
}, Fn = {
/**
* 组件标识
*/
id: String,
/**
* 自动补全小数
*/
autoDecimal: { type: Boolean, default: !0 },
/**
* 下限placeholder---未实现
*/
beginPlaceHolder: { type: String, default: "请输入开始数字" },
/**
* 下限值
*/
beginValue: { type: [Number, String], default: "" },
/**
* 启用大数支持
*/
bigNumber: { type: Boolean, default: !1 },
/**
* 允许为空
*/
nullable: { type: Boolean, default: !1 },
/**
* 小数点符号
*/
decimalSeparator: { type: String, default: "." },
/**
* 是否禁用
*/
disabled: { type: Boolean, default: !1 },
/**
* 是否可编辑
*/
editable: { type: Boolean, default: !0 },
/**
* 上限placeholder---未实现
*/
endPlaceHolder: { type: String, default: "请输入结束数字" },
/**
* 上限值
*/
endValue: { type: [Number, String], default: "" },
/**
* 格式化 formatter 和 parser 必须同时存在
* formatter: (val: number) => string;
* parser: (val: string | number) => number;
*/
formatter: { type: Function },
/**
* 千分位符号
*/
groupSeparator: { type: String, default: "," },
/**
* 使用千分位时,每组显示的字符数
*/
groupSize: { type: Number, default: 3 },
/**
* 最大值
*/
max: { type: [Number, String] },
/**
* 最小值
*/
min: { type: [Number, String] },
parser: { type: Function },
/**
* 空白提示文本
*/
placeholder: { type: String, default: "请输入数字" },
/**
* 精度
*/
precision: { type: Number, default: 0 },
/**
* 前缀
*/
prefix: { type: String, default: "" },
/**
* 是否只读
*/
readonly: { type: Boolean, default: !1 },
/**
* 间隔符---未实现
*/
separator: { type: String, default: "~" },
/**
* 是否显示加减按钮
*/
showButton: { type: Boolean, default: !0 },
/**
* 显示0值
*/
showZero: { type: Boolean, default: !0 },
/**
* up or down 步长
*/
step: { type: Number, default: 1 },
/**
* 后缀
*/
suffix: { type: String, default: "" },
/**
* 文本方向
*/
textAlign: { type: String, default: "left" },
/**
* 是否使用千分值
*/
useThousands: { type: Boolean, default: !0 }
}, ro = Ht(Fn, Ia, _a, pa);
function io(n, t) {
const e = $(() => Number(n.precision) || 0);
function o(l) {
return l.toFixed(e.value);
}
function r(l) {
return isNaN(l) || l === null || l === void 0 || l === "";
}
function i(l) {
const u = r(n.max) ? null : new Ke(String(n.max), 10), d = r(n.min) ? null : new Ke(String(n.min), 10);
return u && l.gt(u) ? u : d && l.lt(d) ? d : l;
}
function a(l, u, d, c) {
const f = new Ke(l, 10), p = r(d && d.value) ? null : new Ke(String(d.value), 10), m = r(u && u.value) ? null : new Ke(String(u.value), 10);
let k;
return c ? k = p && f.gt(p) ? p : f : k = m && f.lt(m) ? m : f, k.toString();
}
function s(l, u = !0) {
if (n.parser)
return isNaN(Number(l)) ? n.parser(l) : l;
let d = new Ke(l, 10);
if (u && (d = i(d)), d.isNaN()) {
if (n.nullable)
return null;
const f = new Ke("" + n.min, 10), p = new Ke("" + n.max, 10);
if (!f.isNaN())
d = f;
else if (!p.isNaN())
d = p;
else
return 0;
}
return o(d);
}
return { getRealValue: s, isEmpty: r, precision: e, getValidNumberObject: i, getValidNumberInRange: a };
}
function ao(n, t, e) {
const o = $(() => ({
prefix: n.prefix,
suffix: n.suffix,
decimalSeparator: n.decimalSeparator,
groupSeparator: n.useThousands ? n.groupSeparator : "",
groupSize: n.groupSize
})), { getValidNumberObject: r, precision: i } = e;
function a(u) {
return u = u == null || u === "" ? "" : String(u), u = u.replace(new RegExp(n.prefix, "g"), "").replace(new RegExp(n.suffix, "g"), "").replace(/,/g, ""), n.groupSeparator && n.groupSeparator !== "," && (u = u.replace(new RegExp(`\\${n.groupSeparator}`, "g"), "")), n.decimalSeparator && n.decimalSeparator !== "." && (u = u.replace(new RegExp(`\\${n.decimalSeparator}`, "g"), ".")), u;
}
function s(u, d) {
return n.precision !== null && n.precision !== void 0 ? u.toFormat(i.value, d) : u.toFormat(d);
}
function l(u, d = !0) {
const c = a(u), f = new Ke(c, 10);
let p = f;
return d && (p = r(f)), p.valueOf() === "0" && !n.showZero || p.isNaN() ? "" : n.formatter ? n.formatter(p.toNumber()) : s(p, o.value);
}
return { cleanFormat: a, format: l };
}
function tn(n, t, e, o, r, i, a, s, l, u) {
const { format: d } = r, { getRealValue: c, getValidNumberInRange: f } = i;
function p() {
const x = new Ke(o.value || 0);
return !((n.max || n.max === 0) && !new Ke(n.max).isNaN() && x.gte(new Ke(n.max)) && (o.value || o.value === 0));
}
function m() {
const x = new Ke(o.value || 0);
return !((n.min || n.min === 0) && !new Ke(n.min).isNaN() && x.lte(new Ke(n.min)) && (o.value || o.value === 0));
}
function k(x) {
if (n.readonly || n.disabled)
return;
const S = x === "up" ? p : m, E = x === "up" ? "plus" : "minus";
if (S()) {
let _ = new Ke(o.value || 0)[E](Number(n.step)).toFixed();
_ = f(_, s, l, u);
const F = c(_);
e.value = d(_), o.value !== F && (o.value = F, a(o.value));
}
}
function C() {
k("up");
}
function g() {
k("down");
}
function b(x) {
C(), x.stopPropagation();
}
function v(x) {
g(), x.stopPropagation();
}
return { canDownward: m, canUpward: p, downward: g, onClickDownButton: v, onClickUpButton: b, upward: C };
}
function nn(n, t, e, o, r, i, a, s, l, u, d) {
const { cleanFormat: c, format: f } = r, { getRealValue: p, isEmpty: m, getValidNumberInRange: k } = i, { downward: C, upward: g } = a, b = $(() => e.value), v = T(!1);
function x(w) {
var N;
if (w.stopPropagation(), n.readonly || n.disabled)
return;
v.value = !1;
let _ = (N = w.target) == null ? void 0 : N.value;
n.nullable || (_ = _ || 0);
let F = c(_);
F = k(F, l, u, d);
const y = p(F);
e.value = f(F), o.value !== y && (o.value = y, s(o.value)), t.emit("blur", { event: w, formatted: e.value, value: o.value });
}
function S(w) {
w.stopPropagation(), !(n.readonly || n.disabled) && (v.value = !0, e.value = m(o.value) || !n.showZero && o.value === "0" ? "" : String(o.value), t.emit("focus", { event: w, formatted: e.value, value: o.value }));
}
function E(w) {
var y;
w.stopPropagation();
let _ = (y = w.target) == null ? void 0 : y.value;
n.nullable || (_ = _ || 0);
const F = c(_);
e.value = F, o.value = p(F), s(o.value);
}
function h(w) {
w.key === "ArrowDown" && (w.preventDefault(), C()), w.key === "ArrowUp" && (w.preventDefault(), g()), w.stopPropagation();
}
return { textBoxValue: b, onBlurTextBox: x, onFocusTextBox: S, onInput: E, onKeyDown: h, isTextBoxFocused: v };
}
function on(n, t, e, o) {
const {
onBlurTextBox: r,
onFocusTextBox: i,
onInput: a,
onKeyDown: s,
textBoxValue: l
} = e, u = $(() => o ? n.beginPlaceHolder : n.endPlaceHolder), d = $(() => ({
"form-control": !0,
"sub-input": !0
})), c = $(() => ({
"text-align": n.textAlign
}));
function f(p) {
p.stopPropagation();
}
return () => M("input", {
class: d.value,
style: c.value,
type: "text",
value: l.value,
disabled: n.disabled,
readonly: n.readonly || !n.editable,
placeholder: u.value,
onBlur: r,
onChange: f,
onFocus: i,
onInput: a,
onKeydown: s
}, null);
}
function rn(n, t, e) {
const {
canDownward: o,
canUpward: r,
onClickDownButton: i,
onClickUpButton: a
} = e, s = $(() => ({
"input-group-append": !0,
"btn-group": !0,
"btn-group-number": !0,
"sub-btn-group": !0
})), l = $(() => ({
btn: !0,
"btn-secondary": !0,
"btn-number-flag": !0
})), u = $(() => ({
cursor: r() ? "pointer" : "not-allowed",
"margin-left": 0
})), d = $(() => ({
cursor: o() ? "pointer" : "not-allowed",
"margin-left": 0
}));
return () => M("div", {
class: s.value
}, [M("button", {
class: l.value,
style: u.value,
onClick: a,
disabled: !r()
}, [M("span", {
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
}, null)]), M("button", {
class: l.value,
style: d.value,
onClick: i,
disabled: !o()
}, [M("span", {
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
}, null)])]);
}
const an = /* @__PURE__ */ nt({
name: "FNumberRange",
props: Fn,
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
setup(n, t) {
const e = T(n.beginValue), o = T(""), r = T(n.endValue), i = T(""), a = io(n), s = ao(n, t, a), l = (S) => {
t.emit("beginValueChange", S);
}, u = tn(n, t, o, e, s, a, l, e, r, !0), d = nn(n, t, o, e, s, a, u, l, e, r, !0), c = rn(n, t, u), f = on(n, t, d, !0), p = (S) => {
t.emit("endValueChange", S);
}, m = tn(n, t, i, r, s, a, p, e, r, !1), k = nn(n, t, i, r, s, a, m, p, e, r, !1), C = rn(n, t, m), g = on(n, t, k, !1), {
getRealValue: b
} = a, {
format: v
} = s, x = $(() => !n.disabled && !n.readonly && n.showButton);
return Ot(() => {
const S = b(n.beginValue, !1), E = b(n.endValue, !1);
o.value = v(S, !1), i.value = v(E, !1);
}), Te(() => [n.beginValue], ([S]) => {
if (!d.isTextBoxFocused.value) {
const E = b(S, !1);
e.value = E, o.value = v(E, !1);
}
}), Te(() => [n.endValue], ([S]) => {
if (!k.isTextBoxFocused.value) {
const E = b(S, !1);
r.value = E, i.value = v(E, !1);
}
}), Te(() => [n.precision, n.useThousands, n.prefix, n.suffix, n.showZero], () => {
o.value = v(e.value), i.value = v(r.value);
}), () => M("div", {
class: "input-group number-range f-cmp-number-spinner"
}, [M("div", {
class: "form-control input-container"
}, [M("div", {
class: "sub-input-group"
}, [f(), x.value && c()]), M("span", {
class: "spliter"
}, [wt("~")]), M("div", {
class: "sub-input-group"
}, [g(), x.value && C()])])]);
}
});
function so(n, t, e) {
var h;
const o = e && e.getStyles && e.getStyles() || "", r = e && e.getDesignerClass && e.getDesignerClass() || "", i = T();
function a() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
}
function s() {
return !1;
}
function l() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
}
function u() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
}
function d(w) {
if (!w || !w.value)
return null;
if (w.value.schema && w.value.schema.type === "component")
return w.value;
const _ = T(w == null ? void 0 : w.value.parent), F = d(_);
return F || null;
}
function c(w = t) {
var N;
if (e != null && e.getDraggableDesignItemElement)
return e.getDraggableDesignItemElement(w);
const { componentInstance: _, designerItemElementRef: F } = w;
if (!_ || !_.value)
return null;
const { getCustomButtons: y } = _.value;
return _.value.canMove || y && ((N = y()) != null && N.length) ? F : c(w.parent);
}
function f(w) {
return !!e && e.canAccepts(w);
}
function p() {
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
}
function m() {
}
function k(w, _) {
var F;
!w || !_ || (e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(w, _), (F = t == null ? void 0 : t.setupContext) == null || F.emit("dragEnd"));
}
function C(w, _) {
const { componentType: F } = w;
let y = no(F, w, _);
e && e.onResolveNewComponentSchema && (y = e.onResolveNewComponentSchema(w, y));
const N = F.toLowerCase().replace(/-/g, "_");
return y && !y.id && y.type === F && (y.id = `${N}_${Math.random().toString().slice(2, 6)}`), y;
}
function g(w) {
w && e != null && e.onChildElementMovedOut && e.onChildElementMovedOut(w);
}
function b(...w) {
if (e && e.getPropsConfig)
return e.getPropsConfig(...w);
}
function v(w) {
if (!w)
return;
const _ = t == null ? void 0 : t.schema, { formSchemaUtils: F } = w;
if (_ && F.getExpressions().length) {
const y = F.getExpressions().findIndex((N) => N.target === _.id);
y > -1 && F.getExpressions().splice(y, 1);
}
}
function x(w) {
e && e.onRemoveComponent && e.onRemoveComponent(), v(w), t != null && t.schema.contents && t.schema.contents.map((_) => {
let F = _.id;
_.type === "component-ref" && (F = _.component);
const y = n.value.querySelectorAll(`#${F}-design-item`);
y != null && y.length && Array.from(y).map((N) => {
var P;
(P = N == null ? void 0 : N.componentInstance) != null && P.value.onRemoveComponent && N.componentInstance.value.onRemoveComponent(w);
});
});
}
function S() {
if (e && e.getCustomButtons)
return e.getCustomButtons();
}
function E(w) {
if (e && e.onPropertyChanged)
return e.onPropertyChanged(w);
}
return i.value = {
canMove: a(),
canSelectParent: s(),
canDelete: l(),
canNested: !u(),
contents: t == null ? void 0 : t.schema.contents,
elementRef: n,
parent: (h = t == null ? void 0 : t.parent) == null ? void 0 : h.componentInstance,
schema: t == null ? void 0 : t.schema,
styles: o,
designerClass: r,
canAccepts: f,
getBelongedComponentInstance: d,
getDraggableDesignItemElement: c,
getDraggingDisplayText: p,
getPropConfig: b,
getDragScopeElement: m,
onAcceptMovedChildElement: k,
onChildElementMovedOut: g,
addNewChildComponentSchema: C,
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || T(!1),
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
onRemoveComponent: x,
getCustomButtons: S,
onPropertyChanged: E
}, i;
}
const Va = T(0);
function Na() {
Va.value++;
}
const Wt = T(0);
function Pa(n, t) {
const e = t.getBoundingClientRect(), o = n.getBoundingClientRect(), r = o.top >= e.top, i = o.top <= e.bottom;
return r && i;
}
function Da(n) {
const t = n.querySelector(".component-btn-group");
if (!t)
return;
t.style.display = "";
const e = t.getBoundingClientRect();
if (!(e.top === 0 && e.left === 0)) {
const o = t.querySelector("div");
if (o) {
const r = o.getBoundingClientRect();
o.style.top = e.top + "px";
let i = e.left - r.width;
const a = document.querySelector(".editorDiv");
if (a) {
const s = a.getBoundingClientRect();
i < s.left && ({ left: i } = n.getBoundingClientRect());
}
o.style.left = i + "px";
}
}
}
function Ba(n) {
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length && t.length === 1) {
const e = t[0], o = document.querySelector(`[id=${e}]`);
if (o && o.contains(n))
return o;
}
}
function lo(n) {
if (!n)
return;
const t = n.getBoundingClientRect();
if (t.width === 0 && t.height === 0)
return;
const e = n.querySelector(".component-btn-group");
if (e) {
let o = !0;
const r = Ba(n);
if (r && (o = Pa(n, r)), !o) {
e.style.display = "none";
return;
}
Da(n);
}
}
function Ra(n) {
if (!n)
return;
let t;
n.className.includes("dgComponentSelected") ? t = n : t = n.querySelector(".dgComponentSelected"), t && lo(t);
}
function La(n) {
const { formSchemaUtils: t, formStateMachineUtils: e } = n;
function o(l, u = "") {
return {
path: u + l.code,
field: l.id,
fullPath: l.code
};
}
function r(l, u = "") {
return t.getViewModelById(l).states.map((c) => o(c, u));
}
function i(l) {
const u = t.getRootViewModelId(), d = r(l);
if (l === u)
return d;
const c = r(u, "root-component.");
return [...d, ...c];
}
function a(l) {
return l.binding && l.binding.path || l.id || "";
}
function s() {
return e && e.getRenderStates() || [];
}
return { getVariables: i, getControlName: a, getStateMachines: s };
}
class uo {
constructor(t) {
V(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'"
}
]);
V(this, "expressionNames", {
compute: "计算表达式",
dependency: "依赖表达式",
validate: "验证表达式",
dataPicking: "帮助前表达式",
visible: "可见表达式",
readonly: "只读表达式",
required: "必填表达式"
});
V(this, "getExpressionConverter", (t, e) => ({
convertFrom: (o, r, i, a) => {
const s = i.getExpressionRuleValue(t, e || r);
return s && s.value || "";
},
convertTo: (o, r, i, a, s) => {
var l;
if (r === "dataPicking" && (i != null && i.target)) {
const u = `${i.target}_dataPicking`;
((l = i.rules) == null ? void 0 : l.some(
(c) => c.id === u && c.value
)) ? o.dictPickingExpressionId = u : delete o.dictPickingExpressionId;
}
a.updateExpression(i);
}
}));
this.formSchemaService = t;
}
getExpressionRule(t, e) {
const o = this.formSchemaService.getExpressions();
if (!o)
return "";
const r = o.find((a) => a.target === t);
if (!r)
return "";
const i = r.rules.find((a) => a.type === e);
return i || "";
}
// 获取上下文表单变量
getContextFormVariables() {
const { module: t } = this.formSchemaService.getFormSchema();
if (!t.viewmodels || t.viewmodels.length === 0)
return [];
const e = this.formSchemaService.getRootViewModelId(), o = this.formSchemaService.getViewModelById(e);
if (!o || !o.states || o.states.length === 0)
return [];
const r = [];
return o.states.forEach((i) => {
r.push({
key: i.code,
name: i.name,
description: i.name,
category: i.category
});
}), r;
}
createTreeNode(t, e, o = "label") {
return {
id: t.id,
name: t.name,
bindingPath: t[o],
parents: e
};
}
buildEntityFieldsTreeData(t = null, e) {
const o = [];
return t == null || t.forEach((r) => {
var s;
const i = this.createTreeNode(r, e);
let a = [];
(s = r.type) != null && s.fields && (a = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), o.push({
data: i,
children: a,
expanded: !0
});
}), o;
}
buildChildEntityTreeData(t = null, e) {
const o = [];
return t == null || t.forEach((r) => {
var l, u;
const i = this.createTreeNode(r, e), a = this.buildEntityFieldsTreeData((l = r.type) == null ? void 0 : l.fields, [...e, r.label]), s = this.buildChildEntityTreeData((u = r.type) == null ? void 0 : u.entities, [...e, r.label]);
s != null && s.length && (a == null || a.push(...s)), o.push({
data: i,
children: a || [],
// 空值回退
expanded: !0
});
}), o;
}
getEntitiesTreeData() {
const t = this.formSchemaService.getSchemaEntities();
if (!(t != null && t.length))
return [];
const e = t[0];
if (!(e != null && e.type))
return [];
const o = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), r = this.buildChildEntityTreeData(e.type.entities, [e.code]);
return r != null && r.length && (o == null || o.push(...r)), {
entityCode: e.code,
fields: [{
data: this.createTreeNode(e, [], "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, e, o) {
const r = o === "Field" ? t.binding.field : t.id, i = this.getExpressionRule(r, e), a = this.getEntitiesAndVariables(), s = {
message: ["validate", "required", "dataPicking"].includes(e) && i ? i.message : "",
...a
};
return i.messageType != null && (s.messageType = i.messageType), s;
}
buildRule(t, e, o, r) {
const { expression: i, message: a, messageType: s } = e, l = {
id: `${t}_${o}`,
type: o,
value: i
};
return (o === "validate" || o === "dataPicking" || o === "required") && (l.message = a), o === "dataPicking" && (l.messageType = s), o === "validate" && r && (l.elementId = r), l;
}
getExpressionData() {
const { expressions: t } = this.formSchemaService.getFormSchema().module;
return t || [];
}
updateExpression(t, e, o, r) {
const i = e === "Field" ? t.binding.field : t.id, a = this.buildRule(i, o, r, t.type === "form-group" ? t.id : "");
let l = this.getExpressionData().find((d) => d.targetType === e && d.target === i);
const u = (d) => d.value.trim() === "";
if (l) {
const d = l.rules.find((c) => c.id === a.id);
if (d)
u(a) ? l.rules = l.rules.filter((c) => c.id !== a.id) : (Object.assign(d, a), r === "validate" && t.type === "form-group" && (d.elementId = t.id));
else {
if (u(a))
return null;
l.rules = l.rules || [], l.rules.push(a);
}
} else {
if (u(a))
return null;
l = {
target: `${i}`,
rules: [a],
targetType: e
};
}
return l;
}
getExpressionEditorOptions(t, e, o, r) {
return o.reduce((i, a) => {
var l, u;
const s = e === "Field" ? (l = t == null ? void 0 : t.binding) == null ? void 0 : l.field : t.id;
return i[a] = {
hide: e === "Field" ? !!((u = t == null ? void 0 : t.binding) != null && u.field) : !1,
description: "",
title: this.expressionNames[a],
type: "string",
$converter: this.getExpressionConverter(s),
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, e),
onSubmitModal: (d) => {
const c = this.updateExpression(t, e, d, a);
if (r) {
const f = this.buildRule(s, d, a);
r(f);
}
return c;
}
}
}, i;
}, {});
}
getExpressionInfo(t, e, o) {
const r = e === "Field" ? t.binding.field : t.id, i = this.getExpressionRule(r, o), a = {
value: i && i.value,
targetId: r,
targetType: e,
expressionType: o
};
return i && i.message && (a.message = i.message), a;
}
getExpressionConfig(t, e, o = ["compute", "dependency", "validate"], r) {
return {
description: "表达式",
title: "表达式",
properties: {
...this.getExpressionEditorOptions(t, e, o, r)
}
};
}
getExpressionOptions(t, e, o) {
const r = this.getExpressionInfo(t, e, o);
return {
dialogTitle: `${this.expressionNames[o]}编辑器`,
singleExpand: !1,
showMessage: o === "required",
beforeOpen: () => this.onBeforeOpenExpression(t, o, e),
expressionInfo: r
};
}
}
class co {
constructor(t, e) {
V(this, "componentId");
V(this, "viewModelId");
V(this, "eventsEditorUtils");
V(this, "formSchemaUtils");
V(this, "formMetadataConverter");
V(this, "designViewModelUtils");
V(this, "designViewModelField");
V(this, "controlCreatorUtils");
V(this, "designerHostService");
V(this, "schemaService", null);
V(this, "metadataService", null);
V(this, "propertyConfig", {
type: "object",
categories: {}
});
var o;
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
}
getTableInfo() {
var t;
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(t) {
var o;
const e = t.binding && t.binding.type === "Form" && t.binding.field;
if (e) {
if (!this.designViewModelField) {
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = r.fields.find((i) => i.id === e);
}
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: de[t.type].name }]
}
}
}
};
}
getAppearanceConfig(t = null, e = {}, o) {
const r = {
title: "外观",
description: "Appearance"
}, i = {
class: {
title: "class样式",
type: "string",
description: "组件的CSS样式",
$converter: "/converter/appearance.converter"
},
style: {
title: "style样式",
type: "string",
description: "组件的样式",
$converter: "/converter/appearance.converter"
}
};
for (const a in e)
i[a] = Object.assign(i[a] || {}, e[a]);
return {
...r,
properties: { ...i },
setPropertyRelates(a, s) {
if (a) {
switch (a && a.propertyID) {
case "class":
case "style": {
Wt.value++;
break;
}
}
o && o(a, t, s);
}
}
};
}
getPropertyEditorParams(t, e = [], o = "visible", r = {}, i = {}) {
const { getVariables: a, getControlName: s, getStateMachines: l } = La(this.designerHostService), u = this.getRealTargetType(t), d = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], c = {
type: "property-editor",
propertyTypes: d
};
return d.map((f) => {
switch (f) {
case "Const":
Object.assign(c, {
constType: "enum",
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
}, r);
break;
case "Expression":
c.expressionConfig = this.getExpressionOptions(t, u, o);
break;
case "StateMachine":
c.stateMachines = l();
break;
case "Variable":
Object.assign(c, {
controlName: s(t),
newVariablePrefix: "is",
newVariableType: "Boolean",
variables: a(this.viewModelId),
onBeforeOpenVariables: (p) => {
p.value = a(this.viewModelId);
}
}, i);
break;
}
}), c;
}
getVisibleProperty(t, e = "") {
return {
visible: {
title: "是否可见",
type: "boolean",
description: "运行时组件是否可见",
editor: this.getPropertyEditorParams(t, e === "gridFieldEditor" ? ["Const", "Expression"] : ["Const", "Variable", "StateMachine", "Expression"], "visible")
}
};
}
/**
* 获取行为
* @param propertyData
* @param viewModelId
* @returns
*/
getBehaviorConfig(t, e = "", o = {}, r) {
const i = {
title: "行为",
description: ""
}, a = this.getVisibleProperty(t, e);
for (const l in o)
a[l] = Object.assign(a[l] || {}, o[l]);
const s = this;
return {
...i,
properties: { ...a },
setPropertyRelates(l, u) {
if (l) {
switch (l.propertyID) {
case "disabled":
case "readonly":
case "visible":
s.afterMutilEditorChanged(t, l);
break;
}
r && r(l, u);
}
}
};
}
/**
* 当多值编辑器变更时
* @param propertyData
* @param changeObject
*/
afterMutilEditorChanged(t, e) {
this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, t);
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(t, e) {
const o = e && e.parent && e.parent.schema;
if (!o)
return;
const r = o.contents.findIndex((a) => a.id === t), i = kt(o.contents[r]);
o.contents.splice(r, 1), o.contents.splice(r, 0, i), Na();
}
/**
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
* @param changeObject
* @param viewModelId
* @returns
*/
addNewVariableToViewModel(t, e) {
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"
};
delete o.newVariableType, delete o.isNewVariable, this.formSchemaUtils.getVariableByCode(a.code) || this.formSchemaUtils.getViewModelById(e).states.push(a);
}
/**
* 更新表达式到expressions节点
* @param changeObject
*/
updateExpressionValue(t) {
const e = t.propertyValue;
if (!((e && e.type) === "Expression" && e.expressionInfo))
return;
const { expressionId: i, expressionInfo: a } = e, { targetId: s, targetType: l, expressionType: u, value: d, message: c } = a, f = this.formSchemaUtils.getModule();
f.expressions ?? (f.expressions = []);
const { expressions: p } = f;
let m = p.find((C) => C.target === s);
m || (m = { target: s, rules: [], targetType: l }, p.push(m));
const k = m.rules.find((C) => C.type === u);
if (k)
k.value = d, k.message = c;
else {
const C = { id: i, type: u, value: d, message: c };
m.rules.push(C);
}
delete e.expressionInfo;
}
/**
* 属性类型切换为非表达式后,清除原表达式
* @param changeObject
* @param propertyData
* @returns
*/
clearExpression(t, e) {
const o = t.propertyValue;
if (o && o.type === "Expression")
return;
const i = t.propertyID, a = this.formSchemaUtils.getExpressions(), s = e.binding ? e.binding.field : e.id, l = a.find((u) => u.target === s);
!l || !l.rules || (l.rules = l.rules.filter((u) => u.type !== i));
}
getExpressionOptions(t, e, o) {
return new uo(this.formSchemaUtils).getExpressionOptions(t, e, o);
}
getRealTargetType(t) {
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
}
}
const jt = class jt {
/**
* 根据绑定字段类型获取可用的输入类控件
*/
static getEditorTypesByMDataType(t, e = "") {
let o = jt.fieldControlTypeMapping[t];
if (e === "data-grid-column" && (o != null && o.length)) {
const r = [de["check-group"].type, de["radio-group"].type];
o = o.filter((i) => !r.includes(i.key));
}
return o;
}
/**
* 获取所有输入类控件
*/
static getAllInputTypes() {
const t = [];
for (const e in jt.fieldControlTypeMapping)
jt.fieldControlTypeMapping[e].forEach((o) => {
t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
});
return t;
}
/**
* 提供schema字段基础属性和DOM控件属性的映射
* @param control 控件元数据
*/
static mappingDomPropAndSchemaProp(t, e) {
var i;
const o = (i = t.editor) == null ? void 0 : i.type, r = [];
return (t.type === de["data-grid-column"].type || t.type === de["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && r.push({ domField: "title", schemaField: "name" }), r.push({ domField: "label", schemaField: "name" }), r.push({ domField: "editor.required", schemaField: "require" }), r.push({ domField: "editor.readonly", schemaField: "readonly" }), (o === de["input-group"].type || o === de.textarea.type || o === de["number-spinner"].type) && r.push({ domField: "editor.maxLength", schemaField: "type.length" }), o === de["number-spinner"].type && r.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === de["data-grid-column"].type || t.type === de["tree-grid-column"].type) && r.push({ domField: "formatter.precision", schemaField: "type.precision" }), (o === de["combo-list"].type || o === de["radio-group"].type) && r.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === de["data-grid-column"].type || t.type === de["tree-grid-column"].type) && r.push({ domField: "formatter.data", schemaField: "type.enumValues" }), o === de["date-picker"].type && (r.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), r.push({ domField: "editor.fieldType", schemaField: "type.name" })), o === de["number-spinner"].type && (r.push({ domField: "editor.max", schemaField: "editor.maxValue" }), r.push({ domField: "editor.min", schemaField: "editor.minValue" })), o === de.lookup.type && (r.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), r.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), r.push({ domField: "editor.textField", schemaField: "editor.textField" }), r.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), r.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), r.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), r.push({ domField: "path", schemaField: "bindingPath" }), r.push({ domField: "binding.path", schemaField: "bindingField" }), r.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === de["data-grid-column"].type || t.type === de["tree-grid-column"].type) && r.push({ d