@farris/ui-vue 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { FTreeView as
|
|
3
|
-
import { cloneDeep as
|
|
4
|
-
const
|
|
1
|
+
import { ref as s, defineComponent as N, inject as T, createVNode as F } from "vue";
|
|
2
|
+
import { FTreeView as B } from "../tree-view/index.esm.js";
|
|
3
|
+
import { cloneDeep as P } from "lodash-es";
|
|
4
|
+
const D = {
|
|
5
5
|
/** 树表数据 */
|
|
6
6
|
data: { type: Object, default: [] },
|
|
7
7
|
/** 树表是否支持可选状态 */
|
|
@@ -20,200 +20,242 @@ const x = {
|
|
|
20
20
|
lineColor: { type: String, default: "#9399a0" },
|
|
21
21
|
/** 单元格高度 */
|
|
22
22
|
cellHeight: { type: Number, default: 28 }
|
|
23
|
+
}, k = {
|
|
24
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
25
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
26
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
27
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
28
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
29
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
30
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
31
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
32
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
33
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
34
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
35
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
36
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
37
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
38
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
39
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
40
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
41
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
42
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
43
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
44
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
45
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
46
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
47
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
48
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
49
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
50
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
51
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
52
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
53
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
54
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
55
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
56
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
57
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
58
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
59
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
60
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
23
61
|
};
|
|
24
|
-
var
|
|
25
|
-
function E() {
|
|
26
|
-
|
|
27
|
-
|
|
62
|
+
var p = /* @__PURE__ */ ((a) => (a.Frame = "frame", a.dataGrid = "data-grid", a.listView = "list-view", a.form = "form", a.attachmentPanel = "attachment-panel", a.modalFrame = "modal-frame", a.table = "table", a.appointmentCalendar = "appointment-calendar", a))(p || {});
|
|
63
|
+
function E(a) {
|
|
64
|
+
const h = s("");
|
|
65
|
+
function u(e) {
|
|
66
|
+
let i = "controlIcon mr-2 fd-i-Family ", r = "";
|
|
28
67
|
switch (e == null ? void 0 : e.type) {
|
|
29
68
|
case "form-group": {
|
|
30
|
-
|
|
69
|
+
r = e.editor && e.editor.type ? `fd_pc-${e.editor.type}` : "";
|
|
31
70
|
break;
|
|
32
71
|
}
|
|
33
72
|
default:
|
|
34
|
-
|
|
73
|
+
i += `fd_pc-${e.type}`;
|
|
35
74
|
}
|
|
36
|
-
return
|
|
75
|
+
return i += r, i;
|
|
37
76
|
}
|
|
38
|
-
function
|
|
39
|
-
var
|
|
40
|
-
let
|
|
41
|
-
const
|
|
42
|
-
if ((
|
|
43
|
-
const
|
|
44
|
-
e.id === ((
|
|
77
|
+
function b(e, i) {
|
|
78
|
+
var n;
|
|
79
|
+
let r = e.id;
|
|
80
|
+
const t = i == null ? void 0 : i.contents;
|
|
81
|
+
if ((i == null ? void 0 : i.type) === "splitter" && t && t.length === 2) {
|
|
82
|
+
const c = i.direction !== "column";
|
|
83
|
+
e.id === ((n = t[0]) == null ? void 0 : n.id) ? r = c ? "左侧区域" : "上方区域" : r = c ? "右侧区域" : "下方区域";
|
|
45
84
|
}
|
|
46
|
-
return
|
|
85
|
+
return r;
|
|
47
86
|
}
|
|
48
|
-
function
|
|
87
|
+
function m(e) {
|
|
49
88
|
if (e.isLikeCardContainer)
|
|
50
89
|
return "区块";
|
|
51
|
-
const
|
|
52
|
-
return e.id === "page-header" &&
|
|
90
|
+
const i = e.appearance && e.appearance.class || "", r = i.split(" ");
|
|
91
|
+
return e.id === "page-header" && i && i === "f-page-header" ? "页头" : r.includes("f-page-header-base") ? "页头容器" : r.includes("f-page-header-extend") ? "页头扩展容器" : r.includes("f-title") ? "标题容器" : r.includes("f-page") ? "根容器" : r.includes("f-page-main") ? "内容区域" : r.includes("f-scrollspy-content") && e.isScrollspyContainer ? "滚动监听容器" : r.includes("f-grid-is-sub") ? "表格容器" : r.includes("f-filter-container") ? "筛选条容器" : "容器";
|
|
53
92
|
}
|
|
54
|
-
function
|
|
55
|
-
const { componentType:
|
|
56
|
-
switch (
|
|
57
|
-
case
|
|
93
|
+
function w(e) {
|
|
94
|
+
const { componentType: i } = e;
|
|
95
|
+
switch (i) {
|
|
96
|
+
case p.Frame:
|
|
58
97
|
return "根组件";
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
return "表格组件";
|
|
62
|
-
case
|
|
98
|
+
case p.dataGrid:
|
|
99
|
+
case p.table:
|
|
100
|
+
return (a == null ? void 0 : a.formSchemaUtils.selectNode(e, (t) => t.type === (k["tree-grid"] && k["tree-grid"].type))) ? "树表格组件" : "表格组件";
|
|
101
|
+
case p.attachmentPanel:
|
|
63
102
|
return "附件组件";
|
|
64
|
-
case
|
|
65
|
-
case "ListView":
|
|
103
|
+
case p.listView:
|
|
66
104
|
return "列表视图组件";
|
|
67
|
-
case
|
|
105
|
+
case p.modalFrame:
|
|
68
106
|
return "弹窗页面";
|
|
69
|
-
case
|
|
107
|
+
case p.appointmentCalendar:
|
|
70
108
|
return "预约日历组件";
|
|
71
109
|
default:
|
|
72
|
-
if (
|
|
110
|
+
if (i.startsWith("form"))
|
|
73
111
|
return "卡片组件";
|
|
74
112
|
}
|
|
75
113
|
return "组件";
|
|
76
114
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
115
|
+
function g(e, i) {
|
|
116
|
+
const r = e.name || e.text || e.label || e.title || e.mainTitle;
|
|
117
|
+
if (r && typeof r == "string")
|
|
118
|
+
return r.trim();
|
|
81
119
|
switch (e.type) {
|
|
82
120
|
case "content-container":
|
|
83
|
-
return
|
|
121
|
+
return m(e);
|
|
84
122
|
case "splitter-pane":
|
|
85
|
-
return
|
|
123
|
+
return b(e, i);
|
|
86
124
|
case "component":
|
|
87
|
-
return
|
|
88
|
-
case "response-form":
|
|
89
|
-
return "卡片面板";
|
|
125
|
+
return w(e);
|
|
90
126
|
default:
|
|
91
|
-
return e.id;
|
|
127
|
+
return k[e.type] && k[e.type].name || e.id;
|
|
92
128
|
}
|
|
93
129
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
130
|
+
function v(e) {
|
|
131
|
+
const i = e.length ? e[0] : null;
|
|
132
|
+
h.value = i.originalId;
|
|
133
|
+
const r = i ? `${i.originalId}-design-item` : "", t = document.getElementById(r);
|
|
134
|
+
t && t && t.click();
|
|
100
135
|
}
|
|
101
|
-
return { getIcon:
|
|
136
|
+
return { getIcon: u, getTitle: g, onChanged: v, currentSelectedNodeId: h };
|
|
102
137
|
}
|
|
103
|
-
function
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
var
|
|
107
|
-
const
|
|
108
|
-
|
|
138
|
+
function G(a, h) {
|
|
139
|
+
const u = a.data.module ? s(a.data.module.components[0]) : s(a.data), { getIcon: b, getTitle: m } = h;
|
|
140
|
+
function w(t, n, c, l) {
|
|
141
|
+
var d;
|
|
142
|
+
const o = (d = a.data.module) == null ? void 0 : d.components.find((f) => f.id === t.component);
|
|
143
|
+
o && g([o], n, c, l);
|
|
109
144
|
}
|
|
110
|
-
function
|
|
111
|
-
return t.forEach((
|
|
112
|
-
if (
|
|
113
|
-
|
|
145
|
+
function g(t, n, c, l) {
|
|
146
|
+
return t.forEach((o) => {
|
|
147
|
+
if (o.type === "component-ref") {
|
|
148
|
+
w(o, n, c, l);
|
|
114
149
|
return;
|
|
115
150
|
}
|
|
116
|
-
const
|
|
117
|
-
originalId:
|
|
118
|
-
layer:
|
|
119
|
-
originalParent:
|
|
120
|
-
name:
|
|
121
|
-
type:
|
|
122
|
-
controlIcon: b(
|
|
123
|
-
rawSchema:
|
|
151
|
+
const d = {
|
|
152
|
+
originalId: o.id,
|
|
153
|
+
layer: c,
|
|
154
|
+
originalParent: l == null ? void 0 : l.id,
|
|
155
|
+
name: m(o, l),
|
|
156
|
+
type: o.type,
|
|
157
|
+
controlIcon: b(o),
|
|
158
|
+
rawSchema: o
|
|
124
159
|
};
|
|
125
|
-
|
|
126
|
-
}),
|
|
160
|
+
n.push(P(d)), (o.contents || o.buttons) && g(o.contents || o.buttons, n, c + 1, o);
|
|
161
|
+
}), n;
|
|
127
162
|
}
|
|
128
|
-
function
|
|
129
|
-
const
|
|
130
|
-
t = t.filter((f) => f.layer !== 0),
|
|
131
|
-
let
|
|
132
|
-
for (; t.length !== 0 ||
|
|
133
|
-
const f = t.find((y) => y.originalParent ===
|
|
134
|
-
f ? (
|
|
163
|
+
function v(t) {
|
|
164
|
+
const n = [], c = t.find((f) => f.layer === 0);
|
|
165
|
+
t = t.filter((f) => f.layer !== 0), n.push(c);
|
|
166
|
+
let l = c.originalId, o = 0, d = 1e3;
|
|
167
|
+
for (; t.length !== 0 || d === 0; ) {
|
|
168
|
+
const f = t.find((y) => y.originalParent === l);
|
|
169
|
+
f ? (n.push(f), l = f.originalId, t = t.filter((y) => y.originalId !== l), o = 0) : (o -= 1, l = n.slice(o)[0].originalId), d -= 1;
|
|
135
170
|
}
|
|
136
|
-
return
|
|
171
|
+
return n;
|
|
137
172
|
}
|
|
138
|
-
function
|
|
139
|
-
return t.forEach((
|
|
140
|
-
|
|
141
|
-
}), t.forEach((
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
}), t.forEach((
|
|
145
|
-
|
|
173
|
+
function e(t) {
|
|
174
|
+
return t.forEach((n, c) => {
|
|
175
|
+
n.id = (c + 1).toString();
|
|
176
|
+
}), t.forEach((n) => {
|
|
177
|
+
var c;
|
|
178
|
+
n.parent = ((c = t.find((l) => l.originalId === n.originalParent)) == null ? void 0 : c.id) || "";
|
|
179
|
+
}), t.forEach((n) => {
|
|
180
|
+
n.hasChildren = t.findIndex((c) => c.parent === n.id) > 0;
|
|
146
181
|
}), t;
|
|
147
182
|
}
|
|
148
|
-
function
|
|
149
|
-
const
|
|
183
|
+
function i(t) {
|
|
184
|
+
const n = {
|
|
150
185
|
originalId: "page",
|
|
151
186
|
layer: 0,
|
|
152
187
|
originalParent: null,
|
|
153
188
|
name: "页面",
|
|
154
189
|
type: "Frame",
|
|
155
190
|
controlIcon: "fd-i-Family fd_pc-module",
|
|
156
|
-
rawSchema:
|
|
191
|
+
rawSchema: u
|
|
157
192
|
};
|
|
158
|
-
return t[0].originalParent =
|
|
193
|
+
return t[0].originalParent = n.originalId, t.unshift(n), n;
|
|
159
194
|
}
|
|
160
|
-
function
|
|
195
|
+
function r() {
|
|
161
196
|
let t;
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
o
|
|
167
|
-
const
|
|
168
|
-
t =
|
|
197
|
+
if (u.value) {
|
|
198
|
+
const n = [];
|
|
199
|
+
n.push(u.value);
|
|
200
|
+
const o = g(n, [], 1, null);
|
|
201
|
+
i(o);
|
|
202
|
+
const d = v(o);
|
|
203
|
+
t = e(d);
|
|
169
204
|
}
|
|
170
205
|
return t;
|
|
171
206
|
}
|
|
172
|
-
return { getData:
|
|
207
|
+
return { getData: r };
|
|
173
208
|
}
|
|
174
|
-
const
|
|
209
|
+
const M = /* @__PURE__ */ N({
|
|
175
210
|
name: "FDesignerOutline",
|
|
176
|
-
props:
|
|
211
|
+
props: D,
|
|
177
212
|
emits: ["outputValue", "currentEvent", "selectionChanged"],
|
|
178
|
-
setup(
|
|
179
|
-
const
|
|
180
|
-
onChanged:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
213
|
+
setup(a, h) {
|
|
214
|
+
const u = s(), b = s(a.selectable), m = s(a.autoCheckChildren), w = s(a.cascade), g = s(a.showTreeNodeIcons), v = s(a.showLines), e = s(a.newDataItem), i = s(a.lineColor), r = s(a.cellHeight), t = T("designer-host-service"), n = E(t), {
|
|
215
|
+
onChanged: c,
|
|
216
|
+
currentSelectedNodeId: l
|
|
217
|
+
} = n, {
|
|
218
|
+
getData: o
|
|
219
|
+
} = G(a, n);
|
|
220
|
+
let d = o();
|
|
221
|
+
function f() {
|
|
222
|
+
d = o(), u.value && u.value.updateDataSource && (u.value.updateDataSource(d), l && u.value.clearSelection && (u.value.clearSelection(), y({
|
|
223
|
+
id: l.value
|
|
224
|
+
})));
|
|
187
225
|
}
|
|
188
|
-
function
|
|
189
|
-
if (
|
|
190
|
-
const
|
|
191
|
-
|
|
226
|
+
function y(S) {
|
|
227
|
+
if (!S && u.value && u.value.clearSelection && u.value.clearSelection(), S && u.value && u.value.selectItem) {
|
|
228
|
+
const C = d.findIndex((x) => x.originalId === S.id);
|
|
229
|
+
if (C > -1) {
|
|
230
|
+
u.value.selectItem(C);
|
|
231
|
+
const x = d[C];
|
|
232
|
+
l && (l.value = x.originalId);
|
|
233
|
+
} else l && (l.value = "");
|
|
192
234
|
}
|
|
193
235
|
}
|
|
194
|
-
return
|
|
195
|
-
selectControlTreeNode:
|
|
196
|
-
refreshControlTree:
|
|
236
|
+
return h.expose({
|
|
237
|
+
selectControlTreeNode: y,
|
|
238
|
+
refreshControlTree: f
|
|
197
239
|
}), () => F("div", {
|
|
198
240
|
class: "designer-control-tree"
|
|
199
|
-
}, [F(
|
|
200
|
-
ref:
|
|
201
|
-
data:
|
|
241
|
+
}, [F(B, {
|
|
242
|
+
ref: u,
|
|
243
|
+
data: d,
|
|
202
244
|
selectable: b.value,
|
|
203
|
-
autoCheckChildren:
|
|
204
|
-
cascade:
|
|
205
|
-
showTreeNodeIcons:
|
|
206
|
-
showLines:
|
|
207
|
-
newDataItem:
|
|
208
|
-
lineColor:
|
|
209
|
-
cellHeight:
|
|
245
|
+
autoCheckChildren: m.value,
|
|
246
|
+
cascade: w.value,
|
|
247
|
+
showTreeNodeIcons: g.value,
|
|
248
|
+
showLines: v.value,
|
|
249
|
+
newDataItem: e.value,
|
|
250
|
+
lineColor: i.value,
|
|
251
|
+
cellHeight: r.value,
|
|
210
252
|
iconField: "controlIcon",
|
|
211
|
-
onSelectionChange:
|
|
253
|
+
onSelectionChange: c
|
|
212
254
|
}, null)]);
|
|
213
255
|
}
|
|
214
256
|
});
|
|
215
257
|
export {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
258
|
+
p as ComponentType,
|
|
259
|
+
M as FDesignerOutline,
|
|
260
|
+
D as designerOutlineProps
|
|
219
261
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,
|
|
1
|
+
(function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("../tree-view/index.umd.js"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","../tree-view/index.umd.js","lodash-es"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f["designer-outline"]={},f.Vue,f.treeView,f.LodashES))})(this,function(f,d,v,P){"use strict";const N={data:{type:Object,default:[]},selectable:{type:Boolean,default:!1},autoCheckChildren:{type:Boolean,default:!0},cascade:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},newDataItem:{type:Object,default:{}},lineColor:{type:String,default:"#9399a0"},cellHeight:{type:Number,default:28}},C={button:{type:"button",name:"按钮",icon:"Button"},"response-toolbar":{type:"response-toolbar",name:"工具栏",icon:"ButtonGroup"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮",icon:"Button"},"content-container":{type:"content-container",name:"容器",icon:"ContentContainer"},"input-group":{type:"input-group",name:"文本",icon:"TextBox"},textarea:{type:"textarea",name:"多行文本",icon:"MultiTextBox"},lookup:{type:"lookup",name:"帮助",icon:"LookupEdit"},"number-spinner":{type:"number-spinner",name:"数值",icon:"NumericBox"},"date-picker":{type:"date-picker",name:"日期",icon:"DateBox"},switch:{type:"switch",name:"开关",icon:"SwitchField"},"radio-group":{type:"radio-group",name:"单选组",icon:"RadioGroup"},"check-box":{type:"check-box",name:"复选框",icon:"CheckBox"},"check-group":{type:"check-group",name:"复选框组",icon:"CheckGroup"},"combo-list":{type:"combo-list",name:"下拉列表",icon:"EnumField"},"response-form":{type:"response-form",name:"卡片面板",icon:"Form"},"response-layout":{type:"response-layout",name:"布局容器",icon:"ResponseLayout3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"ResponseLayout1"},"tree-grid":{type:"tree-grid",name:"树表格",icon:"TreeGrid"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格",icon:"DataGrid"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块",icon:"Module"},component:{type:"component",name:"组件",icon:"Component"},tabs:{type:"tabs",name:"标签页",icon:"Tab"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮",icon:"Button"},"time-picker":{type:"time-picker",name:"时间选择",icon:"TimePicker"},section:{type:"section",name:"分组面板",icon:"Section"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板",icon:"Splitter"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传",icon:"FileUpload"},"page-header":{type:"page-header",name:"页头",icon:"Header"},"page-footer":{type:"page-footer",name:"页脚",icon:"ModalFooter"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏",icon:"TabToolbar"}};var g=(i=>(i.Frame="frame",i.dataGrid="data-grid",i.listView="list-view",i.form="form",i.attachmentPanel="attachment-panel",i.modalFrame="modal-frame",i.table="table",i.appointmentCalendar="appointment-calendar",i))(g||{});function B(i){const y=d.ref("");function u(e){let r="controlIcon mr-2 fd-i-Family ",a="";switch(e==null?void 0:e.type){case"form-group":{a=e.editor&&e.editor.type?`fd_pc-${e.editor.type}`:"";break}default:r+=`fd_pc-${e.type}`}return r+=a,r}function m(e,r){var n;let a=e.id;const t=r==null?void 0:r.contents;if((r==null?void 0:r.type)==="splitter"&&t&&t.length===2){const c=r.direction!=="column";e.id===((n=t[0])==null?void 0:n.id)?a=c?"左侧区域":"上方区域":a=c?"右侧区域":"下方区域"}return a}function w(e){if(e.isLikeCardContainer)return"区块";const r=e.appearance&&e.appearance.class||"",a=r.split(" ");return e.id==="page-header"&&r&&r==="f-page-header"?"页头":a.includes("f-page-header-base")?"页头容器":a.includes("f-page-header-extend")?"页头扩展容器":a.includes("f-title")?"标题容器":a.includes("f-page")?"根容器":a.includes("f-page-main")?"内容区域":a.includes("f-scrollspy-content")&&e.isScrollspyContainer?"滚动监听容器":a.includes("f-grid-is-sub")?"表格容器":a.includes("f-filter-container")?"筛选条容器":"容器"}function S(e){const{componentType:r}=e;switch(r){case g.Frame:return"根组件";case g.dataGrid:case g.table:return(i==null?void 0:i.formSchemaUtils.selectNode(e,t=>t.type===(C["tree-grid"]&&C["tree-grid"].type)))?"树表格组件":"表格组件";case g.attachmentPanel:return"附件组件";case g.listView:return"列表视图组件";case g.modalFrame:return"弹窗页面";case g.appointmentCalendar:return"预约日历组件";default:if(r.startsWith("form"))return"卡片组件"}return"组件"}function h(e,r){const a=e.name||e.text||e.label||e.title||e.mainTitle;if(a&&typeof a=="string")return a.trim();switch(e.type){case"content-container":return w(e);case"splitter-pane":return m(e,r);case"component":return S(e);default:return C[e.type]&&C[e.type].name||e.id}}function k(e){const r=e.length?e[0]:null;y.value=r.originalId;const a=r?`${r.originalId}-design-item`:"",t=document.getElementById(a);t&&t&&t.click()}return{getIcon:u,getTitle:h,onChanged:k,currentSelectedNodeId:y}}function E(i,y){const u=i.data.module?d.ref(i.data.module.components[0]):d.ref(i.data),{getIcon:m,getTitle:w}=y;function S(t,n,c,l){var s;const o=(s=i.data.module)==null?void 0:s.components.find(p=>p.id===t.component);o&&h([o],n,c,l)}function h(t,n,c,l){return t.forEach(o=>{if(o.type==="component-ref"){S(o,n,c,l);return}const s={originalId:o.id,layer:c,originalParent:l==null?void 0:l.id,name:w(o,l),type:o.type,controlIcon:m(o),rawSchema:o};n.push(P.cloneDeep(s)),(o.contents||o.buttons)&&h(o.contents||o.buttons,n,c+1,o)}),n}function k(t){const n=[],c=t.find(p=>p.layer===0);t=t.filter(p=>p.layer!==0),n.push(c);let l=c.originalId,o=0,s=1e3;for(;t.length!==0||s===0;){const p=t.find(b=>b.originalParent===l);p?(n.push(p),l=p.originalId,t=t.filter(b=>b.originalId!==l),o=0):(o-=1,l=n.slice(o)[0].originalId),s-=1}return n}function e(t){return t.forEach((n,c)=>{n.id=(c+1).toString()}),t.forEach(n=>{var c;n.parent=((c=t.find(l=>l.originalId===n.originalParent))==null?void 0:c.id)||""}),t.forEach(n=>{n.hasChildren=t.findIndex(c=>c.parent===n.id)>0}),t}function r(t){const n={originalId:"page",layer:0,originalParent:null,name:"页面",type:"Frame",controlIcon:"fd-i-Family fd_pc-module",rawSchema:u};return t[0].originalParent=n.originalId,t.unshift(n),n}function a(){let t;if(u.value){const n=[];n.push(u.value);const o=h(n,[],1,null);r(o);const s=k(o);t=e(s)}return t}return{getData:a}}const L=d.defineComponent({name:"FDesignerOutline",props:N,emits:["outputValue","currentEvent","selectionChanged"],setup(i,y){const u=d.ref(),m=d.ref(i.selectable),w=d.ref(i.autoCheckChildren),S=d.ref(i.cascade),h=d.ref(i.showTreeNodeIcons),k=d.ref(i.showLines),e=d.ref(i.newDataItem),r=d.ref(i.lineColor),a=d.ref(i.cellHeight),t=d.inject("designer-host-service"),n=B(t),{onChanged:c,currentSelectedNodeId:l}=n,{getData:o}=E(i,n);let s=o();function p(){s=o(),u.value&&u.value.updateDataSource&&(u.value.updateDataSource(s),l&&u.value.clearSelection&&(u.value.clearSelection(),b({id:l.value})))}function b(x){if(!x&&u.value&&u.value.clearSelection&&u.value.clearSelection(),x&&u.value&&u.value.selectItem){const T=s.findIndex(F=>F.originalId===x.id);if(T>-1){u.value.selectItem(T);const F=s[T];l&&(l.value=F.originalId)}else l&&(l.value="")}}return y.expose({selectControlTreeNode:b,refreshControlTree:p}),()=>d.createVNode("div",{class:"designer-control-tree"},[d.createVNode(v.FTreeView,{ref:u,data:s,selectable:m.value,autoCheckChildren:w.value,cascade:S.value,showTreeNodeIcons:h.value,showLines:k.value,newDataItem:e.value,lineColor:r.value,cellHeight:a.value,iconField:"controlIcon",onSelectionChange:c},null)])}});f.ComponentType=g,f.FDesignerOutline=L,f.designerOutlineProps=N,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, ref as i, watch as C, createVNode as a } from "vue";
|
|
2
2
|
const v = {
|
|
3
3
|
id: { type: String, default: "" },
|
|
4
4
|
dragula: { type: Object }
|
|
@@ -66,16 +66,40 @@ const v = {
|
|
|
66
66
|
type: "lookup",
|
|
67
67
|
name: "帮助",
|
|
68
68
|
category: "input"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: "dataCollection",
|
|
74
|
+
name: "数据集合类控件",
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
id: "ResponseForm",
|
|
78
|
+
type: "response-form",
|
|
79
|
+
name: "卡片面板",
|
|
80
|
+
category: "dataCollection"
|
|
69
81
|
},
|
|
70
82
|
{
|
|
71
|
-
id: "
|
|
72
|
-
type: "
|
|
73
|
-
name: "
|
|
74
|
-
category: "
|
|
83
|
+
id: "DataGrid",
|
|
84
|
+
type: "data-grid",
|
|
85
|
+
name: "表格",
|
|
86
|
+
category: "dataCollection"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: "container",
|
|
92
|
+
name: "容器类控件",
|
|
93
|
+
items: [
|
|
94
|
+
{
|
|
95
|
+
id: "Tab",
|
|
96
|
+
type: "tabs",
|
|
97
|
+
name: "标签页区域",
|
|
98
|
+
category: "container"
|
|
75
99
|
}
|
|
76
100
|
]
|
|
77
101
|
}
|
|
78
|
-
], x = /* @__PURE__ */
|
|
102
|
+
], x = /* @__PURE__ */ g({
|
|
79
103
|
name: "FDesignerToolbox",
|
|
80
104
|
props: v,
|
|
81
105
|
emits: [],
|
|
@@ -118,14 +142,14 @@ const v = {
|
|
|
118
142
|
updating: e.updating
|
|
119
143
|
};
|
|
120
144
|
}
|
|
121
|
-
function
|
|
145
|
+
function p(e) {
|
|
122
146
|
const t = {
|
|
123
147
|
farrisControlIcon: !0,
|
|
124
148
|
"fd-i-Family": !0
|
|
125
|
-
},
|
|
126
|
-
return t[
|
|
149
|
+
}, m = `fd_pc-${e.icon || e.type}`;
|
|
150
|
+
return t[m] = !0, t;
|
|
127
151
|
}
|
|
128
|
-
function
|
|
152
|
+
function u(e, t) {
|
|
129
153
|
return a("div", {
|
|
130
154
|
class: s(e),
|
|
131
155
|
"data-sourceType": "control",
|
|
@@ -138,7 +162,7 @@ const v = {
|
|
|
138
162
|
"data-templateCategory": e.templateCategory,
|
|
139
163
|
hidden: t.isHide
|
|
140
164
|
}, [a("div", null, [a("div", {
|
|
141
|
-
class:
|
|
165
|
+
class: p(e)
|
|
142
166
|
}, null), a("div", {
|
|
143
167
|
class: "controlName"
|
|
144
168
|
}, [e.name])])]);
|
|
@@ -146,7 +170,7 @@ const v = {
|
|
|
146
170
|
function y(e) {
|
|
147
171
|
return a("div", {
|
|
148
172
|
class: "card-body px-2 py-0 border-0 controlCategory no-drop"
|
|
149
|
-
}, [e.items.map((t) =>
|
|
173
|
+
}, [e.items.map((t) => u(t, e))]);
|
|
150
174
|
}
|
|
151
175
|
function f(e) {
|
|
152
176
|
return !e.hideInControlBox && a("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["designer-toolbox"]={},n.Vue))})(this,function(n,t){"use strict";const i={id:{type:String,default:""},dragula:{type:Object}},d=[{type:"input",name:"输入类控件",items:[{id:"TextBox",type:"input-group",name:"文本",category:"input"},{id:"MultiTextBox",type:"textarea",name:"多行文本",category:"input"},{id:"DateBox",type:"date-picker",name:"日期",category:"input"},{id:"EnumField",type:"combo-list",name:"下拉列表",category:"input"},{id:"NumericBox",type:"number-spinner",name:"数值",category:"input"},{id:"CheckBox",type:"check-box",name:"复选框",category:"input"},{id:"CheckBoxGroup",type:"check-group",name:"复选框组",category:"input"},{id:"RadioGroup",type:"radio-group",name:"单选组",category:"input"},{id:"SwitchField",type:"switch",name:"开关",category:"input"},{id:"LookupEdit",type:"lookup",name:"帮助",category:"input"},{id:"
|
|
1
|
+
(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["designer-toolbox"]={},n.Vue))})(this,function(n,t){"use strict";const i={id:{type:String,default:""},dragula:{type:Object}},d=[{type:"input",name:"输入类控件",items:[{id:"TextBox",type:"input-group",name:"文本",category:"input"},{id:"MultiTextBox",type:"textarea",name:"多行文本",category:"input"},{id:"DateBox",type:"date-picker",name:"日期",category:"input"},{id:"EnumField",type:"combo-list",name:"下拉列表",category:"input"},{id:"NumericBox",type:"number-spinner",name:"数值",category:"input"},{id:"CheckBox",type:"check-box",name:"复选框",category:"input"},{id:"CheckBoxGroup",type:"check-group",name:"复选框组",category:"input"},{id:"RadioGroup",type:"radio-group",name:"单选组",category:"input"},{id:"SwitchField",type:"switch",name:"开关",category:"input"},{id:"LookupEdit",type:"lookup",name:"帮助",category:"input"}]},{type:"dataCollection",name:"数据集合类控件",items:[{id:"ResponseForm",type:"response-form",name:"卡片面板",category:"dataCollection"},{id:"DataGrid",type:"data-grid",name:"表格",category:"dataCollection"}]},{type:"container",name:"容器类控件",items:[{id:"Tab",type:"tabs",name:"标签页区域",category:"container"}]}],c=t.defineComponent({name:"FDesignerToolbox",props:i,emits:[],setup(r){const s=t.ref(d),o=t.ref(r.dragula);function l(e,a){a.isHide=!a.isHide}function p(e){return{"f-icon":!0,"f-icon-arrow-60-down":!e.isHide,"f-icon-arrow-e":e.isHide}}function u(e){return t.createVNode("div",{class:"card-header",onClick:a=>l(a,e)},[t.createVNode("div",{class:"panel-item-title"},[t.createVNode("div",{class:"f-section-formgroup-legend"},[t.createVNode("div",{class:"f-header px-2 col-form-label"},[t.createVNode("div",{class:"f-toolbar mr-2"},[t.createVNode("span",{class:p(e)},null)]),t.createVNode("div",{class:"f-title f-utils-fill d-flex justify-content-between"},[t.createVNode("span",null,[e.name])])])])])])}function f(e){return{"d-none":e.dependentParent||e.hideInControlBox,controlPanel:!0,"drag-copy":!0,"no-drag":e.disable,updating:e.updating}}function y(e){const a={farrisControlIcon:!0,"fd-i-Family":!0},N=`fd_pc-${e.icon||e.type}`;return a[N]=!0,a}function m(e,a){return t.createVNode("div",{class:f(e),"data-sourceType":"control","data-controlType":e.type,"data-controlTypeName":e.name,"data-category":e.category,"data-feature":e.feature?JSON.stringify(e.feature):"","data-fieldType":e.fieldType,"data-templateId":e.id,"data-templateCategory":e.templateCategory,hidden:a.isHide},[t.createVNode("div",null,[t.createVNode("div",{class:y(e)},null),t.createVNode("div",{class:"controlName"},[e.name])])])}function g(e){return t.createVNode("div",{class:"card-body px-2 py-0 border-0 controlCategory no-drop"},[e.items.map(a=>m(a,e))])}function C(e){return!e.hideInControlBox&&t.createVNode("div",{class:"farris-panel-item card border-0"},[u(e),g(e)])}return t.watch(()=>r.dragula,e=>{var a;o.value=e,(a=o.value)==null||a.attachToolbox()}),()=>t.createVNode("div",{class:"controlBox f-utils-fill-flex-column"},[t.createVNode("div",{class:"farris-panel f-utils-fill-flex-column",style:"overflow:auto;"},[s.value.map(e=>C(e))])])}});n.FDesignerToolbox=c,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -2,7 +2,7 @@ var Je = Object.defineProperty;
|
|
|
2
2
|
var et = (e, t, n) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var G = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { ref as v, defineComponent as tt, computed as V, onMounted as nt, createVNode as c, createTextVNode as de, resolveComponent as ot } from "vue";
|
|
5
|
-
import rt from "
|
|
5
|
+
import rt from "../input-group/index.esm.js";
|
|
6
6
|
const at = {
|
|
7
7
|
cancelVisible: { Type: Boolean, default: !0 },
|
|
8
8
|
personnelsPrimaryKey: { Type: String, default: "id" },
|