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