@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,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Re = (s, e, o) => e in s ? Pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
|
|
3
|
+
var B = (s, e, o) => Re(s, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { computed as W, getCurrentInstance as ue, createVNode as w, ref as S, defineComponent as X, onMounted as z, onUnmounted as ne, watch as H, inject as L, createTextVNode as fe, provide as Ee, onBeforeUnmount as Se, withModifiers as Me } from "vue";
|
|
5
|
+
import { cloneDeep as ke } from "lodash-es";
|
|
6
|
+
import { getCustomClass as J, withInstall as Ae } from "../common/index.esm.js";
|
|
7
|
+
import { useDesignerInnerComponent as ge } from "../designer-canvas/index.esm.js";
|
|
8
8
|
class me {
|
|
9
9
|
constructor(e) {
|
|
10
10
|
/** 工具栏项标识 */
|
|
11
|
-
|
|
11
|
+
B(this, "id", "");
|
|
12
12
|
/** 工具栏项自定义样式 */
|
|
13
|
-
|
|
13
|
+
B(this, "class", "btn-secondary");
|
|
14
14
|
/** 图标 */
|
|
15
|
-
|
|
15
|
+
B(this, "icon", "");
|
|
16
16
|
/** 所属分组 */
|
|
17
|
-
|
|
17
|
+
B(this, "groupId", "");
|
|
18
18
|
/** 收藏顺序 */
|
|
19
|
-
|
|
19
|
+
B(this, "order", -1);
|
|
20
20
|
/** 是否作为下拉菜单的顶层按钮 */
|
|
21
|
-
|
|
21
|
+
B(this, "asDropDownTop", !1);
|
|
22
22
|
/** 文本 */
|
|
23
|
-
|
|
23
|
+
B(this, "text", "");
|
|
24
24
|
/** 是否可见 */
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
B(this, "visible", !0);
|
|
26
|
+
B(this, "responsed", !1);
|
|
27
27
|
/** 是否启用提示消息 */
|
|
28
|
-
|
|
28
|
+
B(this, "tipsEnable", !1);
|
|
29
29
|
/** 提示消息内容 */
|
|
30
|
-
|
|
30
|
+
B(this, "tipsText", "");
|
|
31
31
|
/** 记录宽度 */
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
B(this, "width", 0);
|
|
33
|
+
B(this, "onClick", () => {
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
B(this, "options");
|
|
36
36
|
this.options = e;
|
|
37
|
-
const
|
|
37
|
+
const o = [
|
|
38
38
|
"id",
|
|
39
39
|
"class",
|
|
40
40
|
"icon",
|
|
@@ -50,13 +50,13 @@ class me {
|
|
|
50
50
|
"tipsText",
|
|
51
51
|
"onClick"
|
|
52
52
|
];
|
|
53
|
-
Object.keys(e).filter((
|
|
54
|
-
this[
|
|
53
|
+
Object.keys(e).filter((p) => o.indexOf(p) > -1).forEach((p) => {
|
|
54
|
+
this[p] = e[p];
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/** 是否可用 */
|
|
58
58
|
get enable() {
|
|
59
|
-
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable :
|
|
59
|
+
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : W(() => !0);
|
|
60
60
|
}
|
|
61
61
|
/** 设置宽度 */
|
|
62
62
|
setWidth(e) {
|
|
@@ -67,49 +67,49 @@ class me {
|
|
|
67
67
|
return this.visible ? this.width : !1;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class Be extends me {
|
|
71
71
|
constructor(e) {
|
|
72
72
|
super(e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
return e.reduce((
|
|
75
|
+
function he() {
|
|
76
|
+
function s(e) {
|
|
77
|
+
const o = [];
|
|
78
|
+
return e.reduce((p, u) => (u.children && u.children.length > 0 ? p.push(new G(u)) : p.push(new Be(u)), p), o), o;
|
|
79
79
|
}
|
|
80
|
-
return { buildResponseToolbarItems:
|
|
80
|
+
return { buildResponseToolbarItems: s };
|
|
81
81
|
}
|
|
82
|
-
const { buildResponseToolbarItems: Oe } =
|
|
82
|
+
const { buildResponseToolbarItems: Oe } = he();
|
|
83
83
|
class G extends me {
|
|
84
|
-
constructor(
|
|
85
|
-
super(
|
|
86
|
-
|
|
84
|
+
constructor(o) {
|
|
85
|
+
super(o);
|
|
86
|
+
B(this, "placement", "");
|
|
87
87
|
// 下拉位置
|
|
88
88
|
/** 下拉class */
|
|
89
|
-
|
|
89
|
+
B(this, "dropdownClass", "");
|
|
90
90
|
/** 下拉菜单class */
|
|
91
|
-
|
|
91
|
+
B(this, "menuClass", "");
|
|
92
92
|
/** 是否用分开的下拉按钮 */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
Object.keys(
|
|
98
|
-
this[u] =
|
|
99
|
-
}),
|
|
93
|
+
B(this, "split", !1);
|
|
94
|
+
B(this, "children", []);
|
|
95
|
+
B(this, "expanded", !1);
|
|
96
|
+
const p = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
97
|
+
Object.keys(o).filter((u) => p.indexOf(u) > -1).forEach((u) => {
|
|
98
|
+
this[u] = o[u];
|
|
99
|
+
}), o.children && o.children.length && (this.children = Oe(o.children));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
class
|
|
103
|
-
constructor(e,
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
class Lt {
|
|
103
|
+
constructor(e, o) {
|
|
104
|
+
B(this, "id");
|
|
105
|
+
B(this, "name");
|
|
106
106
|
/** 记录元素的Id */
|
|
107
|
-
|
|
107
|
+
B(this, "presetId", []);
|
|
108
108
|
/** 记录转变为下拉时元素的位置 */
|
|
109
|
-
|
|
109
|
+
B(this, "responsedIndex", []);
|
|
110
110
|
/** 记录宽度 */
|
|
111
|
-
|
|
112
|
-
this.id = e, this.name =
|
|
111
|
+
B(this, "width");
|
|
112
|
+
this.id = e, this.name = o, this.width = 0;
|
|
113
113
|
}
|
|
114
114
|
// 设置宽度
|
|
115
115
|
setWidth(e) {
|
|
@@ -144,104 +144,102 @@ class Nt {
|
|
|
144
144
|
return this.presetId.length === this.responsedIndex.length;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const oe = {},
|
|
148
|
-
function
|
|
149
|
-
const { properties: e, title:
|
|
150
|
-
return
|
|
147
|
+
const oe = {}, be = {};
|
|
148
|
+
function se(s) {
|
|
149
|
+
const { properties: e, title: o, ignore: p } = s, u = p && Array.isArray(p), v = Object.keys(e).reduce((h, D) => ((!u || !p.find((I) => I == D)) && (h[D] = e[D].type === "object" && e[D].properties ? se(e[D]) : ke(e[D].default)), h), {});
|
|
150
|
+
return (!u || !p.find((h) => h == "id")) && (v.id = `${o}-${Date.now()}`), v;
|
|
151
151
|
}
|
|
152
|
-
function q(
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
let
|
|
156
|
-
const
|
|
157
|
-
return
|
|
152
|
+
function q(s, e = {}, o) {
|
|
153
|
+
const p = oe[s];
|
|
154
|
+
if (p) {
|
|
155
|
+
let u = se(p);
|
|
156
|
+
const v = be[s];
|
|
157
|
+
return u = v ? v({ getSchemaByType: q }, u, e, o) : u, u;
|
|
158
158
|
}
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const
|
|
163
|
-
return Object.keys(
|
|
161
|
+
function _e(s, e) {
|
|
162
|
+
const o = se(e);
|
|
163
|
+
return Object.keys(s).reduce((p, u) => (p[u] && typeof p[u] == "object" ? Object.assign(p[u], s[u]) : p[u] = s[u], p), o), o;
|
|
164
164
|
}
|
|
165
|
-
function Ne(
|
|
166
|
-
return Object.keys(
|
|
165
|
+
function Ne(s, e) {
|
|
166
|
+
return Object.keys(s).filter((p) => s[p] != null).reduce((p, u) => {
|
|
167
167
|
if (e.has(u)) {
|
|
168
|
-
const
|
|
169
|
-
if (typeof
|
|
170
|
-
|
|
168
|
+
const v = e.get(u);
|
|
169
|
+
if (typeof v == "string")
|
|
170
|
+
p[v] = s[u];
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
Object.assign(
|
|
172
|
+
const h = v(u, s[u], s);
|
|
173
|
+
Object.assign(p, h);
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
|
-
|
|
177
|
-
return
|
|
176
|
+
p[u] = s[u];
|
|
177
|
+
return p;
|
|
178
178
|
}, {});
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
-
return Ne(
|
|
180
|
+
function $e(s, e, o = /* @__PURE__ */ new Map()) {
|
|
181
|
+
const p = _e(s, e);
|
|
182
|
+
return Ne(p, o);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
function e(g, C,
|
|
186
|
-
if (typeof
|
|
187
|
-
return
|
|
188
|
-
if (typeof
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
return Number(
|
|
192
|
-
if (
|
|
193
|
-
return Number(
|
|
194
|
-
if (
|
|
195
|
-
return Number(
|
|
184
|
+
function Fe(s = {}) {
|
|
185
|
+
function e(g, C, l, i) {
|
|
186
|
+
if (typeof l == "number")
|
|
187
|
+
return i[g].length === l;
|
|
188
|
+
if (typeof l == "object") {
|
|
189
|
+
const f = Object.keys(l)[0], c = l[f];
|
|
190
|
+
if (f === "not")
|
|
191
|
+
return Number(i[g].length) !== Number(c);
|
|
192
|
+
if (f === "moreThan")
|
|
193
|
+
return Number(i[g].length) >= Number(c);
|
|
194
|
+
if (f === "lessThan")
|
|
195
|
+
return Number(i[g].length) <= Number(c);
|
|
196
196
|
}
|
|
197
197
|
return !1;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
199
|
+
function o(g, C, l, i) {
|
|
200
|
+
return i[g] && i[g].propertyValue && String(i[g].propertyValue.value) === String(l);
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const p = /* @__PURE__ */ new Map([
|
|
203
203
|
["length", e],
|
|
204
|
-
["getProperty",
|
|
204
|
+
["getProperty", o]
|
|
205
205
|
]);
|
|
206
|
-
Object.keys(
|
|
206
|
+
Object.keys(s).reduce((g, C) => (g.set(C, s[C]), g), p);
|
|
207
207
|
function u(g, C) {
|
|
208
|
-
const
|
|
209
|
-
return typeof C == "number" ? [{ target:
|
|
210
|
-
if (
|
|
211
|
-
return { target:
|
|
212
|
-
const
|
|
213
|
-
return { target:
|
|
208
|
+
const l = g;
|
|
209
|
+
return typeof C == "number" ? [{ target: l, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((i) => {
|
|
210
|
+
if (i === "length")
|
|
211
|
+
return { target: l, operator: "length", param: null, value: C[i] };
|
|
212
|
+
const f = i, c = C[i];
|
|
213
|
+
return { target: l, operator: "getProperty", param: f, value: c };
|
|
214
214
|
}) : [];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return Object.keys(g).reduce((
|
|
218
|
-
const
|
|
219
|
-
return
|
|
216
|
+
function v(g) {
|
|
217
|
+
return Object.keys(g).reduce((l, i) => {
|
|
218
|
+
const f = u(i, g[i]);
|
|
219
|
+
return l.push(...f), l;
|
|
220
220
|
}, []);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
return
|
|
222
|
+
function h(g, C) {
|
|
223
|
+
if (p.has(g.operator)) {
|
|
224
|
+
const l = p.get(g.operator);
|
|
225
|
+
return l && l(g.target, g.param, g.value, C) || !1;
|
|
226
226
|
}
|
|
227
227
|
return !1;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
return
|
|
229
|
+
function D(g, C) {
|
|
230
|
+
return v(g).reduce((f, c) => f && h(c, C), !0);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return
|
|
232
|
+
function I(g, C) {
|
|
233
|
+
const l = Object.keys(g), i = l.includes("allOf"), f = l.includes("anyOf"), c = i || f, T = (c ? g[c ? i ? "allOf" : "anyOf" : "allOf"] : [g]).map((P) => D(P, C));
|
|
234
|
+
return i ? !T.includes(!1) : T.includes(!0);
|
|
235
235
|
}
|
|
236
|
-
return { parseValueSchema:
|
|
236
|
+
return { parseValueSchema: I };
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
238
|
+
const re = {
|
|
239
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
241
240
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
242
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
241
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
243
242
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
244
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
245
243
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
246
244
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
247
245
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -252,115 +250,53 @@ const I = {
|
|
|
252
250
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
253
251
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
254
252
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
259
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
260
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
253
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
254
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
255
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
261
256
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
262
|
-
|
|
263
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
264
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
265
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
257
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
266
258
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
267
259
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
268
|
-
|
|
269
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
260
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
270
261
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
271
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
272
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
273
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
274
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
275
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
276
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
277
262
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
278
263
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
279
264
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
280
|
-
|
|
281
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
282
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
283
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
284
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
285
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
286
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
265
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
287
266
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
295
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
296
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
297
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
298
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
299
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
300
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
301
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
302
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
303
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
304
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
305
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
306
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
307
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
308
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
309
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
310
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
311
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
312
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
313
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
314
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
315
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
316
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
267
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
268
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
269
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
270
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
271
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
272
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
317
273
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
327
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
328
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
329
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
330
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
331
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
332
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
333
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
334
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
335
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
336
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
337
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
338
|
-
/** 查询类 start */
|
|
339
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
340
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
341
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
342
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
343
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
344
|
-
/** 查询类 end */
|
|
345
|
-
/** 审批类 start */
|
|
346
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
347
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
348
|
-
/** 审批类 end */
|
|
349
|
-
}, he = {}, $e = {};
|
|
350
|
-
_e();
|
|
351
|
-
function be(r, e, n = /* @__PURE__ */ new Map(), c = (v, M, S) => M, u = {}, m = (v) => v) {
|
|
352
|
-
return oe[e.title] = e, ye[e.title] = c, he[e.title] = u, $e[e.title] = m, (v = {}) => {
|
|
353
|
-
const M = Ve(v, e, n), S = Object.keys(r).reduce((g, C) => (g[C] = r[C].default, g), {});
|
|
354
|
-
return Object.assign(S, M);
|
|
274
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
275
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
276
|
+
}, ye = {}, Le = {};
|
|
277
|
+
Fe();
|
|
278
|
+
function ve(s, e, o = /* @__PURE__ */ new Map(), p = (h, D, I) => D, u = {}, v = (h) => h) {
|
|
279
|
+
return oe[e.title] = e, be[e.title] = p, ye[e.title] = u, Le[e.title] = v, (h = {}) => {
|
|
280
|
+
const D = $e(h, e, o), I = Object.keys(s).reduce((g, C) => (g[C] = s[C].default, g), {});
|
|
281
|
+
return Object.assign(I, D);
|
|
355
282
|
};
|
|
356
283
|
}
|
|
357
|
-
|
|
358
|
-
|
|
284
|
+
function Ve(s, e) {
|
|
285
|
+
return { customClass: e.class, customStyle: e.style };
|
|
286
|
+
}
|
|
287
|
+
const We = /* @__PURE__ */ new Map([
|
|
288
|
+
["buttons", "items"],
|
|
289
|
+
["appearance", Ve]
|
|
290
|
+
]), Ue = /* @__PURE__ */ new Map([
|
|
291
|
+
["appearance", qe]
|
|
359
292
|
]);
|
|
360
|
-
function
|
|
293
|
+
function qe(s, e) {
|
|
294
|
+
return { class: e.class, style: e.style };
|
|
295
|
+
}
|
|
296
|
+
function Ce(s, e, o) {
|
|
361
297
|
return e;
|
|
362
298
|
}
|
|
363
|
-
const
|
|
299
|
+
const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-design.gitee.io/response-toolbar.schema.json", He = "response-toolbar", Je = "A Farris Toolbar Component", Qe = "object", Xe = {
|
|
364
300
|
id: {
|
|
365
301
|
description: "The unique identifier for a Response Toolbar",
|
|
366
302
|
type: "string"
|
|
@@ -393,19 +329,19 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
393
329
|
type: "array",
|
|
394
330
|
default: []
|
|
395
331
|
}
|
|
396
|
-
},
|
|
332
|
+
}, Ye = [
|
|
397
333
|
"id",
|
|
398
334
|
"type",
|
|
399
335
|
"buttons"
|
|
400
|
-
],
|
|
401
|
-
$schema:
|
|
402
|
-
$id:
|
|
403
|
-
title:
|
|
404
|
-
description:
|
|
405
|
-
type:
|
|
406
|
-
properties:
|
|
407
|
-
required:
|
|
408
|
-
},
|
|
336
|
+
], Ze = {
|
|
337
|
+
$schema: ze,
|
|
338
|
+
$id: Ge,
|
|
339
|
+
title: He,
|
|
340
|
+
description: Je,
|
|
341
|
+
type: Qe,
|
|
342
|
+
properties: Xe,
|
|
343
|
+
required: Ye
|
|
344
|
+
}, Ke = "https://json-schema.org/draft/2020-12/schema", et = "https://farris-design.gitee.io/response-toolbar-item.schema.json", tt = "response-toolbar-item", nt = "A Farris Toolbar Item Component", ot = "object", st = {
|
|
409
345
|
id: {
|
|
410
346
|
description: "The unique identifier for a Response Toolbar",
|
|
411
347
|
type: "string"
|
|
@@ -420,7 +356,8 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
420
356
|
type: "object",
|
|
421
357
|
properties: {
|
|
422
358
|
class: {
|
|
423
|
-
type: "string"
|
|
359
|
+
type: "string",
|
|
360
|
+
default: "btn-primary"
|
|
424
361
|
},
|
|
425
362
|
style: {
|
|
426
363
|
type: "string"
|
|
@@ -428,6 +365,11 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
428
365
|
},
|
|
429
366
|
default: {}
|
|
430
367
|
},
|
|
368
|
+
alignment: {
|
|
369
|
+
description: "The alignment of Response Toolbar Button.",
|
|
370
|
+
type: "string",
|
|
371
|
+
default: "right"
|
|
372
|
+
},
|
|
431
373
|
text: {
|
|
432
374
|
description: "The items of Response Toolbar.",
|
|
433
375
|
type: "string",
|
|
@@ -443,19 +385,19 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
443
385
|
type: "string",
|
|
444
386
|
default: ""
|
|
445
387
|
}
|
|
446
|
-
},
|
|
388
|
+
}, rt = [
|
|
447
389
|
"id",
|
|
448
390
|
"type",
|
|
449
391
|
"text"
|
|
450
392
|
], te = {
|
|
451
|
-
$schema:
|
|
452
|
-
$id:
|
|
453
|
-
title:
|
|
454
|
-
description:
|
|
455
|
-
type:
|
|
456
|
-
properties:
|
|
457
|
-
required:
|
|
458
|
-
},
|
|
393
|
+
$schema: Ke,
|
|
394
|
+
$id: et,
|
|
395
|
+
title: tt,
|
|
396
|
+
description: nt,
|
|
397
|
+
type: ot,
|
|
398
|
+
properties: st,
|
|
399
|
+
required: rt
|
|
400
|
+
}, it = "response-toolbar-item", ct = "A Farris Container Component", at = "object", lt = {
|
|
459
401
|
basic: {
|
|
460
402
|
title: "基本信息",
|
|
461
403
|
description: "Basic Infomation",
|
|
@@ -488,12 +430,12 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
488
430
|
}
|
|
489
431
|
}
|
|
490
432
|
}
|
|
491
|
-
},
|
|
492
|
-
title:
|
|
493
|
-
description:
|
|
494
|
-
type:
|
|
495
|
-
categories:
|
|
496
|
-
},
|
|
433
|
+
}, pe = {
|
|
434
|
+
title: it,
|
|
435
|
+
description: ct,
|
|
436
|
+
type: at,
|
|
437
|
+
categories: lt
|
|
438
|
+
}, ie = {
|
|
497
439
|
/** 组件自定义样式 */
|
|
498
440
|
customClass: { type: String, default: "" },
|
|
499
441
|
alignment: { Type: String, default: "right" },
|
|
@@ -503,489 +445,484 @@ const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-
|
|
|
503
445
|
}
|
|
504
446
|
};
|
|
505
447
|
oe[te.title] = te;
|
|
506
|
-
|
|
507
|
-
const
|
|
448
|
+
ye[pe.title] = pe;
|
|
449
|
+
const pt = Object.assign({}, ie, {
|
|
508
450
|
componentId: { type: String, default: "" }
|
|
509
|
-
}),
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
451
|
+
}), ce = ve(
|
|
452
|
+
ie,
|
|
453
|
+
Ze,
|
|
454
|
+
We,
|
|
513
455
|
Ce
|
|
514
456
|
), we = {
|
|
515
457
|
id: { type: String, default: "" },
|
|
516
458
|
items: { type: Object, default: {} },
|
|
459
|
+
class: { type: String, default: "" },
|
|
517
460
|
text: { type: String, default: "" },
|
|
518
461
|
disabled: { type: Boolean, default: !1 },
|
|
519
462
|
icon: { type: String, default: "" },
|
|
520
|
-
componentId: { type: String, default: "" }
|
|
521
|
-
|
|
463
|
+
componentId: { type: String, default: "" },
|
|
464
|
+
alignment: { Type: String, default: "right" }
|
|
465
|
+
}, dt = ve(
|
|
522
466
|
we,
|
|
523
467
|
te,
|
|
524
|
-
|
|
468
|
+
Ue,
|
|
525
469
|
Ce
|
|
526
470
|
);
|
|
527
|
-
function
|
|
528
|
-
function
|
|
529
|
-
const
|
|
471
|
+
function xe() {
|
|
472
|
+
function s(o) {
|
|
473
|
+
const p = {
|
|
530
474
|
"f-icon": !0
|
|
531
475
|
};
|
|
532
|
-
if (
|
|
533
|
-
const u =
|
|
534
|
-
u && u.length && u.reduce((
|
|
476
|
+
if (o.icon) {
|
|
477
|
+
const u = o.icon.trim().split(" ");
|
|
478
|
+
u && u.length && u.reduce((v, h) => (v[h] = !0, v), p);
|
|
535
479
|
}
|
|
536
|
-
return
|
|
480
|
+
return p;
|
|
537
481
|
}
|
|
538
|
-
function e(
|
|
539
|
-
return !!(
|
|
482
|
+
function e(o) {
|
|
483
|
+
return !!(o.icon && o.icon.trim());
|
|
540
484
|
}
|
|
541
|
-
return { iconClass:
|
|
485
|
+
return { iconClass: s, shouldShowIcon: e };
|
|
542
486
|
}
|
|
543
|
-
function
|
|
544
|
-
function e(
|
|
545
|
-
const
|
|
487
|
+
function ut(s) {
|
|
488
|
+
function e(l) {
|
|
489
|
+
const i = {
|
|
546
490
|
"dropdown-menu": !0
|
|
547
491
|
};
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
550
|
-
|
|
492
|
+
if (l.class) {
|
|
493
|
+
const f = l.menuClass.split(" ");
|
|
494
|
+
f && f.length && f.reduce((c, b) => (c[b] = !0, c), i);
|
|
551
495
|
}
|
|
552
|
-
return
|
|
496
|
+
return i;
|
|
553
497
|
}
|
|
554
|
-
function
|
|
555
|
-
const
|
|
556
|
-
disabled: !
|
|
498
|
+
function o(l) {
|
|
499
|
+
const i = {
|
|
500
|
+
disabled: !l.enable,
|
|
557
501
|
"dropdown-submenu": !0,
|
|
558
502
|
"f-rt-dropdown": !0
|
|
559
|
-
},
|
|
560
|
-
return
|
|
503
|
+
}, f = l.dropdownClass.split(" ");
|
|
504
|
+
return f && f.length && f.reduce((c, b) => (c[b] = !0, c), i), i;
|
|
561
505
|
}
|
|
562
|
-
function
|
|
563
|
-
const
|
|
564
|
-
disabled: !
|
|
506
|
+
function p(l) {
|
|
507
|
+
const i = {
|
|
508
|
+
disabled: !l.enable,
|
|
565
509
|
"dropdown-item": !0,
|
|
566
510
|
"f-rt-btn": !0
|
|
567
|
-
},
|
|
568
|
-
return
|
|
511
|
+
}, f = l.class.split(" ");
|
|
512
|
+
return f && f.length && f.reduce((c, b) => (c[b] = !0, c), i), i;
|
|
569
513
|
}
|
|
570
514
|
let u;
|
|
571
|
-
const
|
|
572
|
-
function
|
|
573
|
-
var
|
|
574
|
-
((
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
578
|
-
|
|
515
|
+
const v = /* @__PURE__ */ new Map();
|
|
516
|
+
function h(l, i, f) {
|
|
517
|
+
var b;
|
|
518
|
+
((b = l.target) == null ? void 0 : b.id) === i.id && l.stopPropagation();
|
|
519
|
+
const c = f ? f.id : "__top_item__";
|
|
520
|
+
if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? v.set(c, i) : v.delete(c)), v.has(c) && v.get(c) !== i) {
|
|
521
|
+
const y = v.get(c);
|
|
522
|
+
y && (y.expanded = !1);
|
|
579
523
|
}
|
|
580
524
|
}
|
|
581
|
-
function
|
|
582
|
-
document.body.click(),
|
|
525
|
+
function D(l, i) {
|
|
526
|
+
document.body.click(), i.enable && i.onClick(l, i.id);
|
|
583
527
|
}
|
|
584
|
-
function
|
|
585
|
-
return
|
|
586
|
-
class:
|
|
587
|
-
id:
|
|
588
|
-
onClick: (
|
|
528
|
+
function I(l) {
|
|
529
|
+
return l.children.map((i) => i.children && i.children.length ? w("li", {
|
|
530
|
+
class: o(i),
|
|
531
|
+
id: i.id,
|
|
532
|
+
onClick: (f) => i.enable && h(f, i, l)
|
|
589
533
|
}, [w("span", {
|
|
590
|
-
id:
|
|
591
|
-
class:
|
|
592
|
-
onMouseover: (
|
|
593
|
-
}, [
|
|
534
|
+
id: i.id,
|
|
535
|
+
class: p(i),
|
|
536
|
+
onMouseover: (f) => i.enable && h(f, i, l)
|
|
537
|
+
}, [i.text, w("i", {
|
|
594
538
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
595
539
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
596
|
-
}, null)]), u(
|
|
597
|
-
class:
|
|
598
|
-
id:
|
|
599
|
-
onClick: (
|
|
600
|
-
onMouseover: (
|
|
601
|
-
}, [
|
|
602
|
-
class:
|
|
603
|
-
}, null),
|
|
604
|
-
}
|
|
605
|
-
function g(
|
|
606
|
-
const
|
|
607
|
-
display:
|
|
540
|
+
}, null)]), u(i, i)]) : w("li", {
|
|
541
|
+
class: p(i),
|
|
542
|
+
id: i.id,
|
|
543
|
+
onClick: (f) => D(f, i),
|
|
544
|
+
onMouseover: (f) => i.enable && h(f, i, l)
|
|
545
|
+
}, [s.shouldShowIcon(i) && w("i", {
|
|
546
|
+
class: s.iconClass(i)
|
|
547
|
+
}, null), i.text]));
|
|
548
|
+
}
|
|
549
|
+
function g(l, i, f) {
|
|
550
|
+
const c = {
|
|
551
|
+
display: l.expanded ? "block" : "none",
|
|
608
552
|
position: "fixed",
|
|
609
553
|
maxWidth: "300px",
|
|
610
554
|
width: "auto",
|
|
611
555
|
minWidth: "120px"
|
|
612
|
-
},
|
|
613
|
-
if (
|
|
556
|
+
}, b = document.getElementsByTagName("body")[0].getClientRects()[0].width, y = i, T = y == null ? void 0 : y.getClientRects();
|
|
557
|
+
if (y && T && T.length) {
|
|
614
558
|
const {
|
|
615
559
|
top: O,
|
|
616
560
|
width: P,
|
|
617
|
-
left:
|
|
561
|
+
left: k,
|
|
618
562
|
right: N,
|
|
619
|
-
height:
|
|
620
|
-
} =
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
624
|
-
|
|
625
|
-
const
|
|
626
|
-
if (
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
|
|
563
|
+
height: j
|
|
564
|
+
} = T[0], m = Math.ceil(j + O);
|
|
565
|
+
c.top = `${m}px`, c.left = `${k}px`;
|
|
566
|
+
const R = l.id + "_menu", A = i ? i.querySelector("#" + R) : null;
|
|
567
|
+
if (A) {
|
|
568
|
+
c.display === "block" && (A.style.display = "block");
|
|
569
|
+
const a = A.getBoundingClientRect();
|
|
570
|
+
if (f) {
|
|
571
|
+
c.top = `${O - 6}px`;
|
|
572
|
+
const n = Math.ceil(P + k);
|
|
573
|
+
c.left = `${n}px`;
|
|
630
574
|
}
|
|
631
|
-
|
|
575
|
+
b - k - P < a.width && (c.left = `${(f ? k : N) - a.width}px`);
|
|
632
576
|
}
|
|
633
577
|
}
|
|
634
|
-
return
|
|
578
|
+
return c;
|
|
635
579
|
}
|
|
636
|
-
u = function(
|
|
637
|
-
var
|
|
638
|
-
const
|
|
580
|
+
u = function(l, i) {
|
|
581
|
+
var y, T;
|
|
582
|
+
const f = ue(), c = i ? i.id : l.id, b = (T = (y = f == null ? void 0 : f.exposed) == null ? void 0 : y.elementRef.value) == null ? void 0 : T.querySelector("#" + c);
|
|
639
583
|
return w("ul", {
|
|
640
|
-
class: e(
|
|
641
|
-
style: g(
|
|
642
|
-
id:
|
|
643
|
-
}, [
|
|
584
|
+
class: e(l),
|
|
585
|
+
style: g(l, b, i),
|
|
586
|
+
id: l.id + "_menu"
|
|
587
|
+
}, [I(l)]);
|
|
644
588
|
};
|
|
645
589
|
function C() {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
}),
|
|
590
|
+
v.forEach((l) => {
|
|
591
|
+
l.expanded = !1;
|
|
592
|
+
}), v.clear();
|
|
649
593
|
}
|
|
650
594
|
return {
|
|
651
595
|
renderDropdownMenu: u,
|
|
652
596
|
clearAllDropDownMenu: C
|
|
653
597
|
};
|
|
654
598
|
}
|
|
655
|
-
function
|
|
656
|
-
const
|
|
657
|
-
renderDropdownMenu:
|
|
599
|
+
function ft(s, e) {
|
|
600
|
+
const o = S(s.alignment), {
|
|
601
|
+
renderDropdownMenu: p,
|
|
658
602
|
clearAllDropDownMenu: u
|
|
659
|
-
} =
|
|
660
|
-
function
|
|
661
|
-
const
|
|
603
|
+
} = ut(e);
|
|
604
|
+
function v(C) {
|
|
605
|
+
const l = {
|
|
662
606
|
"btn-group": !0,
|
|
663
607
|
"f-rt-dropdown": !0,
|
|
664
|
-
"f-btn-ml":
|
|
665
|
-
"f-btn-mr":
|
|
666
|
-
},
|
|
667
|
-
return
|
|
608
|
+
"f-btn-ml": o.value === "right",
|
|
609
|
+
"f-btn-mr": o.value === "left"
|
|
610
|
+
}, i = C.dropdownClass.split(" ");
|
|
611
|
+
return i && i.length && i.reduce((f, c) => (f[c] = !0, f), l), l;
|
|
668
612
|
}
|
|
669
|
-
function
|
|
670
|
-
const
|
|
613
|
+
function h(C) {
|
|
614
|
+
const l = {
|
|
671
615
|
btn: !0,
|
|
672
616
|
disabled: !C.enable,
|
|
673
617
|
"f-rt-btn": !0,
|
|
674
618
|
"btn-icontext": !!(C.icon && C.icon.trim())
|
|
675
619
|
};
|
|
676
620
|
if (C.class) {
|
|
677
|
-
const
|
|
678
|
-
|
|
621
|
+
const i = C.class.split(" ");
|
|
622
|
+
i && i.length && i.reduce((f, c) => (f[c] = !0, f), l);
|
|
679
623
|
}
|
|
680
|
-
return
|
|
624
|
+
return l;
|
|
681
625
|
}
|
|
682
|
-
function
|
|
626
|
+
function D(C, l) {
|
|
683
627
|
C.stopPropagation();
|
|
684
|
-
const
|
|
685
|
-
document.body.click(),
|
|
628
|
+
const i = l.expanded;
|
|
629
|
+
document.body.click(), l.expanded = !i;
|
|
686
630
|
}
|
|
687
|
-
function
|
|
631
|
+
function I(C) {
|
|
688
632
|
return w("div", {
|
|
689
633
|
id: C.id,
|
|
690
|
-
class:
|
|
634
|
+
class: v(C)
|
|
691
635
|
}, [w("div", {
|
|
692
|
-
class:
|
|
636
|
+
class: h(C),
|
|
693
637
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
694
|
-
onClick: (
|
|
638
|
+
onClick: (l) => C.enable && D(l, C)
|
|
695
639
|
}, [e.shouldShowIcon(C) && w("i", {
|
|
696
640
|
class: e.iconClass(C)
|
|
697
641
|
}, null), w("span", null, [C.text]), w("i", {
|
|
698
642
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
699
643
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
700
|
-
}, null)]),
|
|
644
|
+
}, null)]), p(C)]);
|
|
701
645
|
}
|
|
702
646
|
function g() {
|
|
703
647
|
u();
|
|
704
648
|
}
|
|
705
649
|
return {
|
|
706
|
-
renderToolbarDropdown:
|
|
650
|
+
renderToolbarDropdown: I,
|
|
707
651
|
clearAllDropDown: g
|
|
708
652
|
};
|
|
709
653
|
}
|
|
710
654
|
const {
|
|
711
|
-
buildResponseToolbarItems:
|
|
712
|
-
} =
|
|
655
|
+
buildResponseToolbarItems: de
|
|
656
|
+
} = he(), Q = /* @__PURE__ */ X({
|
|
713
657
|
name: "FResponseToolbar",
|
|
714
|
-
props:
|
|
658
|
+
props: ie,
|
|
715
659
|
emits: ["click"],
|
|
716
|
-
setup(
|
|
717
|
-
const
|
|
660
|
+
setup(s, e) {
|
|
661
|
+
const o = S(de(s.items)), p = S(), u = S(), v = S(), h = S(s.alignment), D = {
|
|
718
662
|
id: "__more_buttons__",
|
|
719
663
|
text: "更多"
|
|
720
|
-
},
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
};
|
|
726
|
-
if (r.customClass) {
|
|
727
|
-
const k = r.customClass.split(" ");
|
|
728
|
-
k && k.length && k.reduce((E, l) => (E[l] = !0, E), b);
|
|
729
|
-
}
|
|
730
|
-
return b;
|
|
731
|
-
}), a = z(() => ({
|
|
664
|
+
}, I = S(new G(D)), g = xe(), C = W(() => I.value.children.length > 0), l = W(() => J({
|
|
665
|
+
"f-toolbar": !0,
|
|
666
|
+
"f-response-toolbar": !0,
|
|
667
|
+
"position-relative": !0
|
|
668
|
+
}, s.customClass)), i = W(() => ({
|
|
732
669
|
"d-flex": !0,
|
|
733
670
|
"flex-nowrap": !0,
|
|
734
|
-
"justify-content-end":
|
|
735
|
-
"justify-content-start":
|
|
671
|
+
"justify-content-end": h.value === "right",
|
|
672
|
+
"justify-content-start": h.value === "left"
|
|
736
673
|
})), {
|
|
737
|
-
renderToolbarDropdown:
|
|
738
|
-
clearAllDropDown:
|
|
739
|
-
} =
|
|
740
|
-
function
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}),
|
|
674
|
+
renderToolbarDropdown: f,
|
|
675
|
+
clearAllDropDown: c
|
|
676
|
+
} = ft(s, g);
|
|
677
|
+
function b() {
|
|
678
|
+
o.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
|
|
679
|
+
m.expanded = !1;
|
|
680
|
+
}), I.value.expanded = !1, c();
|
|
744
681
|
}
|
|
745
|
-
function
|
|
746
|
-
const
|
|
682
|
+
function y(m) {
|
|
683
|
+
const R = {
|
|
747
684
|
btn: !0,
|
|
748
685
|
"f-rt-btn": !0,
|
|
749
|
-
"f-btn-ml":
|
|
750
|
-
"f-btn-mr":
|
|
751
|
-
"btn-icontext": !!(
|
|
686
|
+
"f-btn-ml": h.value === "right",
|
|
687
|
+
"f-btn-mr": h.value === "left",
|
|
688
|
+
"btn-icontext": !!(m.icon && m.icon.trim())
|
|
752
689
|
};
|
|
753
|
-
if (
|
|
754
|
-
const
|
|
755
|
-
|
|
690
|
+
if (m.class) {
|
|
691
|
+
const A = m.class.split(" ");
|
|
692
|
+
A && A.length && A.reduce((a, n) => (a[n] = !0, a), R);
|
|
756
693
|
}
|
|
757
|
-
return
|
|
694
|
+
return R;
|
|
758
695
|
}
|
|
759
|
-
function
|
|
760
|
-
document.body.click(),
|
|
696
|
+
function T(m, R) {
|
|
697
|
+
document.body.click(), R.onClick(m, R.id), e.emit("click", m, R.id);
|
|
761
698
|
}
|
|
762
|
-
function O(
|
|
699
|
+
function O(m) {
|
|
763
700
|
return w("button", {
|
|
764
701
|
type: "button",
|
|
765
|
-
class:
|
|
766
|
-
id:
|
|
767
|
-
disabled: !
|
|
768
|
-
onClick: (
|
|
769
|
-
}, [g.shouldShowIcon(
|
|
770
|
-
class: g.iconClass(
|
|
771
|
-
}, null),
|
|
702
|
+
class: y(m),
|
|
703
|
+
id: m.id,
|
|
704
|
+
disabled: !m.enable,
|
|
705
|
+
onClick: (R) => T(R, m)
|
|
706
|
+
}, [g.shouldShowIcon(m) && w("i", {
|
|
707
|
+
class: g.iconClass(m)
|
|
708
|
+
}, null), m.text]);
|
|
772
709
|
}
|
|
773
|
-
const P = /* @__PURE__ */ new Map(),
|
|
774
|
-
function N(
|
|
775
|
-
const
|
|
776
|
-
let
|
|
777
|
-
const
|
|
778
|
-
if (
|
|
779
|
-
const
|
|
780
|
-
|
|
710
|
+
const P = /* @__PURE__ */ new Map(), k = [];
|
|
711
|
+
function N(m) {
|
|
712
|
+
const R = v.value;
|
|
713
|
+
let A = m;
|
|
714
|
+
const a = Array.from(R.children), n = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
715
|
+
if (n) {
|
|
716
|
+
const x = n.computedStyleMap().get("margin-left"), M = n.computedStyleMap().get("margin-right"), F = (x ? x.value : 0) + n.getBoundingClientRect().width + (M ? M.value : 0);
|
|
717
|
+
A -= F;
|
|
781
718
|
}
|
|
782
|
-
const t =
|
|
783
|
-
for (const
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
id:
|
|
787
|
-
width:
|
|
788
|
-
})) :
|
|
719
|
+
const t = a.filter((x) => x.id !== "__more_buttons__");
|
|
720
|
+
for (const x of t) {
|
|
721
|
+
const M = x.computedStyleMap().get("margin-left"), F = x.computedStyleMap().get("margin-right"), _ = (M ? M.value : 0) + x.getBoundingClientRect().width + (F ? F.value : 0);
|
|
722
|
+
A < _ ? (P.set(x.id, !0), k.push({
|
|
723
|
+
id: x.id,
|
|
724
|
+
width: _
|
|
725
|
+
})) : A -= _;
|
|
789
726
|
}
|
|
790
|
-
if (
|
|
791
|
-
for (let
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
|
|
727
|
+
if (k.length)
|
|
728
|
+
for (let x = k.length - 1; x >= 0; x--) {
|
|
729
|
+
const M = k[x].width;
|
|
730
|
+
if (A >= M)
|
|
731
|
+
A -= M, P.delete(k[x].id), k.pop();
|
|
795
732
|
else
|
|
796
733
|
break;
|
|
797
734
|
}
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
|
|
735
|
+
const r = Object.assign({}, I.value);
|
|
736
|
+
r.children = [];
|
|
737
|
+
const d = new G(r), E = o.value.reduce((x, M) => (P.has(M.id) && d.children.push(M), M.visible = !P.has(M.id), x.push(M), x), []);
|
|
738
|
+
I.value = d, o.value = E;
|
|
802
739
|
}
|
|
803
|
-
const
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
806
|
-
(
|
|
740
|
+
const j = new ResizeObserver((m) => {
|
|
741
|
+
if (m.length) {
|
|
742
|
+
const A = m[0].contentRect.width, n = v.value.getBoundingClientRect().width;
|
|
743
|
+
(A < n || k.length) && (N(A), b());
|
|
807
744
|
}
|
|
808
745
|
});
|
|
809
|
-
return
|
|
810
|
-
const
|
|
811
|
-
|
|
746
|
+
return z(() => {
|
|
747
|
+
const m = u.value;
|
|
748
|
+
j.observe(m), document.body.addEventListener("click", b), document.body.addEventListener("wheel", b);
|
|
812
749
|
}), ne(() => {
|
|
813
|
-
|
|
814
|
-
}),
|
|
815
|
-
|
|
750
|
+
j.disconnect(), document.body.removeEventListener("click", b), document.body.removeEventListener("wheel", b);
|
|
751
|
+
}), H(() => s.items, () => {
|
|
752
|
+
o.value = de(s.items);
|
|
816
753
|
}, {
|
|
817
754
|
deep: !0
|
|
818
755
|
}), e.expose({
|
|
819
|
-
elementRef:
|
|
756
|
+
elementRef: p
|
|
820
757
|
}), () => w("div", {
|
|
821
|
-
class:
|
|
822
|
-
ref:
|
|
758
|
+
class: l.value,
|
|
759
|
+
ref: p
|
|
823
760
|
}, [w("div", {
|
|
824
761
|
ref: u,
|
|
825
|
-
class:
|
|
762
|
+
class: i.value
|
|
826
763
|
}, [w("div", {
|
|
827
|
-
ref:
|
|
764
|
+
ref: v,
|
|
828
765
|
class: "d-inline-block f-response-content",
|
|
829
766
|
style: "white-space: nowrap;"
|
|
830
|
-
}, [
|
|
767
|
+
}, [o.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : O(m)), C.value && f(I.value)])])]);
|
|
831
768
|
}
|
|
832
769
|
});
|
|
833
|
-
function
|
|
834
|
-
const
|
|
770
|
+
function gt(s, e) {
|
|
771
|
+
const o = L("design-item-context"), p = L("toolbar-item-handler", () => {
|
|
835
772
|
});
|
|
836
773
|
function u() {
|
|
837
|
-
|
|
774
|
+
p && p();
|
|
838
775
|
}
|
|
839
|
-
function
|
|
776
|
+
function v(n) {
|
|
840
777
|
const t = {
|
|
841
778
|
"dropdown-menu": !0
|
|
842
779
|
};
|
|
843
|
-
if (
|
|
844
|
-
const
|
|
845
|
-
|
|
780
|
+
if (n.class) {
|
|
781
|
+
const r = n.menuClass.split(" ");
|
|
782
|
+
r && r.length && r.reduce((d, E) => (d[E] = !0, d), t);
|
|
846
783
|
}
|
|
847
784
|
return t;
|
|
848
785
|
}
|
|
849
|
-
function
|
|
786
|
+
function h(n) {
|
|
850
787
|
const t = {
|
|
851
|
-
disabled: !
|
|
788
|
+
disabled: !n.enable,
|
|
852
789
|
"dropdown-submenu": !0,
|
|
853
790
|
"f-rt-dropdown": !0
|
|
854
|
-
},
|
|
855
|
-
return
|
|
791
|
+
}, r = n.dropdownClass.split(" ");
|
|
792
|
+
return r && r.length && r.reduce((d, E) => (d[E] = !0, d), t), t;
|
|
856
793
|
}
|
|
857
|
-
function
|
|
794
|
+
function D(n) {
|
|
858
795
|
const t = {
|
|
859
|
-
disabled: !
|
|
796
|
+
disabled: !n.enable,
|
|
860
797
|
"dropdown-item": !0,
|
|
861
798
|
"f-rt-btn": !0,
|
|
862
799
|
"position-relative": !0,
|
|
863
800
|
"farris-component": !0
|
|
864
|
-
},
|
|
865
|
-
return
|
|
801
|
+
}, r = n.class.split(" ");
|
|
802
|
+
return r && r.length && r.reduce((d, E) => (d[E] = !0, d), t), t;
|
|
866
803
|
}
|
|
867
|
-
let
|
|
804
|
+
let I;
|
|
868
805
|
const g = /* @__PURE__ */ new Map();
|
|
869
|
-
function C(
|
|
870
|
-
var
|
|
871
|
-
((
|
|
872
|
-
const
|
|
873
|
-
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(
|
|
874
|
-
const
|
|
875
|
-
|
|
806
|
+
function C(n, t, r) {
|
|
807
|
+
var E;
|
|
808
|
+
((E = n.target) == null ? void 0 : E.id) === t.id && n.stopPropagation();
|
|
809
|
+
const d = r ? r.id : "__top_item__";
|
|
810
|
+
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(d, t) : g.delete(d)), g.has(d) && g.get(d) !== t) {
|
|
811
|
+
const x = g.get(d);
|
|
812
|
+
x && (x.expanded = !1);
|
|
876
813
|
}
|
|
877
814
|
}
|
|
878
|
-
function
|
|
879
|
-
|
|
815
|
+
function l(n) {
|
|
816
|
+
n && (n.stopPropagation(), n.preventDefault());
|
|
880
817
|
}
|
|
881
|
-
function
|
|
818
|
+
function i() {
|
|
882
819
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
|
|
883
|
-
const
|
|
884
|
-
Array.from(
|
|
820
|
+
const n = document.getElementsByClassName("dgComponentSelected");
|
|
821
|
+
Array.from(n).forEach((t) => t.classList.remove("dgComponentSelected"));
|
|
885
822
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
823
|
+
function f(n) {
|
|
824
|
+
n.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
888
825
|
}
|
|
889
|
-
function
|
|
826
|
+
function c(n) {
|
|
890
827
|
const {
|
|
891
828
|
buttons: t = []
|
|
892
|
-
} =
|
|
893
|
-
let
|
|
894
|
-
t.forEach((
|
|
895
|
-
|
|
829
|
+
} = o.schema;
|
|
830
|
+
let r = [];
|
|
831
|
+
t.forEach((x) => {
|
|
832
|
+
r = r.concat(x.children || []);
|
|
896
833
|
});
|
|
897
|
-
const
|
|
834
|
+
const d = r.findIndex((x) => x.id === n), E = d === -1 ? null : r[d];
|
|
898
835
|
return {
|
|
899
|
-
index:
|
|
900
|
-
item:
|
|
836
|
+
index: d,
|
|
837
|
+
item: E
|
|
901
838
|
};
|
|
902
839
|
}
|
|
903
|
-
function
|
|
840
|
+
function b(n) {
|
|
904
841
|
const {
|
|
905
842
|
buttons: t = []
|
|
906
|
-
} =
|
|
843
|
+
} = o.schema, r = t.findIndex((E) => E.id === n), d = r === -1 ? null : t[r];
|
|
907
844
|
return {
|
|
908
|
-
index:
|
|
909
|
-
item:
|
|
845
|
+
index: r,
|
|
846
|
+
item: d
|
|
910
847
|
};
|
|
911
848
|
}
|
|
912
|
-
function
|
|
913
|
-
var
|
|
914
|
-
|
|
849
|
+
function y(n) {
|
|
850
|
+
var d;
|
|
851
|
+
o.schema;
|
|
915
852
|
const {
|
|
916
853
|
index: t,
|
|
917
|
-
item:
|
|
918
|
-
} =
|
|
919
|
-
(
|
|
854
|
+
item: r
|
|
855
|
+
} = c(n);
|
|
856
|
+
(d = o == null ? void 0 : o.setupContext) == null || d.emit("selectionChange", r == null ? void 0 : r.type, r);
|
|
920
857
|
}
|
|
921
|
-
const
|
|
858
|
+
const T = function(n) {
|
|
922
859
|
const {
|
|
923
860
|
componentType: t
|
|
924
|
-
} =
|
|
925
|
-
return
|
|
861
|
+
} = n, r = q(t, n), d = t.toLowerCase().replace("-", "_");
|
|
862
|
+
return r && !r.id && r.type === t && (r.id = `${d}_${Math.random().toString().slice(2, 6)}`), r;
|
|
926
863
|
}, O = function() {
|
|
927
|
-
const
|
|
864
|
+
const n = {
|
|
928
865
|
componentType: "response-toolbar-item",
|
|
929
866
|
parentComponentInstance: e.value,
|
|
930
867
|
targetPosition: -1
|
|
931
868
|
};
|
|
932
|
-
return
|
|
869
|
+
return T(n);
|
|
933
870
|
};
|
|
934
|
-
function P(
|
|
935
|
-
|
|
936
|
-
}
|
|
937
|
-
function
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
buttons:
|
|
941
|
-
} =
|
|
942
|
-
if (!
|
|
871
|
+
function P(n, t) {
|
|
872
|
+
l(n), i(), f(n), y(t.id);
|
|
873
|
+
}
|
|
874
|
+
function k(n, t, r) {
|
|
875
|
+
l(n);
|
|
876
|
+
const d = t.id, E = r && r.id, {
|
|
877
|
+
buttons: x = []
|
|
878
|
+
} = o.schema;
|
|
879
|
+
if (!E)
|
|
943
880
|
return;
|
|
944
881
|
const {
|
|
945
|
-
index:
|
|
946
|
-
} =
|
|
947
|
-
if (
|
|
882
|
+
index: M
|
|
883
|
+
} = b(E);
|
|
884
|
+
if (M === -1)
|
|
948
885
|
return;
|
|
949
886
|
const {
|
|
950
|
-
index:
|
|
951
|
-
} =
|
|
952
|
-
|
|
953
|
-
}
|
|
954
|
-
function N(
|
|
955
|
-
|
|
956
|
-
const
|
|
957
|
-
buttons:
|
|
958
|
-
} =
|
|
959
|
-
if (!
|
|
887
|
+
index: F
|
|
888
|
+
} = c(d);
|
|
889
|
+
F !== -1 && (x[M].children.splice(F, 1), u());
|
|
890
|
+
}
|
|
891
|
+
function N(n, t, r) {
|
|
892
|
+
l(n);
|
|
893
|
+
const d = r && r.id, {
|
|
894
|
+
buttons: E = []
|
|
895
|
+
} = o.schema;
|
|
896
|
+
if (!d)
|
|
960
897
|
return;
|
|
961
898
|
const {
|
|
962
|
-
index:
|
|
963
|
-
} =
|
|
964
|
-
if (
|
|
899
|
+
index: x
|
|
900
|
+
} = b(d);
|
|
901
|
+
if (x === -1)
|
|
965
902
|
return;
|
|
966
|
-
const
|
|
903
|
+
const M = O(), F = Object.assign({}, M, {
|
|
967
904
|
text: t.text
|
|
968
905
|
});
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
buttons:
|
|
975
|
-
} =
|
|
976
|
-
if (!
|
|
906
|
+
E[x].children.push(F), u();
|
|
907
|
+
}
|
|
908
|
+
function j(n, t, r) {
|
|
909
|
+
l(n);
|
|
910
|
+
const d = r && r.id, {
|
|
911
|
+
buttons: E = []
|
|
912
|
+
} = o.schema;
|
|
913
|
+
if (!d)
|
|
977
914
|
return;
|
|
978
915
|
const {
|
|
979
|
-
index:
|
|
980
|
-
} =
|
|
981
|
-
if (
|
|
916
|
+
index: x
|
|
917
|
+
} = b(d);
|
|
918
|
+
if (x === -1)
|
|
982
919
|
return;
|
|
983
|
-
const
|
|
920
|
+
const M = O(), F = Object.assign({}, M, {
|
|
984
921
|
text: "按钮"
|
|
985
922
|
});
|
|
986
|
-
|
|
923
|
+
E[x].children.push(F), u();
|
|
987
924
|
}
|
|
988
|
-
function
|
|
925
|
+
function m(n, t) {
|
|
989
926
|
return w("div", {
|
|
990
927
|
class: "component-btn-group"
|
|
991
928
|
}, [w("div", null, [w("div", {
|
|
@@ -994,7 +931,7 @@ function dt(r, e) {
|
|
|
994
931
|
title: "删除",
|
|
995
932
|
ref: "removeButton",
|
|
996
933
|
style: "position:static;",
|
|
997
|
-
onClick: (
|
|
934
|
+
onClick: (r) => k(r, n, t)
|
|
998
935
|
}, [w("i", {
|
|
999
936
|
class: "f-icon f-icon-yxs_delete"
|
|
1000
937
|
}, null)]), w("div", {
|
|
@@ -1003,7 +940,7 @@ function dt(r, e) {
|
|
|
1003
940
|
title: "复制",
|
|
1004
941
|
ref: "copyButton",
|
|
1005
942
|
style: "position:static;",
|
|
1006
|
-
onClick: (
|
|
943
|
+
onClick: (r) => N(r, n, t)
|
|
1007
944
|
}, [w("i", {
|
|
1008
945
|
class: "f-icon f-icon-yxs_copy"
|
|
1009
946
|
}, null)]), w("div", {
|
|
@@ -1012,174 +949,174 @@ function dt(r, e) {
|
|
|
1012
949
|
title: "新增同级",
|
|
1013
950
|
ref: "appendSame",
|
|
1014
951
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1015
|
-
onClick: (
|
|
952
|
+
onClick: (r) => j(r, n, t)
|
|
1016
953
|
}, [w("i", {
|
|
1017
954
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1018
955
|
}, null), w("span", {
|
|
1019
956
|
style: "font-size:13px;margin:auto"
|
|
1020
|
-
}, [
|
|
957
|
+
}, [fe("新增同级")])])])]);
|
|
1021
958
|
}
|
|
1022
|
-
function
|
|
1023
|
-
return
|
|
1024
|
-
class:
|
|
959
|
+
function R(n) {
|
|
960
|
+
return n.children.map((t) => t.children && t.children.length ? w("li", {
|
|
961
|
+
class: h(t),
|
|
1025
962
|
id: t.id,
|
|
1026
|
-
onClick: (
|
|
963
|
+
onClick: (r) => t.enable && C(r, t, n)
|
|
1027
964
|
}, [w("span", {
|
|
1028
965
|
id: t.id,
|
|
1029
|
-
class:
|
|
1030
|
-
onMouseover: (
|
|
966
|
+
class: D(t),
|
|
967
|
+
onMouseover: (r) => t.enable && C(r, t, n)
|
|
1031
968
|
}, [t.text, w("i", {
|
|
1032
969
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1033
970
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1034
|
-
}, null)]),
|
|
1035
|
-
class:
|
|
971
|
+
}, null)]), I(t, t)]) : w("li", {
|
|
972
|
+
class: D(t),
|
|
1036
973
|
id: t.id,
|
|
1037
|
-
onClick: (
|
|
1038
|
-
}, [
|
|
1039
|
-
class:
|
|
974
|
+
onClick: (r) => P(r, t)
|
|
975
|
+
}, [m(t, n), s.shouldShowIcon(t) && w("i", {
|
|
976
|
+
class: s.iconClass(t)
|
|
1040
977
|
}, null), t.text]));
|
|
1041
978
|
}
|
|
1042
|
-
function
|
|
1043
|
-
const
|
|
1044
|
-
display:
|
|
979
|
+
function A(n, t, r) {
|
|
980
|
+
const d = {
|
|
981
|
+
display: n.expanded ? "block" : "none",
|
|
1045
982
|
position: "fixed",
|
|
1046
983
|
maxWidth: "300px",
|
|
1047
984
|
width: "auto",
|
|
1048
985
|
minWidth: "120px"
|
|
1049
|
-
},
|
|
1050
|
-
if (
|
|
986
|
+
}, E = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = t, M = x == null ? void 0 : x.getClientRects();
|
|
987
|
+
if (x && M && M.length) {
|
|
1051
988
|
const {
|
|
1052
|
-
top:
|
|
1053
|
-
width:
|
|
1054
|
-
left:
|
|
1055
|
-
right:
|
|
989
|
+
top: F,
|
|
990
|
+
width: _,
|
|
991
|
+
left: $,
|
|
992
|
+
right: V,
|
|
1056
993
|
height: U
|
|
1057
|
-
} =
|
|
1058
|
-
|
|
1059
|
-
const Ie =
|
|
1060
|
-
if (
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
|
|
994
|
+
} = M[0], Y = Math.ceil(U + F);
|
|
995
|
+
d.top = `${Y}px`, d.left = `${$}px`;
|
|
996
|
+
const Ie = n.id + "_menu", Z = t ? t.querySelector("#" + Ie) : null;
|
|
997
|
+
if (Z) {
|
|
998
|
+
d.display === "block" && (Z.style.display = "block");
|
|
999
|
+
const le = Z.getBoundingClientRect();
|
|
1000
|
+
if (r) {
|
|
1001
|
+
d.top = `${F - 6}px`;
|
|
1002
|
+
const De = Math.ceil(_ + $);
|
|
1003
|
+
d.left = `${De}px`;
|
|
1067
1004
|
}
|
|
1068
|
-
|
|
1005
|
+
E - $ - _ < le.width && (d.left = `${(r ? $ : V) - le.width}px`);
|
|
1069
1006
|
}
|
|
1070
1007
|
}
|
|
1071
|
-
return
|
|
1008
|
+
return d;
|
|
1072
1009
|
}
|
|
1073
|
-
|
|
1074
|
-
var
|
|
1075
|
-
const
|
|
1010
|
+
I = function(n, t) {
|
|
1011
|
+
var x, M;
|
|
1012
|
+
const r = ue(), d = t ? t.id : n.id, E = (M = (x = r == null ? void 0 : r.exposed) == null ? void 0 : x.elementRef.value) == null ? void 0 : M.querySelector("#" + d);
|
|
1076
1013
|
return w("ul", {
|
|
1077
|
-
class:
|
|
1078
|
-
style:
|
|
1079
|
-
id:
|
|
1080
|
-
}, [
|
|
1014
|
+
class: v(n),
|
|
1015
|
+
style: A(n, E, t),
|
|
1016
|
+
id: n.id + "_menu"
|
|
1017
|
+
}, [R(n)]);
|
|
1081
1018
|
};
|
|
1082
|
-
function
|
|
1083
|
-
g.forEach((
|
|
1084
|
-
|
|
1019
|
+
function a() {
|
|
1020
|
+
g.forEach((n) => {
|
|
1021
|
+
n.expanded = !1;
|
|
1085
1022
|
}), g.clear();
|
|
1086
1023
|
}
|
|
1087
1024
|
return {
|
|
1088
|
-
renderDropdownMenu:
|
|
1089
|
-
clearAllDropDownMenu:
|
|
1025
|
+
renderDropdownMenu: I,
|
|
1026
|
+
clearAllDropDownMenu: a
|
|
1090
1027
|
};
|
|
1091
1028
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const
|
|
1029
|
+
function mt(s, e, o) {
|
|
1030
|
+
const p = S(s.alignment), {
|
|
1094
1031
|
renderDropdownMenu: u,
|
|
1095
|
-
clearAllDropDownMenu:
|
|
1096
|
-
} =
|
|
1032
|
+
clearAllDropDownMenu: v
|
|
1033
|
+
} = gt(e, o), h = L("design-item-context"), D = L("toolbar-item-handler", () => {
|
|
1097
1034
|
});
|
|
1098
|
-
function
|
|
1099
|
-
|
|
1035
|
+
function I() {
|
|
1036
|
+
D && D();
|
|
1100
1037
|
}
|
|
1101
|
-
function g(
|
|
1102
|
-
const
|
|
1038
|
+
function g(a) {
|
|
1039
|
+
const n = {
|
|
1103
1040
|
"btn-group": !0,
|
|
1104
1041
|
"f-rt-dropdown": !0,
|
|
1105
|
-
"f-btn-ml":
|
|
1106
|
-
"f-btn-mr":
|
|
1107
|
-
}, t =
|
|
1108
|
-
return t && t.length && t.reduce((
|
|
1042
|
+
"f-btn-ml": p.value === "right",
|
|
1043
|
+
"f-btn-mr": p.value === "left"
|
|
1044
|
+
}, t = a.dropdownClass.split(" ");
|
|
1045
|
+
return t && t.length && t.reduce((r, d) => (r[d] = !0, r), n), n;
|
|
1109
1046
|
}
|
|
1110
|
-
function C(
|
|
1111
|
-
const
|
|
1047
|
+
function C(a) {
|
|
1048
|
+
const n = {
|
|
1112
1049
|
btn: !0,
|
|
1113
|
-
disabled: !
|
|
1050
|
+
disabled: !a.enable,
|
|
1114
1051
|
"position-relative": !0,
|
|
1115
1052
|
"farris-component": !0,
|
|
1116
1053
|
"f-rt-btn": !0,
|
|
1117
|
-
"btn-icontext": !!(
|
|
1054
|
+
"btn-icontext": !!(a.icon && a.icon.trim())
|
|
1118
1055
|
};
|
|
1119
|
-
if (
|
|
1120
|
-
const t =
|
|
1121
|
-
t && t.length && t.reduce((
|
|
1056
|
+
if (a.class) {
|
|
1057
|
+
const t = a.class.split(" ");
|
|
1058
|
+
t && t.length && t.reduce((r, d) => (r[d] = !0, r), n);
|
|
1122
1059
|
}
|
|
1123
|
-
return
|
|
1060
|
+
return n;
|
|
1124
1061
|
}
|
|
1125
|
-
function
|
|
1126
|
-
|
|
1062
|
+
function l(a) {
|
|
1063
|
+
a && (a.stopPropagation(), a.preventDefault());
|
|
1127
1064
|
}
|
|
1128
|
-
function a
|
|
1129
|
-
|
|
1130
|
-
const t =
|
|
1131
|
-
document.body.click(),
|
|
1065
|
+
function i(a, n) {
|
|
1066
|
+
l(a);
|
|
1067
|
+
const t = n.expanded;
|
|
1068
|
+
document.body.click(), n.expanded = !t;
|
|
1132
1069
|
}
|
|
1133
|
-
const
|
|
1070
|
+
const f = function(a) {
|
|
1134
1071
|
const {
|
|
1135
|
-
componentType:
|
|
1136
|
-
} =
|
|
1137
|
-
return t && !t.id && t.type ===
|
|
1138
|
-
},
|
|
1139
|
-
const
|
|
1072
|
+
componentType: n
|
|
1073
|
+
} = a, t = q(n, a), r = n.toLowerCase().replace("-", "_");
|
|
1074
|
+
return t && !t.id && t.type === n && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
|
|
1075
|
+
}, c = function() {
|
|
1076
|
+
const a = {
|
|
1140
1077
|
componentType: "response-toolbar-item",
|
|
1141
|
-
parentComponentInstance:
|
|
1078
|
+
parentComponentInstance: o.value,
|
|
1142
1079
|
targetPosition: -1
|
|
1143
1080
|
};
|
|
1144
|
-
return
|
|
1081
|
+
return f(a);
|
|
1145
1082
|
};
|
|
1146
|
-
function
|
|
1147
|
-
const
|
|
1083
|
+
function b(a) {
|
|
1084
|
+
const n = h.schema.buttons || h.schema.contents, t = n == null ? void 0 : n.findIndex((d) => d.id === a), r = t === -1 ? null : n[t];
|
|
1148
1085
|
return {
|
|
1149
1086
|
index: t,
|
|
1150
|
-
toolbarItem:
|
|
1087
|
+
toolbarItem: r
|
|
1151
1088
|
};
|
|
1152
1089
|
}
|
|
1153
|
-
function
|
|
1154
|
-
var
|
|
1090
|
+
function y(a, n) {
|
|
1091
|
+
var M;
|
|
1155
1092
|
const {
|
|
1156
1093
|
index: t,
|
|
1157
|
-
toolbarItem:
|
|
1158
|
-
} =
|
|
1094
|
+
toolbarItem: r
|
|
1095
|
+
} = b(n);
|
|
1159
1096
|
if (t === -1)
|
|
1160
1097
|
return;
|
|
1161
|
-
const
|
|
1162
|
-
text:
|
|
1098
|
+
const d = r.text || "按钮", E = c(), x = Object.assign({}, E, {
|
|
1099
|
+
text: d
|
|
1163
1100
|
});
|
|
1164
|
-
(
|
|
1101
|
+
(M = h.schema.buttons) == null || M.push(x), I();
|
|
1165
1102
|
}
|
|
1166
|
-
function
|
|
1103
|
+
function T(a, n) {
|
|
1167
1104
|
const {
|
|
1168
1105
|
index: t,
|
|
1169
|
-
toolbarItem:
|
|
1170
|
-
} =
|
|
1106
|
+
toolbarItem: r
|
|
1107
|
+
} = b(n);
|
|
1171
1108
|
if (t === -1)
|
|
1172
1109
|
return;
|
|
1173
|
-
const
|
|
1174
|
-
text:
|
|
1175
|
-
}),
|
|
1176
|
-
|
|
1110
|
+
const d = r.text || "按钮", E = c(), x = Object.assign({}, E, {
|
|
1111
|
+
text: d
|
|
1112
|
+
}), M = h.schema.buttons[t].children || [];
|
|
1113
|
+
M.push(x), h.schema.buttons[t].children = M, I();
|
|
1177
1114
|
}
|
|
1178
|
-
function O(
|
|
1179
|
-
const t =
|
|
1180
|
-
|
|
1115
|
+
function O(a, n) {
|
|
1116
|
+
const t = h.schema.buttons || h.schema.contents, r = t == null ? void 0 : t.findIndex((d) => d.id === n);
|
|
1117
|
+
r !== -1 && (t.splice(r, 1), I());
|
|
1181
1118
|
}
|
|
1182
|
-
function P(
|
|
1119
|
+
function P(a) {
|
|
1183
1120
|
return w("div", {
|
|
1184
1121
|
class: "component-btn-group"
|
|
1185
1122
|
}, [w("div", null, [w("div", {
|
|
@@ -1188,7 +1125,7 @@ function ut(r, e, n) {
|
|
|
1188
1125
|
title: "删除",
|
|
1189
1126
|
ref: "removeButton",
|
|
1190
1127
|
style: "position:static;",
|
|
1191
|
-
onClick: (
|
|
1128
|
+
onClick: (n) => O(n, a)
|
|
1192
1129
|
}, [w("i", {
|
|
1193
1130
|
class: "f-icon f-icon-yxs_delete"
|
|
1194
1131
|
}, null)]), w("div", {
|
|
@@ -1197,7 +1134,7 @@ function ut(r, e, n) {
|
|
|
1197
1134
|
title: "复制",
|
|
1198
1135
|
ref: "copyButton",
|
|
1199
1136
|
style: "position:static;",
|
|
1200
|
-
onClick: (
|
|
1137
|
+
onClick: (n) => y(n, a)
|
|
1201
1138
|
}, [w("i", {
|
|
1202
1139
|
class: "f-icon f-icon-yxs_copy"
|
|
1203
1140
|
}, null)]), w("div", {
|
|
@@ -1206,76 +1143,76 @@ function ut(r, e, n) {
|
|
|
1206
1143
|
title: "新增子级",
|
|
1207
1144
|
ref: "appendChildButton",
|
|
1208
1145
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1209
|
-
onClick: (
|
|
1146
|
+
onClick: (n) => T(n, a)
|
|
1210
1147
|
}, [w("i", {
|
|
1211
1148
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1212
1149
|
}, null), w("span", {
|
|
1213
1150
|
style: "font-size:13px;margin:auto"
|
|
1214
|
-
}, [
|
|
1151
|
+
}, [fe("新增子级")])])])]);
|
|
1215
1152
|
}
|
|
1216
|
-
function
|
|
1217
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1218
|
-
const
|
|
1219
|
-
Array.from(
|
|
1153
|
+
function k() {
|
|
1154
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
|
|
1155
|
+
const a = document.getElementsByClassName("dgComponentSelected");
|
|
1156
|
+
Array.from(a).forEach((n) => n.classList.remove("dgComponentSelected"));
|
|
1220
1157
|
}
|
|
1221
|
-
function N(
|
|
1222
|
-
|
|
1158
|
+
function N(a) {
|
|
1159
|
+
a.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1223
1160
|
}
|
|
1224
|
-
function
|
|
1225
|
-
var
|
|
1226
|
-
const
|
|
1161
|
+
function j(a) {
|
|
1162
|
+
var d;
|
|
1163
|
+
const n = h.schema.buttons || h.schema.contents, t = n == null ? void 0 : n.findIndex((E) => E.id === a);
|
|
1227
1164
|
if (t === -1)
|
|
1228
1165
|
return;
|
|
1229
|
-
const
|
|
1230
|
-
(
|
|
1166
|
+
const r = n[t];
|
|
1167
|
+
(d = h == null ? void 0 : h.setupContext) == null || d.emit("selectionChange", "response-toolbar-item", r);
|
|
1231
1168
|
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1169
|
+
function m(a, n) {
|
|
1170
|
+
l(a), k(), N(a), l(a), i(a, n), j(n.id);
|
|
1234
1171
|
}
|
|
1235
|
-
function
|
|
1172
|
+
function R(a) {
|
|
1236
1173
|
return w("div", {
|
|
1237
|
-
id:
|
|
1238
|
-
class: g(
|
|
1174
|
+
id: a.id,
|
|
1175
|
+
class: g(a)
|
|
1239
1176
|
}, [w("div", {
|
|
1240
|
-
class: C(
|
|
1177
|
+
class: C(a),
|
|
1241
1178
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1242
|
-
onClick: (
|
|
1243
|
-
}, [P(
|
|
1244
|
-
class: e.iconClass(
|
|
1245
|
-
}, null), w("span", null, [
|
|
1179
|
+
onClick: (n) => a.enable && m(n, a)
|
|
1180
|
+
}, [P(a.id), e.shouldShowIcon(a) && w("i", {
|
|
1181
|
+
class: e.iconClass(a)
|
|
1182
|
+
}, null), w("span", null, [a.text]), w("i", {
|
|
1246
1183
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1247
1184
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1248
|
-
}, null)]), u(
|
|
1185
|
+
}, null)]), u(a)]);
|
|
1249
1186
|
}
|
|
1250
|
-
function
|
|
1251
|
-
|
|
1187
|
+
function A() {
|
|
1188
|
+
v();
|
|
1252
1189
|
}
|
|
1253
1190
|
return {
|
|
1254
|
-
renderToolbarDropdown:
|
|
1255
|
-
clearAllDropDown:
|
|
1191
|
+
renderToolbarDropdown: R,
|
|
1192
|
+
clearAllDropDown: A
|
|
1256
1193
|
};
|
|
1257
1194
|
}
|
|
1258
|
-
function
|
|
1259
|
-
function
|
|
1260
|
-
var u,
|
|
1195
|
+
function ht() {
|
|
1196
|
+
function s(e) {
|
|
1197
|
+
var u, v;
|
|
1261
1198
|
if (!e)
|
|
1262
1199
|
return !1;
|
|
1263
|
-
const
|
|
1264
|
-
if (!
|
|
1200
|
+
const o = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1201
|
+
if (!o)
|
|
1265
1202
|
return !1;
|
|
1266
|
-
const
|
|
1203
|
+
const p = (v = o.schema.appearance) == null ? void 0 : v.class;
|
|
1267
1204
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1268
|
-
const
|
|
1269
|
-
if (
|
|
1205
|
+
const h = o.schema.type, D = (h === "response-form" || h === "content-container") && p && p.includes("farris-form");
|
|
1206
|
+
if (o.schema.type !== "response-layout-item" && !D)
|
|
1270
1207
|
return !1;
|
|
1271
1208
|
}
|
|
1272
1209
|
return e.controlType !== "field-set";
|
|
1273
1210
|
}
|
|
1274
1211
|
return {
|
|
1275
|
-
basalDragulaRuleForContainer:
|
|
1212
|
+
basalDragulaRuleForContainer: s
|
|
1276
1213
|
};
|
|
1277
1214
|
}
|
|
1278
|
-
const
|
|
1215
|
+
const bt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-design.gitee.io/dragging-rules.schema.json", vt = "Dragging Rules", Ct = "The rules of designer canvas", wt = "object", xt = {
|
|
1279
1216
|
"f-page": {
|
|
1280
1217
|
description: "The root class of page designed by farris.",
|
|
1281
1218
|
type: "object",
|
|
@@ -1694,6 +1631,80 @@ const mt = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
1694
1631
|
"f-list-nav-left": {
|
|
1695
1632
|
description: "",
|
|
1696
1633
|
type: "object"
|
|
1634
|
+
},
|
|
1635
|
+
"f-struct-data-grid-in-nav": {
|
|
1636
|
+
description: "",
|
|
1637
|
+
type: "object",
|
|
1638
|
+
properties: {
|
|
1639
|
+
contents: {
|
|
1640
|
+
type: "object",
|
|
1641
|
+
properties: {
|
|
1642
|
+
"f-section-form": {
|
|
1643
|
+
description: "",
|
|
1644
|
+
type: "object",
|
|
1645
|
+
properties: {
|
|
1646
|
+
rules: {
|
|
1647
|
+
type: "object",
|
|
1648
|
+
properties: {
|
|
1649
|
+
canAccept: {
|
|
1650
|
+
type: "boolean",
|
|
1651
|
+
const: !1
|
|
1652
|
+
},
|
|
1653
|
+
fixed: {
|
|
1654
|
+
type: "boolean",
|
|
1655
|
+
const: !0
|
|
1656
|
+
},
|
|
1657
|
+
hidePadding: {
|
|
1658
|
+
type: "boolean",
|
|
1659
|
+
const: !0
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
"f-section-grid": {
|
|
1666
|
+
description: "",
|
|
1667
|
+
type: "object",
|
|
1668
|
+
properties: {
|
|
1669
|
+
rules: {
|
|
1670
|
+
type: "object",
|
|
1671
|
+
properties: {
|
|
1672
|
+
canAccept: {
|
|
1673
|
+
type: "boolean",
|
|
1674
|
+
const: !1
|
|
1675
|
+
},
|
|
1676
|
+
fixed: {
|
|
1677
|
+
type: "boolean",
|
|
1678
|
+
const: !0
|
|
1679
|
+
},
|
|
1680
|
+
hidePadding: {
|
|
1681
|
+
type: "boolean",
|
|
1682
|
+
const: !0
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
rules: {
|
|
1691
|
+
type: "object",
|
|
1692
|
+
properties: {
|
|
1693
|
+
canAccept: {
|
|
1694
|
+
type: "boolean",
|
|
1695
|
+
const: !1
|
|
1696
|
+
},
|
|
1697
|
+
fixed: {
|
|
1698
|
+
type: "boolean",
|
|
1699
|
+
const: !0
|
|
1700
|
+
},
|
|
1701
|
+
hidePadding: {
|
|
1702
|
+
type: "boolean",
|
|
1703
|
+
const: !0
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1697
1708
|
}
|
|
1698
1709
|
}
|
|
1699
1710
|
}
|
|
@@ -1839,209 +1850,142 @@ const mt = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
1839
1850
|
description: "",
|
|
1840
1851
|
type: "object"
|
|
1841
1852
|
}
|
|
1842
|
-
},
|
|
1843
|
-
$schema:
|
|
1844
|
-
$id:
|
|
1845
|
-
title:
|
|
1846
|
-
description:
|
|
1847
|
-
type:
|
|
1848
|
-
properties:
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
function
|
|
1852
|
-
function r(s, y, h, x) {
|
|
1853
|
+
}, Tt = {
|
|
1854
|
+
$schema: bt,
|
|
1855
|
+
$id: yt,
|
|
1856
|
+
title: vt,
|
|
1857
|
+
description: Ct,
|
|
1858
|
+
type: wt,
|
|
1859
|
+
properties: xt
|
|
1860
|
+
}, K = /* @__PURE__ */ new Map();
|
|
1861
|
+
function Te() {
|
|
1862
|
+
function s(c, b, y, T) {
|
|
1853
1863
|
var O;
|
|
1854
|
-
if (typeof
|
|
1855
|
-
return ((O =
|
|
1856
|
-
if (typeof
|
|
1857
|
-
const P = Object.keys(
|
|
1864
|
+
if (typeof y == "number")
|
|
1865
|
+
return ((O = T[c]) == null ? void 0 : O.length) === y;
|
|
1866
|
+
if (typeof y == "object") {
|
|
1867
|
+
const P = Object.keys(y)[0], k = y[P];
|
|
1858
1868
|
if (P === "not")
|
|
1859
|
-
return Number(
|
|
1869
|
+
return Number(T[c].length) !== Number(k);
|
|
1860
1870
|
if (P === "moreThan")
|
|
1861
|
-
return Number(
|
|
1871
|
+
return Number(T[c].length) >= Number(k);
|
|
1862
1872
|
if (P === "lessThan")
|
|
1863
|
-
return Number(
|
|
1873
|
+
return Number(T[c].length) <= Number(k);
|
|
1864
1874
|
}
|
|
1865
1875
|
return !1;
|
|
1866
1876
|
}
|
|
1867
|
-
function e(
|
|
1868
|
-
return typeof
|
|
1877
|
+
function e(c, b, y, T) {
|
|
1878
|
+
return typeof y == "boolean" ? T.childrenClassList.includes(b) === !!y : !1;
|
|
1869
1879
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return typeof
|
|
1880
|
+
function o(c, b, y, T) {
|
|
1881
|
+
return typeof y == "boolean" ? T.parentClassList.includes(b) === !!y : !1;
|
|
1872
1882
|
}
|
|
1873
|
-
function c
|
|
1874
|
-
return typeof
|
|
1883
|
+
function p(c, b, y, T) {
|
|
1884
|
+
return typeof y == "boolean" ? T.parentClassList.includes(b) === !!y : !1;
|
|
1875
1885
|
}
|
|
1876
1886
|
const u = /* @__PURE__ */ new Map([
|
|
1877
|
-
["length",
|
|
1887
|
+
["length", s],
|
|
1878
1888
|
["hasChildren", e],
|
|
1879
|
-
["hasSibling",
|
|
1880
|
-
["hasParent",
|
|
1889
|
+
["hasSibling", p],
|
|
1890
|
+
["hasParent", o]
|
|
1881
1891
|
]);
|
|
1882
|
-
function
|
|
1883
|
-
const
|
|
1884
|
-
return typeof
|
|
1885
|
-
if (
|
|
1886
|
-
return { target:
|
|
1887
|
-
const O =
|
|
1888
|
-
return { target:
|
|
1892
|
+
function v(c, b) {
|
|
1893
|
+
const y = c;
|
|
1894
|
+
return typeof b == "number" ? [{ target: y, operator: "length", param: null, value: Number(b) }] : typeof b == "object" ? Object.keys(b).map((T) => {
|
|
1895
|
+
if (T === "length")
|
|
1896
|
+
return { target: y, operator: "length", param: null, value: b[T] };
|
|
1897
|
+
const O = T, P = b[T];
|
|
1898
|
+
return { target: y, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
|
|
1889
1899
|
}) : [];
|
|
1890
1900
|
}
|
|
1891
|
-
function
|
|
1892
|
-
if (u.has(
|
|
1893
|
-
const
|
|
1894
|
-
return
|
|
1901
|
+
function h(c, b) {
|
|
1902
|
+
if (u.has(c.operator)) {
|
|
1903
|
+
const y = u.get(c.operator);
|
|
1904
|
+
return y && y(c.target, c.param, c.value, b) || !1;
|
|
1895
1905
|
}
|
|
1896
1906
|
return !1;
|
|
1897
1907
|
}
|
|
1898
|
-
function
|
|
1899
|
-
return Object.keys(
|
|
1900
|
-
const N =
|
|
1908
|
+
function D(c, b) {
|
|
1909
|
+
return Object.keys(c).reduce((P, k) => {
|
|
1910
|
+
const N = v(k, c[k]);
|
|
1901
1911
|
return P.push(...N), P;
|
|
1902
|
-
}, []).reduce((P,
|
|
1903
|
-
}
|
|
1904
|
-
function
|
|
1905
|
-
const
|
|
1906
|
-
return
|
|
1907
|
-
}
|
|
1908
|
-
function g(
|
|
1909
|
-
const
|
|
1910
|
-
return
|
|
1911
|
-
}
|
|
1912
|
-
function C(
|
|
1913
|
-
return (
|
|
1914
|
-
const
|
|
1915
|
-
return
|
|
1916
|
-
const P =
|
|
1917
|
-
return
|
|
1918
|
-
},
|
|
1912
|
+
}, []).reduce((P, k) => P && h(k, b), !0);
|
|
1913
|
+
}
|
|
1914
|
+
function I(c, b) {
|
|
1915
|
+
const y = Object.keys(c), T = y.includes("allOf"), O = y.includes("anyOf"), P = T || O, j = (P ? c[P ? T ? "allOf" : "anyOf" : "allOf"] : [c]).map((R) => D(R, b));
|
|
1916
|
+
return T ? !j.includes(!1) : j.includes(!0);
|
|
1917
|
+
}
|
|
1918
|
+
function g(c, b) {
|
|
1919
|
+
const y = c.const;
|
|
1920
|
+
return y ? typeof y == "boolean" ? y : typeof y == "object" ? I(y, b) : !1 : !1;
|
|
1921
|
+
}
|
|
1922
|
+
function C(c) {
|
|
1923
|
+
return (b) => {
|
|
1924
|
+
const y = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1925
|
+
return c && c.properties && Object.keys(c.properties).reduce((T, O) => {
|
|
1926
|
+
const P = c.properties[O];
|
|
1927
|
+
return T[O] = g(P, b), T;
|
|
1928
|
+
}, y), y;
|
|
1919
1929
|
};
|
|
1920
1930
|
}
|
|
1921
|
-
function
|
|
1922
|
-
if (
|
|
1923
|
-
const { rules:
|
|
1924
|
-
|
|
1925
|
-
(P) =>
|
|
1931
|
+
function l(c, b, y) {
|
|
1932
|
+
if (b.type === "object" && b.properties) {
|
|
1933
|
+
const { rules: T, contents: O } = b.properties;
|
|
1934
|
+
y.set(c, C(T)), O && Object.keys(O.properties).forEach(
|
|
1935
|
+
(P) => l(P, O.properties[P], y)
|
|
1926
1936
|
);
|
|
1927
1937
|
}
|
|
1928
1938
|
}
|
|
1929
|
-
function
|
|
1930
|
-
const { properties:
|
|
1931
|
-
Object.keys(
|
|
1932
|
-
|
|
1939
|
+
function i() {
|
|
1940
|
+
const { properties: c } = Tt;
|
|
1941
|
+
Object.keys(c).forEach((b) => {
|
|
1942
|
+
l(b, c[b], K);
|
|
1933
1943
|
});
|
|
1934
1944
|
}
|
|
1935
|
-
function
|
|
1936
|
-
const
|
|
1937
|
-
return
|
|
1938
|
-
}
|
|
1939
|
-
return a(), { getRuleValue: d };
|
|
1940
|
-
}
|
|
1941
|
-
class Se {
|
|
1942
|
-
static getEditorTypesByMDataType(e) {
|
|
1943
|
-
const n = this.fieldControlTypeMapping[e];
|
|
1944
|
-
return n || [{ key: "", value: "" }];
|
|
1945
|
+
function f(c, b) {
|
|
1946
|
+
const y = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1947
|
+
return K.has(c) ? K.get(c)(b) : y;
|
|
1945
1948
|
}
|
|
1949
|
+
return i(), { getRuleValue: f };
|
|
1946
1950
|
}
|
|
1947
|
-
/**
|
|
1948
|
-
* <字段类型,可配置的控件类型列表>的映射
|
|
1949
|
-
*/
|
|
1950
|
-
F(Se, "fieldControlTypeMapping", {
|
|
1951
|
-
String: [
|
|
1952
|
-
{ key: I["input-group"].type, value: I["input-group"].name },
|
|
1953
|
-
{ key: I.lookup.type, value: I.lookup.name },
|
|
1954
|
-
{ key: I.Image.type, value: I.Image.name },
|
|
1955
|
-
{ key: I["date-picker"].type, value: I["date-picker"].name },
|
|
1956
|
-
{ key: I["check-box"].type, value: I["check-box"].name },
|
|
1957
|
-
{ key: I["radio-group"].type, value: I["radio-group"].name },
|
|
1958
|
-
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
1959
|
-
{ key: I.textarea.type, value: I.textarea.name }
|
|
1960
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
1961
|
-
],
|
|
1962
|
-
Text: [
|
|
1963
|
-
{ key: I.textarea.type, value: I.textarea.name },
|
|
1964
|
-
{ key: I.avatar.type, value: I.avatar.name },
|
|
1965
|
-
{ key: I.lookup.type, value: I.lookup.name }
|
|
1966
|
-
],
|
|
1967
|
-
Decimal: [
|
|
1968
|
-
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
1969
|
-
],
|
|
1970
|
-
Integer: [
|
|
1971
|
-
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
1972
|
-
],
|
|
1973
|
-
Number: [
|
|
1974
|
-
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
1975
|
-
],
|
|
1976
|
-
BigNumber: [
|
|
1977
|
-
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
1978
|
-
],
|
|
1979
|
-
Date: [
|
|
1980
|
-
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
1981
|
-
],
|
|
1982
|
-
DateTime: [
|
|
1983
|
-
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
1984
|
-
],
|
|
1985
|
-
Boolean: [
|
|
1986
|
-
{ key: I.switch.type, value: I.switch.name },
|
|
1987
|
-
{ key: I["check-box"].type, value: I["check-box"].name }
|
|
1988
|
-
],
|
|
1989
|
-
Enum: [
|
|
1990
|
-
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
1991
|
-
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
1992
|
-
],
|
|
1993
|
-
Object: [
|
|
1994
|
-
{ key: I.lookup.type, value: I.lookup.name },
|
|
1995
|
-
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
1996
|
-
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
1997
|
-
],
|
|
1998
|
-
EmployeeSelector: [
|
|
1999
|
-
{ key: I.EmployeeSelector.type, value: I.EmployeeSelector.name }
|
|
2000
|
-
],
|
|
2001
|
-
AdminOrganizationSelector: [
|
|
2002
|
-
{ key: I.AdminOrganizationSelector.type, value: I.AdminOrganizationSelector.name }
|
|
2003
|
-
]
|
|
2004
|
-
});
|
|
2005
1951
|
class ae {
|
|
2006
|
-
constructor(e,
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
1952
|
+
constructor(e, o) {
|
|
1953
|
+
B(this, "componentId");
|
|
1954
|
+
B(this, "viewModelId");
|
|
1955
|
+
B(this, "eventsEditorUtils");
|
|
1956
|
+
B(this, "formSchemaUtils");
|
|
1957
|
+
B(this, "formMetadataConverter");
|
|
1958
|
+
B(this, "designViewModelUtils");
|
|
1959
|
+
B(this, "designViewModelField");
|
|
1960
|
+
B(this, "controlCreatorUtils");
|
|
1961
|
+
B(this, "designerHostService");
|
|
1962
|
+
B(this, "schemaService", null);
|
|
1963
|
+
B(this, "metadataService", null);
|
|
1964
|
+
B(this, "propertyConfig", {
|
|
2019
1965
|
type: "object",
|
|
2020
1966
|
categories: {}
|
|
2021
1967
|
});
|
|
2022
|
-
var
|
|
2023
|
-
this.componentId = e, this.designerHostService =
|
|
1968
|
+
var p;
|
|
1969
|
+
this.componentId = e, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((p = this.formSchemaUtils) == null ? void 0 : p.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
|
|
2024
1970
|
}
|
|
2025
1971
|
getTableInfo() {
|
|
2026
1972
|
var e;
|
|
2027
1973
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
2028
1974
|
}
|
|
2029
1975
|
setDesignViewModelField(e) {
|
|
2030
|
-
const
|
|
2031
|
-
if (
|
|
1976
|
+
const o = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1977
|
+
if (o) {
|
|
2032
1978
|
if (!this.designViewModelField) {
|
|
2033
|
-
const
|
|
2034
|
-
this.designViewModelField =
|
|
1979
|
+
const p = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1980
|
+
this.designViewModelField = p.fields.find((u) => u.id === o);
|
|
2035
1981
|
}
|
|
2036
1982
|
e.updateOn = this.designViewModelField.updateOn;
|
|
2037
1983
|
}
|
|
2038
1984
|
}
|
|
2039
|
-
changeFieldEditorType(e,
|
|
1985
|
+
changeFieldEditorType(e, o) {
|
|
2040
1986
|
}
|
|
2041
1987
|
getBasicPropConfig(e) {
|
|
2042
|
-
|
|
2043
|
-
var n = this;
|
|
2044
|
-
return this.setDesignViewModelField(e), {
|
|
1988
|
+
return {
|
|
2045
1989
|
description: "Basic Information",
|
|
2046
1990
|
title: "基本信息",
|
|
2047
1991
|
properties: {
|
|
@@ -2054,69 +1998,17 @@ class ae {
|
|
|
2054
1998
|
type: {
|
|
2055
1999
|
description: "组件类型",
|
|
2056
2000
|
title: "控件类型",
|
|
2057
|
-
type: "
|
|
2058
|
-
refreshPanelAfterChanged: !0,
|
|
2059
|
-
$converter: "/converter/change-editor.converter",
|
|
2001
|
+
type: "select",
|
|
2060
2002
|
editor: {
|
|
2061
2003
|
type: "combo-list",
|
|
2062
|
-
textField: "
|
|
2063
|
-
valueField: "
|
|
2064
|
-
data:
|
|
2065
|
-
editable: !1
|
|
2004
|
+
textField: "name",
|
|
2005
|
+
valueField: "value",
|
|
2006
|
+
data: [{ value: e.type, name: re[e.type].name }]
|
|
2066
2007
|
}
|
|
2067
|
-
},
|
|
2068
|
-
label: {
|
|
2069
|
-
title: "标签",
|
|
2070
|
-
type: "string",
|
|
2071
|
-
$converter: "/converter/form-group-label.converter"
|
|
2072
2008
|
}
|
|
2073
|
-
},
|
|
2074
|
-
setPropertyRelates(m, v) {
|
|
2075
|
-
if (m)
|
|
2076
|
-
switch (m && m.propertyID) {
|
|
2077
|
-
case "type": {
|
|
2078
|
-
n.changeControlType(e, m);
|
|
2079
|
-
break;
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
2009
|
}
|
|
2083
2010
|
};
|
|
2084
2011
|
}
|
|
2085
|
-
/**
|
|
2086
|
-
* 卡片控件:切换控件类型后事件
|
|
2087
|
-
* @param propertyData 控件DOM属性
|
|
2088
|
-
* @param newControlType 新控件类型
|
|
2089
|
-
*/
|
|
2090
|
-
changeControlType(e, n) {
|
|
2091
|
-
var g, C, p, a, d;
|
|
2092
|
-
const c = n.propertyValue, u = this.formSchemaUtils.getComponentById(this.componentId);
|
|
2093
|
-
let m = this.getControlParentContainer(e.id, u);
|
|
2094
|
-
if (!m)
|
|
2095
|
-
return;
|
|
2096
|
-
const v = m.contents.findIndex((s) => s.id === e.id), M = m.contents[v];
|
|
2097
|
-
let S;
|
|
2098
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2099
|
-
editor: {
|
|
2100
|
-
$type: c
|
|
2101
|
-
},
|
|
2102
|
-
name: this.designViewModelField.name,
|
|
2103
|
-
require: this.designViewModelField.require,
|
|
2104
|
-
readonly: this.designViewModelField.readonly
|
|
2105
|
-
}, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, c)), Object.assign(S, {
|
|
2106
|
-
id: M.id,
|
|
2107
|
-
appearance: M.appearance,
|
|
2108
|
-
size: M.size,
|
|
2109
|
-
label: M.label
|
|
2110
|
-
}), Object.assign(S.editor, {
|
|
2111
|
-
isTextArea: S.isTextArea && M.isTextArea,
|
|
2112
|
-
type: c || "",
|
|
2113
|
-
placeHolder: (g = M.editor) == null ? void 0 : g.placeHolder,
|
|
2114
|
-
holdPlace: (C = M.editor) == null ? void 0 : C.holdPlace,
|
|
2115
|
-
readonly: (p = M.editor) == null ? void 0 : p.readonly,
|
|
2116
|
-
require: (a = M.editor) == null ? void 0 : a.require,
|
|
2117
|
-
visible: (d = M.editor) == null ? void 0 : d.visible
|
|
2118
|
-
}), m.contents.splice(v, 1, S);
|
|
2119
|
-
}
|
|
2120
2012
|
getAppearanceConfig(e = null) {
|
|
2121
2013
|
return {
|
|
2122
2014
|
title: "样式",
|
|
@@ -2133,40 +2025,14 @@ class ae {
|
|
|
2133
2025
|
type: "string",
|
|
2134
2026
|
description: "组件的样式",
|
|
2135
2027
|
$converter: "/converter/appearance.converter"
|
|
2136
|
-
},
|
|
2137
|
-
responseLayout: {
|
|
2138
|
-
description: "响应式列宽",
|
|
2139
|
-
title: "响应式列宽",
|
|
2140
|
-
type: "boolean",
|
|
2141
|
-
visible: !1,
|
|
2142
|
-
editor: {
|
|
2143
|
-
type: "response-layout-editor-setting"
|
|
2144
|
-
},
|
|
2145
|
-
$converter: "/converter/response-form-layout.converter"
|
|
2146
2028
|
}
|
|
2147
2029
|
}
|
|
2148
2030
|
};
|
|
2149
2031
|
}
|
|
2150
|
-
/**
|
|
2151
|
-
* 获取控件:以contents为节点进行定位
|
|
2152
|
-
* @param controlId 控件ID
|
|
2153
|
-
* @param domJson 容器
|
|
2154
|
-
*/
|
|
2155
|
-
getControlParentContainer(e, n) {
|
|
2156
|
-
let c;
|
|
2157
|
-
if (!n || !n.contents || n.contents.length === 0)
|
|
2158
|
-
return null;
|
|
2159
|
-
for (const u of n.contents) {
|
|
2160
|
-
if (u.id === e)
|
|
2161
|
-
return c = n, n;
|
|
2162
|
-
if (c = this.getControlParentContainer(e, u), c)
|
|
2163
|
-
return c;
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
2032
|
}
|
|
2167
|
-
class
|
|
2168
|
-
constructor(e,
|
|
2169
|
-
super(e,
|
|
2033
|
+
class jt extends ae {
|
|
2034
|
+
constructor(e, o) {
|
|
2035
|
+
super(e, o);
|
|
2170
2036
|
}
|
|
2171
2037
|
getPropertyConfig(e) {
|
|
2172
2038
|
return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
|
|
@@ -2190,7 +2056,7 @@ class Tt extends ae {
|
|
|
2190
2056
|
type: "combo-list",
|
|
2191
2057
|
textField: "value",
|
|
2192
2058
|
valueField: "key",
|
|
2193
|
-
data: [{ key: "response-toolbar", value:
|
|
2059
|
+
data: [{ key: "response-toolbar", value: re["response-toolbar"].name }]
|
|
2194
2060
|
}
|
|
2195
2061
|
}
|
|
2196
2062
|
}
|
|
@@ -2233,54 +2099,54 @@ class Tt extends ae {
|
|
|
2233
2099
|
};
|
|
2234
2100
|
}
|
|
2235
2101
|
}
|
|
2236
|
-
function
|
|
2237
|
-
const u =
|
|
2238
|
-
let
|
|
2239
|
-
function C(
|
|
2240
|
-
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ?
|
|
2241
|
-
}
|
|
2242
|
-
function
|
|
2243
|
-
return !
|
|
2244
|
-
}
|
|
2245
|
-
function
|
|
2246
|
-
|
|
2247
|
-
const
|
|
2248
|
-
const U =
|
|
2249
|
-
return
|
|
2250
|
-
}, []) : [],
|
|
2102
|
+
function It(s, e, o, p) {
|
|
2103
|
+
const u = Te(), v = S(!1), h = S(!1);
|
|
2104
|
+
let D = !0, I = !1, g;
|
|
2105
|
+
function C(j) {
|
|
2106
|
+
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
|
|
2107
|
+
}
|
|
2108
|
+
function l(j) {
|
|
2109
|
+
return !ht().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
|
|
2110
|
+
}
|
|
2111
|
+
function i() {
|
|
2112
|
+
v.value = !1, h.value = !1;
|
|
2113
|
+
const j = s, m = j.appearance && j.appearance.class || "", R = m.split(" "), A = j.buttons || [], a = A.length ? A[0] : null, n = a && a.appearance ? a.appearance.class : "", t = n ? n.split(" ") : [], r = A.length ? A.reduce(($, V) => {
|
|
2114
|
+
const U = V && V.appearance ? V.appearance.class : "", Y = U ? U.split(" ") : [];
|
|
2115
|
+
return $.push(...Y), $;
|
|
2116
|
+
}, []) : [], d = o == null ? void 0 : o.schema, E = d && d.appearance && d.appearance.class || "", x = E ? E.split(" ") : [];
|
|
2251
2117
|
g = {
|
|
2252
|
-
componentClass:
|
|
2253
|
-
componentClassList:
|
|
2254
|
-
childContents:
|
|
2255
|
-
firstChildContent:
|
|
2256
|
-
firstChildClass:
|
|
2118
|
+
componentClass: m,
|
|
2119
|
+
componentClassList: R,
|
|
2120
|
+
childContents: A,
|
|
2121
|
+
firstChildContent: a,
|
|
2122
|
+
firstChildClass: n,
|
|
2257
2123
|
firstChildClassList: t,
|
|
2258
|
-
parent:
|
|
2259
|
-
parentClass:
|
|
2260
|
-
parentClassList:
|
|
2261
|
-
children:
|
|
2262
|
-
childrenClassList:
|
|
2124
|
+
parent: d,
|
|
2125
|
+
parentClass: E,
|
|
2126
|
+
parentClassList: x,
|
|
2127
|
+
children: A,
|
|
2128
|
+
childrenClassList: r
|
|
2263
2129
|
};
|
|
2264
|
-
const { canAccept:
|
|
2265
|
-
return
|
|
2130
|
+
const { canAccept: M, fixed: F, hidePadding: _ } = u.getRuleValue(R[0], g);
|
|
2131
|
+
return D = M, I = _, !0;
|
|
2266
2132
|
}
|
|
2267
|
-
function
|
|
2133
|
+
function f(j) {
|
|
2268
2134
|
}
|
|
2269
|
-
function
|
|
2270
|
-
return
|
|
2135
|
+
function c() {
|
|
2136
|
+
return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2271
2137
|
}
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
2138
|
+
function b(j, m) {
|
|
2139
|
+
return m.text = j.label, m;
|
|
2274
2140
|
}
|
|
2275
|
-
function
|
|
2276
|
-
const
|
|
2277
|
-
if ((
|
|
2278
|
-
const t = String(
|
|
2279
|
-
return
|
|
2141
|
+
function y(j, m, R) {
|
|
2142
|
+
const A = s;
|
|
2143
|
+
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2144
|
+
const t = String(j.innerText), r = q("form-group");
|
|
2145
|
+
return r.editor = R, r.label = t, r;
|
|
2280
2146
|
}
|
|
2281
|
-
return
|
|
2147
|
+
return R;
|
|
2282
2148
|
}
|
|
2283
|
-
function
|
|
2149
|
+
function T() {
|
|
2284
2150
|
return !1;
|
|
2285
2151
|
}
|
|
2286
2152
|
function O() {
|
|
@@ -2289,29 +2155,29 @@ function xt(r, e, n, c) {
|
|
|
2289
2155
|
function P() {
|
|
2290
2156
|
return !0;
|
|
2291
2157
|
}
|
|
2292
|
-
function
|
|
2293
|
-
return
|
|
2158
|
+
function k() {
|
|
2159
|
+
return I;
|
|
2294
2160
|
}
|
|
2295
|
-
function N(
|
|
2296
|
-
return new
|
|
2161
|
+
function N(j) {
|
|
2162
|
+
return new jt(j, e).getPropertyConfig(s);
|
|
2297
2163
|
}
|
|
2298
2164
|
return {
|
|
2299
|
-
canAccepts:
|
|
2165
|
+
canAccepts: l,
|
|
2300
2166
|
checkCanAddComponent: P,
|
|
2301
2167
|
checkCanDeleteComponent: O,
|
|
2302
|
-
checkCanMoveComponent:
|
|
2303
|
-
getStyles:
|
|
2304
|
-
hideNestedPaddingInDesginerView:
|
|
2305
|
-
onAcceptNewChildElement:
|
|
2306
|
-
onAcceptMovedChildElement:
|
|
2307
|
-
onResolveNewComponentSchema:
|
|
2308
|
-
resolveComponentContext:
|
|
2168
|
+
checkCanMoveComponent: T,
|
|
2169
|
+
getStyles: c,
|
|
2170
|
+
hideNestedPaddingInDesginerView: k,
|
|
2171
|
+
onAcceptNewChildElement: y,
|
|
2172
|
+
onAcceptMovedChildElement: f,
|
|
2173
|
+
onResolveNewComponentSchema: b,
|
|
2174
|
+
resolveComponentContext: i,
|
|
2309
2175
|
getPropsConfig: N,
|
|
2310
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2311
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2176
|
+
triggerBelongedComponentToMoveWhenMoved: v,
|
|
2177
|
+
triggerBelongedComponentToDeleteWhenDeleted: h
|
|
2312
2178
|
};
|
|
2313
2179
|
}
|
|
2314
|
-
const
|
|
2180
|
+
const Dt = {
|
|
2315
2181
|
id: { type: String, default: "" },
|
|
2316
2182
|
componentId: { type: String, default: "" },
|
|
2317
2183
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2324,46 +2190,46 @@ const St = {
|
|
|
2324
2190
|
* 组件值
|
|
2325
2191
|
*/
|
|
2326
2192
|
modelValue: { type: Object }
|
|
2327
|
-
}, ee =
|
|
2328
|
-
function
|
|
2329
|
-
const
|
|
2330
|
-
return u &&
|
|
2193
|
+
}, ee = S(0);
|
|
2194
|
+
function Pt(s, e) {
|
|
2195
|
+
const o = e.getBoundingClientRect(), p = s.getBoundingClientRect(), u = p.top >= o.top, v = p.top <= o.bottom;
|
|
2196
|
+
return u && v;
|
|
2331
2197
|
}
|
|
2332
|
-
function
|
|
2333
|
-
if (!
|
|
2198
|
+
function Rt(s) {
|
|
2199
|
+
if (!s)
|
|
2334
2200
|
return;
|
|
2335
2201
|
let e;
|
|
2336
|
-
if (
|
|
2202
|
+
if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
|
|
2337
2203
|
return;
|
|
2338
|
-
const
|
|
2339
|
-
if (
|
|
2204
|
+
const o = e.getBoundingClientRect();
|
|
2205
|
+
if (o.width === 0 && o.height === 0)
|
|
2340
2206
|
return;
|
|
2341
|
-
const
|
|
2342
|
-
if (
|
|
2343
|
-
if (!
|
|
2344
|
-
|
|
2207
|
+
const p = e.querySelector(".component-btn-group");
|
|
2208
|
+
if (p) {
|
|
2209
|
+
if (!Pt(e, s)) {
|
|
2210
|
+
p.style.display = "none";
|
|
2345
2211
|
return;
|
|
2346
2212
|
}
|
|
2347
|
-
|
|
2348
|
-
const
|
|
2349
|
-
if (
|
|
2350
|
-
const
|
|
2351
|
-
|
|
2213
|
+
p.style.display = "";
|
|
2214
|
+
const v = p.getBoundingClientRect(), h = p.querySelector("div");
|
|
2215
|
+
if (h) {
|
|
2216
|
+
const D = h.getBoundingClientRect();
|
|
2217
|
+
h.style.top = v.top + "px", h.style.left = v.left - D.width + "px";
|
|
2352
2218
|
}
|
|
2353
2219
|
}
|
|
2354
2220
|
}
|
|
2355
|
-
function
|
|
2221
|
+
function Et(s, e, o) {
|
|
2356
2222
|
var N;
|
|
2357
|
-
function
|
|
2223
|
+
function p() {
|
|
2358
2224
|
}
|
|
2359
|
-
const u = "",
|
|
2360
|
-
function
|
|
2225
|
+
const u = "", v = S();
|
|
2226
|
+
function h() {
|
|
2361
2227
|
return !0;
|
|
2362
2228
|
}
|
|
2363
|
-
function
|
|
2229
|
+
function D() {
|
|
2364
2230
|
return !1;
|
|
2365
2231
|
}
|
|
2366
|
-
function
|
|
2232
|
+
function I() {
|
|
2367
2233
|
return !0;
|
|
2368
2234
|
}
|
|
2369
2235
|
function g() {
|
|
@@ -2372,120 +2238,120 @@ function Mt(r, e, n) {
|
|
|
2372
2238
|
function C() {
|
|
2373
2239
|
return !0;
|
|
2374
2240
|
}
|
|
2375
|
-
function
|
|
2376
|
-
if (!
|
|
2241
|
+
function l(j) {
|
|
2242
|
+
if (!j || !j.value)
|
|
2377
2243
|
return null;
|
|
2378
|
-
const
|
|
2379
|
-
return
|
|
2244
|
+
const m = S(j == null ? void 0 : j.value.parent), R = l(m);
|
|
2245
|
+
return R || null;
|
|
2380
2246
|
}
|
|
2381
|
-
function
|
|
2382
|
-
const { componentInstance:
|
|
2383
|
-
return !
|
|
2247
|
+
function i(j = e) {
|
|
2248
|
+
const { componentInstance: m, designerItemElementRef: R } = j;
|
|
2249
|
+
return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? R : i(j.parent);
|
|
2384
2250
|
}
|
|
2385
|
-
function
|
|
2386
|
-
return !!
|
|
2251
|
+
function f(j) {
|
|
2252
|
+
return !!o;
|
|
2387
2253
|
}
|
|
2388
|
-
function
|
|
2254
|
+
function c() {
|
|
2389
2255
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2390
2256
|
}
|
|
2391
|
-
function
|
|
2257
|
+
function b() {
|
|
2392
2258
|
}
|
|
2393
|
-
function
|
|
2259
|
+
function y(j, m) {
|
|
2394
2260
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const { componentType:
|
|
2397
|
-
let
|
|
2398
|
-
const
|
|
2399
|
-
return
|
|
2261
|
+
function T(j) {
|
|
2262
|
+
const { componentType: m } = j;
|
|
2263
|
+
let R = q(m, j);
|
|
2264
|
+
const A = m.toLowerCase().replace("-", "_");
|
|
2265
|
+
return R && !R.id && R.type === m && (R.id = `${A}_${Math.random().toString().slice(2, 6)}`), R;
|
|
2400
2266
|
}
|
|
2401
|
-
function O(
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2404
|
-
let
|
|
2405
|
-
const t =
|
|
2406
|
-
return
|
|
2267
|
+
function O(j, m) {
|
|
2268
|
+
const R = String(j.getAttribute("data-controltype")), A = j.getAttribute("data-feature"), a = A ? JSON.parse(A) : {};
|
|
2269
|
+
a.parentComponentInstance = v.value;
|
|
2270
|
+
let n = q(R, a);
|
|
2271
|
+
const t = R.toLowerCase().replace("-", "_");
|
|
2272
|
+
return n && !n.id && n.type === R && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
|
|
2407
2273
|
}
|
|
2408
|
-
function P(
|
|
2274
|
+
function P(j) {
|
|
2409
2275
|
}
|
|
2410
|
-
function
|
|
2276
|
+
function k(...j) {
|
|
2411
2277
|
return [];
|
|
2412
2278
|
}
|
|
2413
|
-
return
|
|
2414
|
-
canMove:
|
|
2415
|
-
canSelectParent:
|
|
2279
|
+
return v.value = {
|
|
2280
|
+
canMove: h(),
|
|
2281
|
+
canSelectParent: D(),
|
|
2416
2282
|
canAdd: g(),
|
|
2417
|
-
canDelete:
|
|
2283
|
+
canDelete: I(),
|
|
2418
2284
|
canNested: !C(),
|
|
2419
2285
|
contents: [],
|
|
2420
|
-
elementRef:
|
|
2286
|
+
elementRef: s,
|
|
2421
2287
|
parent: (N = e.parent) == null ? void 0 : N.componentInstance,
|
|
2422
2288
|
schema: e.schema,
|
|
2423
2289
|
styles: u,
|
|
2424
|
-
canAccepts:
|
|
2425
|
-
getBelongedComponentInstance:
|
|
2426
|
-
getDraggableDesignItemElement:
|
|
2427
|
-
getDraggingDisplayText:
|
|
2428
|
-
getPropConfig:
|
|
2429
|
-
getDragScopeElement:
|
|
2430
|
-
onAcceptMovedChildElement:
|
|
2290
|
+
canAccepts: f,
|
|
2291
|
+
getBelongedComponentInstance: l,
|
|
2292
|
+
getDraggableDesignItemElement: i,
|
|
2293
|
+
getDraggingDisplayText: c,
|
|
2294
|
+
getPropConfig: k,
|
|
2295
|
+
getDragScopeElement: b,
|
|
2296
|
+
onAcceptMovedChildElement: y,
|
|
2431
2297
|
onAcceptNewChildElement: O,
|
|
2432
2298
|
onChildElementMovedOut: P,
|
|
2433
|
-
addNewChildComponentSchema:
|
|
2434
|
-
updateDragAndDropRules:
|
|
2435
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2436
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2437
|
-
},
|
|
2299
|
+
addNewChildComponentSchema: T,
|
|
2300
|
+
updateDragAndDropRules: p,
|
|
2301
|
+
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
2302
|
+
triggerBelongedComponentToDeleteWhenDeleted: S(!1)
|
|
2303
|
+
}, v;
|
|
2438
2304
|
}
|
|
2439
|
-
const
|
|
2305
|
+
const St = /* @__PURE__ */ X({
|
|
2440
2306
|
name: "FDesignerInnerItem",
|
|
2441
|
-
props:
|
|
2307
|
+
props: Dt,
|
|
2442
2308
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2443
|
-
setup(
|
|
2444
|
-
const
|
|
2445
|
-
designerItemElementRef:
|
|
2446
|
-
componentInstance:
|
|
2309
|
+
setup(s, e) {
|
|
2310
|
+
const o = S(s.canMove), p = S(s.canAdd), u = S(s.canDelete), v = S(!1), h = S(s.contentKey), D = S(s.childType), I = S(s.childLabel), g = S(s.modelValue), C = S(""), l = S(), i = L("canvas-dragula"), f = S(), c = L("design-item-context"), b = {
|
|
2311
|
+
designerItemElementRef: l,
|
|
2312
|
+
componentInstance: f,
|
|
2447
2313
|
schema: g.value,
|
|
2448
|
-
parent:
|
|
2314
|
+
parent: c,
|
|
2449
2315
|
setupContext: e
|
|
2450
2316
|
};
|
|
2451
|
-
|
|
2452
|
-
const
|
|
2317
|
+
Ee("design-item-context", b);
|
|
2318
|
+
const y = W(() => ({
|
|
2453
2319
|
"farris-component": !0,
|
|
2454
2320
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2455
|
-
"flex-fill":
|
|
2456
|
-
"position-relative":
|
|
2457
|
-
"farris-nested":
|
|
2458
|
-
"can-move":
|
|
2459
|
-
"d-none":
|
|
2460
|
-
})),
|
|
2321
|
+
"flex-fill": s.id == "root-component",
|
|
2322
|
+
"position-relative": o.value || u.value,
|
|
2323
|
+
"farris-nested": v.value,
|
|
2324
|
+
"can-move": o.value,
|
|
2325
|
+
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2326
|
+
})), T = W(() => {
|
|
2461
2327
|
const t = {};
|
|
2462
|
-
return C.value && C.value.split(";").reduce((
|
|
2463
|
-
const [
|
|
2464
|
-
return
|
|
2328
|
+
return C.value && C.value.split(";").reduce((r, d) => {
|
|
2329
|
+
const [E, x] = d.split(":");
|
|
2330
|
+
return E && (r[E] = x), r;
|
|
2465
2331
|
}, t), t;
|
|
2466
2332
|
});
|
|
2467
|
-
function O(t,
|
|
2468
|
-
if (
|
|
2469
|
-
const
|
|
2470
|
-
if (
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2333
|
+
function O(t, r) {
|
|
2334
|
+
if (c && c.schema[h.value]) {
|
|
2335
|
+
const d = c.schema[h.value].findIndex((E) => E.id === r.id);
|
|
2336
|
+
if (d > -1) {
|
|
2337
|
+
const E = c.schema[h.value].length, x = c.schema[h.value][d % E];
|
|
2338
|
+
c.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), c.schema[h.value].splice(d, 1), c.componentInstance.value.updateDragAndDropRules(), ee.value++, e.emit("removeComponent");
|
|
2473
2339
|
}
|
|
2474
2340
|
}
|
|
2475
2341
|
}
|
|
2476
2342
|
function P(t) {
|
|
2477
|
-
if (
|
|
2478
|
-
const
|
|
2479
|
-
componentType:
|
|
2480
|
-
label:
|
|
2481
|
-
parentComponentInstance:
|
|
2343
|
+
if (f.value.addNewChildComponentSchema) {
|
|
2344
|
+
const r = {
|
|
2345
|
+
componentType: D.value,
|
|
2346
|
+
label: I.value,
|
|
2347
|
+
parentComponentInstance: f.value,
|
|
2482
2348
|
targetPosition: -1
|
|
2483
|
-
},
|
|
2484
|
-
g.value[
|
|
2349
|
+
}, d = f.value.addNewChildComponentSchema(r);
|
|
2350
|
+
g.value[h.value].push(d), e.emit("addComponent");
|
|
2485
2351
|
}
|
|
2486
2352
|
}
|
|
2487
|
-
function
|
|
2488
|
-
return
|
|
2353
|
+
function k() {
|
|
2354
|
+
return p.value && w("div", {
|
|
2489
2355
|
role: "button",
|
|
2490
2356
|
class: "btn component-settings-button",
|
|
2491
2357
|
title: "新增",
|
|
@@ -2503,13 +2369,13 @@ const kt = /* @__PURE__ */ Y({
|
|
|
2503
2369
|
class: "btn component-settings-button",
|
|
2504
2370
|
title: "删除",
|
|
2505
2371
|
ref: "removeComponent",
|
|
2506
|
-
onClick:
|
|
2372
|
+
onClick: Me((r) => O(r, t), ["stop"])
|
|
2507
2373
|
}, [w("i", {
|
|
2508
2374
|
class: "f-icon f-icon-yxs_delete"
|
|
2509
2375
|
}, null)]);
|
|
2510
2376
|
}
|
|
2511
|
-
function
|
|
2512
|
-
return
|
|
2377
|
+
function j() {
|
|
2378
|
+
return o.value && w("div", {
|
|
2513
2379
|
role: "button",
|
|
2514
2380
|
class: "btn component-settings-button",
|
|
2515
2381
|
title: "移动",
|
|
@@ -2519,61 +2385,61 @@ const kt = /* @__PURE__ */ Y({
|
|
|
2519
2385
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2520
2386
|
}, null)]);
|
|
2521
2387
|
}
|
|
2522
|
-
function
|
|
2388
|
+
function m(t) {
|
|
2523
2389
|
return w("div", {
|
|
2524
2390
|
class: "component-btn-group",
|
|
2525
2391
|
"data-noattach": "true"
|
|
2526
|
-
}, [w("div", null, [
|
|
2392
|
+
}, [w("div", null, [k(), j(), N(t)])]);
|
|
2527
2393
|
}
|
|
2528
|
-
|
|
2529
|
-
g.value = t,
|
|
2394
|
+
H(() => s.modelValue, (t) => {
|
|
2395
|
+
g.value = t, b.schema = t;
|
|
2530
2396
|
});
|
|
2531
|
-
function
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2397
|
+
function R(t) {
|
|
2398
|
+
const r = t.target;
|
|
2399
|
+
Rt(r);
|
|
2534
2400
|
}
|
|
2535
|
-
function
|
|
2536
|
-
var t,
|
|
2537
|
-
(
|
|
2401
|
+
function A() {
|
|
2402
|
+
var t, r;
|
|
2403
|
+
(r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", R);
|
|
2538
2404
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const t =
|
|
2541
|
-
return
|
|
2405
|
+
function a() {
|
|
2406
|
+
const t = l.value, r = S(t.children[1]);
|
|
2407
|
+
return Et(r, b).value;
|
|
2542
2408
|
}
|
|
2543
|
-
|
|
2544
|
-
if (
|
|
2545
|
-
const t =
|
|
2546
|
-
|
|
2409
|
+
z(() => {
|
|
2410
|
+
if (l.value) {
|
|
2411
|
+
const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
2412
|
+
f.value = t && t.componentInstance ? t.componentInstance.value : a(), i && t && i.attachComponents(t, g.value), v.value = f.value.canNested !== void 0 ? f.value.canNested : v.value, p.value = f.value.canAdd !== void 0 ? f.value.canAdd : p.value, u.value = f.value.canDelete !== void 0 ? f.value.canDelete : u.value, o.value = f.value.canMove !== void 0 ? f.value.canMove : o.value, C.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = b);
|
|
2547
2413
|
}
|
|
2548
|
-
|
|
2549
|
-
}),
|
|
2550
|
-
|
|
2414
|
+
A(), ee.value++;
|
|
2415
|
+
}), Se(() => {
|
|
2416
|
+
l.value && l.value.removeEventListener("scroll", R);
|
|
2551
2417
|
});
|
|
2552
|
-
function
|
|
2553
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2554
|
-
const
|
|
2555
|
-
if (
|
|
2556
|
-
const
|
|
2557
|
-
if (!(
|
|
2558
|
-
Array.from(
|
|
2559
|
-
const
|
|
2560
|
-
|
|
2418
|
+
function n(t) {
|
|
2419
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((d) => d.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
|
|
2420
|
+
const r = l.value;
|
|
2421
|
+
if (r) {
|
|
2422
|
+
const d = document.getElementsByClassName("dgComponentSelected");
|
|
2423
|
+
if (!(d && d.length === 1 && d[0] === l.value)) {
|
|
2424
|
+
Array.from(d).forEach((M) => M.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, f.value);
|
|
2425
|
+
const x = f.value.getDraggableDesignItemElement(b);
|
|
2426
|
+
x && x.value && x.value.classList.add("dgComponentSelected");
|
|
2561
2427
|
}
|
|
2562
2428
|
}
|
|
2563
2429
|
ee.value++;
|
|
2564
2430
|
}
|
|
2565
2431
|
return () => w("div", {
|
|
2566
|
-
id: `${
|
|
2567
|
-
ref:
|
|
2568
|
-
class:
|
|
2569
|
-
style:
|
|
2570
|
-
onClick:
|
|
2571
|
-
}, [
|
|
2432
|
+
id: `${s.id}-design-item`,
|
|
2433
|
+
ref: l,
|
|
2434
|
+
class: y.value,
|
|
2435
|
+
style: T.value,
|
|
2436
|
+
onClick: n
|
|
2437
|
+
}, [m(g.value), e.slots.default && e.slots.default()]);
|
|
2572
2438
|
}
|
|
2573
2439
|
});
|
|
2574
|
-
class
|
|
2575
|
-
constructor(e,
|
|
2576
|
-
super(e,
|
|
2440
|
+
class Mt extends ae {
|
|
2441
|
+
constructor(e, o) {
|
|
2442
|
+
super(e, o);
|
|
2577
2443
|
}
|
|
2578
2444
|
getPropertyConfig(e) {
|
|
2579
2445
|
return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
@@ -2622,20 +2488,20 @@ class Pt extends ae {
|
|
|
2622
2488
|
title: "style样式"
|
|
2623
2489
|
}
|
|
2624
2490
|
},
|
|
2625
|
-
setPropertyRelates(
|
|
2491
|
+
setPropertyRelates(o, p) {
|
|
2626
2492
|
}
|
|
2627
2493
|
};
|
|
2628
2494
|
}
|
|
2629
2495
|
getEventPropConfig(e) {
|
|
2630
|
-
const
|
|
2496
|
+
const o = [
|
|
2631
2497
|
{
|
|
2632
2498
|
label: "click",
|
|
2633
2499
|
name: "点击事件"
|
|
2634
2500
|
}
|
|
2635
2501
|
];
|
|
2636
|
-
var
|
|
2637
|
-
const u =
|
|
2638
|
-
|
|
2502
|
+
var p = this;
|
|
2503
|
+
const u = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), v = {};
|
|
2504
|
+
v[p.viewModelId] = {
|
|
2639
2505
|
type: "events-editor",
|
|
2640
2506
|
editor: {
|
|
2641
2507
|
initialData: u
|
|
@@ -2643,21 +2509,21 @@ class Pt extends ae {
|
|
|
2643
2509
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2644
2510
|
title: "事件",
|
|
2645
2511
|
hideTitle: !0,
|
|
2646
|
-
properties:
|
|
2512
|
+
properties: v,
|
|
2647
2513
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2648
2514
|
refreshPanelAfterChanged: !0,
|
|
2649
2515
|
tabId: "commands",
|
|
2650
2516
|
tabName: "交互",
|
|
2651
|
-
setPropertyRelates(
|
|
2652
|
-
const
|
|
2653
|
-
delete e[
|
|
2517
|
+
setPropertyRelates(h, D) {
|
|
2518
|
+
const I = h.propertyValue;
|
|
2519
|
+
delete e[p.viewModelId], I && (I.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, I.events, I));
|
|
2654
2520
|
}
|
|
2655
2521
|
};
|
|
2656
2522
|
}
|
|
2657
2523
|
}
|
|
2658
|
-
class
|
|
2659
|
-
constructor(e,
|
|
2660
|
-
super(e,
|
|
2524
|
+
class kt extends ae {
|
|
2525
|
+
constructor(e, o) {
|
|
2526
|
+
super(e, o);
|
|
2661
2527
|
}
|
|
2662
2528
|
getPropertyConfig(e) {
|
|
2663
2529
|
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
@@ -2681,7 +2547,7 @@ class Rt extends ae {
|
|
|
2681
2547
|
type: "combo-list",
|
|
2682
2548
|
textField: "value",
|
|
2683
2549
|
valueField: "key",
|
|
2684
|
-
data: [{ key: "response-toolbar-item", value:
|
|
2550
|
+
data: [{ key: "response-toolbar-item", value: re["response-toolbar-item"].name }]
|
|
2685
2551
|
}
|
|
2686
2552
|
},
|
|
2687
2553
|
text: {
|
|
@@ -2699,15 +2565,31 @@ class Rt extends ae {
|
|
|
2699
2565
|
};
|
|
2700
2566
|
}
|
|
2701
2567
|
getAppearanceProperties(e) {
|
|
2568
|
+
this.propertyConfig.categories.appearance = {
|
|
2569
|
+
title: "样式",
|
|
2570
|
+
description: "Appearance",
|
|
2571
|
+
properties: {
|
|
2572
|
+
class: {
|
|
2573
|
+
title: "class",
|
|
2574
|
+
type: "string",
|
|
2575
|
+
description: ""
|
|
2576
|
+
},
|
|
2577
|
+
style: {
|
|
2578
|
+
title: "style",
|
|
2579
|
+
type: "string",
|
|
2580
|
+
description: ""
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
};
|
|
2702
2584
|
}
|
|
2703
2585
|
getEventPropConfig(e) {
|
|
2704
|
-
const
|
|
2586
|
+
const o = [
|
|
2705
2587
|
{
|
|
2706
2588
|
label: "click",
|
|
2707
2589
|
name: "点击事件"
|
|
2708
2590
|
}
|
|
2709
|
-
],
|
|
2710
|
-
|
|
2591
|
+
], p = this, u = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), v = {};
|
|
2592
|
+
v[p.viewModelId] = {
|
|
2711
2593
|
type: "events-editor",
|
|
2712
2594
|
editor: {
|
|
2713
2595
|
initialData: u
|
|
@@ -2715,275 +2597,272 @@ class Rt extends ae {
|
|
|
2715
2597
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2716
2598
|
title: "事件",
|
|
2717
2599
|
hideTitle: !0,
|
|
2718
|
-
properties:
|
|
2600
|
+
properties: v,
|
|
2719
2601
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2720
2602
|
refreshPanelAfterChanged: !0,
|
|
2721
2603
|
tabId: "commands",
|
|
2722
2604
|
tabName: "交互",
|
|
2723
|
-
setPropertyRelates(
|
|
2724
|
-
const
|
|
2725
|
-
delete e[
|
|
2605
|
+
setPropertyRelates(h, D) {
|
|
2606
|
+
const I = h.propertyValue;
|
|
2607
|
+
delete e[p.viewModelId], I && (I.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, I.events, I));
|
|
2726
2608
|
}
|
|
2727
2609
|
};
|
|
2728
2610
|
}
|
|
2729
2611
|
}
|
|
2730
|
-
function
|
|
2731
|
-
|
|
2732
|
-
const
|
|
2733
|
-
let u = !1,
|
|
2734
|
-
function
|
|
2612
|
+
function At(s, e) {
|
|
2613
|
+
Te();
|
|
2614
|
+
const o = S(!1), p = S(!1);
|
|
2615
|
+
let u = !1, v = !1;
|
|
2616
|
+
function h(y) {
|
|
2735
2617
|
return !1;
|
|
2736
2618
|
}
|
|
2737
|
-
function
|
|
2619
|
+
function D(y) {
|
|
2738
2620
|
}
|
|
2739
|
-
function
|
|
2621
|
+
function I() {
|
|
2740
2622
|
return "";
|
|
2741
2623
|
}
|
|
2742
|
-
function g(
|
|
2743
|
-
return
|
|
2624
|
+
function g(y, T) {
|
|
2625
|
+
return T.text = y.label, T;
|
|
2744
2626
|
}
|
|
2745
|
-
function C(
|
|
2746
|
-
const P =
|
|
2627
|
+
function C(y, T, O) {
|
|
2628
|
+
const P = s.schema;
|
|
2747
2629
|
if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2748
|
-
const
|
|
2749
|
-
return
|
|
2630
|
+
const j = String(y.innerText), m = q("form-group");
|
|
2631
|
+
return m.editor = O, m.label = j, m;
|
|
2750
2632
|
}
|
|
2751
2633
|
return O;
|
|
2752
2634
|
}
|
|
2753
|
-
function
|
|
2635
|
+
function l() {
|
|
2754
2636
|
return !1;
|
|
2755
2637
|
}
|
|
2756
|
-
function
|
|
2757
|
-
return !
|
|
2638
|
+
function i() {
|
|
2639
|
+
return !v;
|
|
2758
2640
|
}
|
|
2759
|
-
function
|
|
2641
|
+
function f() {
|
|
2760
2642
|
return !1;
|
|
2761
2643
|
}
|
|
2762
|
-
function
|
|
2644
|
+
function c() {
|
|
2763
2645
|
return u;
|
|
2764
2646
|
}
|
|
2765
|
-
function y
|
|
2766
|
-
let
|
|
2767
|
-
switch (
|
|
2647
|
+
function b(y) {
|
|
2648
|
+
let T;
|
|
2649
|
+
switch (s.schema.type) {
|
|
2768
2650
|
case "tab-toolbar-item":
|
|
2769
|
-
|
|
2651
|
+
T = new Mt(y, e);
|
|
2770
2652
|
break;
|
|
2771
2653
|
default:
|
|
2772
|
-
|
|
2654
|
+
T = new kt(y, e);
|
|
2773
2655
|
}
|
|
2774
|
-
return
|
|
2656
|
+
return T.getPropertyConfig(s.schema);
|
|
2775
2657
|
}
|
|
2776
2658
|
return {
|
|
2777
|
-
canAccepts:
|
|
2778
|
-
checkCanAddComponent:
|
|
2779
|
-
checkCanDeleteComponent:
|
|
2780
|
-
checkCanMoveComponent:
|
|
2781
|
-
getStyles:
|
|
2782
|
-
hideNestedPaddingInDesginerView:
|
|
2659
|
+
canAccepts: h,
|
|
2660
|
+
checkCanAddComponent: f,
|
|
2661
|
+
checkCanDeleteComponent: i,
|
|
2662
|
+
checkCanMoveComponent: l,
|
|
2663
|
+
getStyles: I,
|
|
2664
|
+
hideNestedPaddingInDesginerView: c,
|
|
2783
2665
|
onAcceptNewChildElement: C,
|
|
2784
|
-
onAcceptMovedChildElement:
|
|
2666
|
+
onAcceptMovedChildElement: D,
|
|
2785
2667
|
onResolveNewComponentSchema: g,
|
|
2786
|
-
getPropsConfig:
|
|
2787
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2788
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2668
|
+
getPropsConfig: b,
|
|
2669
|
+
triggerBelongedComponentToMoveWhenMoved: o,
|
|
2670
|
+
triggerBelongedComponentToDeleteWhenDeleted: p
|
|
2789
2671
|
};
|
|
2790
2672
|
}
|
|
2791
|
-
const
|
|
2673
|
+
const je = /* @__PURE__ */ X({
|
|
2792
2674
|
name: "FResponseToolbarItemDesign",
|
|
2793
2675
|
props: we,
|
|
2794
2676
|
emits: ["Click"],
|
|
2795
|
-
setup(
|
|
2796
|
-
|
|
2797
|
-
const
|
|
2677
|
+
setup(s, e) {
|
|
2678
|
+
S(), S();
|
|
2679
|
+
const o = S(s.alignment), p = {
|
|
2798
2680
|
id: "__more_buttons__",
|
|
2799
2681
|
text: "More"
|
|
2800
|
-
}, u =
|
|
2801
|
-
|
|
2802
|
-
const
|
|
2803
|
-
|
|
2804
|
-
}),
|
|
2805
|
-
|
|
2682
|
+
}, u = S(new G(p));
|
|
2683
|
+
W(() => u.value.children.length > 0);
|
|
2684
|
+
const v = S(), h = L("designer-host-service"), D = L("design-item-context"), I = At(D, h), g = ge(v, D, I);
|
|
2685
|
+
L("toolbar-item-handler", () => {
|
|
2686
|
+
}), z(() => {
|
|
2687
|
+
v.value.componentInstance = g;
|
|
2806
2688
|
}), e.expose(g.value);
|
|
2807
2689
|
function C() {
|
|
2808
|
-
const
|
|
2690
|
+
const f = {
|
|
2809
2691
|
"f-icon": !0
|
|
2810
|
-
};
|
|
2811
|
-
|
|
2812
|
-
const s = r.icon.trim().split(" ");
|
|
2813
|
-
s && s.length && s.reduce((y, h) => (y[h] = !0, y), d);
|
|
2814
|
-
}
|
|
2815
|
-
return d;
|
|
2692
|
+
}, c = s.icon ? s.icon.trim() : "";
|
|
2693
|
+
return J(f, c);
|
|
2816
2694
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return !!(
|
|
2695
|
+
function l() {
|
|
2696
|
+
return !!(s.icon && s.icon.trim());
|
|
2819
2697
|
}
|
|
2820
|
-
function
|
|
2821
|
-
const
|
|
2698
|
+
function i() {
|
|
2699
|
+
const f = {
|
|
2822
2700
|
btn: !0,
|
|
2823
2701
|
"f-rt-btn": !0,
|
|
2824
|
-
"f-btn-ml":
|
|
2825
|
-
"f-btn-mr":
|
|
2826
|
-
"btn-icontext": !!(
|
|
2702
|
+
"f-btn-ml": o.value === "right",
|
|
2703
|
+
"f-btn-mr": o.value === "left",
|
|
2704
|
+
"btn-icontext": !!(s.icon && s.icon.trim())
|
|
2827
2705
|
};
|
|
2828
|
-
|
|
2829
|
-
const s = r.class.split(" ");
|
|
2830
|
-
s && s.length && s.reduce((y, h) => (y[h] = !0, y), d);
|
|
2831
|
-
}
|
|
2832
|
-
return d;
|
|
2706
|
+
return J(f, s.class);
|
|
2833
2707
|
}
|
|
2834
|
-
return
|
|
2708
|
+
return z(() => {
|
|
2835
2709
|
}), ne(() => {
|
|
2836
2710
|
}), () => w("div", {
|
|
2837
|
-
ref:
|
|
2838
|
-
"data-dragref": `${
|
|
2711
|
+
ref: v,
|
|
2712
|
+
"data-dragref": `${D.schema.id}-container`,
|
|
2839
2713
|
class: "farris-component position-relative",
|
|
2840
2714
|
style: "display:inline-block!important;"
|
|
2841
2715
|
}, [w("button", {
|
|
2842
2716
|
type: "button",
|
|
2843
|
-
class:
|
|
2844
|
-
id:
|
|
2845
|
-
}, [
|
|
2717
|
+
class: i(),
|
|
2718
|
+
id: s.id
|
|
2719
|
+
}, [l() && w("i", {
|
|
2846
2720
|
class: C()
|
|
2847
|
-
}, null),
|
|
2721
|
+
}, null), s.text])]);
|
|
2848
2722
|
}
|
|
2849
|
-
}),
|
|
2723
|
+
}), Bt = /* @__PURE__ */ X({
|
|
2850
2724
|
name: "FResponseToolbarDesign",
|
|
2851
|
-
props:
|
|
2725
|
+
props: pt,
|
|
2852
2726
|
emits: ["Click"],
|
|
2853
|
-
setup(
|
|
2854
|
-
const
|
|
2855
|
-
let
|
|
2856
|
-
const u =
|
|
2727
|
+
setup(s, e) {
|
|
2728
|
+
const o = S(s.items);
|
|
2729
|
+
let p = new Array(o.value.length).fill(S());
|
|
2730
|
+
const u = S(), v = S(), h = S(s.alignment), D = {
|
|
2857
2731
|
id: "__more_buttons__",
|
|
2858
2732
|
text: "More"
|
|
2859
|
-
},
|
|
2860
|
-
|
|
2861
|
-
const C =
|
|
2862
|
-
|
|
2863
|
-
}),
|
|
2864
|
-
C.value.componentInstance =
|
|
2865
|
-
}), e.expose(
|
|
2866
|
-
const
|
|
2733
|
+
}, I = S(new G(D)), g = xe();
|
|
2734
|
+
W(() => I.value.children.length > 0);
|
|
2735
|
+
const C = S(), l = L("designer-host-service"), i = L("design-item-context"), f = It(i.schema, l, i), c = ge(C, i, f);
|
|
2736
|
+
L("toolbar-item-handler", () => {
|
|
2737
|
+
}), z(() => {
|
|
2738
|
+
C.value.componentInstance = c;
|
|
2739
|
+
}), e.expose(c.value);
|
|
2740
|
+
const b = W(() => J({
|
|
2867
2741
|
"f-toolbar": !0,
|
|
2868
2742
|
"f-response-toolbar": !0,
|
|
2869
2743
|
"position-relative": !0
|
|
2870
|
-
})),
|
|
2744
|
+
}, s.customClass)), y = W(() => ({
|
|
2871
2745
|
"d-flex": !0,
|
|
2872
2746
|
"flex-nowrap": !0,
|
|
2873
|
-
"justify-content-end":
|
|
2874
|
-
"justify-content-start":
|
|
2747
|
+
"justify-content-end": h.value === "right",
|
|
2748
|
+
"justify-content-start": h.value === "left"
|
|
2875
2749
|
})), {
|
|
2876
|
-
renderToolbarDropdown:
|
|
2750
|
+
renderToolbarDropdown: T,
|
|
2877
2751
|
clearAllDropDown: O
|
|
2878
|
-
} =
|
|
2752
|
+
} = mt(s, g, c);
|
|
2879
2753
|
function P() {
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
}),
|
|
2754
|
+
o.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
|
|
2755
|
+
a.expanded = !1;
|
|
2756
|
+
}), I.value.expanded = !1, O();
|
|
2883
2757
|
}
|
|
2884
|
-
const
|
|
2885
|
-
function
|
|
2886
|
-
const
|
|
2887
|
-
let t =
|
|
2888
|
-
const
|
|
2889
|
-
if (
|
|
2890
|
-
const
|
|
2891
|
-
t -=
|
|
2758
|
+
const k = /* @__PURE__ */ new Map(), N = [];
|
|
2759
|
+
function j(a) {
|
|
2760
|
+
const n = v.value;
|
|
2761
|
+
let t = a;
|
|
2762
|
+
const r = Array.from(n.children), d = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
|
|
2763
|
+
if (d) {
|
|
2764
|
+
const _ = d.computedStyleMap().get("margin-left"), $ = d.computedStyleMap().get("margin-right"), V = (_ ? _.value : 0) + d.getBoundingClientRect().width + ($ ? $.value : 0);
|
|
2765
|
+
t -= V;
|
|
2892
2766
|
}
|
|
2893
|
-
const
|
|
2894
|
-
for (const
|
|
2895
|
-
const
|
|
2896
|
-
t < U ? (
|
|
2897
|
-
id:
|
|
2767
|
+
const E = r.filter((_) => _.id !== "__more_buttons__");
|
|
2768
|
+
for (const _ of E) {
|
|
2769
|
+
const $ = _.computedStyleMap().get("margin-left"), V = _.computedStyleMap().get("margin-right"), U = ($ ? $.value : 0) + _.getBoundingClientRect().width + (V ? V.value : 0);
|
|
2770
|
+
t < U ? (k.set(_.id, !0), N.push({
|
|
2771
|
+
id: _.id,
|
|
2898
2772
|
width: U
|
|
2899
2773
|
})) : t -= U;
|
|
2900
2774
|
}
|
|
2901
2775
|
if (N.length)
|
|
2902
|
-
for (let
|
|
2903
|
-
const
|
|
2904
|
-
if (t >=
|
|
2905
|
-
t -=
|
|
2776
|
+
for (let _ = N.length - 1; _ >= 0; _--) {
|
|
2777
|
+
const $ = N[_].width;
|
|
2778
|
+
if (t >= $)
|
|
2779
|
+
t -= $, k.delete(N[_].id), N.pop();
|
|
2906
2780
|
else
|
|
2907
2781
|
break;
|
|
2908
2782
|
}
|
|
2909
|
-
const
|
|
2910
|
-
|
|
2911
|
-
const
|
|
2912
|
-
|
|
2783
|
+
const x = Object.assign({}, I.value);
|
|
2784
|
+
x.children = [];
|
|
2785
|
+
const M = new G(x), F = o.value.reduce((_, $) => (k.has($.id) && M.children.push($), $.visible = !k.has($.id), _.push($), _), []);
|
|
2786
|
+
I.value = M, o.value = F;
|
|
2913
2787
|
}
|
|
2914
|
-
const
|
|
2915
|
-
if (
|
|
2916
|
-
const t =
|
|
2917
|
-
(t <
|
|
2788
|
+
const m = new ResizeObserver((a) => {
|
|
2789
|
+
if (a.length) {
|
|
2790
|
+
const t = a[0].contentRect.width, d = v.value.getBoundingClientRect().width;
|
|
2791
|
+
(t < d || N.length) && j(t);
|
|
2918
2792
|
}
|
|
2919
2793
|
});
|
|
2920
|
-
|
|
2921
|
-
const
|
|
2922
|
-
|
|
2794
|
+
z(() => {
|
|
2795
|
+
const a = u.value;
|
|
2796
|
+
m.observe(a), document.body.addEventListener("click", P);
|
|
2923
2797
|
}), ne(() => {
|
|
2924
|
-
|
|
2925
|
-
}),
|
|
2926
|
-
|
|
2798
|
+
m.disconnect(), document.body.removeEventListener("click", P);
|
|
2799
|
+
}), H(() => s.items, () => {
|
|
2800
|
+
o.value = s.items;
|
|
2927
2801
|
}, {
|
|
2928
2802
|
deep: !0
|
|
2929
|
-
}),
|
|
2930
|
-
|
|
2803
|
+
}), H(o, (a) => {
|
|
2804
|
+
p = new Array(o.value.length).fill(S());
|
|
2931
2805
|
});
|
|
2932
|
-
function
|
|
2933
|
-
|
|
2806
|
+
function R(a, n, t, r) {
|
|
2807
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", a, n, t, r);
|
|
2934
2808
|
}
|
|
2935
|
-
function
|
|
2936
|
-
const
|
|
2937
|
-
|
|
2809
|
+
function A() {
|
|
2810
|
+
const a = v.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
2811
|
+
a == null || a.classList.remove("dgComponentSelected"), a == null || a.classList.remove("dgComponentFocused");
|
|
2938
2812
|
}
|
|
2939
2813
|
return () => w("div", {
|
|
2940
2814
|
ref: C,
|
|
2941
|
-
"data-dragref": `${
|
|
2942
|
-
class:
|
|
2815
|
+
"data-dragref": `${i.schema.id}-container`,
|
|
2816
|
+
class: b.value
|
|
2943
2817
|
}, [w("div", {
|
|
2944
2818
|
ref: u,
|
|
2945
|
-
class:
|
|
2819
|
+
class: y.value
|
|
2946
2820
|
}, [w("div", {
|
|
2947
|
-
ref:
|
|
2821
|
+
ref: v,
|
|
2948
2822
|
class: "d-inline-block f-response-content",
|
|
2949
2823
|
style: "white-space: nowrap;"
|
|
2950
|
-
}, [
|
|
2951
|
-
ref:
|
|
2824
|
+
}, [o.value.map((a, n) => w(St, {
|
|
2825
|
+
ref: p[n],
|
|
2952
2826
|
class: "p-0 display-inline-block",
|
|
2953
|
-
modelValue:
|
|
2954
|
-
"onUpdate:modelValue": (t) =>
|
|
2827
|
+
modelValue: a,
|
|
2828
|
+
"onUpdate:modelValue": (t) => a = t,
|
|
2955
2829
|
canMove: !0,
|
|
2956
2830
|
childType: "response-toolbar-item",
|
|
2957
2831
|
childLabel: "按钮",
|
|
2958
2832
|
contentKey: "buttons",
|
|
2959
|
-
componentId:
|
|
2960
|
-
id:
|
|
2833
|
+
componentId: s.componentId,
|
|
2834
|
+
id: a.id,
|
|
2961
2835
|
style: "padding:0 !important;display:inline-block",
|
|
2962
|
-
onSelectionChange:
|
|
2963
|
-
onRemoveComponent:
|
|
2836
|
+
onSelectionChange: R,
|
|
2837
|
+
onRemoveComponent: A
|
|
2964
2838
|
}, {
|
|
2965
|
-
default: () =>
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2839
|
+
default: () => {
|
|
2840
|
+
var t;
|
|
2841
|
+
return [w(je, {
|
|
2842
|
+
id: a.id,
|
|
2843
|
+
disable: a.disable,
|
|
2844
|
+
text: a.text,
|
|
2845
|
+
icon: a.icon,
|
|
2846
|
+
class: ((t = a.appearance) == null ? void 0 : t.class) || "btn-secondary",
|
|
2847
|
+
alignment: s.alignment || "right",
|
|
2848
|
+
componentId: s.componentId
|
|
2849
|
+
}, null)];
|
|
2850
|
+
}
|
|
2972
2851
|
}))])])]);
|
|
2973
2852
|
}
|
|
2974
|
-
}), Vt =
|
|
2975
|
-
|
|
2976
|
-
|
|
2853
|
+
}), Vt = ce;
|
|
2854
|
+
Q.register = (s, e, o) => {
|
|
2855
|
+
s["response-toolbar"] = Q, e["response-toolbar"] = ce;
|
|
2977
2856
|
};
|
|
2978
|
-
|
|
2979
|
-
|
|
2857
|
+
Q.registerDesigner = (s, e, o) => {
|
|
2858
|
+
s["response-toolbar"] = Bt, e["response-toolbar"] = ce, s["response-toolbar-item"] = je, e["response-toolbar-item"] = dt;
|
|
2980
2859
|
};
|
|
2981
|
-
const
|
|
2860
|
+
const Wt = Ae(Q);
|
|
2982
2861
|
export {
|
|
2983
|
-
|
|
2862
|
+
Q as FResponseToolbar,
|
|
2984
2863
|
G as ResponseToolbarDropDownItem,
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2864
|
+
Lt as ResponseToolbarGroup,
|
|
2865
|
+
Be as ResponseToolbarItem,
|
|
2866
|
+
Wt as default,
|
|
2988
2867
|
Vt as responseToolbarResolver
|
|
2989
2868
|
};
|