@farris/ui-vue 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { FSchemaSelector as
|
|
4
|
-
import { FModalService as
|
|
1
|
+
import { ref as b, defineComponent as D, createVNode as t, inject as R, Fragment as ee, createTextVNode as T, computed as F, provide as O, onMounted as W } from "vue";
|
|
2
|
+
import { isPlainObject as q, cloneDeep as B } from "lodash-es";
|
|
3
|
+
import { FSchemaSelector as ne } from "../schema-selector/index.esm.js";
|
|
4
|
+
import { FModalService as te } from "../modal/index.esm.js";
|
|
5
5
|
import "../combo-list/index.esm.js";
|
|
6
6
|
const J = {}, U = {};
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title:
|
|
9
|
-
return
|
|
7
|
+
function z(n) {
|
|
8
|
+
const { properties: e, title: a, ignore: r } = n, u = r && Array.isArray(r), f = Object.keys(e).reduce((l, h) => ((!u || !r.find((m) => m == h)) && (l[h] = e[h].type === "object" && e[h].properties ? z(e[h]) : B(e[h].default)), l), {});
|
|
9
|
+
return (!u || !r.find((l) => l == "id")) && (f.id = `${a}-${Date.now()}`), f;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
11
|
+
function $(n, e = {}, a) {
|
|
12
|
+
const r = J[n];
|
|
13
|
+
if (r) {
|
|
14
|
+
let u = z(r);
|
|
15
|
+
const f = U[n];
|
|
16
|
+
return u = f ? f({ getSchemaByType: $ }, u, e, a) : u, u;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return Object.keys(n).reduce((
|
|
20
|
+
function oe(n, e) {
|
|
21
|
+
const a = z(e);
|
|
22
|
+
return Object.keys(n).reduce((r, u) => (r[u] && q(r[u]) && q(n[u]) ? Object.assign(r[u], n[u]) : r[u] = n[u], r), a), a;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(n).filter((
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
|
|
24
|
+
function re(n, e) {
|
|
25
|
+
return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
|
|
26
|
+
if (e.has(u)) {
|
|
27
|
+
const f = e.get(u);
|
|
28
|
+
if (typeof f == "string")
|
|
29
|
+
r[f] = n[u];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
31
|
+
const l = f(u, n[u], n);
|
|
32
|
+
Object.assign(r, l);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
|
-
|
|
36
|
-
return
|
|
35
|
+
r[u] = n[u];
|
|
36
|
+
return r;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
return
|
|
39
|
+
function ae(n, e, a = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const r = oe(n, e);
|
|
41
|
+
return re(r, a);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const p = Object.keys(
|
|
43
|
+
function se(n = {}) {
|
|
44
|
+
function e(s, i, o, c) {
|
|
45
|
+
if (typeof o == "number")
|
|
46
|
+
return c[s].length === o;
|
|
47
|
+
if (typeof o == "object") {
|
|
48
|
+
const p = Object.keys(o)[0], d = o[p];
|
|
49
49
|
if (p === "not")
|
|
50
|
-
return Number(
|
|
50
|
+
return Number(c[s].length) !== Number(d);
|
|
51
51
|
if (p === "moreThan")
|
|
52
|
-
return Number(
|
|
52
|
+
return Number(c[s].length) >= Number(d);
|
|
53
53
|
if (p === "lessThan")
|
|
54
|
-
return Number(
|
|
54
|
+
return Number(c[s].length) <= Number(d);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function s
|
|
59
|
-
return
|
|
58
|
+
function a(s, i, o, c) {
|
|
59
|
+
return c[s] && c[s].propertyValue && String(c[s].propertyValue.value) === String(o);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const r = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", e],
|
|
63
|
-
["getProperty",
|
|
63
|
+
["getProperty", a]
|
|
64
64
|
]);
|
|
65
|
-
Object.keys(n).reduce((
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const p =
|
|
72
|
-
return { target:
|
|
65
|
+
Object.keys(n).reduce((s, i) => (s.set(i, n[i]), s), r);
|
|
66
|
+
function u(s, i) {
|
|
67
|
+
const o = s;
|
|
68
|
+
return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!i }] : typeof i == "object" ? Object.keys(i).map((c) => {
|
|
69
|
+
if (c === "length")
|
|
70
|
+
return { target: o, operator: "length", param: null, value: i[c] };
|
|
71
|
+
const p = c, d = i[c];
|
|
72
|
+
return { target: o, operator: "getProperty", param: p, value: d };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const p =
|
|
78
|
-
return
|
|
75
|
+
function f(s) {
|
|
76
|
+
return Object.keys(s).reduce((o, c) => {
|
|
77
|
+
const p = u(c, s[c]);
|
|
78
|
+
return o.push(...p), o;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
81
|
+
function l(s, i) {
|
|
82
|
+
if (r.has(s.operator)) {
|
|
83
|
+
const o = r.get(s.operator);
|
|
84
|
+
return o && o(s.target, s.param, s.value, i) || !1;
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
function h(
|
|
89
|
-
return
|
|
88
|
+
function h(s, i) {
|
|
89
|
+
return f(s).reduce((p, d) => p && l(d, i), !0);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
91
|
+
function m(s, i) {
|
|
92
|
+
const o = Object.keys(s), c = o.includes("allOf"), p = o.includes("anyOf"), d = c || p, g = (d ? s[d ? c ? "allOf" : "anyOf" : "allOf"] : [s]).map((y) => h(y, i));
|
|
93
|
+
return c ? !g.includes(!1) : g.includes(!0);
|
|
94
94
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: m };
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
function
|
|
100
|
-
return J[e.title] = e, U[e.title] =
|
|
101
|
-
const h =
|
|
102
|
-
return Object.assign(
|
|
97
|
+
const le = {}, ce = {};
|
|
98
|
+
se();
|
|
99
|
+
function ie(n, e, a = /* @__PURE__ */ new Map(), r = (l, h, m) => h, u = {}, f = (l) => l) {
|
|
100
|
+
return J[e.title] = e, U[e.title] = r, le[e.title] = u, ce[e.title] = f, (l = {}) => {
|
|
101
|
+
const h = ae(l, e, a), m = Object.keys(n).reduce((s, i) => (s[i] = n[i].default, s), {});
|
|
102
|
+
return Object.assign(m, h);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function ue(n, e) {
|
|
106
106
|
return { customClass: e.class, customStyle: e.style };
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
["appearance",
|
|
108
|
+
const de = /* @__PURE__ */ new Map([
|
|
109
|
+
["appearance", ue]
|
|
110
110
|
]);
|
|
111
|
-
function
|
|
111
|
+
function fe(n, e, a) {
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const me = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/events-editor.schema.json", pe = "events-editor", he = "A Farris Component", we = "object", ge = {
|
|
115
115
|
id: {
|
|
116
116
|
description: "The unique identifier for events-editor",
|
|
117
117
|
type: "string"
|
|
@@ -173,23 +173,23 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
173
173
|
type: "boolean",
|
|
174
174
|
default: !0
|
|
175
175
|
}
|
|
176
|
-
},
|
|
176
|
+
}, be = [
|
|
177
177
|
"id",
|
|
178
178
|
"type"
|
|
179
|
-
],
|
|
180
|
-
$schema:
|
|
181
|
-
$id:
|
|
182
|
-
title:
|
|
183
|
-
description:
|
|
184
|
-
type:
|
|
185
|
-
properties:
|
|
186
|
-
required:
|
|
187
|
-
},
|
|
188
|
-
title:
|
|
189
|
-
description:
|
|
190
|
-
type:
|
|
191
|
-
categories:
|
|
192
|
-
},
|
|
179
|
+
], Ce = {
|
|
180
|
+
$schema: me,
|
|
181
|
+
$id: ve,
|
|
182
|
+
title: pe,
|
|
183
|
+
description: he,
|
|
184
|
+
type: we,
|
|
185
|
+
properties: ge,
|
|
186
|
+
required: be
|
|
187
|
+
}, Ee = "events-editor", Se = "A Farris Component", ye = "object", Me = {}, Be = {
|
|
188
|
+
title: Ee,
|
|
189
|
+
description: Se,
|
|
190
|
+
type: ye,
|
|
191
|
+
categories: Me
|
|
192
|
+
}, H = [
|
|
193
193
|
{
|
|
194
194
|
label: "pageChange",
|
|
195
195
|
name: "MockMock切换页码"
|
|
@@ -210,7 +210,7 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
210
210
|
label: "onDeleteClicked",
|
|
211
211
|
name: "Mock操作列点击删除"
|
|
212
212
|
}
|
|
213
|
-
],
|
|
213
|
+
], Le = {
|
|
214
214
|
propertyID: "data-grid-component-viewmodel",
|
|
215
215
|
propertyType: "events",
|
|
216
216
|
/** 内置构件显示的命令列表 */
|
|
@@ -274,7 +274,7 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
274
274
|
}
|
|
275
275
|
],
|
|
276
276
|
/** (事件设定)可绑定事件默认列表; */
|
|
277
|
-
events:
|
|
277
|
+
events: H,
|
|
278
278
|
/** 已绑定的事件(拼接已有的参数值,拼接当前事件->待集成-从dom结构中取值,事件及对应的字符串) */
|
|
279
279
|
boundEventsList: [],
|
|
280
280
|
/** 视图模型已有命令 */
|
|
@@ -292,24 +292,24 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
292
292
|
/** 初始为空,用于存储用户点击「导入新命令」的控制器值 */
|
|
293
293
|
newController: [],
|
|
294
294
|
isAddControllerMethod: !1,
|
|
295
|
-
getEventList: () => ({ events:
|
|
296
|
-
},
|
|
297
|
-
initialData: { type: Object, default:
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
295
|
+
getEventList: () => ({ events: H, boundEventsList: [] })
|
|
296
|
+
}, _ = {
|
|
297
|
+
initialData: { type: Object, default: Le }
|
|
298
|
+
}, G = ie(
|
|
299
|
+
_,
|
|
300
|
+
Ce,
|
|
301
|
+
de,
|
|
302
|
+
fe,
|
|
303
|
+
Be
|
|
304
304
|
);
|
|
305
305
|
function Y(n, e) {
|
|
306
|
-
const
|
|
307
|
-
function
|
|
306
|
+
const a = b([]), { boundEvents: r, unBoundEvent: u } = e;
|
|
307
|
+
function f(o) {
|
|
308
308
|
return {
|
|
309
309
|
/** 当前事件名称及label */
|
|
310
310
|
event: {
|
|
311
|
-
label:
|
|
312
|
-
name:
|
|
311
|
+
label: o.boundEvents.label,
|
|
312
|
+
name: o.boundEvents.name
|
|
313
313
|
},
|
|
314
314
|
/** 控制组件的展示及顺序:
|
|
315
315
|
* 0:事件下拉框
|
|
@@ -324,160 +324,160 @@ function Y(n, e) {
|
|
|
324
324
|
showSwitchNumber: 2
|
|
325
325
|
}],
|
|
326
326
|
/** 方法列表 */
|
|
327
|
-
command:
|
|
327
|
+
command: B(o.command),
|
|
328
328
|
/** 当前的控制器 */
|
|
329
|
-
controller:
|
|
329
|
+
controller: B(o.controller)
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
334
|
-
|
|
332
|
+
function l() {
|
|
333
|
+
var o;
|
|
334
|
+
a.value = (o = r.value) == null ? void 0 : o.map((c) => f(c));
|
|
335
335
|
}
|
|
336
|
-
function h(
|
|
337
|
-
const p =
|
|
338
|
-
boundEvents:
|
|
336
|
+
function h(o) {
|
|
337
|
+
const p = f({
|
|
338
|
+
boundEvents: o,
|
|
339
339
|
command: null,
|
|
340
340
|
controller: { id: "", name: "", label: "" }
|
|
341
341
|
});
|
|
342
|
-
p.showSwitch[0].showSwitchNumber = 1, p.showSwitch[0].showSection[2][3] = !0,
|
|
342
|
+
p.showSwitch[0].showSwitchNumber = 1, p.showSwitch[0].showSection[2][3] = !0, a.value.unshift(p);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
var
|
|
346
|
-
(
|
|
347
|
-
|
|
344
|
+
function m() {
|
|
345
|
+
var o;
|
|
346
|
+
(o = a.value) == null || o.forEach((c) => {
|
|
347
|
+
c.showSwitch.forEach((p) => {
|
|
348
348
|
p.showSection[2][3] = !1;
|
|
349
349
|
});
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
|
|
354
|
-
|
|
352
|
+
function s(o) {
|
|
353
|
+
a.value[o].showSwitch.forEach((c) => {
|
|
354
|
+
c.showSection[2][3] = !c.showSection[2][3];
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
if (
|
|
359
|
-
const
|
|
360
|
-
|
|
357
|
+
function i(o) {
|
|
358
|
+
if (o >= 0 && o <= a.value.length - 1) {
|
|
359
|
+
const c = a.value[o];
|
|
360
|
+
u(c.event), a.value.splice(o, 1);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
return {
|
|
364
364
|
addNewInteraction: h,
|
|
365
|
-
collapseInteractions:
|
|
366
|
-
deleteInteracton:
|
|
367
|
-
toggleMethodInInteraction:
|
|
368
|
-
interactions:
|
|
369
|
-
loadInteractions:
|
|
365
|
+
collapseInteractions: m,
|
|
366
|
+
deleteInteracton: i,
|
|
367
|
+
toggleMethodInInteraction: s,
|
|
368
|
+
interactions: a,
|
|
369
|
+
loadInteractions: l
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const e =
|
|
374
|
-
function
|
|
375
|
-
const
|
|
376
|
-
(
|
|
372
|
+
function Q(n) {
|
|
373
|
+
const e = b([]), a = b([]), r = b([]);
|
|
374
|
+
function u() {
|
|
375
|
+
const i = a.value.reduce(
|
|
376
|
+
(c, p) => (c.set(p.boundEvents.label, !0), c),
|
|
377
377
|
/* @__PURE__ */ new Map()
|
|
378
378
|
);
|
|
379
|
-
return e.value.filter((
|
|
379
|
+
return e.value.filter((c) => !i.has(c.label));
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
var
|
|
383
|
-
const
|
|
384
|
-
|
|
381
|
+
function f() {
|
|
382
|
+
var o;
|
|
383
|
+
const i = ((o = a.value) == null ? void 0 : o.length) > 0;
|
|
384
|
+
r.value = i ? u() : e.value;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
e.value = n.value.events,
|
|
386
|
+
function l() {
|
|
387
|
+
e.value = n.value.events, a.value = n.value.boundEventsList, f();
|
|
388
388
|
}
|
|
389
|
-
function h(
|
|
390
|
-
|
|
389
|
+
function h(i) {
|
|
390
|
+
r.value = r.value.filter((o) => o.label !== i.label);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
|
|
392
|
+
function m(i) {
|
|
393
|
+
a.value = a.value.filter((o) => o.boundEvents.label !== i.label), f();
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
var
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
return
|
|
395
|
+
function s() {
|
|
396
|
+
var c;
|
|
397
|
+
const i = (c = n.value) == null ? void 0 : c.getEventList(), { events: o } = i;
|
|
398
|
+
i && (n.value.events = B(o), n.value.boundEventsList = i.boundEventsList), n.value.boundEventsList && (n.value.boundEventsList = n.value.boundEventsList.filter(function(p) {
|
|
399
|
+
return o.find((d) => d.label == p.boundEvents.label);
|
|
400
400
|
}));
|
|
401
401
|
}
|
|
402
402
|
return {
|
|
403
403
|
allEvents: e,
|
|
404
|
-
boundEvents:
|
|
405
|
-
candidateEvents:
|
|
404
|
+
boundEvents: a,
|
|
405
|
+
candidateEvents: r,
|
|
406
406
|
excludeFromCandidates: h,
|
|
407
|
-
loadEvents:
|
|
408
|
-
resetBoundEvents:
|
|
409
|
-
unBoundEvent:
|
|
407
|
+
loadEvents: l,
|
|
408
|
+
resetBoundEvents: s,
|
|
409
|
+
unBoundEvent: m
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
const
|
|
412
|
+
const ke = {}, Ne = {
|
|
413
413
|
events: { type: Array, default: [] }
|
|
414
|
-
},
|
|
414
|
+
}, Ae = /* @__PURE__ */ D({
|
|
415
415
|
name: "FEventList",
|
|
416
|
-
props:
|
|
416
|
+
props: Ne,
|
|
417
417
|
emits: ["click"],
|
|
418
418
|
setup(n, e) {
|
|
419
|
-
const
|
|
420
|
-
function
|
|
421
|
-
e.emit("click",
|
|
419
|
+
const a = b(n.events);
|
|
420
|
+
function r(f) {
|
|
421
|
+
e.emit("click", f);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
423
|
+
function u(f) {
|
|
424
|
+
return t("div", {
|
|
425
425
|
class: "f-page-events-editor-first-bound-event"
|
|
426
|
-
}, [
|
|
427
|
-
onClick: () =>
|
|
426
|
+
}, [t("div", {
|
|
427
|
+
onClick: () => r(f),
|
|
428
428
|
class: "f-page-events-editor-first-bound-event-name"
|
|
429
|
-
}, [
|
|
429
|
+
}, [f.name])]);
|
|
430
430
|
}
|
|
431
|
-
return () =>
|
|
431
|
+
return () => t("div", {
|
|
432
432
|
class: "f-page-events-editor-events"
|
|
433
|
-
}, [
|
|
433
|
+
}, [a.value.map((f) => u(f))]);
|
|
434
434
|
}
|
|
435
|
-
}),
|
|
435
|
+
}), X = /* @__PURE__ */ D({
|
|
436
436
|
name: "FInteractionButton",
|
|
437
|
-
props:
|
|
437
|
+
props: ke,
|
|
438
438
|
emits: ["click"],
|
|
439
439
|
setup(n, e) {
|
|
440
|
-
const
|
|
441
|
-
candidateEvents:
|
|
442
|
-
} =
|
|
443
|
-
collapseInteractions:
|
|
444
|
-
} =
|
|
440
|
+
const a = R("useEventsComposition"), r = R("useInteractionCompostion"), {
|
|
441
|
+
candidateEvents: u
|
|
442
|
+
} = a, {
|
|
443
|
+
collapseInteractions: f
|
|
444
|
+
} = r, l = b(!1);
|
|
445
445
|
function h(p) {
|
|
446
|
-
|
|
446
|
+
u.value = u.value.filter((d) => d.label !== p.label);
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
|
|
448
|
+
function m() {
|
|
449
|
+
l.value = !1;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
451
|
+
function s() {
|
|
452
|
+
l.value = !0;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
|
|
454
|
+
function i(p) {
|
|
455
|
+
m(), h(p), e.emit("click", p);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
457
|
+
function o() {
|
|
458
|
+
l.value ? m() : s();
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
|
|
460
|
+
function c() {
|
|
461
|
+
f(), o();
|
|
462
462
|
}
|
|
463
|
-
return () =>
|
|
463
|
+
return () => t(ee, null, [t("div", {
|
|
464
464
|
class: "f-page-events-editor-top-button"
|
|
465
|
-
}, [
|
|
465
|
+
}, [t("button", {
|
|
466
466
|
class: "f-page-events-editor-button",
|
|
467
|
-
onClick:
|
|
468
|
-
}, [
|
|
467
|
+
onClick: c
|
|
468
|
+
}, [t("span", {
|
|
469
469
|
class: "f-page-events-editor-text"
|
|
470
|
-
}, [
|
|
471
|
-
events:
|
|
472
|
-
onClick:
|
|
470
|
+
}, [T("新建交互事件")])])]), l.value && t(Ae, {
|
|
471
|
+
events: u.value,
|
|
472
|
+
onClick: i
|
|
473
473
|
}, null)]);
|
|
474
474
|
}
|
|
475
|
-
}),
|
|
475
|
+
}), Pe = {
|
|
476
476
|
collapsed: { type: Boolean, default: !0 },
|
|
477
477
|
displayOrder: { type: Number, default: -1 },
|
|
478
478
|
interaction: { type: Object, default: {} },
|
|
479
479
|
controllers: { type: Array, default: [] }
|
|
480
|
-
},
|
|
480
|
+
}, Fe = {
|
|
481
481
|
/** 入参 */
|
|
482
482
|
initialData: { Type: Object, default: {} },
|
|
483
483
|
/** 原层级结构数据 */
|
|
@@ -492,327 +492,382 @@ const Me = {}, Be = {
|
|
|
492
492
|
exit: { Type: Number, default: -1 },
|
|
493
493
|
/** 接收是否显示「可选择方法」功能 */
|
|
494
494
|
haveBoundcommand: { Type: Boolean, default: !1 }
|
|
495
|
-
},
|
|
495
|
+
}, De = {
|
|
496
496
|
controllers: { type: Array, default: [] }
|
|
497
|
-
},
|
|
497
|
+
}, Te = /* @__PURE__ */ D({
|
|
498
498
|
name: "FCommandList",
|
|
499
|
-
props:
|
|
499
|
+
props: De,
|
|
500
500
|
emits: ["selectMethod"],
|
|
501
501
|
setup(n, e) {
|
|
502
|
-
const
|
|
503
|
-
function
|
|
504
|
-
return
|
|
502
|
+
const a = b(n.controllers);
|
|
503
|
+
function r(m) {
|
|
504
|
+
return m.controllerList.length !== 0;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
return
|
|
506
|
+
function u(m) {
|
|
507
|
+
return r(m) && t("div", {
|
|
508
508
|
class: "f-page-internals-controller"
|
|
509
|
-
}, [
|
|
509
|
+
}, [t("div", {
|
|
510
510
|
class: "f-page-internals-controller-name",
|
|
511
|
-
title:
|
|
512
|
-
}, [
|
|
511
|
+
title: m.controllerName.name
|
|
512
|
+
}, [m.controllerName.name])]);
|
|
513
513
|
}
|
|
514
|
-
function m
|
|
514
|
+
function f(m, s) {
|
|
515
515
|
e.emit("selectMethod", {
|
|
516
|
-
method:
|
|
517
|
-
controller:
|
|
516
|
+
method: m,
|
|
517
|
+
controller: s
|
|
518
518
|
});
|
|
519
519
|
}
|
|
520
|
-
function
|
|
521
|
-
return
|
|
520
|
+
function l(m) {
|
|
521
|
+
return m.controllerList.map((s) => t("div", {
|
|
522
522
|
class: "f-page-internals-command",
|
|
523
|
-
onClick: () =>
|
|
524
|
-
}, [
|
|
523
|
+
onClick: () => f(s, m)
|
|
524
|
+
}, [t("div", {
|
|
525
525
|
class: "f-page-internals-command-name",
|
|
526
|
-
title:
|
|
527
|
-
}, [
|
|
526
|
+
title: s.label
|
|
527
|
+
}, [s.name])]));
|
|
528
528
|
}
|
|
529
|
-
function h(
|
|
530
|
-
return
|
|
529
|
+
function h(m) {
|
|
530
|
+
return t("div", null, [u(m), l(m)]);
|
|
531
531
|
}
|
|
532
|
-
return () =>
|
|
532
|
+
return () => t("div", {
|
|
533
533
|
class: "f-page-internals"
|
|
534
|
-
}, [
|
|
534
|
+
}, [a.value.map((m) => h(m))]);
|
|
535
535
|
}
|
|
536
|
-
}),
|
|
536
|
+
}), Oe = /* @__PURE__ */ D({
|
|
537
537
|
name: "FCommandSource",
|
|
538
|
-
props:
|
|
538
|
+
props: Fe,
|
|
539
539
|
emits: ["addInternalCommandListChanged", "newImportChanged", "currentCommandChanged", "originalDataChanged", "click", "existChanged", "newFucChanged", "close", "selectMethod"],
|
|
540
540
|
setup(n, e) {
|
|
541
|
-
const
|
|
542
|
-
controllers:
|
|
543
|
-
} =
|
|
541
|
+
const a = R("useMethodsComposition"), {
|
|
542
|
+
controllers: r
|
|
543
|
+
} = a, u = b(!1), f = b(n.canAddNewMethod), l = F(() => !f.value), h = F(() => u.value), m = F(() => ({
|
|
544
544
|
"font-size": "15px",
|
|
545
545
|
margin: "5px",
|
|
546
546
|
color: "#226eff",
|
|
547
547
|
flex: 1
|
|
548
|
-
})),
|
|
549
|
-
function
|
|
550
|
-
return
|
|
551
|
-
injectSymbolToken:
|
|
548
|
+
})), s = Symbol("controller schema repository inject token");
|
|
549
|
+
function i() {
|
|
550
|
+
return t(ne, {
|
|
551
|
+
injectSymbolToken: s,
|
|
552
552
|
"view-type": "NavList"
|
|
553
553
|
}, null);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
555
|
+
function o() {
|
|
556
|
+
te.show({
|
|
557
557
|
title: "选择控制器",
|
|
558
558
|
width: 950,
|
|
559
|
-
render:
|
|
559
|
+
render: i
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function c() {
|
|
563
563
|
}
|
|
564
564
|
function p() {
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function d() {
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function E() {
|
|
569
569
|
e.emit("close", null);
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
571
|
+
function L() {
|
|
572
|
+
return t("div", {
|
|
573
573
|
class: "f-command-breakline"
|
|
574
|
-
}, [
|
|
574
|
+
}, [T("------------------------------------------------------------")]);
|
|
575
575
|
}
|
|
576
576
|
function g() {
|
|
577
|
-
return
|
|
577
|
+
return t("div", {
|
|
578
578
|
class: "f-page-internals-new-command"
|
|
579
|
-
}, [
|
|
579
|
+
}, [t("div", {
|
|
580
580
|
class: "f-page-internals-new-command-func1"
|
|
581
|
-
}, [
|
|
581
|
+
}, [t("div", {
|
|
582
582
|
class: "f-icon f-icon-panel-retraction",
|
|
583
|
-
style:
|
|
584
|
-
}, null),
|
|
583
|
+
style: m.value
|
|
584
|
+
}, null), t("div", {
|
|
585
585
|
class: "f-function-class",
|
|
586
|
-
onClick: () =>
|
|
587
|
-
}, [
|
|
586
|
+
onClick: () => o()
|
|
587
|
+
}, [T("引入控制器")])]), l.value && t("div", {
|
|
588
588
|
class: "f-page-internals-new-command-func2"
|
|
589
|
-
}, [
|
|
589
|
+
}, [t("div", {
|
|
590
590
|
class: "f-icon f-icon-new-edit",
|
|
591
|
-
style:
|
|
592
|
-
}, null),
|
|
591
|
+
style: m.value
|
|
592
|
+
}, null), t("div", {
|
|
593
593
|
class: "f-function-class",
|
|
594
594
|
onClick: () => void 0
|
|
595
|
-
}, [
|
|
595
|
+
}, [T("添加新方法")])]), h.value && void 0, t("div", {
|
|
596
596
|
class: "f-page-internals-new-command-func3"
|
|
597
|
-
}, [
|
|
597
|
+
}, [t("div", {
|
|
598
598
|
class: "f-icon f-icon-licensed",
|
|
599
|
-
style:
|
|
600
|
-
}, null),
|
|
599
|
+
style: m.value
|
|
600
|
+
}, null), t("div", {
|
|
601
601
|
class: "f-function-class",
|
|
602
602
|
onClick: () => void 0
|
|
603
|
-
}, [
|
|
603
|
+
}, [T("已有方法")])])]);
|
|
604
604
|
}
|
|
605
|
-
function v
|
|
606
|
-
e.emit("selectMethod",
|
|
605
|
+
function S(v) {
|
|
606
|
+
e.emit("selectMethod", v);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
608
|
+
function y() {
|
|
609
|
+
return t("div", {
|
|
610
610
|
class: "f-page-command-source-choice"
|
|
611
|
-
}, [
|
|
612
|
-
controllers:
|
|
613
|
-
onSelectMethod:
|
|
611
|
+
}, [t(Te, {
|
|
612
|
+
controllers: r.value,
|
|
613
|
+
onSelectMethod: S
|
|
614
614
|
}, null)]);
|
|
615
615
|
}
|
|
616
|
-
return () =>
|
|
616
|
+
return () => t("div", {
|
|
617
617
|
class: "f-page-events-editor-command-source"
|
|
618
|
-
}, [
|
|
618
|
+
}, [y(), L(), g(), L(), t("div", null, [t("div", {
|
|
619
619
|
class: "f-page-internals-close",
|
|
620
|
-
onClick:
|
|
621
|
-
}, [
|
|
620
|
+
onClick: E
|
|
621
|
+
}, [T("取消")])])]);
|
|
622
622
|
}
|
|
623
|
-
}),
|
|
623
|
+
}), je = {
|
|
624
624
|
command: { type: Object, default: {} }
|
|
625
|
-
},
|
|
625
|
+
}, Re = /* @__PURE__ */ D({
|
|
626
626
|
name: "FParameterEditor",
|
|
627
|
-
props:
|
|
628
|
-
emits: [],
|
|
627
|
+
props: je,
|
|
628
|
+
emits: ["confirm", "change"],
|
|
629
629
|
setup(n, e) {
|
|
630
|
-
const
|
|
631
|
-
|
|
632
|
-
const
|
|
633
|
-
function
|
|
630
|
+
const a = b(n.command), r = b(0), u = b(!1), f = b(!1);
|
|
631
|
+
b(""), b([]);
|
|
632
|
+
const l = F(() => a.value !== null), h = F(() => u.value), m = F(() => f.value), s = F(() => !u.value && !f.value), i = b(!1);
|
|
633
|
+
function o() {
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
635
|
+
function c() {
|
|
636
|
+
return t("div", null, [t("div", {
|
|
637
637
|
title: "'方法已被移除,请重新绑定'",
|
|
638
638
|
class: "f-icon f-icon-flowline-warning",
|
|
639
639
|
style: "font-size: 13px;margin-right:10px; color: red;width: 30px;height: 20px;text-align: center;",
|
|
640
640
|
onClick: () => void 0
|
|
641
641
|
}, null)]);
|
|
642
642
|
}
|
|
643
|
-
function l() {
|
|
644
|
-
}
|
|
645
643
|
function p() {
|
|
646
|
-
|
|
644
|
+
}
|
|
645
|
+
function d() {
|
|
646
|
+
return t("div", null, [t("div", {
|
|
647
647
|
title: "'方法已被删除,请绑定其他方法'",
|
|
648
648
|
class: "f-icon f-icon-flowline-warning",
|
|
649
649
|
style: "font-size: 13px;margin-right:10px; color: red;width: 30px;height: 20px;text-align: center;",
|
|
650
650
|
onClick: () => void 0
|
|
651
651
|
}, null)]);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function E(M) {
|
|
654
|
+
i.value = !i.value;
|
|
654
655
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
656
|
+
function L() {
|
|
657
|
+
return t("div", null, [t("div", {
|
|
657
658
|
class: "f-icon f-icon-edit-button",
|
|
658
659
|
style: "font-size: 13px;margin-right:10px;",
|
|
659
|
-
onClick: () => (
|
|
660
|
+
onClick: () => E(r.value)
|
|
660
661
|
}, null)]);
|
|
661
662
|
}
|
|
662
|
-
function
|
|
663
|
-
|
|
663
|
+
function g(M, A) {
|
|
664
|
+
A.value = M.target.value;
|
|
665
|
+
}
|
|
666
|
+
function S() {
|
|
667
|
+
e.emit("change", a.value);
|
|
668
|
+
}
|
|
669
|
+
function y(M) {
|
|
670
|
+
return t("div", null, [t("input", {
|
|
671
|
+
class: "form-control f-utils-fill text-left",
|
|
672
|
+
value: M.value,
|
|
673
|
+
onChange: (A) => g(A, M),
|
|
674
|
+
onBlur: (A) => S()
|
|
675
|
+
}, null)]);
|
|
676
|
+
}
|
|
677
|
+
function v() {
|
|
678
|
+
var M;
|
|
679
|
+
return (M = a.value.property) == null ? void 0 : M.map((A) => t("div", null, [t("div", {
|
|
680
|
+
class: "f-page-parameter-editor-row1"
|
|
681
|
+
}, [t("div", {
|
|
682
|
+
class: "f-page-parameter-editor-parameter-name"
|
|
683
|
+
}, [A.shownName, A.description && t("div", {
|
|
684
|
+
class: "farris-label-tips"
|
|
685
|
+
}, [t("i", {
|
|
686
|
+
class: "f-icon f-icon-message_help",
|
|
687
|
+
style: "color:#878D99;"
|
|
688
|
+
}, null)])])]), t("div", {
|
|
689
|
+
class: "f-page-parameter-editor-row2"
|
|
690
|
+
}, [y(A)])]));
|
|
691
|
+
}
|
|
692
|
+
function C(M) {
|
|
693
|
+
i.value = !1, e.emit("confirm");
|
|
694
|
+
}
|
|
695
|
+
function w() {
|
|
696
|
+
return t("div", null, [t("div", {
|
|
697
|
+
class: "f-page-parameter-editor-btn"
|
|
698
|
+
}, [t("div", {
|
|
699
|
+
class: "btn-finish",
|
|
700
|
+
onClick: () => C(r.value)
|
|
701
|
+
}, [T("完成")])])]);
|
|
702
|
+
}
|
|
703
|
+
function k() {
|
|
704
|
+
return t("div", {
|
|
705
|
+
class: "f-page-parameter-editor-group"
|
|
706
|
+
}, [v()]);
|
|
707
|
+
}
|
|
708
|
+
function N() {
|
|
709
|
+
return t("div", null, [t("div", {
|
|
664
710
|
class: "f-page-parameter-editor-first-row"
|
|
665
|
-
}, [
|
|
711
|
+
}, [t("span", {
|
|
666
712
|
class: "f-page-parameter-editor-command-name",
|
|
667
|
-
title:
|
|
668
|
-
}, [
|
|
713
|
+
title: a.value.label
|
|
714
|
+
}, [a.value.name]), t("div", {
|
|
669
715
|
class: "f-page-parameter-editor-first-row-icon"
|
|
670
|
-
}, [h.value &&
|
|
716
|
+
}, [h.value && c(), m.value && d(), s.value && L()])]), i.value && k(), i.value && w()]);
|
|
671
717
|
}
|
|
672
|
-
return () =>
|
|
718
|
+
return () => t("div", {
|
|
673
719
|
class: "f-page-parameter-editor"
|
|
674
|
-
}, [
|
|
720
|
+
}, [l.value && N()]);
|
|
675
721
|
}
|
|
676
|
-
}),
|
|
722
|
+
}), Z = /* @__PURE__ */ D({
|
|
677
723
|
name: "FInteractionItem",
|
|
678
|
-
props:
|
|
724
|
+
props: Pe,
|
|
679
725
|
emits: ["addAction", "delete", "toggle"],
|
|
680
726
|
setup(n, e) {
|
|
681
|
-
const
|
|
682
|
-
toggleSelectingMethod:
|
|
683
|
-
emitFinalState:
|
|
684
|
-
} =
|
|
685
|
-
const v =
|
|
727
|
+
const a = R("useMethodsComposition"), {
|
|
728
|
+
toggleSelectingMethod: r,
|
|
729
|
+
emitFinalState: u
|
|
730
|
+
} = a, f = b(n.controllers), l = b(n.interaction), h = b(n.displayOrder), m = F(() => {
|
|
731
|
+
const v = l.value.showSwitch[0];
|
|
686
732
|
return v.showSection[v.showSwitchNumber][2];
|
|
687
|
-
}),
|
|
688
|
-
const v = !!
|
|
689
|
-
return v &&
|
|
690
|
-
}),
|
|
733
|
+
}), s = F(() => {
|
|
734
|
+
const v = !!l.value.command, C = l.value.showSwitch[0], w = C.showSection[C.showSwitchNumber][3];
|
|
735
|
+
return v && w;
|
|
736
|
+
}), i = F(() => ({
|
|
691
737
|
"f-icon": !0,
|
|
692
|
-
"f-icon-arrow-chevron-down":
|
|
693
|
-
"f-icon-arrow-chevron-left": !
|
|
738
|
+
"f-icon-arrow-chevron-down": s.value,
|
|
739
|
+
"f-icon-arrow-chevron-left": !s.value
|
|
694
740
|
}));
|
|
695
|
-
function
|
|
741
|
+
function o() {
|
|
696
742
|
e.emit("delete", h.value);
|
|
697
743
|
}
|
|
698
|
-
function
|
|
699
|
-
const v =
|
|
744
|
+
function c() {
|
|
745
|
+
const v = l.value.showSwitch[0];
|
|
700
746
|
v.showSection[v.showSwitchNumber][3] = !v.showSection[v.showSwitchNumber][3], e.emit("toggle", h.value);
|
|
701
747
|
}
|
|
702
748
|
function p() {
|
|
703
|
-
if (
|
|
704
|
-
const
|
|
705
|
-
|
|
749
|
+
if (l.value.command !== null) {
|
|
750
|
+
const C = l.value.showSwitch[0];
|
|
751
|
+
r(C), e.emit("addAction", h.value);
|
|
706
752
|
}
|
|
707
753
|
}
|
|
708
|
-
function
|
|
709
|
-
v === null &&
|
|
710
|
-
const
|
|
711
|
-
|
|
754
|
+
function d(v) {
|
|
755
|
+
v === null && l.value.command === null && e.emit("delete", h.value);
|
|
756
|
+
const C = l.value.showSwitch[0];
|
|
757
|
+
r(C);
|
|
712
758
|
}
|
|
713
|
-
function
|
|
759
|
+
function E(v) {
|
|
714
760
|
const {
|
|
715
|
-
method:
|
|
716
|
-
controller:
|
|
761
|
+
method: C,
|
|
762
|
+
controller: w
|
|
717
763
|
} = v, {
|
|
718
764
|
id: k,
|
|
719
|
-
label:
|
|
720
|
-
name:
|
|
721
|
-
handlerName:
|
|
722
|
-
} =
|
|
723
|
-
controllerName:
|
|
724
|
-
} =
|
|
725
|
-
|
|
765
|
+
label: N,
|
|
766
|
+
name: M,
|
|
767
|
+
handlerName: A
|
|
768
|
+
} = C, {
|
|
769
|
+
controllerName: P
|
|
770
|
+
} = w, I = !1, K = P.id;
|
|
771
|
+
l.value.command = {
|
|
726
772
|
id: k,
|
|
727
|
-
label:
|
|
728
|
-
name:
|
|
729
|
-
handlerName:
|
|
730
|
-
hasPath:
|
|
731
|
-
cmpId:
|
|
732
|
-
},
|
|
733
|
-
id:
|
|
734
|
-
label:
|
|
735
|
-
name:
|
|
773
|
+
label: N,
|
|
774
|
+
name: M,
|
|
775
|
+
handlerName: A,
|
|
776
|
+
hasPath: I,
|
|
777
|
+
cmpId: K
|
|
778
|
+
}, l.value.controller = {
|
|
779
|
+
id: P.id,
|
|
780
|
+
label: P.label,
|
|
781
|
+
name: P.name
|
|
736
782
|
};
|
|
737
|
-
const
|
|
738
|
-
|
|
783
|
+
const j = l.value.showSwitch[0];
|
|
784
|
+
j.showSwitchNumber = 2, j.showSection[j.showSwitchNumber][2] = !1, j.showSection[j.showSwitchNumber][3] = !0, u();
|
|
739
785
|
}
|
|
740
|
-
function
|
|
741
|
-
return
|
|
742
|
-
controllers:
|
|
743
|
-
onClose:
|
|
744
|
-
onSelectMethod:
|
|
786
|
+
function L() {
|
|
787
|
+
return t(Oe, {
|
|
788
|
+
controllers: f.value,
|
|
789
|
+
onClose: d,
|
|
790
|
+
onSelectMethod: E
|
|
745
791
|
}, null);
|
|
746
792
|
}
|
|
747
793
|
function g() {
|
|
748
|
-
|
|
749
|
-
|
|
794
|
+
const v = l.value.showSwitch[0];
|
|
795
|
+
v.showSection[v.showSwitchNumber][3] = !1;
|
|
796
|
+
}
|
|
797
|
+
function S(v) {
|
|
798
|
+
l.value.command = B(v), u();
|
|
799
|
+
}
|
|
800
|
+
function y() {
|
|
801
|
+
return t(Re, {
|
|
802
|
+
command: l.value.command,
|
|
803
|
+
onConfirm: () => g(),
|
|
804
|
+
onChange: (v) => S(v)
|
|
750
805
|
}, null);
|
|
751
806
|
}
|
|
752
|
-
return () =>
|
|
807
|
+
return () => t("div", {
|
|
753
808
|
class: "show-switch"
|
|
754
|
-
}, [
|
|
809
|
+
}, [t("div", {
|
|
755
810
|
class: "f-page-events-editor-bound-event"
|
|
756
|
-
}, [
|
|
811
|
+
}, [t("div", {
|
|
757
812
|
class: "f-page-events-editor-bound-event-name",
|
|
758
|
-
title:
|
|
759
|
-
}, [
|
|
813
|
+
title: l.value.event.label
|
|
814
|
+
}, [l.value.event.name]), t("div", {
|
|
760
815
|
style: "float:right;margin:5px;"
|
|
761
|
-
}, [
|
|
762
|
-
class:
|
|
816
|
+
}, [t("div", {
|
|
817
|
+
class: i.value,
|
|
763
818
|
style: "font-size: 10px;",
|
|
764
|
-
onClick:
|
|
765
|
-
}, null)]),
|
|
819
|
+
onClick: c
|
|
820
|
+
}, null)]), t("div", {
|
|
766
821
|
class: "f-icon f-icon-yxs_delete",
|
|
767
822
|
style: "font-size: 13px;float: right; margin:8px;",
|
|
768
|
-
onClick:
|
|
769
|
-
}, null),
|
|
823
|
+
onClick: o
|
|
824
|
+
}, null), t("div", {
|
|
770
825
|
class: "f-icon f-icon-home-add",
|
|
771
826
|
style: "float:right; font-size: 10px; margin:8px;",
|
|
772
827
|
onClick: p
|
|
773
|
-
}, null)]),
|
|
828
|
+
}, null)]), m.value && L(), s.value && y()]);
|
|
774
829
|
}
|
|
775
830
|
});
|
|
776
|
-
function
|
|
777
|
-
const { interactions:
|
|
778
|
-
function
|
|
779
|
-
|
|
831
|
+
function x(n, e, a) {
|
|
832
|
+
const { interactions: r } = e, u = b(n.value.internalCommandList);
|
|
833
|
+
function f(d) {
|
|
834
|
+
r.value[d].showSwitch = [], r.value[d].showSwitch.push(B({
|
|
780
835
|
// 存储所有的展示设定
|
|
781
836
|
showSection: [[!1, !1, !1, !1, !1], [!1, !1, !0, !1, !1], [!1, !0, !1, !0, !1]],
|
|
782
837
|
// 展示哪个部分
|
|
783
838
|
showSwitchNumber: 2
|
|
784
|
-
})),
|
|
839
|
+
})), r.value = B(r.value);
|
|
785
840
|
}
|
|
786
|
-
function
|
|
841
|
+
function l(d, E, L) {
|
|
787
842
|
}
|
|
788
|
-
function h(
|
|
789
|
-
var
|
|
790
|
-
const
|
|
791
|
-
return (
|
|
792
|
-
|
|
793
|
-
g.Code ===
|
|
843
|
+
function h(d) {
|
|
844
|
+
var L;
|
|
845
|
+
const E = [];
|
|
846
|
+
return (L = n.value.newController) == null || L.forEach((g) => {
|
|
847
|
+
d.forEach((S) => {
|
|
848
|
+
g.Code === S.controller.label && E.push(B(g));
|
|
794
849
|
});
|
|
795
|
-
}),
|
|
850
|
+
}), E;
|
|
796
851
|
}
|
|
797
|
-
function
|
|
798
|
-
var
|
|
852
|
+
function m() {
|
|
853
|
+
var S;
|
|
799
854
|
n.value.isAddControllerMethod = !!n.value.newFuncEvents;
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
|
|
855
|
+
const d = [], E = B(n.value.internalCommandList);
|
|
856
|
+
r.value.map((y) => {
|
|
857
|
+
const v = B(y.controller), C = B(y.command), w = B(y.event), k = { controller: v, command: C, boundEvents: w };
|
|
858
|
+
d.push(B(k));
|
|
804
859
|
});
|
|
805
|
-
const
|
|
860
|
+
const L = (S = n.value.newController) != null && S.length && d.length ? B(h(d)) : [], g = {
|
|
806
861
|
/** 拼接名称时的前缀 */
|
|
807
862
|
viewModelId: n.value.viewModelId,
|
|
808
863
|
/** 视图模型绑定的事件下的方法列表 */
|
|
809
|
-
savedCommand:
|
|
864
|
+
savedCommand: B(n.value.viewModel),
|
|
810
865
|
/** 当前界面显示的绑定事件 */
|
|
811
|
-
boundEventsList:
|
|
866
|
+
boundEventsList: B(d),
|
|
812
867
|
/** 可选择的绑定事件列表 */
|
|
813
|
-
events:
|
|
868
|
+
events: B(n.value.events),
|
|
814
869
|
/** 内置构件列表; */
|
|
815
|
-
internalCommandList:
|
|
870
|
+
internalCommandList: B(E),
|
|
816
871
|
/** 所有可选的组件 */
|
|
817
872
|
componentLists: [],
|
|
818
873
|
/** 接收formBasicService.formMetaBasicInfo.relativePath */
|
|
@@ -820,7 +875,7 @@ function X(n, e, s) {
|
|
|
820
875
|
/** 接收formBasicService.envType */
|
|
821
876
|
envType: n.value.envType,
|
|
822
877
|
/** 初始为空,用于存储用户点击「导入新方法」的控制器值 */
|
|
823
|
-
newController:
|
|
878
|
+
newController: B(L),
|
|
824
879
|
/** 切换到代码视图标识 */
|
|
825
880
|
isAddControllerMethod: n.value.isAddControllerMethod,
|
|
826
881
|
/** 用户选择「已有方法」 */
|
|
@@ -828,234 +883,234 @@ function X(n, e, s) {
|
|
|
828
883
|
/** 上一个绑定的方法 */
|
|
829
884
|
preCommand: n.value.preCommand,
|
|
830
885
|
/** 新增方法的对应事件 */
|
|
831
|
-
newFuncEvents:
|
|
886
|
+
newFuncEvents: B(n.value.newFuncEvents)
|
|
832
887
|
};
|
|
833
|
-
|
|
888
|
+
a.emit("savedCommandListChanged", g);
|
|
834
889
|
}
|
|
835
|
-
function
|
|
836
|
-
|
|
890
|
+
function s(d) {
|
|
891
|
+
d.showSection[d.showSwitchNumber][2] = !0;
|
|
837
892
|
}
|
|
838
|
-
function d
|
|
839
|
-
|
|
893
|
+
function i(d) {
|
|
894
|
+
d.showSection[d.showSwitchNumber][2] = !1;
|
|
840
895
|
}
|
|
841
|
-
function
|
|
842
|
-
|
|
896
|
+
function o(d) {
|
|
897
|
+
d.showSection[d.showSwitchNumber][3] = !0;
|
|
843
898
|
}
|
|
844
|
-
function
|
|
845
|
-
|
|
899
|
+
function c(d) {
|
|
900
|
+
d.showSection[d.showSwitchNumber][3] = !1;
|
|
846
901
|
}
|
|
847
|
-
function p(
|
|
848
|
-
|
|
902
|
+
function p(d) {
|
|
903
|
+
d.showSection[d.showSwitchNumber][2] ? (i(d), o(d)) : (s(d), c(d));
|
|
849
904
|
}
|
|
850
905
|
return {
|
|
851
|
-
controllers:
|
|
852
|
-
onClosed:
|
|
853
|
-
emitFinalState:
|
|
854
|
-
onCurrentCommandChanged:
|
|
906
|
+
controllers: u,
|
|
907
|
+
onClosed: f,
|
|
908
|
+
emitFinalState: m,
|
|
909
|
+
onCurrentCommandChanged: l,
|
|
855
910
|
toggleSelectingMethod: p
|
|
856
911
|
};
|
|
857
912
|
}
|
|
858
|
-
const V = /* @__PURE__ */
|
|
913
|
+
const V = /* @__PURE__ */ D({
|
|
859
914
|
name: "FEventsEditor",
|
|
860
|
-
props:
|
|
915
|
+
props: _,
|
|
861
916
|
emits: ["savedCommandListChanged"],
|
|
862
917
|
setup(n, e) {
|
|
863
|
-
const
|
|
864
|
-
loadEvents:
|
|
865
|
-
resetBoundEvents:
|
|
866
|
-
} =
|
|
918
|
+
const a = b(n.initialData), r = Q(a), {
|
|
919
|
+
loadEvents: u,
|
|
920
|
+
resetBoundEvents: f
|
|
921
|
+
} = r, l = Y(a, r), {
|
|
867
922
|
addNewInteraction: h,
|
|
868
|
-
deleteInteracton:
|
|
869
|
-
interactions:
|
|
870
|
-
loadInteractions:
|
|
871
|
-
} =
|
|
872
|
-
|
|
873
|
-
function
|
|
874
|
-
|
|
923
|
+
deleteInteracton: m,
|
|
924
|
+
interactions: s,
|
|
925
|
+
loadInteractions: i
|
|
926
|
+
} = l, o = x(a, l, e);
|
|
927
|
+
O("useEventsComposition", r), O("useInteractionCompostion", l), O("useMethodsComposition", o);
|
|
928
|
+
function c() {
|
|
929
|
+
a.value.isAddControllerMethod = !1;
|
|
875
930
|
}
|
|
876
931
|
W(() => {
|
|
877
|
-
|
|
932
|
+
c(), f(), u(), i();
|
|
878
933
|
});
|
|
879
934
|
function p(g) {
|
|
880
|
-
|
|
935
|
+
m(g);
|
|
881
936
|
}
|
|
882
|
-
function
|
|
883
|
-
const
|
|
884
|
-
return
|
|
937
|
+
function d(g, S) {
|
|
938
|
+
const y = g.showSwitch[0], v = y.showSection[y.showSwitchNumber][3];
|
|
939
|
+
return t(Z, {
|
|
885
940
|
interaction: g,
|
|
886
|
-
displayOrder:
|
|
887
|
-
collapsed:
|
|
941
|
+
displayOrder: S,
|
|
942
|
+
collapsed: v,
|
|
888
943
|
onDelete: p
|
|
889
944
|
}, null);
|
|
890
945
|
}
|
|
891
|
-
function
|
|
946
|
+
function E() {
|
|
892
947
|
var g;
|
|
893
|
-
return (g =
|
|
948
|
+
return (g = s.value) == null ? void 0 : g.map((S, y) => t("div", {
|
|
894
949
|
class: "events-display-order",
|
|
895
|
-
key:
|
|
896
|
-
}, [
|
|
950
|
+
key: S.event.label
|
|
951
|
+
}, [d(S, y)]));
|
|
897
952
|
}
|
|
898
|
-
function
|
|
953
|
+
function L(g) {
|
|
899
954
|
h(g);
|
|
900
955
|
}
|
|
901
|
-
return () =>
|
|
956
|
+
return () => t("div", {
|
|
902
957
|
class: "f-page-events-editor"
|
|
903
|
-
}, [
|
|
958
|
+
}, [t("div", {
|
|
904
959
|
class: "f-page-events-editor-content"
|
|
905
|
-
}, [
|
|
906
|
-
onClick:
|
|
907
|
-
}, null),
|
|
960
|
+
}, [t(X, {
|
|
961
|
+
onClick: L
|
|
962
|
+
}, null), E()])]);
|
|
908
963
|
}
|
|
909
964
|
});
|
|
910
|
-
function
|
|
911
|
-
var
|
|
912
|
-
function
|
|
965
|
+
function Ie(n, e, a) {
|
|
966
|
+
var C;
|
|
967
|
+
function r() {
|
|
913
968
|
}
|
|
914
|
-
const
|
|
969
|
+
const u = "", f = "", l = b();
|
|
915
970
|
function h() {
|
|
916
971
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
917
972
|
}
|
|
918
|
-
function
|
|
973
|
+
function m() {
|
|
919
974
|
return !1;
|
|
920
975
|
}
|
|
921
|
-
function
|
|
976
|
+
function s() {
|
|
922
977
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
923
978
|
}
|
|
924
|
-
function
|
|
979
|
+
function i() {
|
|
925
980
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
926
981
|
}
|
|
927
|
-
function
|
|
982
|
+
function o(w) {
|
|
928
983
|
if (!w || !w.value)
|
|
929
984
|
return null;
|
|
930
985
|
if (w.value.schema && w.value.schema.type === "component")
|
|
931
986
|
return w.value;
|
|
932
|
-
const
|
|
933
|
-
return
|
|
987
|
+
const k = b(w == null ? void 0 : w.value.parent), N = o(k);
|
|
988
|
+
return N || null;
|
|
934
989
|
}
|
|
935
|
-
function
|
|
936
|
-
const { componentInstance:
|
|
937
|
-
return !
|
|
990
|
+
function c(w = e) {
|
|
991
|
+
const { componentInstance: k, designerItemElementRef: N } = w;
|
|
992
|
+
return !k || !k.value ? null : k.value.canMove ? N : c(w.parent);
|
|
938
993
|
}
|
|
939
994
|
function p(w) {
|
|
940
|
-
return !!
|
|
995
|
+
return !!a;
|
|
941
996
|
}
|
|
942
|
-
function
|
|
997
|
+
function d() {
|
|
943
998
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
944
999
|
}
|
|
945
|
-
function
|
|
1000
|
+
function E() {
|
|
946
1001
|
}
|
|
947
|
-
function
|
|
1002
|
+
function L(w, k) {
|
|
948
1003
|
}
|
|
949
|
-
function g(w) {
|
|
950
|
-
const { componentType:
|
|
951
|
-
let
|
|
952
|
-
const A =
|
|
953
|
-
return
|
|
1004
|
+
function g(w, k) {
|
|
1005
|
+
const { componentType: N } = w;
|
|
1006
|
+
let M = $(N, w, k);
|
|
1007
|
+
const A = N.toLowerCase().replace("-", "_");
|
|
1008
|
+
return M && !M.id && M.type === N && (M.id = `${A}_${Math.random().toString().slice(2, 6)}`), M;
|
|
954
1009
|
}
|
|
955
|
-
function
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
let P =
|
|
959
|
-
const
|
|
960
|
-
return P && !P.id && P.type ===
|
|
1010
|
+
function S(w, k) {
|
|
1011
|
+
const N = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
|
|
1012
|
+
A.parentComponentInstance = l.value;
|
|
1013
|
+
let P = $(N, A);
|
|
1014
|
+
const I = N.toLowerCase().replace("-", "_");
|
|
1015
|
+
return P && !P.id && P.type === N && (P.id = `${I}_${Math.random().toString().slice(2, 6)}`), P;
|
|
961
1016
|
}
|
|
962
|
-
function
|
|
1017
|
+
function y(w) {
|
|
963
1018
|
}
|
|
964
|
-
function
|
|
1019
|
+
function v(...w) {
|
|
965
1020
|
}
|
|
966
|
-
return
|
|
1021
|
+
return l.value = {
|
|
967
1022
|
canMove: h(),
|
|
968
|
-
canSelectParent:
|
|
969
|
-
canDelete:
|
|
970
|
-
canNested: !
|
|
1023
|
+
canSelectParent: m(),
|
|
1024
|
+
canDelete: s(),
|
|
1025
|
+
canNested: !i(),
|
|
971
1026
|
contents: e == null ? void 0 : e.schema.contents,
|
|
972
1027
|
elementRef: n,
|
|
973
|
-
parent: (
|
|
1028
|
+
parent: (C = e == null ? void 0 : e.parent) == null ? void 0 : C.componentInstance,
|
|
974
1029
|
schema: e == null ? void 0 : e.schema,
|
|
975
|
-
styles:
|
|
976
|
-
designerClass:
|
|
1030
|
+
styles: u,
|
|
1031
|
+
designerClass: f,
|
|
977
1032
|
canAccepts: p,
|
|
978
|
-
getBelongedComponentInstance:
|
|
979
|
-
getDraggableDesignItemElement:
|
|
980
|
-
getDraggingDisplayText:
|
|
981
|
-
getPropConfig:
|
|
982
|
-
getDragScopeElement:
|
|
983
|
-
onAcceptMovedChildElement:
|
|
984
|
-
onAcceptNewChildElement:
|
|
985
|
-
onChildElementMovedOut:
|
|
1033
|
+
getBelongedComponentInstance: o,
|
|
1034
|
+
getDraggableDesignItemElement: c,
|
|
1035
|
+
getDraggingDisplayText: d,
|
|
1036
|
+
getPropConfig: v,
|
|
1037
|
+
getDragScopeElement: E,
|
|
1038
|
+
onAcceptMovedChildElement: L,
|
|
1039
|
+
onAcceptNewChildElement: S,
|
|
1040
|
+
onChildElementMovedOut: y,
|
|
986
1041
|
addNewChildComponentSchema: g,
|
|
987
|
-
updateDragAndDropRules:
|
|
988
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
989
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
990
|
-
},
|
|
1042
|
+
updateDragAndDropRules: r,
|
|
1043
|
+
triggerBelongedComponentToMoveWhenMoved: b(!1),
|
|
1044
|
+
triggerBelongedComponentToDeleteWhenDeleted: b(!1)
|
|
1045
|
+
}, l;
|
|
991
1046
|
}
|
|
992
|
-
const
|
|
1047
|
+
const Ve = /* @__PURE__ */ D({
|
|
993
1048
|
name: "FEventsEditorDesign",
|
|
994
|
-
props:
|
|
1049
|
+
props: _,
|
|
995
1050
|
emits: ["savedCommandListChanged"],
|
|
996
1051
|
setup(n, e) {
|
|
997
|
-
const
|
|
998
|
-
loadEvents:
|
|
999
|
-
resetBoundEvents:
|
|
1000
|
-
} =
|
|
1052
|
+
const a = b(n.initialData), r = Q(a), {
|
|
1053
|
+
loadEvents: u,
|
|
1054
|
+
resetBoundEvents: f
|
|
1055
|
+
} = r, l = Y(a, r), {
|
|
1001
1056
|
addNewInteraction: h,
|
|
1002
|
-
deleteInteracton:
|
|
1003
|
-
interactions:
|
|
1004
|
-
loadInteractions:
|
|
1005
|
-
} =
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1057
|
+
deleteInteracton: m,
|
|
1058
|
+
interactions: s,
|
|
1059
|
+
loadInteractions: i
|
|
1060
|
+
} = l, o = x(a, l, e);
|
|
1061
|
+
O("useEventsComposition", r), O("useInteractionCompostion", l), O("useMethodsComposition", o);
|
|
1062
|
+
const c = b(), p = R("design-item-context"), d = Ie(c, p);
|
|
1008
1063
|
W(() => {
|
|
1009
|
-
|
|
1010
|
-
}), e.expose(
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1064
|
+
c.value.componentInstance = d, E(), f(), u(), i();
|
|
1065
|
+
}), e.expose(d.value);
|
|
1066
|
+
function E() {
|
|
1067
|
+
a.value.isAddControllerMethod = !1;
|
|
1013
1068
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1069
|
+
function L(v) {
|
|
1070
|
+
m(v);
|
|
1016
1071
|
}
|
|
1017
|
-
function g(
|
|
1018
|
-
const w =
|
|
1019
|
-
return
|
|
1020
|
-
interaction:
|
|
1021
|
-
displayOrder:
|
|
1022
|
-
collapsed:
|
|
1023
|
-
onDelete:
|
|
1072
|
+
function g(v, C) {
|
|
1073
|
+
const w = v.showSwitch[0], k = w.showSection[w.showSwitchNumber][3];
|
|
1074
|
+
return t(Z, {
|
|
1075
|
+
interaction: v,
|
|
1076
|
+
displayOrder: C,
|
|
1077
|
+
collapsed: k,
|
|
1078
|
+
onDelete: L
|
|
1024
1079
|
}, null);
|
|
1025
1080
|
}
|
|
1026
|
-
function
|
|
1027
|
-
var
|
|
1028
|
-
return (
|
|
1081
|
+
function S() {
|
|
1082
|
+
var v;
|
|
1083
|
+
return (v = s.value) == null ? void 0 : v.map((C, w) => t("div", {
|
|
1029
1084
|
class: "events-display-order",
|
|
1030
|
-
key:
|
|
1031
|
-
}, [g(
|
|
1085
|
+
key: C.event.label
|
|
1086
|
+
}, [g(C, w)]));
|
|
1032
1087
|
}
|
|
1033
|
-
function
|
|
1034
|
-
h(
|
|
1088
|
+
function y(v) {
|
|
1089
|
+
h(v);
|
|
1035
1090
|
}
|
|
1036
|
-
return () =>
|
|
1037
|
-
ref:
|
|
1091
|
+
return () => t("div", {
|
|
1092
|
+
ref: c,
|
|
1038
1093
|
class: "f-page-events-editor"
|
|
1039
|
-
}, [
|
|
1094
|
+
}, [t("div", {
|
|
1040
1095
|
class: "f-page-events-editor-content"
|
|
1041
|
-
}, [
|
|
1042
|
-
onClick:
|
|
1043
|
-
}, null),
|
|
1096
|
+
}, [t(X, {
|
|
1097
|
+
onClick: y
|
|
1098
|
+
}, null), S()])]);
|
|
1044
1099
|
}
|
|
1045
|
-
}),
|
|
1100
|
+
}), Ge = {
|
|
1046
1101
|
install(n) {
|
|
1047
1102
|
n.component(V.name, V);
|
|
1048
1103
|
},
|
|
1049
|
-
register(n, e,
|
|
1050
|
-
n["events-editor"] = V, e["events-editor"] =
|
|
1104
|
+
register(n, e, a, r) {
|
|
1105
|
+
n["events-editor"] = V, e["events-editor"] = G;
|
|
1051
1106
|
},
|
|
1052
|
-
registerDesigner(n, e,
|
|
1053
|
-
n["events-editor"] =
|
|
1107
|
+
registerDesigner(n, e, a) {
|
|
1108
|
+
n["events-editor"] = Ve, e["events-editor"] = G;
|
|
1054
1109
|
}
|
|
1055
1110
|
};
|
|
1056
1111
|
export {
|
|
1057
1112
|
V as FEventsEditor,
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1113
|
+
Ge as default,
|
|
1114
|
+
_ as eventsEditorProps,
|
|
1115
|
+
G as propsResolver
|
|
1061
1116
|
};
|