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