@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,451 lines • 464 kB
JavaScript
var or = Object.defineProperty;
var rr = (t, n, e) => n in t ? or(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
var B = (t, n, e) => rr(t, typeof n != "symbol" ? n + "" : n, e);
import { ref as F, createVNode as M, createTextVNode as Ze, computed as N, defineComponent as ze, Fragment as Ot, watch as Fe, onMounted as gt, reactive as Ct, createApp as _n, onUnmounted as en, Transition as Xn, mergeProps as It, onBeforeUnmount as Sn, withDirectives as Qn, resolveDirective as ir, nextTick as Ht, onBeforeMount as ar, Teleport as Kn, shallowRef as lr, render as fn, h as sr, cloneVNode as ur, inject as xt, provide as cr, triggerRef as dr, isVNode as fr, vShow as pr } from "vue";
import { isPlainObject as Dn, cloneDeep as We, isUndefined as dt, throttle as mr } from "lodash-es";
import { useConditionValue as hr, FConditionFields as vr } from "../condition/index.esm.js";
import gr, { useCondition as yr } from "../query-solution/index.esm.js";
import br, { FDrawer as wr } from "../drawer/index.esm.js";
import Cr, { FDynamicFormGroup as Jn, FDynamicFormInput as xr } from "../dynamic-form/index.esm.js";
import { DgControl as Nn, useDesignerComponent as _r } from "../designer-canvas/index.esm.js";
import { useGuid as Sr, resolveField as at, FormSchemaEntityFieldTypeName as Rn, useCommonUtils as Fr, useDateFormat as Tr, useNumberFormat as kr, setFieldValue as gn, getCustomClass as pn, withInstall as Mr, FormSchemaEntityField$Type as Ln, FormSchemaEntityFieldType$Type as Er } from "../common/index.esm.js";
import { useResizeObserver as Zn } from "@vueuse/core";
import { useIdentify as Ir, useGroupData as Or, useFilter as Pr, useHierarchy as Br, useLoading as Vr, useDataView as Dr, useSelection as Nr, useSelectHierarchyItem as Rr, useDataViewContainerStyle as Lr, useCommandColumn as $r, useColumn as Wr, useSort as Hr, useGroupColumn as jr, useRow as Ar, useEdit as qr, useVisualDataBound as Gr, useVisualDataCell as zr, useVisualDataRow as Yr, useVisualData as Ur, useCellPosition as Xr, useSidebar as Qr, useVirtualScroll as Kr, useFitColumn as Jr, useFilterHistory as Zr, useColumnFilter as ei, useDragColumn as ti, getColumnHeader as ni, getSidebar as oi, getDisableMask as ri, getHorizontalScrollbar as ii, getVerticalScrollbar as ai, getEmpty as li } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import eo from "../transfer/index.esm.js";
import si from "../tabs/index.esm.js";
import ui from "../order/index.esm.js";
import { FCheckbox as ci } from "../checkbox/index.esm.js";
import di from "../filter-bar/index.esm.js";
import $n from "../tooltip/index.esm.js";
import fi from "../pagination/index.esm.js";
import pi from "../button/index.esm.js";
import mi from "../search-box/index.esm.js";
import to from "../tags/index.esm.js";
import { createPropsResolver as hi } from "../dynamic-resolver/index.esm.js";
import { FPropertyPanel as vi } from "../property-panel/index.esm.js";
import gi from "../accordion/index.esm.js";
import yi from "../avatar/index.esm.js";
import bi from "../../designer/button-edit/index.esm.js";
import wi from "../button-group/index.esm.js";
import Ci from "../calendar/index.esm.js";
import xi from "../capsule/index.esm.js";
import Wn from "../../designer/checkbox/index.esm.js";
import Hn from "../../designer/checkbox-group/index.esm.js";
import yn from "../combo-list/index.esm.js";
import _i from "../combo-tree/index.esm.js";
import Si from "../component/index.esm.js";
import Fi from "../color-picker/index.esm.js";
import Ti from "../content-container/index.esm.js";
import ki, { DATE_FORMATS as Mi } from "../date-picker/index.esm.js";
import Ei from "../../designer/data-grid/index.esm.js";
import Ii from "../dropdown/index.esm.js";
import Oi from "../events-editor/index.esm.js";
import Pi, { FieldSelectorRepositoryToken as mn } from "../field-selector/index.esm.js";
import Bi from "../binding-selector/index.esm.js";
import Vi from "../image-cropper/index.esm.js";
import Di from "../../designer/input-group/index.esm.js";
import Ni from "../layout/index.esm.js";
import Ri from "../list-nav/index.esm.js";
import Li from "../list-view/index.esm.js";
import $i, { LookupSchemaRepositoryToken as Wi } from "../lookup/index.esm.js";
import Hi from "../mapping-editor/index.esm.js";
import ji from "../nav/index.esm.js";
import Ai from "../number-range/index.esm.js";
import qi from "../number-spinner/index.esm.js";
import Gi from "../page-header/index.esm.js";
import zi from "../page-footer/index.esm.js";
import Yi from "../progress/index.esm.js";
import Ui from "../../designer/radio-group/index.esm.js";
import Xi from "../rate/index.esm.js";
import Qi from "../response-toolbar/index.esm.js";
import Ki from "../response-layout/index.esm.js";
import Ji from "../response-layout-editor/index.esm.js";
import Zi from "../section/index.esm.js";
import ea from "../smoke-detector/index.esm.js";
import ta from "../splitter/index.esm.js";
import na from "../step/index.esm.js";
import oa from "../switch/index.esm.js";
import ra from "../text/index.esm.js";
import ia from "../time-picker/index.esm.js";
import aa from "../tree-view/index.esm.js";
import la from "../uploader/index.esm.js";
import sa from "../verify-detail/index.esm.js";
import ua from "../video/index.esm.js";
import ca from "../textarea/index.esm.js";
import da from "../schema-selector/index.esm.js";
import fa from "../tree-grid/index.esm.js";
import pa from "../event-parameter/index.esm.js";
import ma from "../filter-condition-editor/index.esm.js";
import ha from "../fieldset/index.esm.js";
import va from "../sort-condition-editor/index.esm.js";
import ga from "../menu-lookup/index.esm.js";
import ya from "../json-editor/index.esm.js";
import ba from "../property-editor/index.esm.js";
import wa from "../expression-editor/index.esm.js";
import Ca from "../code-editor/index.esm.js";
import xa from "../html-template/index.esm.js";
import "../external-container/index.esm.js";
import "../notify/index.esm.js";
import _a from "../popover/index.esm.js";
const no = {}, oo = {};
function Fn(t) {
const { properties: n, title: e, ignore: o } = t, r = o && Array.isArray(o), i = Object.keys(n).reduce((a, l) => ((!r || !o.find((s) => s === l)) && (a[l] = n[l].type === "object" && n[l].properties ? Fn(n[l]) : We(n[l].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 Sa(t) {
const { properties: n, title: e, required: o } = t;
if (o && Array.isArray(o)) {
const r = o.reduce((i, a) => (i[a] = n[a].type === "object" && n[a].properties ? Fn(n[a]) : We(n[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 ro(t, n = {}, e) {
const o = no[t];
if (o) {
let r = Sa(o);
const i = oo[t];
return r = i ? i({ getSchemaByType: ro }, r, n, e) : r, r;
}
return null;
}
function Fa(t, n) {
const e = Fn(n);
return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(t, r) && (o[r] && Dn(o[r]) && Dn(t[r] || !t[r]) ? Object.assign(o[r], t[r] || {}) : o[r] = t[r]), o), e), e;
}
function io(t, n) {
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
if (n.has(r)) {
const i = n.get(r);
if (typeof i == "string")
o[i] = t[r];
else {
const a = i(r, t[r], t);
Object.assign(o, a);
}
} else
o[r] = t[r];
return o;
}, {});
}
function Ta(t, n, e = /* @__PURE__ */ new Map()) {
const o = Fa(t, n);
return io(o, e);
}
function ka(t = {}) {
function n(f, d, u, p) {
if (typeof u == "number")
return p[f].length === u;
if (typeof u == "object") {
const m = Object.keys(u)[0], c = u[m];
if (m === "not")
return Number(p[f].length) !== Number(c);
if (m === "moreThan")
return Number(p[f].length) >= Number(c);
if (m === "lessThan")
return Number(p[f].length) <= Number(c);
}
return !1;
}
function e(f, d, u, p) {
return p[f] && p[f].propertyValue && String(p[f].propertyValue.value) === String(u);
}
const o = /* @__PURE__ */ new Map([
["length", n],
["getProperty", e]
]);
Object.keys(t).reduce((f, d) => (f.set(d, t[d]), f), o);
function r(f, d) {
const u = f;
return typeof d == "number" ? [{ target: u, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: u, operator: "getProperty", param: f, value: !!d }] : typeof d == "object" ? Object.keys(d).map((p) => {
if (p === "length")
return { target: u, operator: "length", param: null, value: d[p] };
const m = p, c = d[p];
return { target: u, operator: "getProperty", param: m, value: c };
}) : [];
}
function i(f) {
return Object.keys(f).reduce((u, p) => {
const m = r(p, f[p]);
return u.push(...m), u;
}, []);
}
function a(f, d) {
if (o.has(f.operator)) {
const u = o.get(f.operator);
return u && u(f.target, f.param, f.value, d) || !1;
}
return !1;
}
function l(f, d) {
return i(f).reduce((m, c) => m && a(c, d), !0);
}
function s(f, d) {
const u = Object.keys(f), p = u.includes("allOf"), m = u.includes("anyOf"), c = p || m, h = (c ? f[c ? p ? "allOf" : "anyOf" : "allOf"] : [f]).map((y) => l(y, d));
return p ? !h.includes(!1) : h.includes(!0);
}
return { parseValueSchema: s };
}
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: "筛选条" }
}, Ma = {}, Ea = {};
ka();
function _t(t, n, e = /* @__PURE__ */ new Map(), o = (a, l, s, f) => l, r = {}, i = (a) => a) {
return no[n.title] = n, oo[n.title] = o, Ma[n.title] = r, Ea[n.title] = i, (a = {}, l = !0) => {
if (!l)
return io(a, e);
const s = Ta(a, n, e), f = Object.keys(t).reduce((d, u) => (d[u] = t[u].default, d), {});
return Object.assign(f, s);
};
}
function Yt(t, n) {
return { customClass: n.class, customStyle: n.style };
}
function Ia() {
function t(n, e) {
const { dataSource: o } = n || {};
return o === void 0 ? {} : {};
}
return {
resolve: t
};
}
function Oa() {
function t(n, e) {
return n.selectItemById(e);
}
return {
selectItemById: t
};
}
function Pa() {
function t(n, e) {
const { columns: o } = e;
return n.updateColumns(o);
}
return {
updateColumns: t
};
}
const Ba = /* @__PURE__ */ new Map([
["appearance", Yt]
]);
function Va(t, n, e) {
return n;
}
const Da = "https://json-schema.org/draft/2020-12/schema", Na = "https://farris-design.gitee.io/filter-bar.schema.json", Ra = "filter-bar", La = "A Farris Component", $a = "object", Wa = {
id: {
description: "The unique identifier for filter-bar",
type: "string"
},
type: {
description: "The type string of filter-bar",
type: "string",
default: "filter-bar"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
defaultValues: {
description: "",
type: "array"
},
disable: {
type: "string",
default: !1
},
visible: {
description: "",
type: "boolean",
default: !0
}
}, Ha = [
"id",
"type"
], ja = {
$schema: Da,
$id: Na,
title: Ra,
description: La,
type: $a,
properties: Wa,
required: Ha
}, Tn = {
/** 被绑定数据 */
data: {
type: Array,
default: [{
id: "name",
fieldCode: "name",
fieldName: "名称",
compareType: "0",
valueType: 0,
value: "示例1",
relation: "1"
}]
},
/** 筛选分类 */
fields: { type: Array, default: [] },
/** 是否可选择 */
mode: { type: String, default: "editable" },
/** 是否可见 */
visible: { type: Boolean, default: !0 },
/** 是否禁用 */
disable: { type: Boolean, default: !1 },
/** 清空值文字 */
resetText: { type: String, default: "清空" },
/** 是否显示重置 */
showReset: { type: Boolean, default: !1 }
}, ao = _t(Tn, ja, Ba, Va);
function lo(t, n) {
const e = F([]), o = F([]), r = F([]), i = F("");
F(!1), F(t.mode);
const a = /* @__PURE__ */ new Map(), { createConditionValue: l } = hr(), s = yr(t, n), { getFilterConditions: f } = s;
function d(w) {
return !w.value.isEmpty() && !!w.value.getDisplayText();
}
function u(w) {
const _ = {
id: w.id,
fieldCode: w.labelCode,
fieldName: w.name,
required: w.editor.required,
editor: w.editor,
value: l(w.controlType || "text")
};
return w.controlType === "lookup" ? (_.value.valueField = w.editor.valueField, _.value.helpId = w.editor.helpId) : w.controlType === "date-picker" ? (_.value.displayFormat = w.editor.displayFormat || "yyyy-MM-dd", _.value.valueFormat = w.editor.valueFormat || "yyyy-MM-dd") : w.controlType === "datetime-picker" && (_.value.displayFormat = w.editor.displayFormat || "yyyy-MM-dd HH:mm:ss", _.value.valueFormat = w.editor.valueFormat || "yyyy-MM-dd HH:mm:ss"), _;
}
function p(w) {
o.value = t.fields.map((_) => {
const S = We(_);
return S.editor.type || (S.editor.type = _.controlType), S.editor.type === "number-spinner" || S.editor.type === "number-range" ? (S.editor.showZero = !0, S.editor.nullable = !0) : S.editor.type === "combo-list" ? S.editor.enableClear = !0 : S.editor.type === "datetime-picker" && (S.editor.type = "date-picker", S.editor.showTime = !0), S;
}), o.value.reduce((_, S) => _, a);
}
function m(w) {
r.value = o.value.map((_) => u(_));
}
function c(w, _) {
p(t.fields), m(t.data);
}
function C(w) {
r.value = r.value.filter((_) => _.id !== w.id), e.value = e.value.filter((_) => _.fieldCode !== w.fieldCode), o.value = o.value.filter((_) => _.id !== w.id), n.emit("remove", w.fieldCode);
}
function g(w) {
w.value.clear(), e.value = e.value.filter((_) => _.fieldCode !== w.fieldCode), n.emit("clear", w.fieldCode);
}
function h() {
r.value.forEach((w) => w.value.clear());
}
function x() {
r.value.forEach((w) => {
w.value.clear();
}), n.emit("reset");
}
c(t.fields, t.data);
function y() {
var S;
const w = (S = r.value) == null ? void 0 : S.filter((v) => {
var T;
return !((T = v.value) != null && T.isEmpty());
});
return f(w, o.value);
}
return {
clearAll: h,
clearFilterItem: g,
currentFilterId: i,
filterFields: o,
filterItems: r,
loadFilterItems: c,
removeFilterItem: C,
reset: x,
shouldShowClearButtonInFilterItem: d,
handleQuery: y
};
}
function Aa(t, n) {
function e() {
}
return () => M("div", {
class: "f-filter-list-ellipsis",
onClick: (o) => void 0
}, [Ze("...")]);
}
function qa(t, n, e, o, r) {
const {
filterFields: i,
handleQuery: a
} = r, l = F(We(o.value)), s = F("更多筛选");
function f() {
e.value = !1, l.value = We(o.value);
}
function d() {
e.value = !1, o.value.forEach((m) => {
const c = l.value.find((C) => C.id === m.id);
c != null && c.value && (m.value = c.value);
});
const p = a();
n.emit("conditionChange", p);
}
function u() {
return M("div", null, [M(vr, {
fields: i.value,
conditions: l.value
}, null), M("div", null, [M("button", {
class: "btn btn-secondary",
onClick: f
}, [Ze("取消")]), M("button", {
class: "btn btn-primary",
onClick: d
}, [Ze("确定")])])]);
}
return () => M(wr, {
modelValue: e.value,
"onUpdate:modelValue": (p) => e.value = p,
showClose: !1,
width: 480,
closeByMask: !1,
title: s.value
}, {
content: u
});
}
function so(t, n, e) {
const o = F([]), r = F("更多"), i = F(t.resetText), a = F(t.showReset), l = F(!1), {
clearAll: s,
reset: f,
filterItems: d,
filterFields: u
} = e;
function p() {
o.value = d.value.filter((x) => x.editor.isExtend);
}
p();
const m = N(() => o.value && o.value.length > 0), c = N(() => a.value);
function C(x) {
l.value = !0;
}
function g(x) {
t.mode === "display-only" ? s() : f();
}
const h = qa(t, n, l, o, e);
return () => M("div", {
class: "f-filter-toolbars"
}, [m.value && M("button", {
class: "btn btn-link",
onClick: (x) => C()
}, [r.value]), c.value && M("button", {
class: "btn btn-link",
onClick: (x) => g()
}, [i.value]), h()]);
}
const Ga = {
filterItem: { type: Object, default: null },
position: { type: Object, default: null }
}, za = /* @__PURE__ */ ze({
name: "FFilterBarItem",
props: Ga,
emits: ["cancel", "confirm"],
setup(t, n) {
const e = F(We(t.filterItem)), o = F(t.position), r = {
left: o.value.left,
top: o.value.top
};
function i(f, d, u) {
f.value.editorType === "combo-list" && u.newValue ? f.value.valueList = u.newValue.map((p) => ({
name: p[f.editor.textField || "name"],
value: p[f.editor.valueField || "value"]
})) : f.value.editorType === "radio-group" && (f.value.valueList = [f.editor.data.find((p) => p.value === d)]);
}
function a() {
var u, p, m;
const {
editor: f
} = e.value, d = e.value;
return ((u = d.value) == null ? void 0 : u.editorType) === "lookup" && f ? (f.idValue = (p = d.value.mapFields) == null ? void 0 : p.map((c) => c.id).join(","), f.onClear = () => {
d.value.mapFields = [], i(d, "");
}, f["onUpdate:dataMapping"] = (c) => {
d.value.mapFields = c.items, i(d, d.value.getValue());
}) : ((m = d.value) == null ? void 0 : m.editorType) === "number-range" && f && (f.beginValue = d.value.begin, f.onBeginValueChange = (c) => {
d.value.begin = c, i(d, c);
}, f.endValue = d.value.end, f.onEndValueChange = (c) => {
d.value.end = c, i(d, c);
}), M(Jn, {
label: "",
editor: f,
required: f == null ? void 0 : f.required,
modelValue: d.value.value,
"onUpdate:modelValue": (c) => d.value.value = c,
onChange: (c, C) => i(d, c, C)
}, null);
}
function l(f) {
n.emit("cancel");
}
function s(f) {
f.stopPropagation(), n.emit("confirm", e.value);
}
return () => M("div", {
class: "f-filter-panel-wrapper can-close",
onClick: l
}, [M("div", {
class: "f-filter-panel",
style: r
}, [M("div", {
class: "f-filter-panel-inner",
onClick: (f) => f.stopPropagation()
}, [M("div", {
class: "f-filter-panel-arrow",
style: {
left: o.value.arrowLeft,
right: o.value.arrowRight
}
}, null), a(), M("div", {
class: "f-filter-panel-footer ng-star-inserted"
}, [M("div", {
class: "filer-panel-clear"
}, [M("button", {
class: "btn btn-link",
disabled: ""
}, [Ze("清空筛选")])]), M("div", {
class: "filter-panel-btns"
}, [M("button", {
class: "btn btn-secondary can-close",
onClick: l
}, [Ze("取消")]), M("button", {
class: "filter-panel-submit btn btn-primary",
onClick: s
}, [Ze("确定")])])])])])]);
}
}), Ya = {
filterItem: { type: Object, default: null },
useFilterItemsComposition: { type: Object, default: null },
disabled: { type: Boolean, default: !1 }
}, uo = /* @__PURE__ */ ze({
name: "FFilterBarItem",
props: Ya,
emits: ["confirm"],
setup(t, n) {
const e = F(t.filterItem), {
clearFilterItem: o,
currentFilterId: r,
removeFilterItem: i,
shouldShowClearButtonInFilterItem: a
} = t.useFilterItemsComposition, l = F(t.disabled), s = F(), f = F(!1), d = function() {
return {
"f-filter-item": !0,
"f-filter-item-actived": !e.value.value.isEmpty(),
// 'f-filter-item-last': index === filterItems.value.length - 1,
"f-filter-item-edit": e.value.id === r.value
};
};
N(() => !l.value && t.mode === "editable");
function u(C) {
t.mode === "display-only" ? i(e.value) : o(e.value);
}
function p(C) {
var x;
const g = (x = C.currentTarget) == null ? void 0 : x.getBoundingClientRect(), h = 380;
g.left > document.body.clientWidth - h - 20 ? s.value = {
left: g.left + g.width - h + "px",
top: g.top + g.height + "px",
arrowLeft: "auto",
arrowRight: "26px"
} : s.value = {
left: g.left + "px",
top: g.top + g.height + "px",
arrowLeft: "26px",
arrowRight: "auto"
}, f.value = !0;
}
function m() {
f.value = !1;
}
function c(C) {
f.value = !1, e.value.value = C.value, n.emit("confirm", C);
}
return () => M("div", {
key: e.value.id,
id: e.value.id,
class: d()
}, [M("div", {
class: "f-filter-item-inner",
onClick: (C) => p(C)
}, [e.value.editor.required && M("span", {
class: "f-filter-item-required text-danger"
}, [Ze("*")]), M("span", {
class: "f-filter-item-text"
}, [e.value.fieldName]), e.value.value.getDisplayText() && M(Ot, null, [M("span", {
class: "f-filter-item-tip"
}, [Ze(":")]), M("span", {
class: "f-filter-item-content"
}, [e.value.value.getDisplayText()])]), !l.value && M("span", {
class: "f-filter-item-arrow f-icon f-icon-arrow-chevron-down"
}, null)]), a(e.value) && M("span", {
class: "mr-3 f-filter-item-clear",
onClick: (C) => u()
}, [M("span", {
class: "f-icon f-icon-close-circle"
}, null)]), f.value && M(za, {
position: s.value,
filterItem: e.value,
onConfirm: c,
onCancel: m
}, null)]);
}
});
function Ua(t, n, e) {
const o = F(null);
function r() {
var m, c;
let l = !1;
const s = (m = n.value) == null ? void 0 : m.children;
if (!n.value || !t.value || !s || s.length === 0)
return;
const f = (c = t.value.children[1]) == null ? void 0 : c.clientWidth, d = t.value.clientWidth;
let u = 0, p = 0;
Array.from(s).forEach((C) => {
C.style.display = "block";
});
for (let C = 0; C < s.length; C++) {
const g = s[C], h = g.offsetWidth;
u + h <= d - 30 - f ? (u += h, p++) : (g.style.display = "none", l = !0);
}
return e.value = l, p;
}
function i() {
var s;
if (!t.value || !n.value)
return;
(s = o.value) == null || s.unobserve(t.value);
const l = n.value.children;
Array.from(l).forEach((f) => {
f.style.display = "block";
});
}
function a() {
if (!n.value || !t.value)
return;
const l = new ResizeObserver((s) => {
r();
});
return l.observe(t.value), o.value = l, l;
}
return {
setupWidthObserver: a,
cancelWidthObserver: i
};
}
const Gt = /* @__PURE__ */ ze({
name: "FFilterBar",
props: Tn,
emits: ["clear", "remove", "reset", "conditionChange", "change"],
setup(t, n) {
const e = F(!0), o = F(!1), r = F(!1), i = F(!1), a = F(null), l = F(null), s = lo(t, n), f = Ua(l, a, i), {
cancelWidthObserver: d,
setupWidthObserver: u
} = f, {
filterFields: p,
filterItems: m,
loadFilterItems: c,
handleQuery: C
} = s, g = N(() => ({
display: p.value && p.value.length ? "" : "none"
}));
Fe([() => t.data, () => t.fields], ([k, E]) => {
c(E, k);
}), gt(() => {
u();
});
const h = N(() => o.value && e.value), x = N(() => ({
"f-filter-list": !0,
"f-filter-list-extend": h.value
// 'f-utils-overflow-hidden': true
})), y = N(() => ({
'"extend-btn-arrow': !0,
"f-icon": !0,
"f-icon-arrow-chevron-up": o.value,
"f-icon-arrow-chevron-down": !o.value
})), w = N(() => m.value.length > 0);
N(() => r.value && !o.value && i.value);
const _ = so(t, n, s);
function S(k) {
n.emit("change", k);
const E = C();
n.emit("conditionChange", E);
}
function v() {
return M("div", {
class: x.value,
ref: a
}, [m.value.map((k, E) => !k.editor.isExtend && M(uo, {
filterItem: k,
useFilterItemsComposition: s,
onConfirm: S
}, null)), o.value && _()]);
}
function T() {
o.value = !o.value, o.value ? d() : u();
}
return () => M("div", {
class: "f-filter-wrapper",
style: g.value
}, [M("div", {
class: "f-filter-wrapper-inner f-utils-fill"
}, [M("div", {
class: "f-filter-main f-utils-fill",
ref: l
}, [M("div", {
class: "f-filter-list-wrapper d-flex w-100"
}, [w.value && v()]), !o.value && _()]), i.value && M("div", {
class: "f-filter-extend-btn"
}, [M("button", {
class: "btn btn-link",
onClick: T
}, [M("span", {
class: "extend-btn-text"
}, [o.value ? "收折" : "展开"]), M("span", {
class: y.value
}, null)])])])]);
}
}), Xa = F(0);
function Qa() {
Xa.value++;
}
const jt = F(0);
function Ka(t, n) {
const e = n.getBoundingClientRect(), o = t.getBoundingClientRect(), r = o.top >= e.top, i = o.top <= e.bottom;
return r && i;
}
function Ja(t) {
const n = t.querySelector(".component-btn-group");
if (!n)
return;
n.style.display = "";
const e = n.getBoundingClientRect();
if (!(e.top === 0 && e.left === 0)) {
const o = n.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 l = a.getBoundingClientRect();
i < l.left && ({ left: i } = t.getBoundingClientRect());
}
o.style.left = i + "px";
}
}
}
function Za(t) {
if (!window.scrollContainerList)
return;
const n = Array.from(window.scrollContainerList);
if (n.length && n.length === 1) {
const e = n[0], o = document.querySelector(`[id=${e}]`);
if (o && o.contains(t))
return o;
}
}
function co(t) {
if (!t)
return;
const n = t.getBoundingClientRect();
if (n.width === 0 && n.height === 0)
return;
const e = t.querySelector(".component-btn-group");
if (e) {
let o = !0;
const r = Za(t);
if (r && (o = Ka(t, r)), !o) {
e.style.display = "none";
return;
}
Ja(t);
}
}
function el(t) {
if (!t)
return;
let n;
t.className.includes("dgComponentSelected") ? n = t : n = t.querySelector(".dgComponentSelected"), n && co(n);
}
function tl(t) {
const { formSchemaUtils: n, formStateMachineUtils: e } = t;
function o(s, f = "") {
return {
path: f + s.code,
field: s.id,
fullPath: s.code
};
}
function r(s, f = "") {
return n.getViewModelById(s).states.map((u) => o(u, f));
}
function i(s) {
const f = n.getRootViewModelId(), d = r(s);
if (s === f)
return d;
const u = r(f, "root-component.");
return [...d, ...u];
}
function a(s) {
return s.binding && s.binding.path || s.id || "";
}
function l() {
return e && e.getRenderStates() || [];
}
return { getVariables: i, getControlName: a, getStateMachines: l };
}
class fo {
constructor(n) {
B(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'"
}
]);
B(this, "expressionNames", {
compute: "计算表达式",
dependency: "依赖表达式",
validate: "验证表达式",
dataPicking: "帮助前表达式",
visible: "可见表达式",
readonly: "只读表达式",
required: "必填表达式"
});
B(this, "getExpressionConverter", (n, e) => ({
convertFrom: (o, r, i, a) => {
const l = i.getExpressionRuleValue(n, e || r);
return l && l.value || "";
},
convertTo: (o, r, i, a, l) => {
var s;
if (r === "dataPicking" && (i != null && i.target)) {
const f = `${i.target}_dataPicking`;
((s = i.rules) == null ? void 0 : s.some(
(u) => u.id === f && u.value
)) ? o.dictPickingExpressionId = f : delete o.dictPickingExpressionId;
}
a.updateExpression(i);
}
}));
this.formSchemaService = n;
}
getExpressionRule(n, e) {
const o = this.formSchemaService.getExpressions();
if (!o)
return "";
const r = o.find((a) => a.target === n);
if (!r)
return "";
const i = r.rules.find((a) => a.type === e);
return i || "";
}
// 获取上下文表单变量
getContextFormVariables() {
const { module: n } = this.formSchemaService.getFormSchema();
if (!n.viewmodels || n.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(n, e, o = "label") {
return {
id: n.id,
name: n.name,
bindingPath: n[o],
parents: e
};
}
buildEntityFieldsTreeData(n = null, e) {
const o = [];
return n == null || n.forEach((r) => {
var l;
const i = this.createTreeNode(r, e);
let a = [];
(l = r.type) != null && l.fields && (a = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), o.push({
data: i,
children: a,
expanded: !0
});
}), o;
}
buildChildEntityTreeData(n = null, e) {
const o = [];
return n == null || n.forEach((r) => {
var s, f;
const i = this.createTreeNode(r, e), a = this.buildEntityFieldsTreeData((s = r.type) == null ? void 0 : s.fields, [...e, r.label]), l = this.buildChildEntityTreeData((f = r.type) == null ? void 0 : f.entities, [...e, r.label]);
l != null && l.length && (a == null || a.push(...l)), o.push({
data: i,
children: a || [],
// 空值回退
expanded: !0
});
}), o;
}
getEntitiesTreeData() {
const n = this.formSchemaService.getSchemaEntities();
if (!(n != null && n.length))
return [];
const e = n[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(n, e, o) {
const r = o === "Field" ? n.binding.field : n.id, i = this.getExpressionRule(r, e), a = this.getEntitiesAndVariables(), l = {
message: ["validate", "required", "dataPicking"].includes(e) && i ? i.message : "",
...a
};
return i.messageType != null && (l.messageType = i.messageType), l;
}
buildRule(n, e, o, r) {
const { expression: i, message: a, messageType: l } = e, s = {
id: `${n}_${o}`,
type: o,
value: i
};
return (o === "validate" || o === "dataPicking" || o === "required") && (s.message = a), o === "dataPicking" && (s.messageType = l), o === "validate" && r && (s.elementId = r), s;
}
getExpressionData() {
const { expressions: n } = this.formSchemaService.getFormSchema().module;
return n || [];
}
updateExpression(n, e, o, r) {
const i = e === "Field" ? n.binding.field : n.id, a = this.buildRule(i, o, r, n.type === "form-group" ? n.id : "");
let s = this.getExpressionData().find((d) => d.targetType === e && d.target === i);
const f = (d) => d.value.trim() === "";
if (s) {
const d = s.rules.find((u) => u.id === a.id);
if (d)
f(a) ? s.rules = s.rules.filter((u) => u.id !== a.id) : (Object.assign(d, a), r === "validate" && n.type === "form-group" && (d.elementId = n.id));
else {
if (f(a))
return null;
s.rules = s.rules || [], s.rules.push(a);
}
} else {
if (f(a))
return null;
s = {
target: `${i}`,
rules: [a],
targetType: e
};
}
return s;
}
getExpressionEditorOptions(n, e, o, r) {
return o.reduce((i, a) => {
var s, f;
const l = e === "Field" ? (s = n == null ? void 0 : n.binding) == null ? void 0 : s.field : n.id;
return i[a] = {
hide: e === "Field" ? !!((f = n == null ? void 0 : n.binding) != null && f.field) : !1,
description: "",
title: this.expressionNames[a],
type: "string",
$converter: this.getExpressionConverter(l),
editor: {
type: "expression-editor",
singleExpand: !1,
dialogTitle: `${this.expressionNames[a]}编辑器`,
showMessage: a === "validate" || a === "dataPicking" || a === "required",
showMessageType: a === "dataPicking",
beforeOpen: () => this.onBeforeOpenExpression(n, a, e),
onSubmitModal: (d) => {
const u = this.updateExpression(n, e, d, a);
if (r) {
const p = this.buildRule(l, d, a);
r(p);
}
return u;
}
}
}, i;
}, {});
}
getExpressionInfo(n, e, o) {
const r = e === "Field" ? n.binding.field : n.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(n, e, o = ["compute", "dependency", "validate"], r) {
return {
description: "表达式",
title: "表达式",
properties: {
...this.getExpressionEditorOptions(n, e, o, r)
}
};
}
getExpressionOptions(n, e, o) {
const r = this.getExpressionInfo(n, e, o);
return {
dialogTitle: `${this.expressionNames[o]}编辑器`,
singleExpand: !1,
showMessage: o === "required",
beforeOpen: () => this.onBeforeOpenExpression(n, o, e),
expressionInfo: r
};
}
}
class po {
constructor(n, e) {
B(this, "componentId");
B(this, "viewModelId");
B(this, "eventsEditorUtils");
B(this, "formSchemaUtils");
B(this, "formMetadataConverter");
B(this, "designViewModelUtils");
B(this, "designViewModelField");
B(this, "controlCreatorUtils");
B(this, "designerHostService");
B(this, "schemaService", null);
B(this, "metadataService", null);
B(this, "propertyConfig", {
type: "object",
categories: {}
});
var o;
this.componentId = n, 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(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
}
getTableInfo() {
var n;
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(n) {
var o;
const e = n.binding && n.binding.type === "Form" && n.binding.field;
if (e) {
if (!this.designViewModelField) {
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = r.fields.find((i) => i.id === e);
}
n.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
}
}
getBasicPropConfig(n) {
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: n.type, name: de[n.type].name }]
}
}
}
};
}
getAppearanceConfig(n = 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, l) {
if (a) {
switch (a && a.propertyID) {
case "class":
case "style": {
jt.value++;
break;
}
}
o && o(a, n, l);
}
}
};
}
getPropertyEditorParams(n, e = [], o = "visible", r = {}, i = {}) {
const { getVariables: a, getControlName: l, getStateMachines: s } = tl(this.designerHostService), f = this.getRealTargetType(n), d = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], u = {
type: "property-editor",
propertyTypes: d
};
return d.map((p) => {
switch (p) {
case "Const":
Object.assign(u, {
constType: "enum",
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
}, r);
break;
case "Expression":
u.expressionConfig = this.getExpressionOptions(n, f, o);
break;
case "StateMachine":
u.stateMachines = s();
break;
case "Variable":
Object.assign(u, {
controlName: l(n),
newVariablePrefix: "is",
newVariableType: "Boolean",
variables: a(this.viewModelId),
onBeforeOpenVariables: (m) => {
m.value = a(this.viewModelId);
}
}, i);
break;
}
}), u;
}
getVisibleProperty(n, e = "") {
return {
visible: {
title: "是否可见",
type: "boolean",
description: "运行时组件是否可见",
editor: this.getPropertyEditorParams(n, e === "gridFieldEditor" ? ["Const", "Expression"] : ["Const", "Variable", "StateMachine", "Expression"], "visible")
}
};
}
/**
* 获取行为
* @param propertyData
* @param viewModelId
* @returns
*/
getBehaviorConfig(n, e = "", o = {}, r) {
const i = {
title: "行为",
description: ""
}, a = this.getVisibleProperty(n, e);
for (const s in o)
a[s] = Object.assign(a[s] || {}, o[s]);
const l = this;
return {
...i,
properties: { ...a },
setPropertyRelates(s, f) {
if (s) {
switch (s.propertyID) {
case "disabled":
case "readonly":
case "visible":
l.afterMutilEditorChanged(n, s);
break;
}
r && r(s, f);
}
}
};
}
/**
* 当多值编辑器变更时
* @param propertyData
* @param changeObject
*/
afterMutilEditorChanged(n, e) {
this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, n);
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(n, e) {
const o = e && e.parent && e.parent.schema;
if (!o)
return;
const r = o.contents.findIndex((a) => a.id === n), i = We(o.contents[r]);
o.contents.splice(r, 1), o.contents.splice(r, 0, i), Qa();
}
/**
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
* @param changeObject
* @param viewModelId
* @returns
*/
addNewVariableToViewModel(n, e) {
const o = n.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(n) {
const e = n.propertyValue;
if (!((e && e.type) === "Expression" && e.expressionInfo))
return;
const { expressionId: i, expressionInfo: a } = e, { targetId: l, targetType: s, expressionType: f, value: d, message: u } = a, p = this.formSchemaUtils.getModule();
p.expressions ?? (p.expressions = []);
const { expressions: m } = p;
let c = m.find((g) => g.target === l);
c || (c = { target: l, rules: [], targetType: s }, m.push(c));
const C = c.rules.find((g) => g.type === f);
if (C)
C.value = d, C.message = u;
else {
const g = { id: i, type: f, value: d, message: u };
c.rules.push(g);
}
delete e.expressionInfo;
}
/**
* 属性类型切换为非表达式后,清除原表达式
* @param changeObject
* @param propertyData
* @returns
*/
clearExpression(n, e) {
const o = n.propertyValue;
if (o && o.type === "Expression")
return;
const i = n.propertyID, a = this.formSchemaUtils.getExpressions(), l = e.binding ? e.binding.field : e.id, s = a.find((f) => f.target === l);
!s || !s.rules || (s.rules = s.rules.filter((f) => f.type !== i));
}
getExpressionOptions(n, e, o) {
return new fo(this.formSchemaUtils).getExpressionOptions(n, e, o);
}
getRealTargetType(n) {
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
}
}
const qt = class qt {
/**
* 根据绑定字段类型获取可用的输入类控件
*/
static getEditorTypesByMDataType(n, e = "") {
let o = qt.fieldControlTypeMapping[n];
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 n = [];
for (const e in qt.fieldControlTypeMapping)
qt.fieldControlTypeMapping[e].forEach((o) => {
n.find((r) => r.key === o.key && r.value === o.value) || n.push({ key: o.key, value: o.value });
});
return n;
}
/**
* 提供schema字段基础属性和DOM控件属性的映射
* @param control 控件元数据
*/
static mappingDomPropAndSchemaProp(n, e) {
var i;
const o = (i = n.editor) == null ? void 0 : i.type, r = [];
return (n.type === de["data-grid-column"].type || n.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" }), (n.type === de["data-grid-column"].type || n.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" }), (n.type === de["data-grid-column"].type || n.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" }), (n.type === de["data-grid-column"].type || n.type === de["tree-grid-column"].type) && r.push({ domField: "field", schemaField: "bindingPath" }), r;
}
};
/**
* <字段类型,可配置的控件类型列表>的映射
*/
B(qt, "fieldControlTypeMapping", {
String: [
{ key: de["input-group"].type, value: de["input-group"].name },
{ key: de.lookup.type, value: de.lookup.name },
{ key: de["date-picker"].type, value: de["date-picker"].name },
{ key: de["check-group"].type, value: de["check-group"].name },
{ key: de["radio-group"].type, value: de["radio-group"].name },
{ key: de["combo-list"].type, value: de["combo-list"].name },
{ key: de.textarea.type, value: de.textarea.name },
{ key: de["time-picker"].type, value: de["time-picker"].name }
],
Text: [
{ key: de.textarea.type, value: de.textarea.name },
{ key: de.lookup.type, value: de.lookup.name }
],
Decimal: [
{ key: de["number-spinner"].type, value: de["number-spinner"].name }
],
Integer: [
{ key: de["number-spinner"].type, value: de["number-spinner"].name }
],
Number: [
{ key: de["number-spinner"].type, value: de["number-spinner"].name }
],
BigNumber: [
{ key: de["number-spinner"].type, value: de["number-spinner"].name }
],
Date: [
{ key: de["date-picker"].type, value: de["date-picker"].name }
],
DateTime: [
{ key: de["date-picker"].type, value: de["date-picker"].name }
],
Bo