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