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