@farris/ui-vue 1.3.0 → 1.3.1
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 +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- 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 +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { getCustomClass as
|
|
7
|
-
import { useDesignerInnerComponent as
|
|
8
|
-
class
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var Ee = (s, e, n) => e in s ? Me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
|
|
3
|
+
var D = (s, e, n) => Ee(s, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { computed as V, getCurrentInstance as de, createVNode as y, ref as S, defineComponent as Q, onMounted as z, onUnmounted as ue, watch as G, inject as L, createTextVNode as pe, provide as Re, onBeforeUnmount as ke, withModifiers as Pe } from "vue";
|
|
5
|
+
import { isPlainObject as ce, cloneDeep as fe } from "lodash-es";
|
|
6
|
+
import { getCustomClass as H, withInstall as Be } from "../common/index.esm.js";
|
|
7
|
+
import { useDesignerInnerComponent as ge } from "../designer-canvas/index.esm.js";
|
|
8
|
+
class me {
|
|
9
9
|
constructor(e) {
|
|
10
10
|
/** 工具栏项标识 */
|
|
11
|
-
|
|
11
|
+
D(this, "id", "");
|
|
12
12
|
/** 工具栏项自定义样式 */
|
|
13
|
-
|
|
13
|
+
D(this, "class", "btn-secondary");
|
|
14
14
|
/** 图标 */
|
|
15
|
-
|
|
15
|
+
D(this, "icon", "");
|
|
16
16
|
/** 所属分组 */
|
|
17
|
-
|
|
17
|
+
D(this, "groupId", "");
|
|
18
18
|
/** 收藏顺序 */
|
|
19
|
-
|
|
19
|
+
D(this, "order", -1);
|
|
20
20
|
/** 是否作为下拉菜单的顶层按钮 */
|
|
21
|
-
|
|
21
|
+
D(this, "asDropDownTop", !1);
|
|
22
22
|
/** 文本 */
|
|
23
|
-
|
|
23
|
+
D(this, "text", "");
|
|
24
24
|
/** 是否可见 */
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
D(this, "visible", !0);
|
|
26
|
+
D(this, "responsed", !1);
|
|
27
27
|
/** 是否启用提示消息 */
|
|
28
|
-
|
|
28
|
+
D(this, "tipsEnable", !1);
|
|
29
29
|
/** 提示消息内容 */
|
|
30
|
-
|
|
30
|
+
D(this, "tipsText", "");
|
|
31
31
|
/** 记录宽度 */
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
D(this, "width", 0);
|
|
33
|
+
D(this, "onClick", () => {
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
D(this, "options");
|
|
36
36
|
this.options = e;
|
|
37
|
-
const
|
|
37
|
+
const n = [
|
|
38
38
|
"id",
|
|
39
39
|
"class",
|
|
40
40
|
"icon",
|
|
@@ -50,13 +50,13 @@ class be {
|
|
|
50
50
|
"tipsText",
|
|
51
51
|
"onClick"
|
|
52
52
|
];
|
|
53
|
-
Object.keys(e).filter((
|
|
54
|
-
this[
|
|
53
|
+
Object.keys(e).filter((i) => n.indexOf(i) > -1).forEach((i) => {
|
|
54
|
+
this[i] = e[i];
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/** 是否可用 */
|
|
58
58
|
get enable() {
|
|
59
|
-
return Object.keys(this.options).indexOf("
|
|
59
|
+
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : V(() => !0);
|
|
60
60
|
}
|
|
61
61
|
/** 设置宽度 */
|
|
62
62
|
setWidth(e) {
|
|
@@ -67,49 +67,49 @@ class be {
|
|
|
67
67
|
return this.visible ? this.width : !1;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class
|
|
70
|
+
class Ae extends me {
|
|
71
71
|
constructor(e) {
|
|
72
72
|
super(e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function he() {
|
|
76
76
|
function s(e) {
|
|
77
|
-
const
|
|
78
|
-
return e.reduce((
|
|
77
|
+
const n = [];
|
|
78
|
+
return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new W(d)) : i.push(new Ae(d)), i), n), n;
|
|
79
79
|
}
|
|
80
80
|
return { buildResponseToolbarItems: s };
|
|
81
81
|
}
|
|
82
|
-
const { buildResponseToolbarItems:
|
|
83
|
-
class
|
|
84
|
-
constructor(
|
|
85
|
-
super(
|
|
86
|
-
|
|
82
|
+
const { buildResponseToolbarItems: Oe } = he();
|
|
83
|
+
class W extends me {
|
|
84
|
+
constructor(n) {
|
|
85
|
+
super(n);
|
|
86
|
+
D(this, "placement", "");
|
|
87
87
|
// 下拉位置
|
|
88
88
|
/** 下拉class */
|
|
89
|
-
|
|
89
|
+
D(this, "dropdownClass", "");
|
|
90
90
|
/** 下拉菜单class */
|
|
91
|
-
|
|
91
|
+
D(this, "menuClass", "");
|
|
92
92
|
/** 是否用分开的下拉按钮 */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
Object.keys(
|
|
98
|
-
this[d] =
|
|
99
|
-
}),
|
|
93
|
+
D(this, "split", !1);
|
|
94
|
+
D(this, "children", []);
|
|
95
|
+
D(this, "expanded", !1);
|
|
96
|
+
const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
97
|
+
Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
|
|
98
|
+
this[d] = n[d];
|
|
99
|
+
}), n.children && n.children.length && (this.children = Oe(n.children));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
class
|
|
103
|
-
constructor(e,
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
class Pt {
|
|
103
|
+
constructor(e, n) {
|
|
104
|
+
D(this, "id");
|
|
105
|
+
D(this, "name");
|
|
106
106
|
/** 记录元素的Id */
|
|
107
|
-
|
|
107
|
+
D(this, "presetId", []);
|
|
108
108
|
/** 记录转变为下拉时元素的位置 */
|
|
109
|
-
|
|
109
|
+
D(this, "responsedIndex", []);
|
|
110
110
|
/** 记录宽度 */
|
|
111
|
-
|
|
112
|
-
this.id = e, this.name =
|
|
111
|
+
D(this, "width");
|
|
112
|
+
this.id = e, this.name = n, this.width = 0;
|
|
113
113
|
}
|
|
114
114
|
// 设置宽度
|
|
115
115
|
setWidth(e) {
|
|
@@ -144,98 +144,98 @@ class Vt {
|
|
|
144
144
|
return this.presetId.length === this.responsedIndex.length;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const
|
|
148
|
-
function
|
|
149
|
-
const { properties: e, title:
|
|
150
|
-
return (!d || !
|
|
147
|
+
const ee = {}, be = {};
|
|
148
|
+
function te(s) {
|
|
149
|
+
const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), h = Object.keys(e).reduce((f, x) => ((!d || !i.find((w) => w == x)) && (f[x] = e[x].type === "object" && e[x].properties ? te(e[x]) : fe(e[x].default)), f), {});
|
|
150
|
+
return n && (!d || !i.find((f) => f == "id")) && (h.id = `${n}-${Date.now()}`), h;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
let d =
|
|
156
|
-
const
|
|
157
|
-
return d =
|
|
152
|
+
function X(s, e = {}, n) {
|
|
153
|
+
const i = ee[s];
|
|
154
|
+
if (i) {
|
|
155
|
+
let d = te(i);
|
|
156
|
+
const h = be[s];
|
|
157
|
+
return d = h ? h({ getSchemaByType: X }, d, e, n) : d, d;
|
|
158
158
|
}
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const
|
|
163
|
-
return Object.keys(s).reduce((
|
|
161
|
+
function je(s, e) {
|
|
162
|
+
const n = te(e);
|
|
163
|
+
return Object.keys(s).reduce((i, d) => (i[d] && ce(i[d]) && ce(s[d]) ? Object.assign(i[d], s[d]) : i[d] = s[d], i), n), n;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
return Object.keys(s).filter((
|
|
165
|
+
function _e(s, e) {
|
|
166
|
+
return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
|
|
167
167
|
if (e.has(d)) {
|
|
168
|
-
const
|
|
169
|
-
if (typeof
|
|
170
|
-
|
|
168
|
+
const h = e.get(d);
|
|
169
|
+
if (typeof h == "string")
|
|
170
|
+
i[h] = s[d];
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
Object.assign(
|
|
172
|
+
const f = h(d, s[d], s);
|
|
173
|
+
Object.assign(i, f);
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
|
-
|
|
177
|
-
return
|
|
176
|
+
i[d] = s[d];
|
|
177
|
+
return i;
|
|
178
178
|
}, {});
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
const
|
|
182
|
-
return
|
|
180
|
+
function $e(s, e, n = /* @__PURE__ */ new Map()) {
|
|
181
|
+
const i = je(s, e);
|
|
182
|
+
return _e(i, n);
|
|
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 Fe(s = {}) {
|
|
185
|
+
function e(g, m, l, c) {
|
|
186
|
+
if (typeof l == "number")
|
|
187
|
+
return c[g].length === l;
|
|
188
|
+
if (typeof l == "object") {
|
|
189
|
+
const p = Object.keys(l)[0], b = l[p];
|
|
190
|
+
if (p === "not")
|
|
191
|
+
return Number(c[g].length) !== Number(b);
|
|
192
|
+
if (p === "moreThan")
|
|
193
|
+
return Number(c[g].length) >= Number(b);
|
|
194
|
+
if (p === "lessThan")
|
|
195
|
+
return Number(c[g].length) <= Number(b);
|
|
196
196
|
}
|
|
197
197
|
return !1;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
199
|
+
function n(g, m, l, c) {
|
|
200
|
+
return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(l);
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const i = /* @__PURE__ */ new Map([
|
|
203
203
|
["length", e],
|
|
204
|
-
["getProperty",
|
|
204
|
+
["getProperty", n]
|
|
205
205
|
]);
|
|
206
|
-
Object.keys(s).reduce((g,
|
|
207
|
-
function d(g,
|
|
208
|
-
const
|
|
209
|
-
return typeof
|
|
210
|
-
if (
|
|
211
|
-
return { target:
|
|
212
|
-
const
|
|
213
|
-
return { target:
|
|
206
|
+
Object.keys(s).reduce((g, m) => (g.set(m, s[m]), g), i);
|
|
207
|
+
function d(g, m) {
|
|
208
|
+
const l = g;
|
|
209
|
+
return typeof m == "number" ? [{ target: l, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!m }] : typeof m == "object" ? Object.keys(m).map((c) => {
|
|
210
|
+
if (c === "length")
|
|
211
|
+
return { target: l, operator: "length", param: null, value: m[c] };
|
|
212
|
+
const p = c, b = m[c];
|
|
213
|
+
return { target: l, operator: "getProperty", param: p, value: b };
|
|
214
214
|
}) : [];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return Object.keys(g).reduce((
|
|
218
|
-
const
|
|
219
|
-
return
|
|
216
|
+
function h(g) {
|
|
217
|
+
return Object.keys(g).reduce((l, c) => {
|
|
218
|
+
const p = d(c, g[c]);
|
|
219
|
+
return l.push(...p), l;
|
|
220
220
|
}, []);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
return
|
|
222
|
+
function f(g, m) {
|
|
223
|
+
if (i.has(g.operator)) {
|
|
224
|
+
const l = i.get(g.operator);
|
|
225
|
+
return l && l(g.target, g.param, g.value, m) || !1;
|
|
226
226
|
}
|
|
227
227
|
return !1;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
return
|
|
229
|
+
function x(g, m) {
|
|
230
|
+
return h(g).reduce((p, b) => p && f(b, m), !0);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return
|
|
232
|
+
function w(g, m) {
|
|
233
|
+
const l = Object.keys(g), c = l.includes("allOf"), p = l.includes("anyOf"), b = c || p, j = (b ? g[b ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((_) => x(_, m));
|
|
234
|
+
return c ? !j.includes(!1) : j.includes(!0);
|
|
235
235
|
}
|
|
236
|
-
return { parseValueSchema:
|
|
236
|
+
return { parseValueSchema: w };
|
|
237
237
|
}
|
|
238
|
-
const
|
|
238
|
+
const ne = {
|
|
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" },
|
|
@@ -274,30 +274,30 @@ const re = {
|
|
|
274
274
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
275
275
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
276
276
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
function
|
|
280
|
-
return
|
|
281
|
-
const
|
|
282
|
-
return Object.assign(
|
|
277
|
+
}, ye = {}, Ne = {};
|
|
278
|
+
Fe();
|
|
279
|
+
function ve(s, e, n = /* @__PURE__ */ new Map(), i = (f, x, w) => x, d = {}, h = (f) => f) {
|
|
280
|
+
return ee[e.title] = e, be[e.title] = i, ye[e.title] = d, Ne[e.title] = h, (f = {}) => {
|
|
281
|
+
const x = $e(f, e, n), w = Object.keys(s).reduce((g, m) => (g[m] = s[m].default, g), {});
|
|
282
|
+
return Object.assign(w, x);
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Le(s, e) {
|
|
286
286
|
return { customClass: e.class, customStyle: e.style };
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const Ve = /* @__PURE__ */ new Map([
|
|
289
289
|
["buttons", "items"],
|
|
290
|
+
["appearance", Le]
|
|
291
|
+
]), Ue = /* @__PURE__ */ new Map([
|
|
290
292
|
["appearance", We]
|
|
291
|
-
]), qe = /* @__PURE__ */ new Map([
|
|
292
|
-
["appearance", ze]
|
|
293
293
|
]);
|
|
294
|
-
function
|
|
294
|
+
function We(s, e) {
|
|
295
295
|
return { class: e.class, style: e.style };
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Ce(s, e, n) {
|
|
298
298
|
return e;
|
|
299
299
|
}
|
|
300
|
-
const
|
|
300
|
+
const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-design.gitee.io/response-toolbar.schema.json", Ge = "response-toolbar", He = "A Farris Toolbar Component", Je = "object", Qe = {
|
|
301
301
|
id: {
|
|
302
302
|
description: "The unique identifier for a Response Toolbar",
|
|
303
303
|
type: "string"
|
|
@@ -313,9 +313,6 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
313
313
|
properties: {
|
|
314
314
|
class: {
|
|
315
315
|
type: "string"
|
|
316
|
-
},
|
|
317
|
-
style: {
|
|
318
|
-
type: "string"
|
|
319
316
|
}
|
|
320
317
|
},
|
|
321
318
|
default: {}
|
|
@@ -330,19 +327,19 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
330
327
|
type: "array",
|
|
331
328
|
default: []
|
|
332
329
|
}
|
|
333
|
-
},
|
|
330
|
+
}, Xe = [
|
|
334
331
|
"id",
|
|
335
332
|
"type",
|
|
336
333
|
"buttons"
|
|
337
|
-
],
|
|
338
|
-
$schema:
|
|
339
|
-
$id:
|
|
340
|
-
title:
|
|
341
|
-
description:
|
|
342
|
-
type:
|
|
343
|
-
properties:
|
|
344
|
-
required:
|
|
345
|
-
},
|
|
334
|
+
], Ye = {
|
|
335
|
+
$schema: qe,
|
|
336
|
+
$id: ze,
|
|
337
|
+
title: Ge,
|
|
338
|
+
description: He,
|
|
339
|
+
type: Je,
|
|
340
|
+
properties: Qe,
|
|
341
|
+
required: Xe
|
|
342
|
+
}, Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/response-toolbar-item.schema.json", et = "response-toolbar-item", tt = "A Farris Toolbar Item Component", nt = "object", ot = {
|
|
346
343
|
id: {
|
|
347
344
|
description: "The unique identifier for a Response Toolbar",
|
|
348
345
|
type: "string"
|
|
@@ -358,10 +355,7 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
358
355
|
properties: {
|
|
359
356
|
class: {
|
|
360
357
|
type: "string",
|
|
361
|
-
default: "btn-
|
|
362
|
-
},
|
|
363
|
-
style: {
|
|
364
|
-
type: "string"
|
|
358
|
+
default: "btn-secondary"
|
|
365
359
|
}
|
|
366
360
|
},
|
|
367
361
|
default: {}
|
|
@@ -374,31 +368,36 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
374
368
|
text: {
|
|
375
369
|
description: "文本",
|
|
376
370
|
type: "string",
|
|
377
|
-
default: "
|
|
371
|
+
default: "按钮"
|
|
378
372
|
},
|
|
379
373
|
icon: {
|
|
380
374
|
description: "图标",
|
|
381
375
|
type: "string",
|
|
382
376
|
default: ""
|
|
383
377
|
},
|
|
378
|
+
disabled: {
|
|
379
|
+
description: "禁用",
|
|
380
|
+
type: "boolean",
|
|
381
|
+
default: !1
|
|
382
|
+
},
|
|
384
383
|
onClick: {
|
|
385
384
|
description: "点击事件",
|
|
386
385
|
type: "string",
|
|
387
386
|
default: ""
|
|
388
387
|
}
|
|
389
|
-
},
|
|
388
|
+
}, st = [
|
|
390
389
|
"id",
|
|
391
390
|
"type",
|
|
392
391
|
"text"
|
|
393
|
-
],
|
|
394
|
-
$schema:
|
|
395
|
-
$id:
|
|
396
|
-
title:
|
|
397
|
-
description:
|
|
398
|
-
type:
|
|
399
|
-
properties:
|
|
400
|
-
required:
|
|
401
|
-
},
|
|
392
|
+
], K = {
|
|
393
|
+
$schema: Ze,
|
|
394
|
+
$id: Ke,
|
|
395
|
+
title: et,
|
|
396
|
+
description: tt,
|
|
397
|
+
type: nt,
|
|
398
|
+
properties: ot,
|
|
399
|
+
required: st
|
|
400
|
+
}, rt = "response-toolbar-item", it = "A Farris Container Component", ct = "object", lt = {
|
|
402
401
|
basic: {
|
|
403
402
|
title: "基本信息",
|
|
404
403
|
description: "Basic Infomation",
|
|
@@ -431,12 +430,12 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
431
430
|
}
|
|
432
431
|
}
|
|
433
432
|
}
|
|
434
|
-
},
|
|
435
|
-
title:
|
|
436
|
-
description:
|
|
437
|
-
type:
|
|
438
|
-
categories:
|
|
439
|
-
},
|
|
433
|
+
}, le = {
|
|
434
|
+
title: rt,
|
|
435
|
+
description: it,
|
|
436
|
+
type: ct,
|
|
437
|
+
categories: lt
|
|
438
|
+
}, oe = {
|
|
440
439
|
/** 组件自定义样式 */
|
|
441
440
|
customClass: { type: String, default: "" },
|
|
442
441
|
alignment: { Type: String, default: "right" },
|
|
@@ -445,16 +444,16 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
445
444
|
default: []
|
|
446
445
|
}
|
|
447
446
|
};
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
const
|
|
447
|
+
ee[K.title] = K;
|
|
448
|
+
ye[le.title] = le;
|
|
449
|
+
const at = Object.assign({}, oe, {
|
|
451
450
|
componentId: { type: String, default: "" }
|
|
452
|
-
}),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
),
|
|
451
|
+
}), se = ve(
|
|
452
|
+
oe,
|
|
453
|
+
Ye,
|
|
454
|
+
Ve,
|
|
455
|
+
Ce
|
|
456
|
+
), we = {
|
|
458
457
|
id: { type: String, default: "" },
|
|
459
458
|
items: { type: Object, default: {} },
|
|
460
459
|
class: { type: String, default: "" },
|
|
@@ -463,1528 +462,772 @@ const dt = Object.assign({}, ie, {
|
|
|
463
462
|
icon: { type: String, default: "" },
|
|
464
463
|
componentId: { type: String, default: "" },
|
|
465
464
|
alignment: { Type: String, default: "right" }
|
|
466
|
-
},
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
465
|
+
}, dt = ve(
|
|
466
|
+
we,
|
|
467
|
+
K,
|
|
468
|
+
Ue,
|
|
469
|
+
Ce
|
|
471
470
|
);
|
|
472
|
-
function
|
|
473
|
-
function s(
|
|
474
|
-
const
|
|
471
|
+
function xe() {
|
|
472
|
+
function s(n) {
|
|
473
|
+
const i = {
|
|
475
474
|
"f-icon": !0
|
|
476
475
|
};
|
|
477
|
-
if (
|
|
478
|
-
const d =
|
|
479
|
-
d && d.length && d.reduce((
|
|
476
|
+
if (n.icon) {
|
|
477
|
+
const d = n.icon.trim().split(" ");
|
|
478
|
+
d && d.length && d.reduce((h, f) => (h[f] = !0, h), i);
|
|
480
479
|
}
|
|
481
|
-
return
|
|
480
|
+
return i;
|
|
482
481
|
}
|
|
483
|
-
function e(
|
|
484
|
-
return !!(
|
|
482
|
+
function e(n) {
|
|
483
|
+
return !!(n.icon && n.icon.trim());
|
|
485
484
|
}
|
|
486
485
|
return { iconClass: s, shouldShowIcon: e };
|
|
487
486
|
}
|
|
488
|
-
function
|
|
489
|
-
function e(
|
|
490
|
-
const
|
|
487
|
+
function ut(s) {
|
|
488
|
+
function e(l) {
|
|
489
|
+
const c = {
|
|
491
490
|
"dropdown-menu": !0
|
|
492
491
|
};
|
|
493
|
-
if (
|
|
494
|
-
const
|
|
495
|
-
|
|
492
|
+
if (l.class) {
|
|
493
|
+
const p = l.menuClass.split(" ");
|
|
494
|
+
p && p.length && p.reduce((b, M) => (b[M] = !0, b), c);
|
|
496
495
|
}
|
|
497
|
-
return
|
|
496
|
+
return c;
|
|
498
497
|
}
|
|
499
|
-
function
|
|
500
|
-
const
|
|
501
|
-
disabled: !
|
|
498
|
+
function n(l) {
|
|
499
|
+
const c = {
|
|
500
|
+
disabled: !l.enable,
|
|
502
501
|
"dropdown-submenu": !0,
|
|
503
502
|
"f-rt-dropdown": !0
|
|
504
|
-
},
|
|
505
|
-
return
|
|
503
|
+
}, p = l.dropdownClass.split(" ");
|
|
504
|
+
return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
|
|
506
505
|
}
|
|
507
|
-
function
|
|
508
|
-
const
|
|
509
|
-
disabled: !
|
|
506
|
+
function i(l) {
|
|
507
|
+
const c = {
|
|
508
|
+
disabled: !l.enable,
|
|
510
509
|
"dropdown-item": !0,
|
|
511
510
|
"f-rt-btn": !0
|
|
512
|
-
},
|
|
513
|
-
return
|
|
511
|
+
}, p = l.class.split(" ");
|
|
512
|
+
return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
|
|
514
513
|
}
|
|
515
514
|
let d;
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
var
|
|
519
|
-
((
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
|
|
515
|
+
const h = /* @__PURE__ */ new Map();
|
|
516
|
+
function f(l, c, p) {
|
|
517
|
+
var M;
|
|
518
|
+
((M = l.target) == null ? void 0 : M.id) === c.id && l.stopPropagation();
|
|
519
|
+
const b = p ? p.id : "__top_item__";
|
|
520
|
+
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? h.set(b, c) : h.delete(b)), h.has(b) && h.get(b) !== c) {
|
|
521
|
+
const O = h.get(b);
|
|
522
|
+
O && (O.expanded = !1);
|
|
524
523
|
}
|
|
525
524
|
}
|
|
526
|
-
function
|
|
527
|
-
document.body.click(),
|
|
528
|
-
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
531
|
-
class:
|
|
532
|
-
id:
|
|
533
|
-
onClick: (
|
|
534
|
-
}, [
|
|
535
|
-
id:
|
|
536
|
-
class: c
|
|
537
|
-
onMouseover: (
|
|
538
|
-
}, [
|
|
525
|
+
function x(l, c) {
|
|
526
|
+
document.body.click(), c.enable && c.onClick(l, c.id);
|
|
527
|
+
}
|
|
528
|
+
function w(l) {
|
|
529
|
+
return l.children.map((c) => c.children && c.children.length ? y("li", {
|
|
530
|
+
class: n(c),
|
|
531
|
+
id: c.id,
|
|
532
|
+
onClick: (p) => c.enable && f(p, c, l)
|
|
533
|
+
}, [y("span", {
|
|
534
|
+
id: c.id,
|
|
535
|
+
class: i(c),
|
|
536
|
+
onMouseover: (p) => c.enable && f(p, c, l)
|
|
537
|
+
}, [c.text, y("i", {
|
|
539
538
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
540
539
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
541
|
-
}, null)]), d(
|
|
542
|
-
class: c
|
|
543
|
-
id:
|
|
544
|
-
onClick: (
|
|
545
|
-
onMouseover: (
|
|
546
|
-
}, [s.shouldShowIcon(
|
|
547
|
-
class: s.iconClass(
|
|
548
|
-
}, null),
|
|
549
|
-
}
|
|
550
|
-
function g(
|
|
551
|
-
const
|
|
552
|
-
display:
|
|
540
|
+
}, null)]), d(c, c)]) : y("li", {
|
|
541
|
+
class: i(c),
|
|
542
|
+
id: c.id,
|
|
543
|
+
onClick: (p) => x(p, c),
|
|
544
|
+
onMouseover: (p) => c.enable && f(p, c, l)
|
|
545
|
+
}, [s.shouldShowIcon(c) && y("i", {
|
|
546
|
+
class: s.iconClass(c)
|
|
547
|
+
}, null), c.text]));
|
|
548
|
+
}
|
|
549
|
+
function g(l, c, p) {
|
|
550
|
+
const b = {
|
|
551
|
+
display: l.expanded ? "block" : "none",
|
|
553
552
|
position: "fixed",
|
|
554
553
|
maxWidth: "300px",
|
|
555
554
|
width: "auto",
|
|
556
555
|
minWidth: "120px"
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
556
|
+
}, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, O = c, j = O == null ? void 0 : O.getClientRects();
|
|
557
|
+
if (O && j && j.length) {
|
|
559
558
|
const {
|
|
560
|
-
top:
|
|
561
|
-
width:
|
|
562
|
-
left:
|
|
563
|
-
right:
|
|
564
|
-
height:
|
|
565
|
-
} =
|
|
566
|
-
|
|
567
|
-
const
|
|
559
|
+
top: F,
|
|
560
|
+
width: _,
|
|
561
|
+
left: R,
|
|
562
|
+
right: E,
|
|
563
|
+
height: k
|
|
564
|
+
} = j[0], v = Math.ceil(k + F);
|
|
565
|
+
b.top = `${v}px`, b.left = `${R}px`;
|
|
566
|
+
const P = l.id + "_menu", A = c ? c.querySelector("#" + P) : null;
|
|
568
567
|
if (A) {
|
|
569
|
-
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
|
|
568
|
+
b.display === "block" && (A.style.display = "block");
|
|
569
|
+
const a = A.getBoundingClientRect();
|
|
570
|
+
if (p) {
|
|
571
|
+
b.top = `${F - 6}px`;
|
|
572
|
+
const o = Math.ceil(_ + R);
|
|
573
|
+
b.left = `${o}px`;
|
|
575
574
|
}
|
|
576
|
-
|
|
575
|
+
M - R - _ < a.width && (b.left = `${(p ? R : E) - a.width}px`);
|
|
577
576
|
}
|
|
578
577
|
}
|
|
579
|
-
return
|
|
580
|
-
}
|
|
581
|
-
d = function(
|
|
582
|
-
var
|
|
583
|
-
const
|
|
584
|
-
return
|
|
585
|
-
class: e(
|
|
586
|
-
style: g(
|
|
587
|
-
id:
|
|
588
|
-
}, [
|
|
578
|
+
return b;
|
|
579
|
+
}
|
|
580
|
+
d = function(l, c) {
|
|
581
|
+
var O, j;
|
|
582
|
+
const p = de(), b = c ? c.id : l.id, M = (j = (O = p == null ? void 0 : p.exposed) == null ? void 0 : O.elementRef.value) == null ? void 0 : j.querySelector("#" + b);
|
|
583
|
+
return y("ul", {
|
|
584
|
+
class: e(l),
|
|
585
|
+
style: g(l, M, c),
|
|
586
|
+
id: l.id + "_menu"
|
|
587
|
+
}, [w(l)]);
|
|
589
588
|
};
|
|
590
|
-
function
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}),
|
|
589
|
+
function m() {
|
|
590
|
+
h.forEach((l) => {
|
|
591
|
+
l.expanded = !1;
|
|
592
|
+
}), h.clear();
|
|
594
593
|
}
|
|
595
594
|
return {
|
|
596
595
|
renderDropdownMenu: d,
|
|
597
|
-
clearAllDropDownMenu:
|
|
596
|
+
clearAllDropDownMenu: m
|
|
598
597
|
};
|
|
599
598
|
}
|
|
600
|
-
function
|
|
601
|
-
const
|
|
602
|
-
renderDropdownMenu:
|
|
599
|
+
function pt(s, e) {
|
|
600
|
+
const n = S(s.alignment), {
|
|
601
|
+
renderDropdownMenu: i,
|
|
603
602
|
clearAllDropDownMenu: d
|
|
604
|
-
} =
|
|
605
|
-
function
|
|
606
|
-
const
|
|
603
|
+
} = ut(e);
|
|
604
|
+
function h(m) {
|
|
605
|
+
const l = {
|
|
607
606
|
"btn-group": !0,
|
|
608
607
|
"f-rt-dropdown": !0,
|
|
609
|
-
"f-btn-ml":
|
|
610
|
-
"f-btn-mr":
|
|
611
|
-
},
|
|
612
|
-
return
|
|
608
|
+
"f-btn-ml": n.value === "right",
|
|
609
|
+
"f-btn-mr": n.value === "left"
|
|
610
|
+
}, c = m.dropdownClass.split(" ");
|
|
611
|
+
return c && c.length && c.reduce((p, b) => (p[b] = !0, p), l), l;
|
|
613
612
|
}
|
|
614
|
-
function m
|
|
615
|
-
const
|
|
613
|
+
function f(m) {
|
|
614
|
+
const l = {
|
|
616
615
|
btn: !0,
|
|
617
|
-
disabled: !
|
|
616
|
+
disabled: !m.enable,
|
|
618
617
|
"f-rt-btn": !0,
|
|
619
|
-
"btn-icontext": !!(
|
|
618
|
+
"btn-icontext": !!(m.icon && m.icon.trim())
|
|
620
619
|
};
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
|
|
620
|
+
if (m.class) {
|
|
621
|
+
const c = m.class.split(" ");
|
|
622
|
+
c && c.length && c.reduce((p, b) => (p[b] = !0, p), l);
|
|
624
623
|
}
|
|
625
|
-
return
|
|
626
|
-
}
|
|
627
|
-
function
|
|
628
|
-
|
|
629
|
-
const
|
|
630
|
-
document.body.click(),
|
|
631
|
-
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
634
|
-
id:
|
|
635
|
-
class:
|
|
636
|
-
}, [
|
|
637
|
-
class: m
|
|
624
|
+
return l;
|
|
625
|
+
}
|
|
626
|
+
function x(m, l) {
|
|
627
|
+
m.stopPropagation();
|
|
628
|
+
const c = l.expanded;
|
|
629
|
+
document.body.click(), l.expanded = !c;
|
|
630
|
+
}
|
|
631
|
+
function w(m) {
|
|
632
|
+
return y("div", {
|
|
633
|
+
id: m.id,
|
|
634
|
+
class: h(m)
|
|
635
|
+
}, [y("div", {
|
|
636
|
+
class: f(m),
|
|
638
637
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
639
|
-
onClick: (
|
|
640
|
-
}, [e.shouldShowIcon(
|
|
641
|
-
class: e.iconClass(
|
|
642
|
-
}, null),
|
|
638
|
+
onClick: (l) => m.enable && x(l, m)
|
|
639
|
+
}, [e.shouldShowIcon(m) && y("i", {
|
|
640
|
+
class: e.iconClass(m)
|
|
641
|
+
}, null), y("span", null, [m.text]), y("i", {
|
|
643
642
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
644
643
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
645
|
-
}, null)]),
|
|
644
|
+
}, null)]), i(m)]);
|
|
646
645
|
}
|
|
647
646
|
function g() {
|
|
648
647
|
d();
|
|
649
648
|
}
|
|
650
649
|
return {
|
|
651
|
-
renderToolbarDropdown:
|
|
650
|
+
renderToolbarDropdown: w,
|
|
652
651
|
clearAllDropDown: g
|
|
653
652
|
};
|
|
654
653
|
}
|
|
655
654
|
const {
|
|
656
|
-
buildResponseToolbarItems:
|
|
657
|
-
} =
|
|
655
|
+
buildResponseToolbarItems: ae
|
|
656
|
+
} = he(), J = /* @__PURE__ */ Q({
|
|
658
657
|
name: "FResponseToolbar",
|
|
659
|
-
props:
|
|
658
|
+
props: oe,
|
|
660
659
|
emits: ["click"],
|
|
661
660
|
setup(s, e) {
|
|
662
|
-
const
|
|
661
|
+
const n = S(ae(s.items)), i = S(), d = S(), h = S(), f = S(s.alignment), x = {
|
|
663
662
|
id: "__more_buttons__",
|
|
664
663
|
text: "更多"
|
|
665
|
-
},
|
|
664
|
+
}, w = S(new W(x)), g = xe(), m = V(() => w.value.children.length > 0), l = V(() => H({
|
|
666
665
|
"f-toolbar": !0,
|
|
667
666
|
"f-response-toolbar": !0,
|
|
668
667
|
"position-relative": !0
|
|
669
|
-
}, s.customClass)),
|
|
668
|
+
}, s.customClass)), c = V(() => ({
|
|
670
669
|
"w-100": !0,
|
|
671
670
|
"d-flex": !0,
|
|
672
671
|
"flex-nowrap": !0,
|
|
673
|
-
"justify-content-end":
|
|
674
|
-
"justify-content-start":
|
|
672
|
+
"justify-content-end": f.value === "right",
|
|
673
|
+
"justify-content-start": f.value === "left"
|
|
675
674
|
})), {
|
|
676
|
-
renderToolbarDropdown:
|
|
677
|
-
clearAllDropDown:
|
|
678
|
-
} =
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}),
|
|
675
|
+
renderToolbarDropdown: p,
|
|
676
|
+
clearAllDropDown: b
|
|
677
|
+
} = pt(s, g);
|
|
678
|
+
function M() {
|
|
679
|
+
n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
|
|
680
|
+
v.expanded = !1;
|
|
681
|
+
}), w.value.expanded = !1, b();
|
|
683
682
|
}
|
|
684
|
-
function v
|
|
685
|
-
const
|
|
683
|
+
function O(v) {
|
|
684
|
+
const P = {
|
|
686
685
|
btn: !0,
|
|
687
686
|
"f-rt-btn": !0,
|
|
688
|
-
"f-btn-ml":
|
|
689
|
-
"f-btn-mr":
|
|
690
|
-
"btn-icontext": !!(
|
|
687
|
+
"f-btn-ml": f.value === "right",
|
|
688
|
+
"f-btn-mr": f.value === "left",
|
|
689
|
+
"btn-icontext": !!(v.icon && v.icon.trim())
|
|
691
690
|
};
|
|
692
|
-
if (
|
|
693
|
-
const A =
|
|
694
|
-
A && A.length && A.reduce((
|
|
691
|
+
if (v.class) {
|
|
692
|
+
const A = v.class.split(" ");
|
|
693
|
+
A && A.length && A.reduce((a, o) => (a[o] = !0, a), P);
|
|
695
694
|
}
|
|
696
|
-
return
|
|
695
|
+
return P;
|
|
697
696
|
}
|
|
698
|
-
function
|
|
699
|
-
document.body.click(), typeof
|
|
697
|
+
function j(v, P) {
|
|
698
|
+
document.body.click(), typeof P.onClick == "function" && P.onClick(v, P.id), e.emit("click", v, P.id);
|
|
700
699
|
}
|
|
701
|
-
function
|
|
702
|
-
return
|
|
700
|
+
function F(v) {
|
|
701
|
+
return y("button", {
|
|
703
702
|
type: "button",
|
|
704
|
-
class: v
|
|
705
|
-
id:
|
|
706
|
-
disabled: !
|
|
707
|
-
onClick: (
|
|
708
|
-
}, [g.shouldShowIcon(
|
|
709
|
-
class: g.iconClass(
|
|
710
|
-
}, null),
|
|
703
|
+
class: O(v),
|
|
704
|
+
id: v.id,
|
|
705
|
+
disabled: !v.enable,
|
|
706
|
+
onClick: (P) => j(P, v)
|
|
707
|
+
}, [g.shouldShowIcon(v) && y("i", {
|
|
708
|
+
class: g.iconClass(v)
|
|
709
|
+
}, null), v.text]);
|
|
711
710
|
}
|
|
712
|
-
const
|
|
713
|
-
function
|
|
714
|
-
const
|
|
715
|
-
let A =
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
A -=
|
|
711
|
+
const _ = /* @__PURE__ */ new Map(), R = [];
|
|
712
|
+
function E(v) {
|
|
713
|
+
const P = h.value;
|
|
714
|
+
let A = v;
|
|
715
|
+
const a = Array.from(P.children), o = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
716
|
+
if (o) {
|
|
717
|
+
const C = o.computedStyleMap().get("margin-left"), I = o.computedStyleMap().get("margin-right"), N = (C ? C.value : 0) + o.getBoundingClientRect().width + (I ? I.value : 0);
|
|
718
|
+
A -= N;
|
|
720
719
|
}
|
|
721
|
-
const t =
|
|
722
|
-
for (const
|
|
723
|
-
const
|
|
724
|
-
A <
|
|
725
|
-
id:
|
|
726
|
-
width:
|
|
727
|
-
})) : A -=
|
|
720
|
+
const t = a.filter((C) => C.id !== "__more_buttons__");
|
|
721
|
+
for (const C of t) {
|
|
722
|
+
const I = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), B = (I ? I.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
|
|
723
|
+
A < B ? (_.set(C.id, !0), R.push({
|
|
724
|
+
id: C.id,
|
|
725
|
+
width: B
|
|
726
|
+
})) : A -= B;
|
|
728
727
|
}
|
|
729
|
-
if (
|
|
730
|
-
for (let
|
|
731
|
-
const
|
|
732
|
-
if (A >=
|
|
733
|
-
A -=
|
|
728
|
+
if (R.length)
|
|
729
|
+
for (let C = R.length - 1; C >= 0; C--) {
|
|
730
|
+
const I = R[C].width;
|
|
731
|
+
if (A >= I)
|
|
732
|
+
A -= I, _.delete(R[C].id), R.pop();
|
|
734
733
|
else
|
|
735
734
|
break;
|
|
736
735
|
}
|
|
737
|
-
const r = Object.assign({},
|
|
736
|
+
const r = Object.assign({}, w.value);
|
|
738
737
|
r.children = [];
|
|
739
|
-
const u = new
|
|
740
|
-
|
|
738
|
+
const u = new W(r), T = n.value.reduce((C, I) => (_.has(I.id) && u.children.push(I), I.visible = !_.has(I.id), C.push(I), C), []);
|
|
739
|
+
w.value = u, n.value = T;
|
|
741
740
|
}
|
|
742
|
-
const
|
|
743
|
-
if (
|
|
744
|
-
const A =
|
|
745
|
-
(A <
|
|
741
|
+
const k = new ResizeObserver((v) => {
|
|
742
|
+
if (v.length) {
|
|
743
|
+
const A = v[0].contentRect.width, o = h.value.getBoundingClientRect().width;
|
|
744
|
+
(A < o || R.length) && (E(A), M());
|
|
746
745
|
}
|
|
747
746
|
});
|
|
748
747
|
return z(() => {
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
}),
|
|
752
|
-
|
|
753
|
-
}),
|
|
754
|
-
|
|
748
|
+
const v = d.value;
|
|
749
|
+
k.observe(v), document.body.addEventListener("click", M), document.body.addEventListener("wheel", M);
|
|
750
|
+
}), ue(() => {
|
|
751
|
+
k.disconnect(), document.body.removeEventListener("click", M), document.body.removeEventListener("wheel", M);
|
|
752
|
+
}), G(() => s.items, () => {
|
|
753
|
+
n.value = ae(s.items);
|
|
755
754
|
}, {
|
|
756
755
|
deep: !0
|
|
757
756
|
}), e.expose({
|
|
758
|
-
elementRef:
|
|
759
|
-
}), () =>
|
|
760
|
-
class:
|
|
761
|
-
ref:
|
|
762
|
-
}, [
|
|
757
|
+
elementRef: i
|
|
758
|
+
}), () => y("div", {
|
|
759
|
+
class: l.value,
|
|
760
|
+
ref: i
|
|
761
|
+
}, [y("div", {
|
|
763
762
|
ref: d,
|
|
764
|
-
class:
|
|
765
|
-
}, [
|
|
766
|
-
ref:
|
|
763
|
+
class: c.value
|
|
764
|
+
}, [y("div", {
|
|
765
|
+
ref: h,
|
|
767
766
|
class: "d-inline-block f-response-content",
|
|
768
767
|
style: "white-space: nowrap;"
|
|
769
|
-
}, [
|
|
768
|
+
}, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? p(v) : F(v)), m.value && p(w.value)])])]);
|
|
770
769
|
}
|
|
771
770
|
});
|
|
772
|
-
function
|
|
773
|
-
const
|
|
771
|
+
function ft(s, e) {
|
|
772
|
+
const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
|
|
774
773
|
});
|
|
775
774
|
function d() {
|
|
776
|
-
|
|
775
|
+
i && i();
|
|
777
776
|
}
|
|
778
|
-
function
|
|
777
|
+
function h(o) {
|
|
779
778
|
const t = {
|
|
780
779
|
"dropdown-menu": !0
|
|
781
780
|
};
|
|
782
|
-
if (
|
|
783
|
-
const r =
|
|
784
|
-
r && r.length && r.reduce((u,
|
|
781
|
+
if (o.class) {
|
|
782
|
+
const r = o.menuClass.split(" ");
|
|
783
|
+
r && r.length && r.reduce((u, T) => (u[T] = !0, u), t);
|
|
785
784
|
}
|
|
786
785
|
return t;
|
|
787
786
|
}
|
|
788
|
-
function
|
|
787
|
+
function f(o) {
|
|
789
788
|
const t = {
|
|
790
|
-
disabled: !
|
|
789
|
+
disabled: !o.enable,
|
|
791
790
|
"dropdown-submenu": !0,
|
|
792
791
|
"f-rt-dropdown": !0
|
|
793
|
-
}, r =
|
|
794
|
-
return r && r.length && r.reduce((u,
|
|
792
|
+
}, r = o.dropdownClass.split(" ");
|
|
793
|
+
return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
|
|
795
794
|
}
|
|
796
|
-
function
|
|
795
|
+
function x(o) {
|
|
797
796
|
const t = {
|
|
798
|
-
disabled: !
|
|
797
|
+
disabled: !o.enable,
|
|
799
798
|
"dropdown-item": !0,
|
|
800
799
|
"f-rt-btn": !0,
|
|
801
800
|
"position-relative": !0,
|
|
802
801
|
"farris-component": !0
|
|
803
|
-
}, r =
|
|
804
|
-
return r && r.length && r.reduce((u,
|
|
802
|
+
}, r = o.class.split(" ");
|
|
803
|
+
return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
|
|
805
804
|
}
|
|
806
|
-
let
|
|
805
|
+
let w;
|
|
807
806
|
const g = /* @__PURE__ */ new Map();
|
|
808
|
-
function
|
|
809
|
-
var
|
|
810
|
-
((
|
|
807
|
+
function m(o, t, r) {
|
|
808
|
+
var T;
|
|
809
|
+
((T = o.target) == null ? void 0 : T.id) === t.id && o.stopPropagation();
|
|
811
810
|
const u = r ? r.id : "__top_item__";
|
|
812
811
|
if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(u, t) : g.delete(u)), g.has(u) && g.get(u) !== t) {
|
|
813
|
-
const
|
|
814
|
-
|
|
812
|
+
const C = g.get(u);
|
|
813
|
+
C && (C.expanded = !1);
|
|
815
814
|
}
|
|
816
815
|
}
|
|
817
|
-
function
|
|
818
|
-
|
|
816
|
+
function l(o) {
|
|
817
|
+
o && (o.stopPropagation(), o.preventDefault());
|
|
819
818
|
}
|
|
820
|
-
function
|
|
819
|
+
function c() {
|
|
821
820
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
|
|
822
|
-
const
|
|
823
|
-
Array.from(
|
|
821
|
+
const o = document.getElementsByClassName("dgComponentSelected");
|
|
822
|
+
Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
|
|
824
823
|
}
|
|
825
|
-
function
|
|
826
|
-
|
|
824
|
+
function p(o) {
|
|
825
|
+
o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
827
826
|
}
|
|
828
|
-
function
|
|
827
|
+
function b(o) {
|
|
829
828
|
const {
|
|
830
829
|
buttons: t = []
|
|
831
|
-
} =
|
|
830
|
+
} = n.schema;
|
|
832
831
|
let r = [];
|
|
833
|
-
t.forEach((
|
|
834
|
-
r = r.concat(
|
|
832
|
+
t.forEach((C) => {
|
|
833
|
+
r = r.concat(C.children || []);
|
|
835
834
|
});
|
|
836
|
-
const u = r.findIndex((
|
|
835
|
+
const u = r.findIndex((C) => C.id === o), T = u === -1 ? null : r[u];
|
|
837
836
|
return {
|
|
838
837
|
index: u,
|
|
839
|
-
item:
|
|
838
|
+
item: T
|
|
840
839
|
};
|
|
841
840
|
}
|
|
842
|
-
function
|
|
841
|
+
function M(o) {
|
|
843
842
|
const {
|
|
844
843
|
buttons: t = []
|
|
845
|
-
} =
|
|
844
|
+
} = n.schema, r = t.findIndex((T) => T.id === o), u = r === -1 ? null : t[r];
|
|
846
845
|
return {
|
|
847
846
|
index: r,
|
|
848
847
|
item: u
|
|
849
848
|
};
|
|
850
849
|
}
|
|
851
|
-
function
|
|
850
|
+
function O(o) {
|
|
852
851
|
var u;
|
|
853
|
-
|
|
852
|
+
n.schema;
|
|
854
853
|
const {
|
|
855
854
|
index: t,
|
|
856
855
|
item: r
|
|
857
|
-
} =
|
|
858
|
-
(u =
|
|
856
|
+
} = b(o);
|
|
857
|
+
(u = n == null ? void 0 : n.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
|
|
859
858
|
}
|
|
860
|
-
const
|
|
859
|
+
const j = function(o) {
|
|
861
860
|
const {
|
|
862
861
|
componentType: t
|
|
863
|
-
} =
|
|
862
|
+
} = o, r = X(t, o), u = t.toLowerCase().replace("-", "_");
|
|
864
863
|
return r && !r.id && r.type === t && (r.id = `${u}_${Math.random().toString().slice(2, 6)}`), r;
|
|
865
|
-
},
|
|
866
|
-
const
|
|
864
|
+
}, F = function() {
|
|
865
|
+
const o = {
|
|
867
866
|
componentType: "response-toolbar-item",
|
|
868
867
|
parentComponentInstance: e.value,
|
|
869
868
|
targetPosition: -1
|
|
870
869
|
};
|
|
871
|
-
return
|
|
870
|
+
return j(o);
|
|
872
871
|
};
|
|
873
|
-
function
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
function
|
|
877
|
-
|
|
878
|
-
const u = t.id,
|
|
879
|
-
buttons:
|
|
880
|
-
} =
|
|
881
|
-
if (!
|
|
872
|
+
function _(o, t) {
|
|
873
|
+
l(o), c(), p(o), O(t.id);
|
|
874
|
+
}
|
|
875
|
+
function R(o, t, r) {
|
|
876
|
+
l(o);
|
|
877
|
+
const u = t.id, T = r && r.id, {
|
|
878
|
+
buttons: C = []
|
|
879
|
+
} = n.schema;
|
|
880
|
+
if (!T)
|
|
882
881
|
return;
|
|
883
882
|
const {
|
|
884
|
-
index:
|
|
885
|
-
} =
|
|
886
|
-
if (
|
|
883
|
+
index: I
|
|
884
|
+
} = M(T);
|
|
885
|
+
if (I === -1)
|
|
887
886
|
return;
|
|
888
887
|
const {
|
|
889
|
-
index:
|
|
890
|
-
} =
|
|
891
|
-
|
|
888
|
+
index: N
|
|
889
|
+
} = b(u);
|
|
890
|
+
N !== -1 && (C[I].children.splice(N, 1), d());
|
|
892
891
|
}
|
|
893
|
-
function
|
|
894
|
-
|
|
892
|
+
function E(o, t, r) {
|
|
893
|
+
l(o);
|
|
895
894
|
const u = r && r.id, {
|
|
896
|
-
buttons:
|
|
897
|
-
} =
|
|
895
|
+
buttons: T = []
|
|
896
|
+
} = n.schema;
|
|
898
897
|
if (!u)
|
|
899
898
|
return;
|
|
900
899
|
const {
|
|
901
|
-
index:
|
|
902
|
-
} =
|
|
903
|
-
if (
|
|
900
|
+
index: C
|
|
901
|
+
} = M(u);
|
|
902
|
+
if (C === -1)
|
|
904
903
|
return;
|
|
905
|
-
const
|
|
904
|
+
const I = F(), N = Object.assign({}, I, {
|
|
906
905
|
text: t.text
|
|
907
906
|
});
|
|
908
|
-
|
|
907
|
+
T[C].children.push(N), d();
|
|
909
908
|
}
|
|
910
|
-
function
|
|
911
|
-
|
|
909
|
+
function k(o, t, r) {
|
|
910
|
+
l(o);
|
|
912
911
|
const u = r && r.id, {
|
|
913
|
-
buttons:
|
|
914
|
-
} =
|
|
912
|
+
buttons: T = []
|
|
913
|
+
} = n.schema;
|
|
915
914
|
if (!u)
|
|
916
915
|
return;
|
|
917
916
|
const {
|
|
918
|
-
index:
|
|
919
|
-
} =
|
|
920
|
-
if (
|
|
917
|
+
index: C
|
|
918
|
+
} = M(u);
|
|
919
|
+
if (C === -1)
|
|
921
920
|
return;
|
|
922
|
-
const
|
|
921
|
+
const I = F(), N = Object.assign({}, I, {
|
|
923
922
|
text: "按钮"
|
|
924
923
|
});
|
|
925
|
-
|
|
924
|
+
T[C].children.push(N), d();
|
|
926
925
|
}
|
|
927
|
-
function
|
|
928
|
-
return
|
|
926
|
+
function v(o, t) {
|
|
927
|
+
return y("div", {
|
|
929
928
|
class: "component-btn-group"
|
|
930
|
-
}, [
|
|
929
|
+
}, [y("div", null, [y("div", {
|
|
931
930
|
role: "button",
|
|
932
931
|
class: "btn component-settings-button",
|
|
933
932
|
title: "删除",
|
|
934
933
|
ref: "removeButton",
|
|
935
934
|
style: "position:static;",
|
|
936
|
-
onClick: (r) =>
|
|
937
|
-
}, [
|
|
935
|
+
onClick: (r) => R(r, o, t)
|
|
936
|
+
}, [y("i", {
|
|
938
937
|
class: "f-icon f-icon-yxs_delete"
|
|
939
|
-
}, null)]),
|
|
938
|
+
}, null)]), y("div", {
|
|
940
939
|
role: "button",
|
|
941
940
|
class: "btn component-settings-button",
|
|
942
941
|
title: "复制",
|
|
943
942
|
ref: "copyButton",
|
|
944
943
|
style: "position:static;",
|
|
945
|
-
onClick: (r) =>
|
|
946
|
-
}, [
|
|
944
|
+
onClick: (r) => E(r, o, t)
|
|
945
|
+
}, [y("i", {
|
|
947
946
|
class: "f-icon f-icon-yxs_copy"
|
|
948
|
-
}, null)]),
|
|
947
|
+
}, null)]), y("div", {
|
|
949
948
|
role: "button",
|
|
950
949
|
class: "btn component-settings-button",
|
|
951
950
|
title: "新增同级",
|
|
952
951
|
ref: "appendSame",
|
|
953
952
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
954
|
-
onClick: (r) =>
|
|
955
|
-
}, [
|
|
953
|
+
onClick: (r) => k(r, o, t)
|
|
954
|
+
}, [y("i", {
|
|
956
955
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
957
|
-
}, null),
|
|
956
|
+
}, null), y("span", {
|
|
958
957
|
style: "font-size:13px;margin:auto"
|
|
959
|
-
}, [
|
|
958
|
+
}, [pe("新增同级")])])])]);
|
|
960
959
|
}
|
|
961
|
-
function
|
|
962
|
-
return
|
|
963
|
-
class:
|
|
960
|
+
function P(o) {
|
|
961
|
+
return o.children.map((t) => t.children && t.children.length ? y("li", {
|
|
962
|
+
class: f(t),
|
|
964
963
|
id: t.id,
|
|
965
|
-
onClick: (r) => t.enable &&
|
|
966
|
-
}, [
|
|
964
|
+
onClick: (r) => t.enable && m(r, t, o)
|
|
965
|
+
}, [y("span", {
|
|
967
966
|
id: t.id,
|
|
968
|
-
class:
|
|
969
|
-
onMouseover: (r) => t.enable &&
|
|
970
|
-
}, [t.text,
|
|
967
|
+
class: x(t),
|
|
968
|
+
onMouseover: (r) => t.enable && m(r, t, o)
|
|
969
|
+
}, [t.text, y("i", {
|
|
971
970
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
972
971
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
973
|
-
}, null)]),
|
|
974
|
-
class:
|
|
972
|
+
}, null)]), w(t, t)]) : y("li", {
|
|
973
|
+
class: x(t),
|
|
975
974
|
id: t.id,
|
|
976
|
-
onClick: (r) =>
|
|
977
|
-
}, [
|
|
975
|
+
onClick: (r) => _(r, t)
|
|
976
|
+
}, [v(t, o), s.shouldShowIcon(t) && y("i", {
|
|
978
977
|
class: s.iconClass(t)
|
|
979
978
|
}, null), t.text]));
|
|
980
979
|
}
|
|
981
|
-
function A(
|
|
980
|
+
function A(o, t, r) {
|
|
982
981
|
const u = {
|
|
983
|
-
display:
|
|
982
|
+
display: o.expanded ? "block" : "none",
|
|
984
983
|
position: "fixed",
|
|
985
984
|
maxWidth: "300px",
|
|
986
985
|
width: "auto",
|
|
987
986
|
minWidth: "120px"
|
|
988
|
-
},
|
|
989
|
-
if (
|
|
987
|
+
}, T = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, I = C == null ? void 0 : C.getClientRects();
|
|
988
|
+
if (C && I && I.length) {
|
|
990
989
|
const {
|
|
991
|
-
top:
|
|
992
|
-
width:
|
|
990
|
+
top: N,
|
|
991
|
+
width: B,
|
|
993
992
|
left: $,
|
|
994
|
-
right:
|
|
995
|
-
height:
|
|
996
|
-
} =
|
|
997
|
-
u.top = `${
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
u.display === "block" && (
|
|
1001
|
-
const
|
|
993
|
+
right: U,
|
|
994
|
+
height: q
|
|
995
|
+
} = I[0], Ie = Math.ceil(q + N);
|
|
996
|
+
u.top = `${Ie}px`, u.left = `${$}px`;
|
|
997
|
+
const De = o.id + "_menu", Y = t ? t.querySelector("#" + De) : null;
|
|
998
|
+
if (Y) {
|
|
999
|
+
u.display === "block" && (Y.style.display = "block");
|
|
1000
|
+
const ie = Y.getBoundingClientRect();
|
|
1002
1001
|
if (r) {
|
|
1003
|
-
u.top = `${
|
|
1004
|
-
const
|
|
1005
|
-
u.left = `${
|
|
1002
|
+
u.top = `${N - 6}px`;
|
|
1003
|
+
const Se = Math.ceil(B + $);
|
|
1004
|
+
u.left = `${Se}px`;
|
|
1006
1005
|
}
|
|
1007
|
-
|
|
1006
|
+
T - $ - B < ie.width && (u.left = `${(r ? $ : U) - ie.width}px`);
|
|
1008
1007
|
}
|
|
1009
1008
|
}
|
|
1010
1009
|
return u;
|
|
1011
1010
|
}
|
|
1012
|
-
|
|
1013
|
-
var
|
|
1014
|
-
const r =
|
|
1015
|
-
return
|
|
1016
|
-
class:
|
|
1017
|
-
style: A(
|
|
1018
|
-
id:
|
|
1019
|
-
}, [
|
|
1011
|
+
w = function(o, t) {
|
|
1012
|
+
var C, I;
|
|
1013
|
+
const r = de(), u = t ? t.id : o.id, T = (I = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : I.querySelector("#" + u);
|
|
1014
|
+
return y("ul", {
|
|
1015
|
+
class: h(o),
|
|
1016
|
+
style: A(o, T, t),
|
|
1017
|
+
id: o.id + "_menu"
|
|
1018
|
+
}, [P(o)]);
|
|
1020
1019
|
};
|
|
1021
|
-
function
|
|
1022
|
-
g.forEach((
|
|
1023
|
-
|
|
1020
|
+
function a() {
|
|
1021
|
+
g.forEach((o) => {
|
|
1022
|
+
o.expanded = !1;
|
|
1024
1023
|
}), g.clear();
|
|
1025
1024
|
}
|
|
1026
1025
|
return {
|
|
1027
|
-
renderDropdownMenu:
|
|
1028
|
-
clearAllDropDownMenu:
|
|
1026
|
+
renderDropdownMenu: w,
|
|
1027
|
+
clearAllDropDownMenu: a
|
|
1029
1028
|
};
|
|
1030
1029
|
}
|
|
1031
|
-
function
|
|
1032
|
-
const
|
|
1030
|
+
function gt(s, e, n) {
|
|
1031
|
+
const i = S(s.alignment), {
|
|
1033
1032
|
renderDropdownMenu: d,
|
|
1034
|
-
clearAllDropDownMenu:
|
|
1035
|
-
} =
|
|
1033
|
+
clearAllDropDownMenu: h
|
|
1034
|
+
} = ft(e, n), f = L("design-item-context"), x = L("toolbar-item-handler", () => {
|
|
1036
1035
|
});
|
|
1037
|
-
function
|
|
1038
|
-
|
|
1036
|
+
function w() {
|
|
1037
|
+
x && x();
|
|
1039
1038
|
}
|
|
1040
|
-
function g(
|
|
1041
|
-
const
|
|
1039
|
+
function g(a) {
|
|
1040
|
+
const o = {
|
|
1042
1041
|
"btn-group": !0,
|
|
1043
1042
|
"f-rt-dropdown": !0,
|
|
1044
|
-
"f-btn-ml":
|
|
1045
|
-
"f-btn-mr":
|
|
1046
|
-
}, t =
|
|
1047
|
-
return t && t.length && t.reduce((r, u) => (r[u] = !0, r),
|
|
1043
|
+
"f-btn-ml": i.value === "right",
|
|
1044
|
+
"f-btn-mr": i.value === "left"
|
|
1045
|
+
}, t = a.dropdownClass.split(" ");
|
|
1046
|
+
return t && t.length && t.reduce((r, u) => (r[u] = !0, r), o), o;
|
|
1048
1047
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const
|
|
1048
|
+
function m(a) {
|
|
1049
|
+
const o = {
|
|
1051
1050
|
btn: !0,
|
|
1052
|
-
disabled: !
|
|
1051
|
+
disabled: !a.enable,
|
|
1053
1052
|
"position-relative": !0,
|
|
1054
1053
|
"farris-component": !0,
|
|
1055
1054
|
"f-rt-btn": !0,
|
|
1056
|
-
"btn-icontext": !!(
|
|
1055
|
+
"btn-icontext": !!(a.icon && a.icon.trim())
|
|
1057
1056
|
};
|
|
1058
|
-
if (
|
|
1059
|
-
const t =
|
|
1060
|
-
t && t.length && t.reduce((r, u) => (r[u] = !0, r),
|
|
1057
|
+
if (a.class) {
|
|
1058
|
+
const t = a.class.split(" ");
|
|
1059
|
+
t && t.length && t.reduce((r, u) => (r[u] = !0, r), o);
|
|
1061
1060
|
}
|
|
1062
|
-
return
|
|
1061
|
+
return o;
|
|
1063
1062
|
}
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1063
|
+
function l(a) {
|
|
1064
|
+
a && (a.stopPropagation(), a.preventDefault());
|
|
1066
1065
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
const t =
|
|
1070
|
-
document.body.click(),
|
|
1066
|
+
function c(a, o) {
|
|
1067
|
+
l(a);
|
|
1068
|
+
const t = o.expanded;
|
|
1069
|
+
document.body.click(), o.expanded = !t;
|
|
1071
1070
|
}
|
|
1072
|
-
const
|
|
1071
|
+
const p = function(a) {
|
|
1073
1072
|
const {
|
|
1074
|
-
componentType:
|
|
1075
|
-
} =
|
|
1076
|
-
return t && !t.id && t.type ===
|
|
1077
|
-
},
|
|
1078
|
-
const
|
|
1073
|
+
componentType: o
|
|
1074
|
+
} = a, t = X(o, a), r = o.toLowerCase().replace("-", "_");
|
|
1075
|
+
return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
|
|
1076
|
+
}, b = function() {
|
|
1077
|
+
const a = {
|
|
1079
1078
|
componentType: "response-toolbar-item",
|
|
1080
|
-
parentComponentInstance:
|
|
1079
|
+
parentComponentInstance: n.value,
|
|
1081
1080
|
targetPosition: -1
|
|
1082
1081
|
};
|
|
1083
|
-
return
|
|
1082
|
+
return p(a);
|
|
1084
1083
|
};
|
|
1085
|
-
function
|
|
1086
|
-
const
|
|
1084
|
+
function M(a) {
|
|
1085
|
+
const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((u) => u.id === a), r = t === -1 ? null : o[t];
|
|
1087
1086
|
return {
|
|
1088
1087
|
index: t,
|
|
1089
1088
|
toolbarItem: r
|
|
1090
1089
|
};
|
|
1091
1090
|
}
|
|
1092
|
-
function
|
|
1093
|
-
var
|
|
1091
|
+
function O(a, o) {
|
|
1092
|
+
var I;
|
|
1094
1093
|
const {
|
|
1095
1094
|
index: t,
|
|
1096
1095
|
toolbarItem: r
|
|
1097
|
-
} =
|
|
1096
|
+
} = M(o);
|
|
1098
1097
|
if (t === -1)
|
|
1099
1098
|
return;
|
|
1100
|
-
const u = r.text || "按钮",
|
|
1099
|
+
const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
|
|
1101
1100
|
text: u
|
|
1102
1101
|
});
|
|
1103
|
-
(
|
|
1102
|
+
(I = f.schema.buttons) == null || I.push(C), w();
|
|
1104
1103
|
}
|
|
1105
|
-
function
|
|
1104
|
+
function j(a, o) {
|
|
1106
1105
|
const {
|
|
1107
1106
|
index: t,
|
|
1108
1107
|
toolbarItem: r
|
|
1109
|
-
} =
|
|
1108
|
+
} = M(o);
|
|
1110
1109
|
if (t === -1)
|
|
1111
1110
|
return;
|
|
1112
|
-
const u = r.text || "按钮",
|
|
1111
|
+
const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
|
|
1113
1112
|
text: u
|
|
1114
|
-
}),
|
|
1115
|
-
|
|
1113
|
+
}), I = f.schema.buttons[t].children || [];
|
|
1114
|
+
I.push(C), f.schema.buttons[t].children = I, w();
|
|
1116
1115
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const t =
|
|
1119
|
-
r !== -1 && (t.splice(r, 1),
|
|
1116
|
+
function F(a, o) {
|
|
1117
|
+
const t = f.schema.buttons || f.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === o);
|
|
1118
|
+
r !== -1 && (t.splice(r, 1), w());
|
|
1120
1119
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return
|
|
1120
|
+
function _(a) {
|
|
1121
|
+
return y("div", {
|
|
1123
1122
|
class: "component-btn-group"
|
|
1124
|
-
}, [
|
|
1123
|
+
}, [y("div", null, [y("div", {
|
|
1125
1124
|
role: "button",
|
|
1126
1125
|
class: "btn component-settings-button",
|
|
1127
1126
|
title: "删除",
|
|
1128
1127
|
ref: "removeButton",
|
|
1129
1128
|
style: "position:static;",
|
|
1130
|
-
onClick: (
|
|
1131
|
-
}, [
|
|
1129
|
+
onClick: (o) => F(o, a)
|
|
1130
|
+
}, [y("i", {
|
|
1132
1131
|
class: "f-icon f-icon-yxs_delete"
|
|
1133
|
-
}, null)]),
|
|
1132
|
+
}, null)]), y("div", {
|
|
1134
1133
|
role: "button",
|
|
1135
1134
|
class: "btn component-settings-button",
|
|
1136
1135
|
title: "复制",
|
|
1137
1136
|
ref: "copyButton",
|
|
1138
1137
|
style: "position:static;",
|
|
1139
|
-
onClick: (
|
|
1140
|
-
}, [
|
|
1138
|
+
onClick: (o) => O(o, a)
|
|
1139
|
+
}, [y("i", {
|
|
1141
1140
|
class: "f-icon f-icon-yxs_copy"
|
|
1142
|
-
}, null)]),
|
|
1141
|
+
}, null)]), y("div", {
|
|
1143
1142
|
role: "button",
|
|
1144
1143
|
class: "btn component-settings-button",
|
|
1145
1144
|
title: "新增子级",
|
|
1146
1145
|
ref: "appendChildButton",
|
|
1147
1146
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1148
|
-
onClick: (
|
|
1149
|
-
}, [
|
|
1147
|
+
onClick: (o) => j(o, a)
|
|
1148
|
+
}, [y("i", {
|
|
1150
1149
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1151
|
-
}, null),
|
|
1150
|
+
}, null), y("span", {
|
|
1152
1151
|
style: "font-size:13px;margin:auto"
|
|
1153
|
-
}, [
|
|
1152
|
+
}, [pe("新增子级")])])])]);
|
|
1154
1153
|
}
|
|
1155
|
-
function
|
|
1156
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1157
|
-
const
|
|
1158
|
-
Array.from(
|
|
1154
|
+
function R() {
|
|
1155
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1156
|
+
const a = document.getElementsByClassName("dgComponentSelected");
|
|
1157
|
+
Array.from(a).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1159
1158
|
}
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1159
|
+
function E(a) {
|
|
1160
|
+
a.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1162
1161
|
}
|
|
1163
|
-
function
|
|
1162
|
+
function k(a) {
|
|
1164
1163
|
var u;
|
|
1165
|
-
const
|
|
1164
|
+
const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((T) => T.id === a);
|
|
1166
1165
|
if (t === -1)
|
|
1167
1166
|
return;
|
|
1168
|
-
const r =
|
|
1169
|
-
(u =
|
|
1170
|
-
}
|
|
1171
|
-
function
|
|
1172
|
-
|
|
1173
|
-
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1176
|
-
id:
|
|
1177
|
-
class: g(
|
|
1178
|
-
}, [
|
|
1179
|
-
class:
|
|
1167
|
+
const r = o[t];
|
|
1168
|
+
(u = f == null ? void 0 : f.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
|
|
1169
|
+
}
|
|
1170
|
+
function v(a, o) {
|
|
1171
|
+
l(a), R(), E(a), l(a), c(a, o), k(o.id);
|
|
1172
|
+
}
|
|
1173
|
+
function P(a) {
|
|
1174
|
+
return y("div", {
|
|
1175
|
+
id: a.id,
|
|
1176
|
+
class: g(a)
|
|
1177
|
+
}, [y("div", {
|
|
1178
|
+
class: m(a),
|
|
1180
1179
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1181
|
-
onClick: (
|
|
1182
|
-
}, [
|
|
1183
|
-
class: e.iconClass(
|
|
1184
|
-
}, null),
|
|
1180
|
+
onClick: (o) => a.enable && v(o, a)
|
|
1181
|
+
}, [_(a.id), e.shouldShowIcon(a) && y("i", {
|
|
1182
|
+
class: e.iconClass(a)
|
|
1183
|
+
}, null), y("span", null, [a.text]), y("i", {
|
|
1185
1184
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1186
1185
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1187
|
-
}, null)]), d(
|
|
1186
|
+
}, null)]), d(a)]);
|
|
1188
1187
|
}
|
|
1189
1188
|
function A() {
|
|
1190
|
-
|
|
1189
|
+
h();
|
|
1191
1190
|
}
|
|
1192
1191
|
return {
|
|
1193
|
-
renderToolbarDropdown:
|
|
1192
|
+
renderToolbarDropdown: P,
|
|
1194
1193
|
clearAllDropDown: A
|
|
1195
1194
|
};
|
|
1196
1195
|
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
return e.controlType !== "field-set";
|
|
1212
|
-
}
|
|
1213
|
-
return {
|
|
1214
|
-
basalDragulaRuleForContainer: s
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
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 = {
|
|
1218
|
-
"f-page": {
|
|
1219
|
-
description: "The root class of page designed by farris.",
|
|
1220
|
-
type: "object",
|
|
1221
|
-
properties: {
|
|
1222
|
-
contents: {
|
|
1223
|
-
type: "object",
|
|
1224
|
-
properties: {
|
|
1225
|
-
"f-page-header": {
|
|
1226
|
-
description: "The class of page header designed by farris.",
|
|
1227
|
-
type: "string"
|
|
1228
|
-
},
|
|
1229
|
-
"f-page-main": {
|
|
1230
|
-
description: "The class of page body designed by farris.",
|
|
1231
|
-
type: "object",
|
|
1232
|
-
properties: {
|
|
1233
|
-
contents: {
|
|
1234
|
-
type: "object",
|
|
1235
|
-
properties: {
|
|
1236
|
-
"f-struct-like-card": {
|
|
1237
|
-
description: "",
|
|
1238
|
-
type: "object",
|
|
1239
|
-
properties: {
|
|
1240
|
-
contents: {
|
|
1241
|
-
type: "object",
|
|
1242
|
-
properties: {
|
|
1243
|
-
"f-struct-form": {
|
|
1244
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
1245
|
-
type: "object",
|
|
1246
|
-
properties: {
|
|
1247
|
-
contents: {
|
|
1248
|
-
type: "object",
|
|
1249
|
-
properties: {
|
|
1250
|
-
"f-section-form": {
|
|
1251
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1252
|
-
type: "object",
|
|
1253
|
-
properties: {
|
|
1254
|
-
contents: {
|
|
1255
|
-
type: "object",
|
|
1256
|
-
properties: {
|
|
1257
|
-
"f-form-layout": {
|
|
1258
|
-
description: "The class of reponse form",
|
|
1259
|
-
type: "object",
|
|
1260
|
-
properties: {
|
|
1261
|
-
rules: {
|
|
1262
|
-
type: "object",
|
|
1263
|
-
properties: {
|
|
1264
|
-
canAccept: {
|
|
1265
|
-
type: "boolean",
|
|
1266
|
-
const: !0
|
|
1267
|
-
},
|
|
1268
|
-
fixed: {
|
|
1269
|
-
type: "boolean",
|
|
1270
|
-
const: !0
|
|
1271
|
-
},
|
|
1272
|
-
hidePadding: {
|
|
1273
|
-
type: "boolean",
|
|
1274
|
-
const: !1
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
},
|
|
1282
|
-
rules: {
|
|
1283
|
-
type: "object",
|
|
1284
|
-
properties: {
|
|
1285
|
-
canAccept: {
|
|
1286
|
-
type: "boolean",
|
|
1287
|
-
const: !1
|
|
1288
|
-
},
|
|
1289
|
-
fixed: {
|
|
1290
|
-
type: "boolean",
|
|
1291
|
-
const: !0
|
|
1292
|
-
},
|
|
1293
|
-
hidePadding: {
|
|
1294
|
-
type: "boolean",
|
|
1295
|
-
const: !0
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
rules: {
|
|
1304
|
-
type: "object",
|
|
1305
|
-
properties: {
|
|
1306
|
-
canAccept: {
|
|
1307
|
-
type: "boolean",
|
|
1308
|
-
const: !1
|
|
1309
|
-
},
|
|
1310
|
-
fixed: {
|
|
1311
|
-
type: "boolean",
|
|
1312
|
-
const: !1
|
|
1313
|
-
},
|
|
1314
|
-
hidePadding: {
|
|
1315
|
-
type: "boolean",
|
|
1316
|
-
const: !0
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
"f-struct-wrapper": {
|
|
1323
|
-
description: "",
|
|
1324
|
-
type: "object",
|
|
1325
|
-
properties: {
|
|
1326
|
-
contents: {
|
|
1327
|
-
type: "object",
|
|
1328
|
-
properties: {
|
|
1329
|
-
"f-section-tabs": {
|
|
1330
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
1331
|
-
type: "object",
|
|
1332
|
-
properties: {
|
|
1333
|
-
contents: {
|
|
1334
|
-
type: "object",
|
|
1335
|
-
properties: {
|
|
1336
|
-
"f-tabs-in-card": {
|
|
1337
|
-
description: "The class of tabs which contains sub-grid.",
|
|
1338
|
-
type: "object",
|
|
1339
|
-
properties: {
|
|
1340
|
-
contents: {
|
|
1341
|
-
type: "object",
|
|
1342
|
-
properties: {
|
|
1343
|
-
"f-struct-data-grid-in-card": {
|
|
1344
|
-
description: "The class of sub-grid component",
|
|
1345
|
-
type: "object",
|
|
1346
|
-
properties: {
|
|
1347
|
-
contents: {
|
|
1348
|
-
type: "object",
|
|
1349
|
-
properties: {
|
|
1350
|
-
"f-grid-is-sub": {
|
|
1351
|
-
description: "The class of sub-grid",
|
|
1352
|
-
type: "object",
|
|
1353
|
-
properties: {
|
|
1354
|
-
rules: {
|
|
1355
|
-
type: "object",
|
|
1356
|
-
properties: {
|
|
1357
|
-
canAccept: {
|
|
1358
|
-
type: "boolean",
|
|
1359
|
-
const: !0
|
|
1360
|
-
},
|
|
1361
|
-
fixed: {
|
|
1362
|
-
type: "boolean",
|
|
1363
|
-
const: !0
|
|
1364
|
-
},
|
|
1365
|
-
hidePadding: {
|
|
1366
|
-
type: "boolean",
|
|
1367
|
-
const: !1
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
|
-
rules: {
|
|
1376
|
-
type: "object",
|
|
1377
|
-
properties: {
|
|
1378
|
-
canAccept: {
|
|
1379
|
-
type: "boolean",
|
|
1380
|
-
const: !1
|
|
1381
|
-
},
|
|
1382
|
-
fixed: {
|
|
1383
|
-
type: "boolean",
|
|
1384
|
-
const: !1
|
|
1385
|
-
},
|
|
1386
|
-
hidePadding: {
|
|
1387
|
-
type: "boolean",
|
|
1388
|
-
const: !0
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
},
|
|
1396
|
-
rules: {
|
|
1397
|
-
type: "object",
|
|
1398
|
-
properties: {
|
|
1399
|
-
canAccept: {
|
|
1400
|
-
type: "boolean",
|
|
1401
|
-
const: !1
|
|
1402
|
-
},
|
|
1403
|
-
fixed: {
|
|
1404
|
-
type: "boolean",
|
|
1405
|
-
const: !0
|
|
1406
|
-
},
|
|
1407
|
-
hidePadding: {
|
|
1408
|
-
type: "boolean",
|
|
1409
|
-
const: !0
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
},
|
|
1417
|
-
rules: {
|
|
1418
|
-
type: "object",
|
|
1419
|
-
properties: {
|
|
1420
|
-
canAccept: {
|
|
1421
|
-
type: "boolean",
|
|
1422
|
-
const: !1
|
|
1423
|
-
},
|
|
1424
|
-
fixed: {
|
|
1425
|
-
type: "boolean",
|
|
1426
|
-
const: !0
|
|
1427
|
-
},
|
|
1428
|
-
hidePadding: {
|
|
1429
|
-
type: "boolean",
|
|
1430
|
-
const: !0
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
},
|
|
1436
|
-
"f-section-in-main": {
|
|
1437
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1438
|
-
type: "object",
|
|
1439
|
-
properties: {
|
|
1440
|
-
rules: {
|
|
1441
|
-
type: "object",
|
|
1442
|
-
properties: {
|
|
1443
|
-
canAccept: {
|
|
1444
|
-
type: "boolean",
|
|
1445
|
-
const: !0
|
|
1446
|
-
},
|
|
1447
|
-
fixed: {
|
|
1448
|
-
type: "boolean",
|
|
1449
|
-
const: !0
|
|
1450
|
-
},
|
|
1451
|
-
hidePadding: {
|
|
1452
|
-
type: "boolean",
|
|
1453
|
-
const: !1
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
},
|
|
1461
|
-
rules: {
|
|
1462
|
-
type: "object",
|
|
1463
|
-
properties: {
|
|
1464
|
-
canAccept: {
|
|
1465
|
-
type: "boolean",
|
|
1466
|
-
const: !1
|
|
1467
|
-
},
|
|
1468
|
-
fixed: {
|
|
1469
|
-
type: "boolean",
|
|
1470
|
-
const: !1
|
|
1471
|
-
},
|
|
1472
|
-
hidePadding: {
|
|
1473
|
-
type: "boolean",
|
|
1474
|
-
const: !0
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
rules: {
|
|
1483
|
-
type: "object",
|
|
1484
|
-
properties: {
|
|
1485
|
-
canAccept: {
|
|
1486
|
-
type: "boolean",
|
|
1487
|
-
const: !0
|
|
1488
|
-
},
|
|
1489
|
-
fixed: {
|
|
1490
|
-
type: "boolean",
|
|
1491
|
-
const: !0
|
|
1492
|
-
},
|
|
1493
|
-
hidePadding: {
|
|
1494
|
-
type: "object",
|
|
1495
|
-
const: {
|
|
1496
|
-
allOf: [
|
|
1497
|
-
{
|
|
1498
|
-
sibling: 0,
|
|
1499
|
-
parent: {
|
|
1500
|
-
"f-page-main": !0
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
]
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
"f-struct-data-grid": {
|
|
1511
|
-
description: "",
|
|
1512
|
-
type: "object",
|
|
1513
|
-
properties: {
|
|
1514
|
-
rules: {
|
|
1515
|
-
type: "object",
|
|
1516
|
-
properties: {
|
|
1517
|
-
canAccept: {
|
|
1518
|
-
type: "object",
|
|
1519
|
-
const: !0
|
|
1520
|
-
},
|
|
1521
|
-
fixed: {
|
|
1522
|
-
type: "boolean",
|
|
1523
|
-
const: !0
|
|
1524
|
-
},
|
|
1525
|
-
hidePadding: {
|
|
1526
|
-
type: "boolean",
|
|
1527
|
-
const: !0
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
},
|
|
1533
|
-
"f-page-main-content": {
|
|
1534
|
-
description: "",
|
|
1535
|
-
type: "object",
|
|
1536
|
-
properties: {
|
|
1537
|
-
contents: {
|
|
1538
|
-
type: "object",
|
|
1539
|
-
properties: {
|
|
1540
|
-
"f-page-content-nav": {
|
|
1541
|
-
description: "",
|
|
1542
|
-
type: "object",
|
|
1543
|
-
properties: {
|
|
1544
|
-
contents: {
|
|
1545
|
-
type: "object",
|
|
1546
|
-
properties: {
|
|
1547
|
-
"f-struct-data-grid-in-nav": {
|
|
1548
|
-
description: "",
|
|
1549
|
-
type: "object",
|
|
1550
|
-
properties: {
|
|
1551
|
-
contents: {
|
|
1552
|
-
type: "object",
|
|
1553
|
-
properties: {
|
|
1554
|
-
"f-page-content-nav-extend": {
|
|
1555
|
-
description: "",
|
|
1556
|
-
type: "object"
|
|
1557
|
-
},
|
|
1558
|
-
"f-section-in-nav": {
|
|
1559
|
-
description: "",
|
|
1560
|
-
type: "object",
|
|
1561
|
-
properties: {
|
|
1562
|
-
rules: {
|
|
1563
|
-
type: "object",
|
|
1564
|
-
properties: {
|
|
1565
|
-
canAccept: {
|
|
1566
|
-
type: "boolean",
|
|
1567
|
-
const: !1
|
|
1568
|
-
},
|
|
1569
|
-
fixed: {
|
|
1570
|
-
type: "boolean",
|
|
1571
|
-
const: !0
|
|
1572
|
-
},
|
|
1573
|
-
hidePadding: {
|
|
1574
|
-
type: "boolean",
|
|
1575
|
-
const: !1
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
},
|
|
1583
|
-
rules: {
|
|
1584
|
-
type: "object",
|
|
1585
|
-
properties: {
|
|
1586
|
-
canAccept: {
|
|
1587
|
-
type: "boolean",
|
|
1588
|
-
const: !0
|
|
1589
|
-
},
|
|
1590
|
-
fixed: {
|
|
1591
|
-
type: "boolean",
|
|
1592
|
-
const: !1
|
|
1593
|
-
},
|
|
1594
|
-
hidePadding: {
|
|
1595
|
-
type: "boolean",
|
|
1596
|
-
const: !0
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
},
|
|
1606
|
-
"f-page-content-main": {
|
|
1607
|
-
description: "",
|
|
1608
|
-
type: "object",
|
|
1609
|
-
properties: {}
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
},
|
|
1615
|
-
"f-page-content": {
|
|
1616
|
-
description: "",
|
|
1617
|
-
type: "object",
|
|
1618
|
-
properties: {
|
|
1619
|
-
contents: {
|
|
1620
|
-
type: "object",
|
|
1621
|
-
properties: {
|
|
1622
|
-
"f-page-content-nav": {
|
|
1623
|
-
description: "",
|
|
1624
|
-
type: "object",
|
|
1625
|
-
properties: {
|
|
1626
|
-
contents: {
|
|
1627
|
-
type: "object",
|
|
1628
|
-
properties: {
|
|
1629
|
-
"f-list-nav": {
|
|
1630
|
-
description: "",
|
|
1631
|
-
type: "object"
|
|
1632
|
-
},
|
|
1633
|
-
"f-list-nav-left": {
|
|
1634
|
-
description: "",
|
|
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
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
},
|
|
1714
|
-
rules: {
|
|
1715
|
-
type: "object",
|
|
1716
|
-
properties: {
|
|
1717
|
-
canAccept: {
|
|
1718
|
-
type: "boolean",
|
|
1719
|
-
const: !1
|
|
1720
|
-
},
|
|
1721
|
-
fixed: {
|
|
1722
|
-
type: "boolean",
|
|
1723
|
-
const: !0
|
|
1724
|
-
},
|
|
1725
|
-
hidePadding: {
|
|
1726
|
-
type: "boolean",
|
|
1727
|
-
const: !0
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
},
|
|
1732
|
-
"f-page-content-main": {
|
|
1733
|
-
description: "",
|
|
1734
|
-
type: "object",
|
|
1735
|
-
properties: {
|
|
1736
|
-
rules: {
|
|
1737
|
-
type: "object",
|
|
1738
|
-
properties: {
|
|
1739
|
-
canAccept: {
|
|
1740
|
-
type: "boolean",
|
|
1741
|
-
const: !1
|
|
1742
|
-
},
|
|
1743
|
-
fixed: {
|
|
1744
|
-
type: "boolean",
|
|
1745
|
-
const: !1
|
|
1746
|
-
},
|
|
1747
|
-
hidePadding: {
|
|
1748
|
-
type: "boolean",
|
|
1749
|
-
const: !0
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
},
|
|
1757
|
-
rules: {
|
|
1758
|
-
type: "object",
|
|
1759
|
-
properties: {
|
|
1760
|
-
canAccept: {
|
|
1761
|
-
type: "boolean",
|
|
1762
|
-
const: !1
|
|
1763
|
-
},
|
|
1764
|
-
fixed: {
|
|
1765
|
-
type: "boolean",
|
|
1766
|
-
const: !0
|
|
1767
|
-
},
|
|
1768
|
-
hidePadding: {
|
|
1769
|
-
type: "boolean",
|
|
1770
|
-
const: !0
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
},
|
|
1778
|
-
rules: {
|
|
1779
|
-
type: "object",
|
|
1780
|
-
properties: {
|
|
1781
|
-
canAccept: {
|
|
1782
|
-
type: "object",
|
|
1783
|
-
const: {
|
|
1784
|
-
anyOf: [
|
|
1785
|
-
{
|
|
1786
|
-
children: 0
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
children: {
|
|
1790
|
-
length: {
|
|
1791
|
-
not: 1
|
|
1792
|
-
},
|
|
1793
|
-
"f-struct-like-card": !0
|
|
1794
|
-
}
|
|
1795
|
-
},
|
|
1796
|
-
{
|
|
1797
|
-
children: {
|
|
1798
|
-
"scroll-spy": !1,
|
|
1799
|
-
"f-page-content": !1,
|
|
1800
|
-
"f-struct-like-card": !1
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
]
|
|
1804
|
-
}
|
|
1805
|
-
},
|
|
1806
|
-
fixed: {
|
|
1807
|
-
type: "boolean",
|
|
1808
|
-
const: !0
|
|
1809
|
-
},
|
|
1810
|
-
hidePadding: {
|
|
1811
|
-
type: "boolean",
|
|
1812
|
-
const: !0
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
},
|
|
1818
|
-
"f-page-footer": {
|
|
1819
|
-
description: "The class of page footer designed by farris.",
|
|
1820
|
-
type: "string"
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
},
|
|
1824
|
-
rules: {
|
|
1825
|
-
type: "object",
|
|
1826
|
-
properties: {
|
|
1827
|
-
canAccept: {
|
|
1828
|
-
type: "boolean",
|
|
1829
|
-
const: !1
|
|
1830
|
-
},
|
|
1831
|
-
fixed: {
|
|
1832
|
-
type: "boolean",
|
|
1833
|
-
const: !0
|
|
1834
|
-
},
|
|
1835
|
-
hidePadding: {
|
|
1836
|
-
type: "boolean",
|
|
1837
|
-
const: !0
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
},
|
|
1843
|
-
"f-page-is-managelist": {
|
|
1844
|
-
description: "The root class of mangement list page.",
|
|
1845
|
-
type: "string"
|
|
1846
|
-
},
|
|
1847
|
-
"f-page-card": {
|
|
1848
|
-
description: "",
|
|
1849
|
-
type: "object"
|
|
1850
|
-
},
|
|
1851
|
-
"f-page-is-mainsubcard": {
|
|
1852
|
-
description: "",
|
|
1853
|
-
type: "object"
|
|
1854
|
-
}
|
|
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) {
|
|
1865
|
-
var O;
|
|
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);
|
|
1876
|
-
}
|
|
1877
|
-
return !1;
|
|
1878
|
-
}
|
|
1879
|
-
function e(a, y, v, T) {
|
|
1880
|
-
return typeof v == "boolean" ? T.childrenClassList.includes(y) === !!v : !1;
|
|
1881
|
-
}
|
|
1882
|
-
function o(a, y, v, T) {
|
|
1883
|
-
return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
|
|
1884
|
-
}
|
|
1885
|
-
function c(a, y, v, T) {
|
|
1886
|
-
return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
|
|
1887
|
-
}
|
|
1888
|
-
const d = /* @__PURE__ */ new Map([
|
|
1889
|
-
["length", s],
|
|
1890
|
-
["hasChildren", e],
|
|
1891
|
-
["hasSibling", c],
|
|
1892
|
-
["hasParent", o]
|
|
1893
|
-
]);
|
|
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) => {
|
|
1897
|
-
if (T === "length")
|
|
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 };
|
|
1901
|
-
}) : [];
|
|
1902
|
-
}
|
|
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;
|
|
1907
|
-
}
|
|
1908
|
-
return !1;
|
|
1909
|
-
}
|
|
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);
|
|
1915
|
-
}
|
|
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));
|
|
1918
|
-
return T ? !j.includes(!1) : j.includes(!0);
|
|
1919
|
-
}
|
|
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;
|
|
1931
|
-
};
|
|
1932
|
-
}
|
|
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)
|
|
1938
|
-
);
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
function i() {
|
|
1942
|
-
const { properties: a } = jt;
|
|
1943
|
-
Object.keys(a).forEach((y) => {
|
|
1944
|
-
p(y, a[y], K);
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
function f(a, y) {
|
|
1948
|
-
const v = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1949
|
-
return K.has(a) ? K.get(a)(y) : v;
|
|
1950
|
-
}
|
|
1951
|
-
return i(), { getRuleValue: f };
|
|
1952
|
-
}
|
|
1953
|
-
class ae {
|
|
1954
|
-
constructor(e, o) {
|
|
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", {
|
|
1196
|
+
class re {
|
|
1197
|
+
constructor(e, n) {
|
|
1198
|
+
D(this, "componentId");
|
|
1199
|
+
D(this, "viewModelId");
|
|
1200
|
+
D(this, "eventsEditorUtils");
|
|
1201
|
+
D(this, "formSchemaUtils");
|
|
1202
|
+
D(this, "formMetadataConverter");
|
|
1203
|
+
D(this, "designViewModelUtils");
|
|
1204
|
+
D(this, "designViewModelField");
|
|
1205
|
+
D(this, "controlCreatorUtils");
|
|
1206
|
+
D(this, "designerHostService");
|
|
1207
|
+
D(this, "schemaService", null);
|
|
1208
|
+
D(this, "metadataService", null);
|
|
1209
|
+
D(this, "propertyConfig", {
|
|
1967
1210
|
type: "object",
|
|
1968
1211
|
categories: {}
|
|
1969
1212
|
});
|
|
1970
|
-
var
|
|
1971
|
-
this.componentId = e, this.designerHostService =
|
|
1213
|
+
var i;
|
|
1214
|
+
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1972
1215
|
}
|
|
1973
1216
|
getTableInfo() {
|
|
1974
1217
|
var e;
|
|
1975
1218
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1976
1219
|
}
|
|
1977
1220
|
setDesignViewModelField(e) {
|
|
1978
|
-
const
|
|
1979
|
-
if (
|
|
1221
|
+
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1222
|
+
if (n) {
|
|
1980
1223
|
if (!this.designViewModelField) {
|
|
1981
|
-
const
|
|
1982
|
-
this.designViewModelField =
|
|
1224
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1225
|
+
this.designViewModelField = i.fields.find((d) => d.id === n);
|
|
1983
1226
|
}
|
|
1984
1227
|
e.updateOn = this.designViewModelField.updateOn;
|
|
1985
1228
|
}
|
|
1986
1229
|
}
|
|
1987
|
-
changeFieldEditorType(e,
|
|
1230
|
+
changeFieldEditorType(e, n) {
|
|
1988
1231
|
}
|
|
1989
1232
|
getBasicPropConfig(e) {
|
|
1990
1233
|
return {
|
|
@@ -2005,7 +1248,7 @@ class ae {
|
|
|
2005
1248
|
type: "combo-list",
|
|
2006
1249
|
textField: "name",
|
|
2007
1250
|
valueField: "value",
|
|
2008
|
-
data: [{ value: e.type, name:
|
|
1251
|
+
data: [{ value: e.type, name: ne[e.type].name }]
|
|
2009
1252
|
}
|
|
2010
1253
|
}
|
|
2011
1254
|
}
|
|
@@ -2037,17 +1280,17 @@ class ae {
|
|
|
2037
1280
|
* @param componentInstance
|
|
2038
1281
|
* @returns
|
|
2039
1282
|
*/
|
|
2040
|
-
updateElementByParentContainer(e,
|
|
2041
|
-
const
|
|
2042
|
-
if (!
|
|
1283
|
+
updateElementByParentContainer(e, n) {
|
|
1284
|
+
const i = n && n.parent && n.parent.schema;
|
|
1285
|
+
if (!i)
|
|
2043
1286
|
return;
|
|
2044
|
-
const d =
|
|
2045
|
-
|
|
1287
|
+
const d = i.contents.findIndex((f) => f.id === e), h = fe(i.contents[d]);
|
|
1288
|
+
i.contents.splice(d, 1), i.contents.splice(d, 0, h);
|
|
2046
1289
|
}
|
|
2047
1290
|
}
|
|
2048
|
-
class
|
|
2049
|
-
constructor(e,
|
|
2050
|
-
super(e,
|
|
1291
|
+
class mt extends re {
|
|
1292
|
+
constructor(e, n) {
|
|
1293
|
+
super(e, n);
|
|
2051
1294
|
}
|
|
2052
1295
|
getPropertyConfig(e) {
|
|
2053
1296
|
return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
|
|
@@ -2071,7 +1314,7 @@ class Pt extends ae {
|
|
|
2071
1314
|
type: "combo-list",
|
|
2072
1315
|
textField: "value",
|
|
2073
1316
|
valueField: "key",
|
|
2074
|
-
data: [{ key: "response-toolbar", value:
|
|
1317
|
+
data: [{ key: "response-toolbar", value: ne["response-toolbar"].name }]
|
|
2075
1318
|
}
|
|
2076
1319
|
}
|
|
2077
1320
|
}
|
|
@@ -2114,85 +1357,40 @@ class Pt extends ae {
|
|
|
2114
1357
|
};
|
|
2115
1358
|
}
|
|
2116
1359
|
}
|
|
2117
|
-
function
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
|
|
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;
|
|
2122
|
-
}
|
|
2123
|
-
function p(j) {
|
|
2124
|
-
return !bt().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
|
|
2125
|
-
}
|
|
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), $;
|
|
2131
|
-
}, []) : [], u = o == null ? void 0 : o.schema, R = u && u.appearance && u.appearance.class || "", x = R ? R.split(" ") : [];
|
|
2132
|
-
g = {
|
|
2133
|
-
componentClass: h,
|
|
2134
|
-
componentClassList: I,
|
|
2135
|
-
childContents: A,
|
|
2136
|
-
firstChildContent: l,
|
|
2137
|
-
firstChildClass: n,
|
|
2138
|
-
firstChildClassList: t,
|
|
2139
|
-
parent: u,
|
|
2140
|
-
parentClass: R,
|
|
2141
|
-
parentClassList: x,
|
|
2142
|
-
children: A,
|
|
2143
|
-
childrenClassList: r
|
|
2144
|
-
};
|
|
2145
|
-
const { canAccept: M, fixed: F, hidePadding: _ } = d.getRuleValue(I[0], g);
|
|
2146
|
-
return D = M, P = _, !0;
|
|
2147
|
-
}
|
|
2148
|
-
function f(j) {
|
|
2149
|
-
}
|
|
2150
|
-
function a() {
|
|
2151
|
-
return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2152
|
-
}
|
|
2153
|
-
function y(j, h) {
|
|
2154
|
-
return h.text = j.label, h;
|
|
1360
|
+
function ht(s, e) {
|
|
1361
|
+
const n = s.schema;
|
|
1362
|
+
function i(m) {
|
|
1363
|
+
return !1;
|
|
2155
1364
|
}
|
|
2156
|
-
function
|
|
2157
|
-
|
|
2158
|
-
if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2159
|
-
const t = String(j.innerText), r = q("form-group");
|
|
2160
|
-
return r.editor = I, r.label = t, r;
|
|
2161
|
-
}
|
|
2162
|
-
return I;
|
|
1365
|
+
function d(m, l) {
|
|
1366
|
+
return l.text = m.label, l;
|
|
2163
1367
|
}
|
|
2164
|
-
function
|
|
1368
|
+
function h() {
|
|
2165
1369
|
return !1;
|
|
2166
1370
|
}
|
|
2167
|
-
function
|
|
1371
|
+
function f() {
|
|
2168
1372
|
return !1;
|
|
2169
1373
|
}
|
|
2170
|
-
function
|
|
1374
|
+
function x() {
|
|
2171
1375
|
return !0;
|
|
2172
1376
|
}
|
|
2173
|
-
function
|
|
2174
|
-
return
|
|
1377
|
+
function w() {
|
|
1378
|
+
return !0;
|
|
2175
1379
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return new
|
|
1380
|
+
function g(m) {
|
|
1381
|
+
return new mt(m, e).getPropertyConfig(n);
|
|
2178
1382
|
}
|
|
2179
1383
|
return {
|
|
2180
|
-
canAccepts:
|
|
2181
|
-
checkCanAddComponent:
|
|
2182
|
-
checkCanDeleteComponent:
|
|
2183
|
-
checkCanMoveComponent:
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
onAcceptMovedChildElement: f,
|
|
2188
|
-
onResolveNewComponentSchema: y,
|
|
2189
|
-
resolveComponentContext: i,
|
|
2190
|
-
getPropsConfig: N,
|
|
2191
|
-
triggerBelongedComponentToMoveWhenMoved: b,
|
|
2192
|
-
triggerBelongedComponentToDeleteWhenDeleted: m
|
|
1384
|
+
canAccepts: i,
|
|
1385
|
+
checkCanAddComponent: x,
|
|
1386
|
+
checkCanDeleteComponent: f,
|
|
1387
|
+
checkCanMoveComponent: h,
|
|
1388
|
+
hideNestedPaddingInDesginerView: w,
|
|
1389
|
+
onResolveNewComponentSchema: d,
|
|
1390
|
+
getPropsConfig: g
|
|
2193
1391
|
};
|
|
2194
1392
|
}
|
|
2195
|
-
const
|
|
1393
|
+
const bt = {
|
|
2196
1394
|
id: { type: String, default: "" },
|
|
2197
1395
|
componentId: { type: String, default: "" },
|
|
2198
1396
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2205,256 +1403,248 @@ const It = {
|
|
|
2205
1403
|
* 组件值
|
|
2206
1404
|
*/
|
|
2207
1405
|
modelValue: { type: Object }
|
|
2208
|
-
},
|
|
2209
|
-
function
|
|
2210
|
-
const
|
|
2211
|
-
return d &&
|
|
1406
|
+
}, Z = S(0);
|
|
1407
|
+
function yt(s, e) {
|
|
1408
|
+
const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, h = i.top <= n.bottom;
|
|
1409
|
+
return d && h;
|
|
2212
1410
|
}
|
|
2213
|
-
function
|
|
1411
|
+
function vt(s) {
|
|
2214
1412
|
if (!s)
|
|
2215
1413
|
return;
|
|
2216
1414
|
let e;
|
|
2217
1415
|
if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
|
|
2218
1416
|
return;
|
|
2219
|
-
const
|
|
2220
|
-
if (
|
|
1417
|
+
const n = e.getBoundingClientRect();
|
|
1418
|
+
if (n.width === 0 && n.height === 0)
|
|
2221
1419
|
return;
|
|
2222
|
-
const
|
|
2223
|
-
if (
|
|
2224
|
-
if (!
|
|
2225
|
-
|
|
1420
|
+
const i = e.querySelector(".component-btn-group");
|
|
1421
|
+
if (i) {
|
|
1422
|
+
if (!yt(e, s)) {
|
|
1423
|
+
i.style.display = "none";
|
|
2226
1424
|
return;
|
|
2227
1425
|
}
|
|
2228
|
-
|
|
2229
|
-
const
|
|
2230
|
-
if (
|
|
2231
|
-
const
|
|
2232
|
-
|
|
1426
|
+
i.style.display = "";
|
|
1427
|
+
const h = i.getBoundingClientRect(), f = i.querySelector("div");
|
|
1428
|
+
if (f) {
|
|
1429
|
+
const x = f.getBoundingClientRect();
|
|
1430
|
+
f.style.top = h.top + "px", f.style.left = h.left - x.width + "px";
|
|
2233
1431
|
}
|
|
2234
1432
|
}
|
|
2235
1433
|
}
|
|
2236
|
-
function
|
|
2237
|
-
var
|
|
2238
|
-
function
|
|
1434
|
+
function Ct(s, e, n) {
|
|
1435
|
+
var R;
|
|
1436
|
+
function i() {
|
|
2239
1437
|
}
|
|
2240
|
-
const d = "",
|
|
2241
|
-
function
|
|
1438
|
+
const d = "", h = S();
|
|
1439
|
+
function f() {
|
|
2242
1440
|
return !0;
|
|
2243
1441
|
}
|
|
2244
|
-
function
|
|
1442
|
+
function x() {
|
|
2245
1443
|
return !1;
|
|
2246
1444
|
}
|
|
2247
|
-
function
|
|
1445
|
+
function w() {
|
|
2248
1446
|
return !0;
|
|
2249
1447
|
}
|
|
2250
1448
|
function g() {
|
|
2251
1449
|
return !0;
|
|
2252
1450
|
}
|
|
2253
|
-
function
|
|
1451
|
+
function m() {
|
|
2254
1452
|
return !0;
|
|
2255
1453
|
}
|
|
2256
|
-
function
|
|
2257
|
-
if (!
|
|
1454
|
+
function l(E) {
|
|
1455
|
+
if (!E || !E.value)
|
|
2258
1456
|
return null;
|
|
2259
|
-
const
|
|
2260
|
-
return
|
|
1457
|
+
const k = S(E == null ? void 0 : E.value.parent), v = l(k);
|
|
1458
|
+
return v || null;
|
|
2261
1459
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const { componentInstance:
|
|
2264
|
-
return !
|
|
1460
|
+
function c(E = e) {
|
|
1461
|
+
const { componentInstance: k, designerItemElementRef: v } = E;
|
|
1462
|
+
return !k || !k.value ? null : k.value.canMove || k.value.canAdd || k.value.canDelete ? v : c(E.parent);
|
|
2265
1463
|
}
|
|
2266
|
-
function
|
|
2267
|
-
return !!
|
|
1464
|
+
function p(E) {
|
|
1465
|
+
return !!n;
|
|
2268
1466
|
}
|
|
2269
|
-
function
|
|
1467
|
+
function b() {
|
|
2270
1468
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2271
1469
|
}
|
|
2272
|
-
function
|
|
1470
|
+
function M() {
|
|
2273
1471
|
}
|
|
2274
|
-
function
|
|
1472
|
+
function O(E, k) {
|
|
2275
1473
|
}
|
|
2276
|
-
function
|
|
2277
|
-
const { componentType:
|
|
2278
|
-
let
|
|
2279
|
-
const
|
|
2280
|
-
return
|
|
1474
|
+
function j(E) {
|
|
1475
|
+
const { componentType: k } = E;
|
|
1476
|
+
let v = X(k, E);
|
|
1477
|
+
const P = k.toLowerCase().replace("-", "_");
|
|
1478
|
+
return v && !v.id && v.type === k && (v.id = `${P}_${Math.random().toString().slice(2, 6)}`), v;
|
|
2281
1479
|
}
|
|
2282
|
-
function
|
|
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);
|
|
2286
|
-
const t = I.toLowerCase().replace("-", "_");
|
|
2287
|
-
return n && !n.id && n.type === I && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
|
|
1480
|
+
function F(E) {
|
|
2288
1481
|
}
|
|
2289
|
-
function E
|
|
2290
|
-
}
|
|
2291
|
-
function k(...j) {
|
|
1482
|
+
function _(...E) {
|
|
2292
1483
|
return [];
|
|
2293
1484
|
}
|
|
2294
|
-
return
|
|
2295
|
-
canMove:
|
|
2296
|
-
canSelectParent:
|
|
1485
|
+
return h.value = {
|
|
1486
|
+
canMove: f(),
|
|
1487
|
+
canSelectParent: x(),
|
|
2297
1488
|
canAdd: g(),
|
|
2298
|
-
canDelete:
|
|
2299
|
-
canNested: !
|
|
1489
|
+
canDelete: w(),
|
|
1490
|
+
canNested: !m(),
|
|
2300
1491
|
contents: [],
|
|
2301
1492
|
elementRef: s,
|
|
2302
|
-
parent: (
|
|
1493
|
+
parent: (R = e.parent) == null ? void 0 : R.componentInstance,
|
|
2303
1494
|
schema: e.schema,
|
|
2304
1495
|
styles: d,
|
|
2305
|
-
canAccepts:
|
|
2306
|
-
getBelongedComponentInstance:
|
|
2307
|
-
getDraggableDesignItemElement:
|
|
2308
|
-
getDraggingDisplayText:
|
|
2309
|
-
getPropConfig:
|
|
2310
|
-
getDragScopeElement:
|
|
2311
|
-
onAcceptMovedChildElement:
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
updateDragAndDropRules: c,
|
|
1496
|
+
canAccepts: p,
|
|
1497
|
+
getBelongedComponentInstance: l,
|
|
1498
|
+
getDraggableDesignItemElement: c,
|
|
1499
|
+
getDraggingDisplayText: b,
|
|
1500
|
+
getPropConfig: _,
|
|
1501
|
+
getDragScopeElement: M,
|
|
1502
|
+
onAcceptMovedChildElement: O,
|
|
1503
|
+
onChildElementMovedOut: F,
|
|
1504
|
+
addNewChildComponentSchema: j,
|
|
1505
|
+
updateDragAndDropRules: i,
|
|
2316
1506
|
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
2317
1507
|
triggerBelongedComponentToDeleteWhenDeleted: S(!1)
|
|
2318
|
-
},
|
|
1508
|
+
}, h;
|
|
2319
1509
|
}
|
|
2320
|
-
const
|
|
1510
|
+
const wt = /* @__PURE__ */ Q({
|
|
2321
1511
|
name: "FDesignerInnerItem",
|
|
2322
|
-
props:
|
|
1512
|
+
props: bt,
|
|
2323
1513
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2324
1514
|
setup(s, e) {
|
|
2325
|
-
const
|
|
2326
|
-
designerItemElementRef:
|
|
2327
|
-
componentInstance:
|
|
1515
|
+
const n = S(s.canMove), i = S(s.canAdd), d = S(s.canDelete), h = S(!1), f = S(s.contentKey), x = S(s.childType), w = S(s.childLabel), g = S(s.modelValue), m = S(""), l = S(), c = L("canvas-dragula"), p = S(), b = L("design-item-context"), M = {
|
|
1516
|
+
designerItemElementRef: l,
|
|
1517
|
+
componentInstance: p,
|
|
2328
1518
|
schema: g.value,
|
|
2329
|
-
parent:
|
|
1519
|
+
parent: b,
|
|
2330
1520
|
setupContext: e
|
|
2331
1521
|
};
|
|
2332
|
-
|
|
2333
|
-
const
|
|
1522
|
+
Re("design-item-context", M);
|
|
1523
|
+
const O = V(() => ({
|
|
2334
1524
|
"farris-component": !0,
|
|
2335
1525
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2336
1526
|
"flex-fill": s.id == "root-component",
|
|
2337
|
-
"position-relative":
|
|
2338
|
-
"farris-nested":
|
|
2339
|
-
"can-move":
|
|
2340
|
-
"d-none":
|
|
2341
|
-
})),
|
|
1527
|
+
"position-relative": n.value || d.value,
|
|
1528
|
+
"farris-nested": h.value,
|
|
1529
|
+
"can-move": n.value,
|
|
1530
|
+
"d-none": l.value && l.value.classList.contains("d-none")
|
|
1531
|
+
})), j = V(() => {
|
|
2342
1532
|
const t = {};
|
|
2343
|
-
return
|
|
2344
|
-
const [
|
|
2345
|
-
return
|
|
1533
|
+
return m.value && m.value.split(";").reduce((r, u) => {
|
|
1534
|
+
const [T, C] = u.split(":");
|
|
1535
|
+
return T && (r[T] = C), r;
|
|
2346
1536
|
}, t), t;
|
|
2347
1537
|
});
|
|
2348
|
-
function
|
|
2349
|
-
if (
|
|
2350
|
-
const u =
|
|
1538
|
+
function F(t, r) {
|
|
1539
|
+
if (b && b.schema[f.value]) {
|
|
1540
|
+
const u = b.schema[f.value].findIndex((T) => T.id === r.id);
|
|
2351
1541
|
if (u > -1) {
|
|
2352
|
-
const
|
|
2353
|
-
|
|
1542
|
+
const T = b.schema[f.value].length, C = b.schema[f.value][u % T];
|
|
1543
|
+
b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[f.value].splice(u, 1), b.componentInstance.value.updateDragAndDropRules(), Z.value++, e.emit("removeComponent");
|
|
2354
1544
|
}
|
|
2355
1545
|
}
|
|
2356
1546
|
}
|
|
2357
|
-
function
|
|
2358
|
-
if (
|
|
1547
|
+
function _(t) {
|
|
1548
|
+
if (p.value.addNewChildComponentSchema) {
|
|
2359
1549
|
const r = {
|
|
2360
|
-
componentType:
|
|
2361
|
-
label:
|
|
2362
|
-
parentComponentInstance:
|
|
1550
|
+
componentType: x.value,
|
|
1551
|
+
label: w.value,
|
|
1552
|
+
parentComponentInstance: p.value,
|
|
2363
1553
|
targetPosition: -1
|
|
2364
|
-
}, u =
|
|
2365
|
-
g.value[
|
|
1554
|
+
}, u = p.value.addNewChildComponentSchema(r);
|
|
1555
|
+
g.value[f.value].push(u), e.emit("addComponent");
|
|
2366
1556
|
}
|
|
2367
1557
|
}
|
|
2368
|
-
function
|
|
2369
|
-
return
|
|
1558
|
+
function R() {
|
|
1559
|
+
return i.value && y("div", {
|
|
2370
1560
|
role: "button",
|
|
2371
1561
|
class: "btn component-settings-button",
|
|
2372
1562
|
title: "新增",
|
|
2373
1563
|
ref: "removeComponent",
|
|
2374
1564
|
onClick: (t) => {
|
|
2375
|
-
|
|
1565
|
+
_();
|
|
2376
1566
|
}
|
|
2377
|
-
}, [
|
|
1567
|
+
}, [y("i", {
|
|
2378
1568
|
class: "f-icon f-icon-plus-circle"
|
|
2379
1569
|
}, null)]);
|
|
2380
1570
|
}
|
|
2381
|
-
function
|
|
2382
|
-
return d.value &&
|
|
1571
|
+
function E(t) {
|
|
1572
|
+
return d.value && y("div", {
|
|
2383
1573
|
role: "button",
|
|
2384
1574
|
class: "btn component-settings-button",
|
|
2385
1575
|
title: "删除",
|
|
2386
1576
|
ref: "removeComponent",
|
|
2387
|
-
onClick:
|
|
2388
|
-
}, [
|
|
1577
|
+
onClick: Pe((r) => F(r, t), ["stop"])
|
|
1578
|
+
}, [y("i", {
|
|
2389
1579
|
class: "f-icon f-icon-yxs_delete"
|
|
2390
1580
|
}, null)]);
|
|
2391
1581
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
1582
|
+
function k() {
|
|
1583
|
+
return n.value && y("div", {
|
|
2394
1584
|
role: "button",
|
|
2395
1585
|
class: "btn component-settings-button",
|
|
2396
1586
|
title: "移动",
|
|
2397
1587
|
ref: "moveComponent"
|
|
2398
|
-
}, [
|
|
1588
|
+
}, [y("i", {
|
|
2399
1589
|
"data-dragging-icon": "true",
|
|
2400
1590
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2401
1591
|
}, null)]);
|
|
2402
1592
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
1593
|
+
function v(t) {
|
|
1594
|
+
return y("div", {
|
|
2405
1595
|
class: "component-btn-group",
|
|
2406
1596
|
"data-noattach": "true"
|
|
2407
|
-
}, [
|
|
1597
|
+
}, [y("div", null, [R(), k(), E(t)])]);
|
|
2408
1598
|
}
|
|
2409
|
-
|
|
2410
|
-
g.value = t,
|
|
1599
|
+
G(() => s.modelValue, (t) => {
|
|
1600
|
+
g.value = t, M.schema = t;
|
|
2411
1601
|
});
|
|
2412
|
-
function
|
|
1602
|
+
function P(t) {
|
|
2413
1603
|
const r = t.target;
|
|
2414
|
-
|
|
1604
|
+
vt(r);
|
|
2415
1605
|
}
|
|
2416
1606
|
function A() {
|
|
2417
1607
|
var t, r;
|
|
2418
|
-
(r = (t = g.value) == null ? void 0 : t.contents) != null && r.length &&
|
|
1608
|
+
(r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", P);
|
|
2419
1609
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const t =
|
|
2422
|
-
return
|
|
1610
|
+
function a() {
|
|
1611
|
+
const t = l.value, r = S(t.children[1]);
|
|
1612
|
+
return Ct(r, M).value;
|
|
2423
1613
|
}
|
|
2424
1614
|
z(() => {
|
|
2425
|
-
if (
|
|
2426
|
-
const t =
|
|
2427
|
-
|
|
1615
|
+
if (l.value) {
|
|
1616
|
+
const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
1617
|
+
p.value = t && t.componentInstance ? t.componentInstance.value : a(), c && t && c.attachComponents(t, g.value), h.value = p.value.canNested !== void 0 ? p.value.canNested : h.value, i.value = p.value.canAdd !== void 0 ? p.value.canAdd : i.value, d.value = p.value.canDelete !== void 0 ? p.value.canDelete : d.value, n.value = p.value.canMove !== void 0 ? p.value.canMove : n.value, m.value = p.value.styles || "", l.value && (l.value.componentInstance = p, l.value.designItemContext = M);
|
|
2428
1618
|
}
|
|
2429
|
-
A(),
|
|
1619
|
+
A(), Z.value++;
|
|
2430
1620
|
}), ke(() => {
|
|
2431
|
-
|
|
1621
|
+
l.value && l.value.removeEventListener("scroll", P);
|
|
2432
1622
|
});
|
|
2433
|
-
function
|
|
1623
|
+
function o(t) {
|
|
2434
1624
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
|
|
2435
|
-
const r =
|
|
1625
|
+
const r = l.value;
|
|
2436
1626
|
if (r) {
|
|
2437
1627
|
const u = document.getElementsByClassName("dgComponentSelected");
|
|
2438
|
-
if (!(u && u.length === 1 && u[0] ===
|
|
2439
|
-
Array.from(u).forEach((
|
|
2440
|
-
const
|
|
2441
|
-
|
|
1628
|
+
if (!(u && u.length === 1 && u[0] === l.value)) {
|
|
1629
|
+
Array.from(u).forEach((I) => I.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, p.value);
|
|
1630
|
+
const C = p.value.getDraggableDesignItemElement(M);
|
|
1631
|
+
C && C.value && C.value.classList.add("dgComponentSelected");
|
|
2442
1632
|
}
|
|
2443
1633
|
}
|
|
2444
|
-
|
|
1634
|
+
Z.value++;
|
|
2445
1635
|
}
|
|
2446
|
-
return () =>
|
|
1636
|
+
return () => y("div", {
|
|
2447
1637
|
id: `${s.id}-design-item`,
|
|
2448
|
-
ref:
|
|
2449
|
-
class:
|
|
2450
|
-
style:
|
|
2451
|
-
onClick:
|
|
2452
|
-
}, [
|
|
1638
|
+
ref: l,
|
|
1639
|
+
class: O.value,
|
|
1640
|
+
style: j.value,
|
|
1641
|
+
onClick: o
|
|
1642
|
+
}, [v(g.value), e.slots.default && e.slots.default()]);
|
|
2453
1643
|
}
|
|
2454
1644
|
});
|
|
2455
|
-
class
|
|
2456
|
-
constructor(e,
|
|
2457
|
-
super(e,
|
|
1645
|
+
class xt extends re {
|
|
1646
|
+
constructor(e, n) {
|
|
1647
|
+
super(e, n);
|
|
2458
1648
|
}
|
|
2459
1649
|
getPropertyConfig(e) {
|
|
2460
1650
|
return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
@@ -2503,20 +1693,20 @@ class kt extends ae {
|
|
|
2503
1693
|
title: "style样式"
|
|
2504
1694
|
}
|
|
2505
1695
|
},
|
|
2506
|
-
setPropertyRelates(
|
|
1696
|
+
setPropertyRelates(n, i) {
|
|
2507
1697
|
}
|
|
2508
1698
|
};
|
|
2509
1699
|
}
|
|
2510
1700
|
getEventPropConfig(e) {
|
|
2511
|
-
const
|
|
1701
|
+
const n = [
|
|
2512
1702
|
{
|
|
2513
1703
|
label: "onClick",
|
|
2514
1704
|
name: "点击事件"
|
|
2515
1705
|
}
|
|
2516
1706
|
];
|
|
2517
|
-
var
|
|
2518
|
-
const d =
|
|
2519
|
-
|
|
1707
|
+
var i = this;
|
|
1708
|
+
const d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
|
|
1709
|
+
h[i.viewModelId] = {
|
|
2520
1710
|
type: "events-editor",
|
|
2521
1711
|
editor: {
|
|
2522
1712
|
initialData: d
|
|
@@ -2524,24 +1714,24 @@ class kt extends ae {
|
|
|
2524
1714
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2525
1715
|
title: "事件",
|
|
2526
1716
|
hideTitle: !0,
|
|
2527
|
-
properties:
|
|
1717
|
+
properties: h,
|
|
2528
1718
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2529
1719
|
refreshPanelAfterChanged: !0,
|
|
2530
1720
|
tabId: "commands",
|
|
2531
1721
|
tabName: "交互",
|
|
2532
|
-
setPropertyRelates(
|
|
2533
|
-
const
|
|
2534
|
-
delete e[
|
|
1722
|
+
setPropertyRelates(f, x) {
|
|
1723
|
+
const w = f.propertyValue;
|
|
1724
|
+
delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
|
|
2535
1725
|
}
|
|
2536
1726
|
};
|
|
2537
1727
|
}
|
|
2538
1728
|
}
|
|
2539
|
-
class
|
|
2540
|
-
constructor(e,
|
|
2541
|
-
super(e,
|
|
1729
|
+
class Tt extends re {
|
|
1730
|
+
constructor(e, n) {
|
|
1731
|
+
super(e, n);
|
|
2542
1732
|
}
|
|
2543
1733
|
getPropertyConfig(e) {
|
|
2544
|
-
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
1734
|
+
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
|
|
2545
1735
|
}
|
|
2546
1736
|
getBasicPropConfig() {
|
|
2547
1737
|
this.propertyConfig.categories.basic = {
|
|
@@ -2562,7 +1752,7 @@ class At extends ae {
|
|
|
2562
1752
|
type: "combo-list",
|
|
2563
1753
|
textField: "value",
|
|
2564
1754
|
valueField: "key",
|
|
2565
|
-
data: [{ key: "response-toolbar-item", value:
|
|
1755
|
+
data: [{ key: "response-toolbar-item", value: ne["response-toolbar-item"].name }]
|
|
2566
1756
|
}
|
|
2567
1757
|
},
|
|
2568
1758
|
text: {
|
|
@@ -2579,6 +1769,20 @@ class At extends ae {
|
|
|
2579
1769
|
}
|
|
2580
1770
|
};
|
|
2581
1771
|
}
|
|
1772
|
+
getbBehaviorConfig() {
|
|
1773
|
+
this.propertyConfig.categories.behavior = {
|
|
1774
|
+
title: "行为",
|
|
1775
|
+
description: "Behavior",
|
|
1776
|
+
properties: {
|
|
1777
|
+
disabled: {
|
|
1778
|
+
title: "禁用状态",
|
|
1779
|
+
type: "boolean",
|
|
1780
|
+
description: "按钮禁用状态",
|
|
1781
|
+
refreshPanelAfterChanged: !0
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
2582
1786
|
getAppearanceProperties(e) {
|
|
2583
1787
|
this.propertyConfig.categories.appearance = {
|
|
2584
1788
|
title: "样式",
|
|
@@ -2587,24 +1791,20 @@ class At extends ae {
|
|
|
2587
1791
|
class: {
|
|
2588
1792
|
title: "class",
|
|
2589
1793
|
type: "string",
|
|
2590
|
-
description: ""
|
|
2591
|
-
|
|
2592
|
-
style: {
|
|
2593
|
-
title: "style",
|
|
2594
|
-
type: "string",
|
|
2595
|
-
description: ""
|
|
1794
|
+
description: "",
|
|
1795
|
+
$converter: "/converter/appearance.converter"
|
|
2596
1796
|
}
|
|
2597
1797
|
}
|
|
2598
1798
|
};
|
|
2599
1799
|
}
|
|
2600
1800
|
getEventPropConfig(e) {
|
|
2601
|
-
const
|
|
1801
|
+
const n = [
|
|
2602
1802
|
{
|
|
2603
1803
|
label: "onClick",
|
|
2604
1804
|
name: "点击事件"
|
|
2605
1805
|
}
|
|
2606
|
-
],
|
|
2607
|
-
|
|
1806
|
+
], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
|
|
1807
|
+
h[i.viewModelId] = {
|
|
2608
1808
|
type: "events-editor",
|
|
2609
1809
|
editor: {
|
|
2610
1810
|
initialData: d
|
|
@@ -2612,272 +1812,242 @@ class At extends ae {
|
|
|
2612
1812
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2613
1813
|
title: "事件",
|
|
2614
1814
|
hideTitle: !0,
|
|
2615
|
-
properties:
|
|
1815
|
+
properties: h,
|
|
2616
1816
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2617
1817
|
refreshPanelAfterChanged: !0,
|
|
2618
1818
|
tabId: "commands",
|
|
2619
1819
|
tabName: "交互",
|
|
2620
|
-
setPropertyRelates(
|
|
2621
|
-
const
|
|
2622
|
-
delete e[
|
|
1820
|
+
setPropertyRelates(f, x) {
|
|
1821
|
+
const w = f.propertyValue;
|
|
1822
|
+
delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
|
|
2623
1823
|
}
|
|
2624
1824
|
};
|
|
2625
1825
|
}
|
|
2626
1826
|
}
|
|
2627
|
-
function
|
|
2628
|
-
|
|
2629
|
-
const o = S(!1), c = S(!1);
|
|
2630
|
-
let d = !1, b = !1;
|
|
2631
|
-
function m(v) {
|
|
1827
|
+
function It(s, e) {
|
|
1828
|
+
function n(x) {
|
|
2632
1829
|
return !1;
|
|
2633
1830
|
}
|
|
2634
|
-
function
|
|
2635
|
-
}
|
|
2636
|
-
function P() {
|
|
2637
|
-
return "";
|
|
2638
|
-
}
|
|
2639
|
-
function g(v, T) {
|
|
2640
|
-
return T.text = v.label, T;
|
|
2641
|
-
}
|
|
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;
|
|
2647
|
-
}
|
|
2648
|
-
return O;
|
|
2649
|
-
}
|
|
2650
|
-
function p() {
|
|
1831
|
+
function i() {
|
|
2651
1832
|
return !1;
|
|
2652
1833
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return !
|
|
1834
|
+
function d() {
|
|
1835
|
+
return !0;
|
|
2655
1836
|
}
|
|
2656
|
-
function
|
|
1837
|
+
function h() {
|
|
2657
1838
|
return !1;
|
|
2658
1839
|
}
|
|
2659
|
-
function
|
|
2660
|
-
|
|
2661
|
-
}
|
|
2662
|
-
function y(v) {
|
|
2663
|
-
let T;
|
|
1840
|
+
function f(x) {
|
|
1841
|
+
let w;
|
|
2664
1842
|
switch (s.schema.type) {
|
|
2665
1843
|
case "tab-toolbar-item":
|
|
2666
|
-
|
|
1844
|
+
w = new xt(x, e);
|
|
2667
1845
|
break;
|
|
2668
1846
|
default:
|
|
2669
|
-
|
|
1847
|
+
w = new Tt(x, e);
|
|
2670
1848
|
}
|
|
2671
|
-
return
|
|
1849
|
+
return w.getPropertyConfig(s.schema);
|
|
2672
1850
|
}
|
|
2673
1851
|
return {
|
|
2674
|
-
canAccepts:
|
|
2675
|
-
|
|
2676
|
-
checkCanDeleteComponent:
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
hideNestedPaddingInDesginerView: a,
|
|
2680
|
-
onAcceptNewChildElement: C,
|
|
2681
|
-
onAcceptMovedChildElement: D,
|
|
2682
|
-
onResolveNewComponentSchema: g,
|
|
2683
|
-
getPropsConfig: y,
|
|
2684
|
-
triggerBelongedComponentToMoveWhenMoved: o,
|
|
2685
|
-
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
1852
|
+
canAccepts: n,
|
|
1853
|
+
checkCanMoveComponent: i,
|
|
1854
|
+
checkCanDeleteComponent: d,
|
|
1855
|
+
checkCanAddComponent: h,
|
|
1856
|
+
getPropsConfig: f
|
|
2686
1857
|
};
|
|
2687
1858
|
}
|
|
2688
|
-
const
|
|
1859
|
+
const Te = /* @__PURE__ */ Q({
|
|
2689
1860
|
name: "FResponseToolbarItemDesign",
|
|
2690
|
-
props:
|
|
1861
|
+
props: we,
|
|
2691
1862
|
emits: ["Click"],
|
|
2692
1863
|
setup(s, e) {
|
|
2693
1864
|
S(), S();
|
|
2694
|
-
const
|
|
1865
|
+
const n = S(s.alignment), i = {
|
|
2695
1866
|
id: "__more_buttons__",
|
|
2696
1867
|
text: "More"
|
|
2697
|
-
}, d = S(new
|
|
2698
|
-
|
|
2699
|
-
const
|
|
1868
|
+
}, d = S(new W(i));
|
|
1869
|
+
V(() => d.value.children.length > 0);
|
|
1870
|
+
const h = S(), f = L("designer-host-service"), x = L("design-item-context"), w = It(x, f), g = ge(h, x, w);
|
|
2700
1871
|
L("toolbar-item-handler", () => {
|
|
2701
1872
|
}), z(() => {
|
|
2702
|
-
|
|
1873
|
+
h.value.componentInstance = g;
|
|
2703
1874
|
}), e.expose(g.value);
|
|
2704
|
-
function
|
|
2705
|
-
const
|
|
1875
|
+
function m() {
|
|
1876
|
+
const p = {
|
|
2706
1877
|
"f-icon": !0
|
|
2707
|
-
},
|
|
2708
|
-
return
|
|
1878
|
+
}, b = s.icon ? s.icon.trim() : "";
|
|
1879
|
+
return H(p, b);
|
|
2709
1880
|
}
|
|
2710
|
-
function
|
|
1881
|
+
function l() {
|
|
2711
1882
|
return !!(s.icon && s.icon.trim());
|
|
2712
1883
|
}
|
|
2713
|
-
function
|
|
2714
|
-
const
|
|
1884
|
+
function c() {
|
|
1885
|
+
const p = {
|
|
2715
1886
|
btn: !0,
|
|
2716
1887
|
"f-rt-btn": !0,
|
|
2717
|
-
"f-btn-ml":
|
|
2718
|
-
"f-btn-mr":
|
|
2719
|
-
"btn-icontext": !!(s.icon && s.icon.trim())
|
|
1888
|
+
"f-btn-ml": n.value === "right",
|
|
1889
|
+
"f-btn-mr": n.value === "left",
|
|
1890
|
+
"btn-icontext": !!(s.icon && s.icon.trim()),
|
|
1891
|
+
disabled: s.disabled === !0
|
|
2720
1892
|
};
|
|
2721
|
-
return
|
|
1893
|
+
return H(p, s.class);
|
|
2722
1894
|
}
|
|
2723
|
-
return
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
ref: b,
|
|
2727
|
-
"data-dragref": `${D.schema.id}-container`,
|
|
1895
|
+
return () => y("div", {
|
|
1896
|
+
ref: h,
|
|
1897
|
+
"data-dragref": `${x.schema.id}-container`,
|
|
2728
1898
|
class: "farris-component position-relative",
|
|
2729
1899
|
style: "display:inline-block!important;"
|
|
2730
|
-
}, [
|
|
1900
|
+
}, [y("button", {
|
|
2731
1901
|
type: "button",
|
|
2732
|
-
class:
|
|
1902
|
+
class: c(),
|
|
2733
1903
|
id: s.id
|
|
2734
|
-
}, [
|
|
2735
|
-
class:
|
|
1904
|
+
}, [l() && y("i", {
|
|
1905
|
+
class: m()
|
|
2736
1906
|
}, null), s.text])]);
|
|
2737
1907
|
}
|
|
2738
|
-
}),
|
|
1908
|
+
}), Dt = /* @__PURE__ */ Q({
|
|
2739
1909
|
name: "FResponseToolbarDesign",
|
|
2740
|
-
props:
|
|
1910
|
+
props: at,
|
|
2741
1911
|
emits: ["Click"],
|
|
2742
1912
|
setup(s, e) {
|
|
2743
|
-
const
|
|
2744
|
-
let
|
|
2745
|
-
const d = S(),
|
|
1913
|
+
const n = S(s.items);
|
|
1914
|
+
let i = new Array(n.value.length).fill(S());
|
|
1915
|
+
const d = S(), h = S(), f = S(s.alignment), x = {
|
|
2746
1916
|
id: "__more_buttons__",
|
|
2747
1917
|
text: "More"
|
|
2748
|
-
},
|
|
2749
|
-
|
|
2750
|
-
const
|
|
1918
|
+
}, w = S(new W(x)), g = xe();
|
|
1919
|
+
V(() => w.value.children.length > 0);
|
|
1920
|
+
const m = S(), l = L("designer-host-service"), c = L("design-item-context"), p = ht(c, l), b = ge(m, c, p);
|
|
2751
1921
|
L("toolbar-item-handler", () => {
|
|
2752
1922
|
}), z(() => {
|
|
2753
|
-
|
|
2754
|
-
}), e.expose(
|
|
2755
|
-
const
|
|
1923
|
+
m.value.componentInstance = b;
|
|
1924
|
+
}), e.expose(b.value);
|
|
1925
|
+
const M = V(() => H({
|
|
2756
1926
|
"f-toolbar": !0,
|
|
2757
1927
|
"f-response-toolbar": !0,
|
|
2758
1928
|
"position-relative": !0
|
|
2759
|
-
}, s.customClass)),
|
|
1929
|
+
}, s.customClass)), O = V(() => ({
|
|
2760
1930
|
"d-flex": !0,
|
|
2761
1931
|
"flex-nowrap": !0,
|
|
2762
|
-
"justify-content-end":
|
|
2763
|
-
"justify-content-start":
|
|
1932
|
+
"justify-content-end": f.value === "right",
|
|
1933
|
+
"justify-content-start": f.value === "left"
|
|
2764
1934
|
})), {
|
|
2765
|
-
renderToolbarDropdown:
|
|
2766
|
-
clearAllDropDown:
|
|
2767
|
-
} =
|
|
2768
|
-
function
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
}),
|
|
1935
|
+
renderToolbarDropdown: j,
|
|
1936
|
+
clearAllDropDown: F
|
|
1937
|
+
} = gt(s, g, b);
|
|
1938
|
+
function _() {
|
|
1939
|
+
n.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
|
|
1940
|
+
a.expanded = !1;
|
|
1941
|
+
}), w.value.expanded = !1, F();
|
|
2772
1942
|
}
|
|
2773
|
-
const
|
|
2774
|
-
function
|
|
2775
|
-
const
|
|
2776
|
-
let t =
|
|
2777
|
-
const r = Array.from(
|
|
1943
|
+
const R = /* @__PURE__ */ new Map(), E = [];
|
|
1944
|
+
function k(a) {
|
|
1945
|
+
const o = h.value;
|
|
1946
|
+
let t = a;
|
|
1947
|
+
const r = Array.from(o.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
|
|
2778
1948
|
if (u) {
|
|
2779
|
-
const
|
|
2780
|
-
t -=
|
|
1949
|
+
const B = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), U = (B ? B.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
|
|
1950
|
+
t -= U;
|
|
2781
1951
|
}
|
|
2782
|
-
const
|
|
2783
|
-
for (const
|
|
2784
|
-
const $ =
|
|
2785
|
-
t <
|
|
2786
|
-
id:
|
|
2787
|
-
width:
|
|
2788
|
-
})) : t -=
|
|
1952
|
+
const T = r.filter((B) => B.id !== "__more_buttons__");
|
|
1953
|
+
for (const B of T) {
|
|
1954
|
+
const $ = B.computedStyleMap().get("margin-left"), U = B.computedStyleMap().get("margin-right"), q = ($ ? $.value : 0) + B.getBoundingClientRect().width + (U ? U.value : 0);
|
|
1955
|
+
t < q ? (R.set(B.id, !0), E.push({
|
|
1956
|
+
id: B.id,
|
|
1957
|
+
width: q
|
|
1958
|
+
})) : t -= q;
|
|
2789
1959
|
}
|
|
2790
|
-
if (
|
|
2791
|
-
for (let
|
|
2792
|
-
const $ =
|
|
1960
|
+
if (E.length)
|
|
1961
|
+
for (let B = E.length - 1; B >= 0; B--) {
|
|
1962
|
+
const $ = E[B].width;
|
|
2793
1963
|
if (t >= $)
|
|
2794
|
-
t -= $,
|
|
1964
|
+
t -= $, R.delete(E[B].id), E.pop();
|
|
2795
1965
|
else
|
|
2796
1966
|
break;
|
|
2797
1967
|
}
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2800
|
-
const
|
|
2801
|
-
|
|
1968
|
+
const C = Object.assign({}, w.value);
|
|
1969
|
+
C.children = [];
|
|
1970
|
+
const I = new W(C), N = n.value.reduce((B, $) => (R.has($.id) && I.children.push($), $.visible = !R.has($.id), B.push($), B), []);
|
|
1971
|
+
w.value = I, n.value = N;
|
|
2802
1972
|
}
|
|
2803
|
-
const
|
|
2804
|
-
if (
|
|
2805
|
-
const t =
|
|
2806
|
-
(t < u ||
|
|
1973
|
+
const v = new ResizeObserver((a) => {
|
|
1974
|
+
if (a.length) {
|
|
1975
|
+
const t = a[0].contentRect.width, u = h.value.getBoundingClientRect().width;
|
|
1976
|
+
(t < u || E.length) && k(t);
|
|
2807
1977
|
}
|
|
2808
1978
|
});
|
|
2809
1979
|
z(() => {
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2812
|
-
}),
|
|
2813
|
-
|
|
2814
|
-
}),
|
|
2815
|
-
|
|
1980
|
+
const a = d.value;
|
|
1981
|
+
v.observe(a), document.body.addEventListener("click", _);
|
|
1982
|
+
}), ue(() => {
|
|
1983
|
+
v.disconnect(), document.body.removeEventListener("click", _);
|
|
1984
|
+
}), G(() => s.items, () => {
|
|
1985
|
+
n.value = s.items;
|
|
2816
1986
|
}, {
|
|
2817
1987
|
deep: !0
|
|
2818
|
-
}),
|
|
2819
|
-
|
|
1988
|
+
}), G(n, (a) => {
|
|
1989
|
+
i = new Array(n.value.length).fill(S());
|
|
2820
1990
|
});
|
|
2821
|
-
function
|
|
2822
|
-
|
|
1991
|
+
function P(a, o, t, r) {
|
|
1992
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", a, o, t, r);
|
|
2823
1993
|
}
|
|
2824
1994
|
function A() {
|
|
2825
|
-
const
|
|
2826
|
-
|
|
1995
|
+
const a = h.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
1996
|
+
a == null || a.classList.remove("dgComponentSelected"), a == null || a.classList.remove("dgComponentFocused");
|
|
2827
1997
|
}
|
|
2828
|
-
return () =>
|
|
2829
|
-
ref:
|
|
2830
|
-
"data-dragref": `${
|
|
2831
|
-
class:
|
|
2832
|
-
}, [
|
|
1998
|
+
return () => y("div", {
|
|
1999
|
+
ref: m,
|
|
2000
|
+
"data-dragref": `${c.schema.id}-container`,
|
|
2001
|
+
class: M.value
|
|
2002
|
+
}, [y("div", {
|
|
2833
2003
|
ref: d,
|
|
2834
|
-
class:
|
|
2835
|
-
}, [
|
|
2836
|
-
ref:
|
|
2004
|
+
class: O.value
|
|
2005
|
+
}, [y("div", {
|
|
2006
|
+
ref: h,
|
|
2837
2007
|
class: "d-inline-block f-response-content",
|
|
2838
2008
|
style: "white-space: nowrap;"
|
|
2839
|
-
}, [
|
|
2840
|
-
ref:
|
|
2009
|
+
}, [n.value.map((a, o) => y(wt, {
|
|
2010
|
+
ref: i[o],
|
|
2841
2011
|
class: "p-0 display-inline-block",
|
|
2842
|
-
modelValue:
|
|
2843
|
-
"onUpdate:modelValue": (t) =>
|
|
2012
|
+
modelValue: a,
|
|
2013
|
+
"onUpdate:modelValue": (t) => a = t,
|
|
2844
2014
|
canMove: !0,
|
|
2845
2015
|
childType: "response-toolbar-item",
|
|
2846
2016
|
childLabel: "按钮",
|
|
2847
2017
|
contentKey: "buttons",
|
|
2848
2018
|
componentId: s.componentId,
|
|
2849
|
-
id:
|
|
2019
|
+
id: a.id,
|
|
2850
2020
|
style: "padding:0 !important;display:inline-block",
|
|
2851
|
-
onSelectionChange:
|
|
2021
|
+
onSelectionChange: P,
|
|
2852
2022
|
onRemoveComponent: A
|
|
2853
2023
|
}, {
|
|
2854
2024
|
default: () => {
|
|
2855
2025
|
var t;
|
|
2856
|
-
return [
|
|
2857
|
-
id:
|
|
2858
|
-
|
|
2859
|
-
text:
|
|
2860
|
-
icon:
|
|
2861
|
-
class: ((t =
|
|
2026
|
+
return [y(Te, {
|
|
2027
|
+
id: a.id,
|
|
2028
|
+
disabled: a.disabled,
|
|
2029
|
+
text: a.text,
|
|
2030
|
+
icon: a.icon,
|
|
2031
|
+
class: ((t = a.appearance) == null ? void 0 : t.class) || "btn-secondary",
|
|
2862
2032
|
alignment: s.alignment || "right",
|
|
2863
2033
|
componentId: s.componentId
|
|
2864
2034
|
}, null)];
|
|
2865
2035
|
}
|
|
2866
2036
|
}))])])]);
|
|
2867
2037
|
}
|
|
2868
|
-
}),
|
|
2869
|
-
|
|
2870
|
-
s["response-toolbar"] =
|
|
2038
|
+
}), Bt = se;
|
|
2039
|
+
J.register = (s, e, n) => {
|
|
2040
|
+
s["response-toolbar"] = J, e["response-toolbar"] = se;
|
|
2871
2041
|
};
|
|
2872
|
-
|
|
2873
|
-
s["response-toolbar"] =
|
|
2042
|
+
J.registerDesigner = (s, e, n) => {
|
|
2043
|
+
s["response-toolbar"] = Dt, e["response-toolbar"] = se, s["response-toolbar-item"] = Te, e["response-toolbar-item"] = dt;
|
|
2874
2044
|
};
|
|
2875
|
-
const
|
|
2045
|
+
const At = Be(J);
|
|
2876
2046
|
export {
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2047
|
+
J as FResponseToolbar,
|
|
2048
|
+
W as ResponseToolbarDropDownItem,
|
|
2049
|
+
Pt as ResponseToolbarGroup,
|
|
2050
|
+
Ae as ResponseToolbarItem,
|
|
2051
|
+
At as default,
|
|
2052
|
+
Bt as responseToolbarResolver
|
|
2883
2053
|
};
|