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