@farris/ui-vue 1.7.3 → 1.7.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 +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3791 -2760
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-view/index.esm.js +1815 -1789
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +2975 -2615
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +427 -466
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +2 -3
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +427 -646
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1190 -850
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3863
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2447 -2221
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +760 -543
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +105 -104
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +320 -153
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5191 -4407
- package/designer/data-grid/index.umd.cjs +17 -10
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +12665 -12117
- package/designer/farris-designer.all.umd.cjs +12 -12
- package/designer/list-view/index.esm.js +327 -327
- package/designer/list-view/index.umd.cjs +3 -3
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +0 -1
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +9 -9
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2829 -2540
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +822 -464
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +69725 -68244
- package/farris.all.umd.cjs +92 -92
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +14 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +6 -1
- package/types/condition/index.d.ts +55 -0
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → flow-canvas/src/components/flow-node-item.component.d.ts} +1 -1
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +1 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-view/src/tree-view.props.d.ts +1 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/layout/designer.d.ts +0 -32
- package/types/list-nav/designer.d.ts +0 -6
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(W,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("../dynamic-resolver/index.umd.js"),require("lodash-es"),require("../common/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../notify/index.umd.js"),require("../tree-view/index.umd.js"),require("../schema-selector/index.umd.js"),require("../modal/index.umd.js"),require("../input-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../event-parameter/index.umd.js"),require("../../designer/dynamic-form/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../dynamic-resolver/index.umd.js","lodash-es","../common/index.umd.js","../designer-canvas/index.umd.js","../notify/index.umd.js","../tree-view/index.umd.js","../schema-selector/index.umd.js","../modal/index.umd.js","../input-group/index.umd.js","../combo-list/index.umd.js","../event-parameter/index.umd.js","../../designer/dynamic-form/index.umd.js"],e):(W=typeof globalThis<"u"?globalThis:W||self,e(W["events-editor"]={},W.Vue,W.dynamicResolver,W.LodashES,W.common,W.designerCanvas,W.notify,W.treeView,W.schemaSelector,W.modal,W.FInputGroup,W.ComboList,W.FEventParameter,W.designer))})(this,function(W,e,ue,q,me,Oe,ae,Re,qe,_e,Ue,ze,ke,Ge){"use strict";const He=new Map([["appearance",ue.resolveAppearance]]);function We(n,x,V){return x}const Ke={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/events-editor.schema.json",title:"events-editor",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for events-editor",type:"string"},type:{description:"The type events of events-editor",type:"events",default:"events-editor"},initialData:{description:"",type:"object",default:{}},viewSourceHandle:{description:"",type:"function",default:null}},required:["id","type"]},Je={title:"events-editor",description:"A Farris Component",type:"object",categories:{}},je=[{label:"pageChange",name:"MockMock切换页码"},{label:"pageSizeChanged",name:"Mock分页条数变化事件"},{label:"scrollYLoad",name:"Mock滚动加载事件"},{label:"onEditClicked",name:"Mock操作列点击编辑"},{label:"onDeleteClicked",name:"Mock操作列点击删除"}],Fe={initialData:{type:Object,default:{propertyID:"data-grid-component-viewmodel",propertyType:"events",internalCommandList:[{controllerName:{id:"70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72",label:"ListController",name:"列表控制器"},controllerList:[{id:"93ee1cd2-cf0b-40b3-b99f-958a3d1fad1c",label:"Load",name:"Mock加载数据",handlerName:"Load"},{id:"71ae8a4c-6202-4875-9246-2e2d959da37f",label:"Search",name:"Mock查询",handlerName:"Search"},{id:"77556491-41c0-4356-8ccf-25e39817060e",label:"Add",name:"Mock添加数据",handlerName:"Add"},{id:"52fdcac3-46c8-466e-aa5d-19920ece2076",label:"View",name:"Mock查看数据",handlerName:"View"},{id:"7ade9996-0531-4401-b1bc-fb9ec8ee3f8e",label:"Edit",name:"Mock编辑数据",handlerName:"Edit"},{id:"6d5a354f-871f-43e6-82bc-7837184380d3",label:"RemoveRows",name:"Mock删除选中行",handlerName:"RemoveRows"},{id:"1a1b7c33-38f0-469f-a017-223086ee6259",label:"ChangePage",name:"Mock切换页码",handlerName:"ChangePage"},{id:"debae2dd-3387-48cf-90ba-96e74ab5a8e5",label:"Remove",name:"Mock删除指定数据",handlerName:"Remove"}]}],events:je,boundEventsList:[],viewModel:[],componentLists:[{componentId:"root-component",viewModelId:"root-viewmodel"},{componentId:"data-grid-component",viewModelId:"data-grid-component-viewmodel"}],allComponentList:[{componentId:"root-component",viewModelId:"root-viewmodel"},{componentId:"data-grid-component",viewModelId:"data-grid-component-viewmodel"}],newController:[],isAddControllerMethod:!1,getEventList:()=>({events:je,boundEventsList:[]})}},viewSourceHandle:{type:Function,default:()=>{}}},Ae=ue.createPropsResolver(Fe,Ke,He,We,Je);function $e(){function n(V,b){const d=[{controllerId:"45be24f9-c1f7-44f7-b447-fe2ada458a61",controllerLabel:"AdvancedListCardController",controllerName:"高级列卡控制器",commands:[{name:"增加子表数据",id:"250cd2a2-9995-4c01-64aa-5029afba08ca",handlerName:"AddItem"},{name:"删除子表数据",id:"a2c06958-29b1-0582-5f3e-c3cfcc741f8f",handlerName:"RemoveItem"},{name:"插入数据",id:"3208b00c-543d-c050-3c54-081715972dda",handlerName:"Insert"},{name:"查询从表数据(分页)",id:"b60b7754-35cf-7eaa-0f1d-bc5e5d61c0bc",handlerName:"queryChild"},{name:"批量删除子表",id:"378fcd7d-ce91-c052-5947-d60ecdb38df9",handlerName:"batchDelete"},{name:"移动数据",id:"fcac5d5e-2367-2b61-a82a-f8e874e8efc0",handlerName:"move"},{name:"打开批量编辑界面",id:"8d8b05d6-2d22-b0b7-7cb8-51bbb8cd8a18",handlerName:"openBatchEditDialog"}]},{controllerId:"d7ce1ba6-49c7-4a27-805f-f78f42e72725",controllerLabel:"EditableListController",controllerName:"可编辑列表控制器",commands:[{name:"打开批量编辑界面",id:"c3831e36-27d1-1c98-dd60-30e2d7ec04d2",handlerName:"openBatchEditDialog"},{name:"加载列表数据",id:"f80e026b-bd9b-002b-d2aa-52c44a633bec",handlerName:"Load"}]},{controllerId:"8fe977a1-2b32-4f0f-a6b3-2657c4d03574",controllerLabel:"TreeCardController",controllerName:"树卡控制器",commands:[{name:"新增子表数据",id:"21b0c3af-3caf-b11d-2360-d9af20016501",handlerName:"AddItem"},{name:"删除子表数据",id:"113f1d77-65a4-63bf-3973-80dd15f294d1",handlerName:"RemoveItem"},{name:"批量删除子表",id:"bf13585c-a8f3-384b-356c-bd8bf06751c4",handlerName:"batchDelete"}]},{controllerId:"8d21e69c-70b3-44f6-88b5-fd6a8d3ce11b",controllerLabel:"PopController",controllerName:"弹出控制器",commands:[{name:"新增子表数据",id:"d6933772-8047-9bde-220b-449481883142",handlerName:"AddItem"},{name:"删除子表数据",id:"03c233eb-e39e-8e34-6809-ee4ab3a0d97c",handlerName:"RemoveItem"},{name:"加载并新增",id:"6882ab4a-9c23-8d59-6aac-de891eae20d2",handlerName:"LoadAndAdd"}]},{controllerId:"43f68561-eae4-4495-b318-d629615523f8",controllerLabel:"BatchEditCommands",controlleName:"批量编辑控制器",commands:[{name:"打开批量编辑界面",id:"a659aaba-daa4-3c07-8b26-164b01726022",handlerName:"openBatchEditDialog"},{name:"复制行",id:"d5f67e0a-767d-a238-5ad4-b1285476c16f",handlerName:"copyRow"},{name:"复制行",id:"229d2dd3-2fe7-f06a-b705-cfa0fc711614",handlerName:"clone"}]},{controllerId:"c121742e-6028-48bf-817c-1dda7fb098df",controllerLabel:"AdvancedListCardWithSidebarController",controllerName:"高级列卡控制器(侧边栏)",commands:[{name:"增加子表数据(侧边栏)",id:"250cd2a2-9995-4c01-64aa-5029afba08ca",handlerName:"AddItem"},{name:"删除子表数据(侧边栏)",id:"a2c06958-29b1-0582-5f3e-c3cfcc741f8f",handlerName:"RemoveItem"}]},{controllerId:"8172a979-2c80-4637-ace7-b13074d3f393",controllerLabel:"CardController",controllerName:"卡片控制器",commands:[{name:"新增子表数据",id:"6f987222-ebe2-0f3c-1594-a12408b22801",handlerName:"AddItem"},{name:"删除子表数据",id:"0cdeddcc-8332-f13f-be96-b5eeac84a334",handlerName:"RemoveItem"},{name:"插入数据",id:"2666b526-a1b2-f268-1629-b1b95b71c8dd",handlerName:"Insert"},{name:"打开批量编辑界面",id:"8104dd8e-bb27-a659-ff7c-a0321523f727",handlerName:"openBatchEditDialog"},{name:"新增子节点(子表树)",id:"bbd11957-de2a-c727-11d6-64788c4b0fa8",handlerName:"addSubChild"},{name:"删除子表树节点",id:"c8c9f652-ba52-3a9b-5eb9-dadd42c832cd",handlerName:"RemoveTreeItem"},{name:"批量删除子表",id:"e96857fa-1617-fd92-8a05-5c684e0819a1",handlerName:"batchDelete"}]},{controllerId:"31c1022c-ab40-4e8d-bc31-85d539f1d36c",controllerLabel:"FileController",controllerName:"文件控制器",commands:[{name:"批量删除文件数据",id:"d5bf021b-1aa4-06fe-3236-188fd218f4f7",handlerName:"removeFileRows"}]},{controllerId:"2eb7bbd1-fabd-4d0f-991d-7242f53225b1",controllerLabel:"AttachmentController",controllerName:"附件控制器",commands:[{name:"上传并更新行",id:"2a84e28f-7202-d858-1466-748a8040c1f9",handlerName:"UploadAndUpdateRow"},{name:"通过属性名上传并更新行",id:"0f98c9b8-a01b-55d4-3115-269a73f7ccff",handlerName:"uploadAndUpdateRowWithPropertyName"},{name:"移除版本附件行",id:"b441b6a7-9e13-9f75-77a2-10b2c1f7ef26",handlerName:"RemoveAttachmentItem"},{name:"上传并批量新增行",id:"e6fc25ca-853b-0b2d-76c9-a1f7a253679b",handlerName:"UploadAndBatchAddRows"},{name:"通过属性名上传并批量更新行",id:"e00b70db-9de3-8e3e-eb59-1c550a255fec",handlerName:"uploadAndBatchAddRowsWithPropertyName"}]},{controllerId:"e353b4e9-e073-4e18-b9f7-ec4cc8ac72b1",controllerLabel:"PrintService",controllerName:"打印控制器",commands:[{name:"根据数据条件批量打印",id:"774fa275-2da1-e927-e8bf-d27d9886a168",handlerName:"printMulti"}]},{controllerId:"70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72",controllerLabel:"ListController",controllerName:"列表控制器",commands:[{name:"加载数据",id:"86c9f281-e5bc-5d5c-1b86-d1e17ab2e850",handlerName:"Load"}]},{controllerId:"7c48ef46-339c-42d4-8365-a21236c63044",controllerLabel:"ListCardController",controllerName:"列卡控制器",commands:[{name:"加载列表数据",id:"e573d6a2-8261-9ad4-c9f1-2e59af53302d",handlerName:"loadList"}]},{controllerId:"26436aa8-88a7-4aee-bf0b-9843c1e8afbf",controllerLabel:"ListListController",controllerName:"双列表控制器",commands:[{name:"加载导航列表数据",id:"f7dd2c84-7abd-d4bf-6b31-71d96035c034",handlerName:"LoadNavList"}]}];let v=-1;const L=d.findIndex(w=>V===w.controllerId);return L!==-1&&(v=d[L].commands.findIndex(w=>b===w.handlerName)),v!==-1}function x(V,b,d){const v=n(V.controllerName.id,b.handlerName);return d.componentLists.length!==0&&v&&(b.hasPath=!0,b.targetComponent=b.targetComponent||d.componentLists[0].componentId,b.componentLists=q.cloneDeep(d.componentLists)),b}return{isContextDependent:n,setComponentLists:x}}var oe=(n=>(n.Frame="frame",n.dataGrid="data-grid",n.listView="list-view",n.form="form",n.uploader="uploader",n.calendar="calendar",n.page="page",n))(oe||{});function Ye(n,x){const V=e.inject("designerContext"),b=V&&V.dgControl?V.dgControl:Oe.DgControl,d=e.ref(""),v=e.ref("");function L(a){var r,h,E,t;let u="controlIcon fd-i-Family ",s="";switch(a==null?void 0:a.type){case"form-group":{s=((r=b[a.type])==null?void 0:r.icon)||((h=a.editor)==null?void 0:h.type)||"",(E=b[a.editor.type])!=null&&E.icon&&(s=b[a.editor.type].icon);break}default:s=((t=b[a.type])==null?void 0:t.icon)||a.type}const i=`fd_pc-${s}`;return u+=i,u}function w(a,u){var r;let s=a.id;const i=u==null?void 0:u.contents;if((u==null?void 0:u.type)==="splitter"&&i&&i.length===2){const h=u.direction!=="column";a.id===((r=i[0])==null?void 0:r.id)?s=h?"左侧区域":"上方区域":s=h?"右侧区域":"下方区域"}return s}function B(a){if(a.isLikeCardContainer)return"区块";const u=a.appearance&&a.appearance.class||"",s=u.split(" ");return a.id==="page-header"&&u&&u==="f-page-header"?"页头":s.includes("f-page-header-base")?"页头容器":s.includes("f-page-header-extend")?"页头扩展容器":s.includes("f-title")?"标题容器":s.includes("f-page")?"根容器":s.includes("f-page-main")?"内容区域":s.includes("f-scrollspy-content")&&a.isScrollspyContainer?"滚动监听容器":s.includes("f-grid-is-sub")?"表格容器":s.includes("f-filter-container")?"筛选条容器":"容器"}function k(a){const{componentType:u}=a;switch(u){case oe.Frame:return"根组件";case oe.dataGrid:return(n==null?void 0:n.formSchemaUtils.selectNode(a,i=>i.type===(b["tree-grid"]&&b["tree-grid"].type)))?"树表格组件":"表格组件";case oe.uploader:return"附件组件";case oe.listView:return"列表视图组件";case oe.form:return"卡片组件";case oe.calendar:return"日历组件";case oe.page:return a.name||"页面";default:return"组件"}}function C(a,u){const s=a.name||a.text||a.label||a.title||a.mainTitle;if(a.type!=="component"&&s&&typeof s=="string")return s.trim();switch(a.type){case"content-container":return B(a);case"splitter-pane":return w(a,u);case"component":return k(a);default:return b[a.type]&&b[a.type].name||a.id}}function F(a,u){const s=a.length?a[0]:null;if(!s)return;v.value="",d.value=s.originalId;const i=s?`${s.originalId}-design-item`:"",r=document.getElementById(i);r&&r.click(),x.emit("selectionChanged",s)}function f(a){if(!a)return;const u=`${a}-design-item`,s=document.getElementById(u);s&&s.click()}return{getIcon:L,getTitle:C,onChanged:F,currentSelectedNodeId:d,currentSelectedOutsideNodeId:v,triggerOutsideClick:f}}function Qe(n,x){const{getIcon:V,getTitle:b}=x;function d(C,F,f,a,u){var i;const s=(i=n.data.module)==null?void 0:i.components.find(r=>r.id===C.component);s&&v([s],F,f,a,u)}function v(C,F,f,a,u){return C.forEach(s=>{if(s.type==="component"&&(u=s.id),s.type==="component-ref"){d(s,F,f,a,u);return}const i={originalId:s.id,layer:f,originalParent:a==null?void 0:a.id,componentId:u,name:b(s,a),type:s.type,controlIcon:V(s),rawSchema:s};F.push(q.cloneDeep(i)),(s.contents||s.buttons)&&v(s.contents||s.buttons,F,f+1,s,u)}),F}function L(C){const F=[],f=C.find(i=>i.layer===0);C=C.filter(i=>i.layer!==0),F.push(f);let a=f.originalId,u=0,s=1e3;for(;C.length!==0||s===0;){const i=C.find(r=>r.originalParent===a);i?(F.push(i),a=i.originalId,C=C.filter(r=>r.originalId!==a),u=0):(u-=1,a=F.slice(u)[0].originalId),s-=1}return F}function w(C){return C.forEach((F,f)=>{F.id=(f+1).toString()}),C.forEach(F=>{var f;F.parent=((f=C.find(a=>a.originalId===F.originalParent))==null?void 0:f.id)||""}),C.forEach(F=>{F.hasChildren=C.findIndex(f=>f.parent===F.id)>0}),C}function B(C){const F={originalId:n.data.module.id,layer:0,originalParent:null,name:"页面",type:"module",controlIcon:"controlIcon fd-i-Family fd_pc-module",rawSchema:n.data.module},f=[];return C.forEach(a=>{a[0].originalParent=F.originalId,f.push(...a)}),f.unshift(F),f}function k(){const C=n.data.module?e.ref(n.data.module.components):e.ref([n.data]);if(!C.value)return;const F=[];C.value.forEach(s=>{if(s){const i=[];i.push(s);const E=v(i,[],1,null,s.id);F.push(E)}});const f=B(F),a=L(f);return w(a)}return{getData:k}}function le(n){const x=e.inject("sourceOutlineData")||[],V=e.ref(),b=e.ref(!1),d=e.ref([]),v=e.ref();function L(i,r,h,E){var t,R,_,T;return{id:me.useGuid().guid(),source:E||{formId:(t=i.sourceCommunication)==null?void 0:t.formId,formCode:(R=i.sourceCommunication)==null?void 0:R.formCode,componentId:(_=i.sourceCommunication)==null?void 0:_.componentId,externalContainerId:(T=i.sourceCommunication)==null?void 0:T.externalContainerId,event:r||"onCommunication"},target:{formId:(h==null?void 0:h.formId)||"",formCode:(h==null?void 0:h.formCode)||"",externalContainerId:(h==null?void 0:h.externalContainerId)||"",commandCode:(h==null?void 0:h.commandCode)||"",commandViewmodelId:(h==null?void 0:h.commandViewmodelId)||""},paramMappings:[]}}function w(i){var r,h;(r=i==null?void 0:i.communication)!=null&&r.length&&((h=i==null?void 0:i.communication)==null||h.map(E=>{var t,R;if(E!=null&&E.id&&!((t=E==null?void 0:E.source)!=null&&t.componentId)){const _=(R=n.getFormSchema().module.communications)==null?void 0:R.find(T=>T.id===(E==null?void 0:E.id));_&&Object.assign(E,_)}}))}function B(i){const r=n.getFormSchema(),{communications:h}=r.module;h||(r.module.communications=[]);const E=r.module.communications.findIndex(t=>t.id===i.id);E===-1?r.module.communications.push(i):Object.assign(r.module.communications[E],i)}function k(i){var r;if((r=i==null?void 0:i.communication)!=null&&r.length){const h=n.getFormSchema();i.communication.map(E=>{h.module.communications&&E&&(h.module.communications=h.module.communications.filter(t=>t.id!==E.id))}),i.communication=[]}}function C(i){var h;const r=n.getFormSchema();i&&((h=r.module.communications)!=null&&h.length)&&(r.module.communications=r.module.communications.filter(E=>E.id!==i))}function F(i,r,h){const E=Ye(i,r),t=n.externalFormSchema.get(h);if(t!=null&&t.content){const R={data:t.content},{getData:_}=Qe(R,E);return _()}return[]}function f(i){var h;if(!((h=i==null?void 0:i.source)!=null&&h.componentId)){b.value=!1;return}const r=x.find(E=>E.originalId===i.source.componentId);r?(b.value=!1,V.value=r):(b.value=!0,V.value={id:i.source.componentId})}function a(i){var t,R,_,T;d.value=[];const r=(t=V.value)==null?void 0:t.rawSchema;if(!r){v.value=null;return}const h=r.type==="form-group"&&r.editor?r.editor.type:r.type,E=(R=ue.schemaMap[h])==null?void 0:R.events;E&&Object.keys(E).forEach(p=>{d.value.push({eventCode:p,eventName:E[p]})}),(_=i.source)!=null&&_.event&&((T=d.value)!=null&&T.length)&&(v.value=d.value.find(p=>{var y;return p.eventCode===((y=i.source)==null?void 0:y.event)}))}function u(i){var E,t,R,_,T,p,y,l;if(!(i!=null&&i.length))return;f(i[0]),a(i[0]);let r="",h="";return b.value?r=`${((E=i[0].source)==null?void 0:E.componentId)||""}-${((t=i[0].source)==null?void 0:t.event)||""}`:(r=(R=V.value)==null?void 0:R.name,r&&((_=v.value)!=null&&_.eventName)&&(r+=`-${(T=v.value)==null?void 0:T.eventName}`),h=`${(p=V.value)==null?void 0:p.name} (${(y=V.value)==null?void 0:y.originalId})`,h=`${h}
|
|
2
|
-
${(l=v.value)==null?void 0:l.eventName} (${v.value.eventCode})`),{title:r,titleTip:h,isControlInvalid:b.value}}function s(i){var r;if((r=i==null?void 0:i.communication)!=null&&r.length){const h=i==null?void 0:i.communication[0];return h==null?void 0:h.source}}return{createNewCommunication:L,resolveCommunication:w,clearAllCommunication:k,clearCommunicationById:C,saveCommunication:B,assembleSourceOutline:F,resolveSourceControlEventTitle:u,resolveCommunicationSource:s}}function Xe(n,x,V){const b=e.ref([]),{boundEvents:d,unBoundEvent:v}=x;function L(f){var u,s;return{event:{label:(u=f.boundEvents)==null?void 0:u.label,name:(s=f.boundEvents)==null?void 0:s.name},showSwitch:[{showSection:[[!1,!1,!1,!1,!1],[!1,!1,!0,!1,!1],[!1,!0,!1,!0,!1]],showSwitchNumber:2}],command:q.cloneDeep(f.command),controller:q.cloneDeep(f.controller),communication:f.communication}}function w(){var f;b.value=(f=d.value)==null?void 0:f.map(a=>L(a))}function B(f,a){const s=L({boundEvents:f,command:null,controller:{id:"",name:"",label:""},communication:a?[a]:[]});if(a){s.showSwitch[0].showSwitchNumber=2,s.showSwitch[0].showSection[2][2]=!1,s.showSwitch[0].showSection[2][3]=!1,s.needSelectCommunicationCommand=!0,b.value.unshift(s);return}f&&(s.showSwitch[0].showSwitchNumber=1,s.showSwitch[0].showSection[2][3]=!0,b.value.unshift(s))}function k(){var f;(f=b.value)==null||f.forEach(a=>{a.showSwitch.forEach(u=>{u.showSection[2][3]=!1}),a.shouldShowCommunicationPanel=!1})}function C(f){b.value[f].showSwitch.forEach(a=>{a.showSection[2][3]=!a.showSection[2][3]})}function F(f){if(f>=0&&f<=b.value.length-1){const a=b.value[f];v(a.event),b.value.splice(f,1);const{clearAllCommunication:u}=le(n);u(a)}}return{addNewInteraction:B,collapseInteractions:k,deleteInteracton:F,toggleMethodInInteraction:C,interactions:b,loadInteractions:w}}function Ze(n){const x=e.ref([]),V=e.ref([]),b=e.ref([]),{isContextDependent:d}=$e();function v(){const{allComponentList:f}=n.value;n.value.componentLists.length&&n.value.viewModel&&n.value.viewModel.forEach(a=>{a.controllerList.forEach(u=>{if(u.targetComponent){const s=f.find(r=>r.componentId===u.targetComponent);if((s?s.viewModelId:void 0)===n.value.viewModelId)u.hasPath=!1;else{const r=d(a.controllerName.id,u.handlerName);u.hasPath=r?!0:u.hasPath,u.componentLists=r?q.cloneDeep(n.value.componentLists):u.componentLists}}})}),n.value.componentLists.length&&n.value.boundEventsList&&n.value.boundEventsList.forEach(a=>{var u;if((u=a.command)!=null&&u.targetComponent){const s=f.find(r=>{var h;return r.componentId===(((h=a.command)==null?void 0:h.targetComponent)||"")});if((s?s.viewModelId:void 0)===n.value.viewModelId)a.command.hasPath=!1;else{const r=d(a.controller.id,a.command.handlerName);a.command.hasPath=r?!0:a.command.hasPath,a.command.componentLists=r?q.cloneDeep(n.value.componentLists):a.command.componentLists}}})}function L(){const f=V.value.reduce((u,s)=>(u.set(s.boundEvents.label,!0),u),new Map);return x.value.filter(u=>!f.has(u.label))}function w(){var a;const f=((a=V.value)==null?void 0:a.length)>0;b.value=f?L():x.value}function B(){v(),x.value=n.value.events,V.value=n.value.boundEventsList,w()}function k(f){b.value=b.value.filter(a=>a.label!==f.label)}function C(f){V.value=V.value.filter(a=>a.boundEvents.label!==f.label),w()}function F(){var u;const f=(u=n.value)==null?void 0:u.getEventList(),{events:a}=f;f&&(n.value.events=q.cloneDeep(a),n.value.boundEventsList=f.boundEventsList),n.value.boundEventsList&&(n.value.boundEventsList=n.value.boundEventsList.filter(function(s){return a.find(i=>i.label===s.boundEvents.label)}))}return{allEvents:x,boundEvents:V,candidateEvents:b,excludeFromCandidates:k,loadEvents:B,resetBoundEvents:F,unBoundEvent:C}}const en={sourceCommunication:{type:Object,default:{}}},nn={events:{type:Array,default:[]}},on=e.defineComponent({name:"FEventList",props:nn,emits:["click"],setup(n,x){const V=e.ref(n.events);function b(v){x.emit("click",v)}function d(v){return e.createVNode("div",{class:"f-page-events-editor-first-bound-event"},[e.createVNode("div",{onClick:()=>b(v),class:"f-page-events-editor-first-bound-event-name"},[v.name])])}return()=>e.createVNode("div",{class:"f-page-events-editor-events"},[V.value.map(v=>d(v))])}}),re={communication:{type:Object},sourceCommunication:{type:Object,default:{}},event:{type:String,default:""}},tn=e.defineComponent({name:"FSelectSourceControl",props:re,emits:["selectSourceEvent","deleteControl"],setup(n,x){const V=e.inject("useFormSchema"),{createNewCommunication:b}=le(V),d=e.ref();d.value=b(n);const v=e.ref([{field:"name",title:"",dataType:"string"}]),L=e.ref([]),w=e.ref(),B=e.ref(),k=e.ref(!0),C=e.ref(!1),F=e.ref([]),f=e.ref(),a=e.ref(!0),u=e.ref(!1);function s(){const p=e.inject("sourceOutlineData");L.value=p||[],B.value.updateDataSource(L.value)}function i(){var y,l,o;if(!((l=(y=d.value)==null?void 0:y.source)!=null&&l.componentId)){u.value=!1;return}const p=(o=L.value)==null?void 0:o.find(c=>c.originalId===d.value.source.componentId);p?(B.value.selectItemById(p.id),u.value=!1):(u.value=!0,w.value={id:d.value.source.componentId})}function r(){var p,y,l;(y=(p=d.value)==null?void 0:p.source)!=null&&y.event&&((l=F.value)!=null&&l.length)&&(f.value=F.value.find(o=>{var c,g;return o.eventCode===((g=(c=d.value)==null?void 0:c.source)==null?void 0:g.event)}))}e.onMounted(()=>{s(),i(),r(),a.value=!1});function h(){var o;F.value=[];const p=w.value.rawSchema,y=p.type==="form-group"&&p.editor?p.editor.type:p.type,l=(o=ue.schemaMap[y])==null?void 0:o.events;l&&Object.keys(l).forEach(c=>{F.value.push({eventCode:c,eventName:l[c]})})}function E(p){k.value=!1,u.value=!1;const y=w.value!==p[0];y&&(w.value=p[0],h()),a.value||(C.value=!0),!a.value&&y&&(f.value=null)}const t=e.computed(()=>({"item-list":!0,"d-none":!k.value})),R=e.computed(()=>p=>{var y;return{item:!0,selected:((y=f.value)==null?void 0:y.eventCode)===p}});function _(p){var y;k.value=!1,C.value=!1,f.value=p,d.value.source.componentId=w.value.rawSchema.id,d.value.source.event=(y=f.value)==null?void 0:y.eventCode,x.emit("selectSourceEvent",d.value)}const T=e.computed(()=>({"form-container":!0,"position-relative":!0,invalid:u.value}));return()=>e.createVNode("div",{class:T.value},[e.createVNode("div",{class:t.value,style:"min-height:220px;"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择源控件")]),e.createVNode(Re.FTreeView,{ref:B,data:L.value,columns:v.value,columnOption:{fitColumns:!0,fitMode:"expand"},showTreeNodeIcons:!0,fit:!0,iconField:"controlIcon",onSelectionChange:E},null)]),C.value&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择事件")]),F.value.map(p=>e.createVNode("span",{class:R.value(p.eventCode),onClick:()=>_(p)},[p.eventName]))])])])}}),an=e.defineComponent({name:"FInteractionButton",props:en,emits:["clickEventItem","selectSourceControl"],setup(n,x){const V=new ae.FNotifyService,b=e.inject("useEventsComposition"),d=e.inject("useInteractionCompostion"),{candidateEvents:v}=b,{collapseInteractions:L}=d,w=e.ref(!1),B=e.ref(!1);function k(u){v.value=v.value.filter(s=>s.label!==u.label)}function C(){var u;(u=n.sourceCommunication)!=null&&u.needSelectSourceControl?B.value=!B.value:w.value=!w.value}function F(u){C(),k(u),x.emit("clickEventItem",u)}function f(){var u;if(!((u=n.sourceCommunication)!=null&&u.needSelectSourceControl)&&v.value.length===0){V.info({position:"top-center",message:"事件已全部绑定"});return}L(),C()}function a(u){B.value=!1,x.emit("selectSourceControl",u)}return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-page-events-editor-top-button"},[e.createVNode("button",{class:"f-page-events-editor-button",onClick:f},[e.createVNode("span",{class:"f-page-events-editor-text"},[e.createTextVNode("新建交互事件")])])]),w.value&&e.createVNode(on,{events:v.value,onClick:F},null),B.value&&e.createVNode(tn,{sourceCommunication:n.sourceCommunication,onSelectSourceEvent:a},null)])}}),cn={collapsed:{type:Boolean,default:!0},displayOrder:{type:Number,default:-1},interaction:{type:Object,default:{}},controllers:{type:Array,default:[]},sourceCommunication:{type:Object,default:{}},viewSourceHandle:{type:Function,default:()=>{}},haveBoundCommand:{Type:Boolean,default:!1}},ln={newImport:{Type:Boolean,default:!1},addInternalCommandList:{Type:Array,default:[]},outerLayerValue:{Type:Number,default:0},exit:{Type:Number,default:-1},haveBoundCommand:{Type:Boolean,default:!1},controllers:{type:Array,default:[]},iteractionDisplayOrder:{Type:Number,default:0},event:{Type:Object},sourceCommunication:{type:Object,default:{}}},rn={controllers:{type:Array,default:[]}},dn=e.defineComponent({name:"FCommandList",props:rn,emits:["selectMethod"],setup(n,x){function V(w){return w.controllerList.length!==0}function b(w){return V(w)&&e.createVNode("div",{class:"f-page-internals-controller"},[e.createVNode("div",{class:"f-page-internals-controller-name",title:w.controllerName.name},[w.controllerName.name])])}function d(w,B){x.emit("selectMethod",{method:w,controller:B})}function v(w){return w.controllerList.map(B=>e.createVNode("div",{class:"f-page-internals-command",onClick:()=>d(B,w)},[e.createVNode("div",{class:"f-page-internals-command-name",title:B.label},[B.name])]))}function L(w){return e.createVNode("div",null,[b(w),v(w)])}return()=>e.createVNode("div",{class:"f-page-internals"},[n.controllers.map(w=>L(w))])}}),sn={getEventPath:{type:Function,default:null},notifyService:{type:Object},useFormSchema:{type:Object},sourceCommunication:{type:Object,default:{}},event:{Type:Object}},un=e.defineComponent({name:"FBoundEventSelector",props:sn,emits:["cancel","submit"],setup(n,x){var P,$;const V=e.ref(),b=e.ref([]),d=e.ref('<i class="f-icon f-icon-search"></i>'),v=n.useFormSchema.getFormMetadataBasicInfo(),L=e.ref(""),w=e.ref(),B=((P=n.sourceCommunication)==null?void 0:P.unSupportedEventCodes)||[],k=e.ref(!B.includes(n.event.label)&&(($=n.useFormSchema.externalFormSchema)==null?void 0:$.size)>0),C=e.ref(),F=e.ref([]);e.onBeforeMount(()=>{if(n.getEventPath){const m=n.getEventPath();V.value=m.viewModelDisplay;const{actionWithPath:M}=m;M.forEach(I=>{I.sourceComponent.map.forEach(A=>{A.active=!1,A.hide=!1})}),b.value=q.cloneDeep(M)}});function f(m=""){m=m.replace(/ /g,"").replace(/>/g,"").toLowerCase(),m===""&&(m=" "),b.value.forEach(M=>{const I=M.path;M.sourceComponent.map.forEach(A=>{const U=A.command.name,J=A.event.name,N=A.command.label;`${I}${U}${J}${N}`.toLowerCase().includes(m)?A.hide=!1:A.hide=!0})})}function a(m=""){m=m.replace(/ /g,"").replace(/>/g,"").toLowerCase(),F.value.forEach(M=>{if(!M.isCommandNode)return;const I=M.name||"",A=M.code||"",U=M.viewmodelName||"",J=`${I}${A}${U}`.toLowerCase();m&&!J.includes(m)?M.hide=!0:M.hide=!1})}function u(m=""){!C.value||C.value.id===v.id?f(m):a(m)}function s(){const m=e.createVNode("div",{class:"f-vm-search"},[e.createVNode("div",{class:"f-vm-searchBar"},[e.createVNode(Ue,{updateOn:"change",groupText:d.value,modelValue:L.value,"onUpdate:modelValue":M=>L.value=M,onChange:u,placeholder:"请输入名称/编号/路径搜索"},null)])]);return k.value?e.createVNode("div",{class:"f-navSelector-header"},[e.createVNode("div",{class:"f-navSelector-recommand"},[e.createVNode("div",{class:"f-navSelector-recommand-text"},[e.createTextVNode("方法列表")])]),e.createVNode("div",{class:"f-navSelector-remainder"},[e.createVNode("div",{class:"f-vm-search"},[m])])]):m}function i(m){return{"f-vm-item":!0,"f-vm-item-focus":m.active}}function r(m,M){let I=0;b.value.forEach(A=>{A.sourceComponent.map.forEach(U=>{!U.command.isInvalid&&m.controller.id===U.controller.id&&m.command.id===U.command.id&&m.event.label===U.event.label&&M.sourceComponent.id===A.sourceComponent.id?(m.active=!m.active,w.value=q.cloneDeep(m)):(U.command.isInvalid&&m.controller.id===U.controller.id&&m.command.id===U.command.id&&m.event.label===U.event.label&&M.sourceComponent.id===A.sourceComponent.id&&(I++,I===1&&(new ae.FNotifyService().info({position:"top-center",message:"该方法已失效"}),w.value=null)),U.active=!1)})})}function h(m){return{"f-event-func":!m.command.isInvalid,"f-event-func-invalid":m.command.isInvalid}}function E(m){return m.sourceComponent.map.filter(M=>!M.hide).map(M=>{if(!M.command.isInvalid)return e.createVNode("div",{class:i(M),onClick:()=>r(M,m)},[e.createVNode("div",{class:"f-event-commandItem"},[e.createVNode("div",{class:"f-icon-command"},[e.createVNode("div",{class:"f-icon f-icon-source-code",style:"font-size:10px;color:#30B471;"},[e.createTextVNode(" ")])]),e.createVNode("div",{class:h(M)},[M.command.name,e.createTextVNode("("),M.command.label,e.createTextVNode(")")])]),e.createVNode("div",{class:"f-event-path"},[m.path,M.event.name])])})}function t(){return b.value.length>0?e.createVNode("div",{class:"f-vm-viewModel flex-fill"},[b.value.map(m=>E(m))]):e.createVNode("div",{class:"f-list-view-emptydata",style:"height: 360px;position: relative;"},[e.createVNode("div",{class:"f-datagrid-norecords"},[e.createVNode("div",{class:"f-datagrid-norecords-content"},[e.createTextVNode(" 暂无数据")])])])}function R(){x.emit("cancel")}function _(){if(!w.value){n.notifyService.info({position:"top-center",message:"请选择需要绑定的方法"});return}x.emit("submit",{selectedCommand:w.value,selectedForm:C.value})}function T(){const m=n.useFormSchema.externalFormSchema,M=[];return M.push({containerId:"",id:v.id,code:v.code,name:v.name}),Array.from(m.keys()).forEach(I=>{const A=m.get(I);M.push({containerId:I,id:A.id,code:A.code,name:A.name})}),M}const p=e.computed(()=>({"f-vm-all":!0," h-100":!0,"has-page-list":k.value}));function y(m){var U,J;const{viewmodels:M,components:I}=m.module;if((M==null?void 0:M.length)===0||(I==null?void 0:I.length)===0)return[];F.value=[];const A=(J=(U=n.sourceCommunication)==null?void 0:U.parameterData)==null?void 0:J.getViewModelName;M.forEach(N=>{if(!N||!N.commands||N.commands.length===0)return[];const z=I.find(ee=>ee.viewModel===N.id),K=A&&z?A(z,N.name,m):"";F.value.push({id:N.id,code:N.code,name:K||N.name}),N.commands.forEach(ee=>{ee.isInvalid||F.value.push({...ee,viewmodelId:N.id,viewmodelName:K||N.name,isCommandNode:!0})})})}function l(m){var M,I,A;if(!(m.id===C.value.id&&m.containerId===C.value.containerId))if(C.value=m,L.value="",w.value=null,C.value.id!==v.id){const U=(I=n.useFormSchema.externalFormSchema)==null?void 0:I.get((M=C.value)==null?void 0:M.containerId);(A=U==null?void 0:U.content)!=null&&A.module&&y(U.content)}else b.value.map(U=>{U.sourceComponent.map.map(J=>{J.hide=!1,J.active=!1})})}function o(){const m=T();C.value||(C.value=m[0]);const M=e.computed(()=>I=>{var A;return{"f-list-view-group-item":!0,"f-listview-active":I.id===((A=C.value)==null?void 0:A.id)&&I.containerId===C.value.containerId}});return e.createVNode("div",{class:"f-page-nav"},[e.createVNode("div",{class:"f-list-view"},[e.createVNode("div",{class:"f-list-view-content"},[e.createVNode("ul",{class:"f-list-view-group",style:"list-style: none;"},[m.map(I=>{let A=I.name;return I.containerId&&(A+=`, 所属外部容器:${I.containerId}`),e.createVNode("li",{class:M.value(I),onClick:()=>l(I)},[e.createVNode("div",{class:"f-list-content"},[e.createVNode("div",{class:"f-navSelector-leftCategory",title:A},[I.name])])])})])])])])}function c(m){F.value.map(M=>M.active=!1),m.active=!0,w.value=m}function g(){return e.createVNode("div",{class:"f-vm-viewModel flex-fill"},[F.value.filter(m=>!m.hide).map(m=>{if(m.isCommandNode)return e.createVNode("div",{class:i(m),onClick:()=>c(m)},[e.createVNode("div",{class:"f-event-commandItem"},[e.createVNode("div",{class:"f-icon-command"},[e.createVNode("div",{class:"f-icon f-icon-source-code",style:"font-size: 10px; color: rgb(48, 180, 113);"},null)]),e.createVNode("div",{class:"f-event-func"},[m.name,e.createTextVNode("("),m.code,e.createTextVNode(")")])]),e.createVNode("div",{class:"f-event-path"},[m.viewmodelName])])})])}return()=>e.createVNode("div",{class:p.value},[e.createVNode("div",{class:"d-flex f-utils-fill-flex-row splitter"},[k.value?o():"",e.createVNode("div",{class:"f-utils-fill-flex-column"},[s(),!C.value||C.value.id===v.id?t():g()])]),e.createVNode("div",{class:"modal-footer"},[e.createVNode("button",{type:"button",class:"btn btn-secondary",onClick:R},[e.createTextVNode("取消")]),e.createVNode("button",{type:"button",class:"btn btn-primary",onClick:_},[e.createTextVNode("确定")])])])}}),mn=e.defineComponent({name:"FCommandSource",props:ln,emits:["addInternalCommandListChanged","newImportChanged","selectBoundMethod","click","existChanged","newFunctionChanged","close","selectMethod","addCommunication"],setup(n,x){const V=e.inject("useMethodsComposition"),b=e.inject("useFormCommand"),d=new ae.FNotifyService,{checkIfNewControllerExists:v,addNewController:L}=V,w=e.ref(n.controllers),B=e.inject("useFormSchema"),k=e.inject(_e.F_MODAL_SERVICE_TOKEN);let C,F;const f=e.ref(!1);e.onMounted(()=>{f.value=B.externalFormSchema.size>0});function a(c,g,P){if(L(c),c.Commands){const $=b.getInternalControllerFromControllerMetadata(c,g,P);v($)&&d.info({position:"top-center",message:"该控制器已存在"})}}async function u(c){b.getSupportedControllerMetadata(c).then(g=>{g&&a(g.controller,g.code,g.nameSpace)}).finally(()=>{C&&C.destroy&&C.destroy()})}function s(c){C&&C.destroy&&C.destroy()}function i(){const c={formBasicInfo:B==null?void 0:B.getFormMetadataBasicInfo()};return e.createVNode(qe.FSchemaSelector,{injectSymbolToken:me.ControllerSchemaRepositorySymbol,"view-type":"NavList",editorParams:c,showFooter:!0,onCancel:s,onSubmit:u},null)}function r(){C=k.open({title:"选择控制器",width:950,render:i,showButtons:!1})}function h(){x.emit("newFunctionChanged")}function E(){F&&F.destroy&&F.destroy()}function t(c){const{selectedCommand:g,selectedForm:P}=c;!P||(P==null?void 0:P.id)===B.getFormMetadataBasicInfo().id?(V.selectBoundCommand(g,n.iteractionDisplayOrder),x.emit("selectBoundMethod")):x.emit("addCommunication",c),E()}function R(){const{getEventPath:c}=V;return e.createVNode(un,{getEventPath:c,notifyService:d,useFormSchema:B,sourceCommunication:n.sourceCommunication,event:n.event,onCancel:E,onSubmit:t},null)}function _(){F=k.open({title:"已有方法",width:950,height:500,fitContent:!1,render:R,showButtons:!1,enableEsc:!1,draggable:!0})}function T(){x.emit("close",null)}function p(){return e.createVNode("div",{class:"f-command-breakline"},[e.createTextVNode("------------------------------------------------------------")])}function y(){return e.createVNode("div",{class:"f-page-internals-new-command"},[e.createVNode("div",{class:"f-page-internals-new-command-func1"},[e.createVNode("div",{class:"f-icon f-icon-panel-retraction"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>r()},[e.createTextVNode("引入控制器")])]),e.createVNode("div",{class:"f-page-internals-new-command-func2"},[e.createVNode("div",{class:"f-icon f-icon-new-edit"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>h()},[e.createTextVNode("添加新方法")])]),(n.haveBoundCommand||f.value)&&e.createVNode("div",{class:"f-page-internals-new-command-func3"},[e.createVNode("div",{class:"f-icon f-icon-licensed"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>_()},[e.createTextVNode("已有方法")])])])}function l(c){x.emit("selectMethod",c)}function o(){return e.createVNode("div",{class:"f-page-command-source-choice"},[e.createVNode(dn,{controllers:w.value,onSelectMethod:l},null)])}return()=>e.createVNode("div",{class:"f-page-events-editor-command-source"},[o(),p(),y(),p(),e.createVNode("div",null,[e.createVNode("div",{class:"f-page-internals-close",onClick:T},[e.createTextVNode("取消")])])])}}),fn={command:{type:Object,default:{}},showParameter:{type:Boolean,default:!1},controller:{type:Object,default:{}},showDeleteIcon:{type:Boolean,default:!1}},hn=e.defineComponent({name:"FParameterEditor",props:fn,emits:["confirm","change","targetChange","viewSource","deleteCommand"],setup(n,x){const V=new ae.FNotifyService,b=e.inject("FMessageBoxService"),d=e.ref(q.cloneDeep(n.command)),v=e.ref(n.controller),L=e.ref(0),w=e.computed(()=>d.value.id==="abandoned"),B=e.computed(()=>d.value.id==="deleted"),k=e.computed(()=>n.showDeleteIcon),C=e.computed(()=>d.value!==null),F=e.inject("useMethodsComposition"),f=e.ref(n.showParameter),a=e.inject("useFormSchema"),u=e.computed(()=>d.value.componentLists&&d.value.hasPath),s=e.computed(()=>{const N=d.value.id!=="abandoned"&&d.value.id!=="deleted",z=u.value,K=d.value.property&&d.value.property.length>0;return N&&(z||K)});function i(){const{targetComponent:N}=d.value;let z="";return d.value.componentLists&&d.value.componentLists.forEach(K=>{if(K.componentId===N){z=K.viewModelId;return}}),z}const r=e.ref(i()),h=e.computed(()=>d.value.targetComponent||"");function E(){V.info({position:"top-center",message:"方法已被移除,请重新绑定"})}function t(){return e.createVNode("div",{title:"方法已被移除,请重新绑定",class:"f-icon f-icon-flowline-warning text-danger text-center ",style:"font-size: 13px;margin-right:10px;width: 30px;height: 20px;",onClick:()=>E()},null)}function R(){V.info({position:"top-center",message:"方法已失效,请重新绑定"})}function _(){return e.createVNode("div",{title:"'方法已被删除,请绑定其他方法'",class:"f-icon f-icon-flowline-warning text-danger text-center ",style:"font-size: 13px;margin-right:10px;width: 30px;height: 20px;",onClick:()=>R()},null)}function T(N){f.value=!f.value}function p(){return e.createVNode("div",{class:"f-icon f-icon-edit-button",style:"font-size: 13px;margin-right:10px;",onClick:()=>T(L.value)},null)}function y(N,z){d.value.targetComponent=N[0].componentId,x.emit("targetChange",d.value)}function l(){const N=e.reactive({content:"将此方法添加到指定的组件",placement:"top"});return e.createVNode("div",null,[e.createVNode("div",{class:"f-page-parameter-editor-targetComponent"},[e.createVNode("div",{class:"f-page-parameter-editor-targetComponent-topic"},[e.createTextVNode("挂载到目标组件"),e.withDirectives(e.createVNode("span",{class:"farris-label-tips ml-2"},[e.createVNode("i",{class:"f-icon f-icon-description-tips"},null)]),[[e.resolveDirective("tooltip"),N]])]),e.createVNode("div",{class:"f-page-parameter-editor-targetComponent-dropdown"},[e.createVNode(ze,{modelValue:r.value,"onUpdate:modelValue":z=>r.value=z,enableClear:!1,idField:"viewModelId",valueField:"viewModelId",textField:"componentId",data:d.value.componentLists,editable:!1,onChange:y},null)])])])}function o(N,z){z.value=N}function c(){x.emit("change",d.value)}function g(){let N="";return h.value?N=a.getViewModelIdByComponentId(h.value):N=F.getViewModeId(),N}function P(N,z){var he,ve,Ce,ge,ie,de,S,D,j,O,G,Y,Q,X,Z,pe,be,we,te,Ne,Se;const K=g(),Ee=a.getViewModelById(K).commands.find(H=>{var ne;return(H==null?void 0:H.id)===((ne=n.command)==null?void 0:ne.id)}),Pe=e.reactive(N.context.data),{assembleSchemaFieldsByComponent:ye,assembleOutline:Me,assembleStateVariables:xe,assembleSchemaFieldsUnderBoundEntity:Ie,getEditor:Le}=N.context.generalData,{designerMode:Be}=a,Te=H=>{o(H,N),c()},De=H=>{var ne,se,ce,Ve;return((Ve=(ce=(se=(ne=N==null?void 0:N.origin)==null?void 0:ne.controlSource)==null?void 0:se.context)==null?void 0:ce.data)==null?void 0:Ve.value)===":Entity"||H.raw.children&&H.raw.children.length&&(H.disabled=!0),H};return e.createVNode(ke,{readonly:Be==="PC_RTC"&&!z.isRtcCommand,defaultValue:N==null?void 0:N.origin.defaultValue,modelValue:N.value,"onUpdate:modelValue":H=>N.value=H,data:Pe,editor:Le(N.value,N,Ee,K,Te),fieldData:ye(),formData:Me(),varData:xe(),activeViewModelFieldData:Ie(h.value),editorControlSource:(he=N==null?void 0:N.origin)==null?void 0:he.controlSource,customRowStatus:De,idField:((ie=(ge=(Ce=(ve=N==null?void 0:N.origin)==null?void 0:ve.controlSource)==null?void 0:Ce.context)==null?void 0:ge.data)==null?void 0:ie.value)===":Entity"?"bindTo":((j=(D=(S=(de=N==null?void 0:N.origin)==null?void 0:de.controlSource)==null?void 0:S.context)==null?void 0:D.valueField)==null?void 0:j.value)||((Q=(Y=(G=(O=N==null?void 0:N.origin)==null?void 0:O.controlSource)==null?void 0:G.context)==null?void 0:Y.idField)==null?void 0:Q.value)||"id",textField:((be=(pe=(Z=(X=N==null?void 0:N.origin)==null?void 0:X.controlSource)==null?void 0:Z.context)==null?void 0:pe.textField)==null?void 0:be.value)||"label",editable:(Se=(Ne=(te=(we=N==null?void 0:N.origin)==null?void 0:we.controlSource)==null?void 0:te.context)==null?void 0:Ne.editable)==null?void 0:Se.value,onConfirm:H=>{o(H,N),c()},onValueChange:H=>{var ne,se;if(((ne=N.origin)==null?void 0:ne.Code)==="lookupId"){const ce=(se=d.value.property)==null?void 0:se.find(Ve=>Ve.name==="mappingFields");ce&&ce.value&&(ce.value="")}o(H,N),c()}},null)}function $(){var N;return(N=d.value.property)==null?void 0:N.map((z,K)=>{const ee=e.reactive({content:z.description,placement:"top"});return e.createVNode("div",{key:z.name+K},[e.createVNode("div",{class:"f-page-parameter-editor-row1"},[e.createVNode("div",{class:"f-page-parameter-editor-parameter-name"},[z.shownName,z.description&&e.withDirectives(e.createVNode("div",{class:"ml-2 farris-label-tips"},[e.createVNode("i",{class:"f-icon f-icon-description-tips"},null)]),[[e.resolveDirective("tooltip"),ee]])])]),e.createVNode("div",{class:"f-page-parameter-editor-row2"},[P(z,d.value)])])})}function m(){return e.createVNode("div",{class:"f-page-parameter-editor-group"},[u.value&&l(),$()])}function M(N){N.stopPropagation(),x.emit("viewSource",{command:d.value,event:N})}function I(){b.question(`确定删除命令【${d.value.name}】吗?`,"",()=>{x.emit("deleteCommand")})}function A(){return e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:N=>I()},null)}const U=e.computed(()=>{var N;return{cursor:w.value||v.value.isCommon||((N=v.value)==null?void 0:N.label.indexOf(a==null?void 0:a.getModule().code))===-1?"default":"pointer"}});function J(){return e.createVNode("div",null,[e.createVNode("div",{class:"f-page-parameter-editor-first-row"},[e.createVNode("span",{class:"f-page-parameter-editor-command-name",style:U.value,title:d.value.label,onDblclick:M},[d.value.name]),e.createVNode("div",{class:"f-page-parameter-editor-first-row-icon"},[w.value&&t(),B.value&&_(),s.value&&p(),k.value&&A()])]),f.value&&m()])}return()=>e.createVNode("div",{class:"f-page-parameter-editor"},[C.value&&J()])}}),vn=e.defineComponent({name:"FSelectParameters",props:re,emits:["changed"],setup(n,x){var l;const V=new ae.FNotifyService;V.globalConfig={position:"top-center"};const b=e.inject("FMessageBoxService"),d=e.ref(n.communication),v=e.ref(((l=d.value)==null?void 0:l.paramMappings)||[]),L=e.inject("useFormSchema"),w=L.getFormMetadataBasicInfo(),B=e.ref([]),k=e.ref([]),C=e.ref({}),F=e.ref({}),f=e.computed(()=>o=>{let c="",g="";if(o.sourceValue&&o.targetVariable){const P=k.value.find($=>$.statePath===`${o.targetVariableViewModelId}.${o.targetVariable}`);P&&P.name?(F.value[o.targetVariable]=!1,c=`${o.sourceValue}--->${P.name}`,g=`将 ${o.sourceValue} 赋值给 ${P.name}`):(F.value[o.targetVariable]=!0,c=`${o.sourceValue}--->${o.targetVariable}`,g=`将 ${o.sourceValue} 赋值给 ${o.targetVariable}`)}return{displayText:c,displayTextTip:g}});e.watch(()=>n.communication,o=>{d.value=o,v.value=d.value.paramMappings||[]},{deep:!0});function a(){var c;const o=v.value.length||0;v.value.length&&(v.value=v.value.filter(g=>!(!g.sourceValue&&!g.targetVariable))),d.value.paramMappings=v.value,o!==((c=d.value.paramMappings)==null?void 0:c.length)&&x.emit("changed")}e.onUnmounted(()=>{a()});function u(o){var m,M;const{viewmodels:c,components:g}=o.module;if((c==null?void 0:c.length)===0||(g==null?void 0:g.length)===0)return[];const P=[];k.value=[];const $=(M=(m=n.sourceCommunication)==null?void 0:m.parameterData)==null?void 0:M.getViewModelName;return c.forEach(I=>{if(!I||!I.states||I.states.length===0)return[];const A=[],U=g.find(z=>z.viewModel===I.id),J=$&&U?$(U,I.name,o):"";I.states.forEach(z=>{const K={...z,statePath:I.id+"."+z.code};A.push({data:K,children:[]}),k.value.push(K)});const N={data:{id:I.id,code:I.code,name:J||I.name,statePath:I.id},children:A};P.push(N)}),P}function s(){var o,c;if(!((o=d.value)!=null&&o.target.formId))return[];if(d.value.target.formId===w.id)B.value=u(L.getFormSchema());else{const g=L.externalFormSchema.get(d.value.target.externalContainerId);(c=g==null?void 0:g.content)!=null&&c.module&&(B.value=u(g==null?void 0:g.content))}}function i(){Object.keys(C.value).forEach(o=>{C.value[o]=!1})}function r(){i();const o=me.useGuid().guid();v.value.push({id:o,sourceValue:"",targetVariable:"",targetVariableViewModelId:""}),d.value.paramMappings=v.value,C.value[o]=!0}function h(o,c,g){o.stopPropagation();function P(){v.value=v.value.filter($=>$.id!==c.id),d.value.paramMappings=v.value,i(),x.emit("changed")}g?b.question(`确定删除参数【${g}】吗?`,"",()=>{P()}):P()}function E(o){C.value[o.id]||(i(),C.value[o.id]=!0)}function t(o,c){if(!c.sourceValue){V.warning("请选择源参数");return}if(!c.targetVariable){V.warning("请选择目标参数");return}C.value[o.id]=!1,Object.assign(o,c),delete o.statePath,x.emit("changed")}function R(o){C.value[o.id]=!1,!o.sourceValue&&!o.targetVariable&&!o.targetVariableViewModelId&&(v.value=v.value.filter(c=>c.id!==o.id),d.value.paramMappings=v.value,x.emit("changed"))}e.onMounted(()=>{s()}),e.watch(()=>n.communication,o=>{s()},{deep:!0});function _(o,c,g){var P;if((P=g.newValue)!=null&&P.length){const{statePath:$}=g.newValue[0];if(($==null?void 0:$.indexOf("."))>0){const m=$.split(".");c.targetVariableViewModelId=m[0],c.targetVariable=m[1]}}}function T(o){return{type:"combo-tree",textField:"name",valueField:"statePath",idField:"statePath",data:B.value,editable:!1,enableClear:!1,customRowStatus:c=>c.raw.parent?(v.value.find(P=>P.id!==o.id&&`${P.targetVariableViewModelId}.${P.targetVariable}`===c.raw.statePath)&&(c.disabled=!0),c):(c.disabled=!0,c)}}function p(o){const c=q.cloneDeep(o);c.statePath=`${c.targetVariableViewModelId}.${c.targetVariable}`;const g=T(o);let P=L.getFormSchema();if(d.value.source.formId!==w.id){const I=L.externalFormSchema.get(d.value.source.externalContainerId);I!=null&&I.content&&(P=I==null?void 0:I.content)}const{assembleSchemaFieldsByComponent:$,assembleOutline:m,assembleStateVariables:M}=n.sourceCommunication.parameterData;return e.createVNode("div",{class:"param-panel"},[e.createVNode("div",{class:"col-12"},[e.createVNode("div",{class:"farris-group-wrap"},[e.createVNode("div",{class:"form-group farris-form-group"},[e.createVNode("label",{class:"col-form-label",title:"源参数"},[e.createVNode("span",{class:"farris-label-text"},[e.createTextVNode("源参数")])])])])]),e.createVNode(ke,{class:"col-12 mb-2",modelValue:c.sourceValue,"onUpdate:modelValue":I=>c.sourceValue=I,fieldData:$(P),formData:m(P),varData:M(P),editorType:"Default",editable:!0},null),e.createVNode(Ge.FDynamicFormGroup,{label:"目标参数",modelValue:c.statePath,"onUpdate:modelValue":I=>c.statePath=I,customClass:"col-12 mb-2",editor:g,onChange:(I,A)=>_(I,c,A)},null),e.createVNode("div",{class:"d-flex justify-content-end"},[e.createVNode("button",{class:"btn btn-secondary mr-2",onClick:()=>R(o)},[e.createTextVNode("取消")]),e.createVNode("button",{class:"btn btn-primary",onClick:()=>t(o,c)},[e.createTextVNode("确定")])])])}x.expose({addParameter:r,closeAllParameterPanel:i});const y=e.computed(()=>o=>({"param-container":!0,"ml-3":!0,invalid:o}));return()=>v.value.length?v.value.map(o=>{const{displayText:c,displayTextTip:g}=f.value(o),P=F.value[o.targetVariable];return e.createVNode("div",{class:y.value(P)},[e.createVNode("div",{class:"selected-item position-relative"},[e.createVNode("span",{class:"form-control mr-3",title:g,onClick:()=>E(o)},[c||"请配置参数"]),P?e.createVNode("span",{title:"目标参数已失效,请重新选择"},[e.createVNode("i",{class:"f-icon f-icon-flowline-warning text-danger text-tip"},null)]):"",e.createVNode("div",{class:"remove-icon"},[e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除参数",onClick:$=>h($,o,c)},null)])]),C.value[o.id]?p(o):""])}):""}}),Cn=e.defineComponent({name:"FCommunicationCommandItem",props:re,emits:["addParameter","deleteCommand","toggleParameterPanel"],setup(n,x){const V=e.ref(n.communication),b=e.inject("FMessageBoxService"),d=e.inject("useFormSchema"),v=d.getFormMetadataBasicInfo(),L=e.ref([]),w=e.ref(),B=e.ref(!1),k=e.ref([]),C=e.ref(),F=e.ref(!1),f=e.ref(n.communication.paramMappings&&n.communication.paramMappings.length>0),a=e.computed(()=>{var l,o,c,g;if(!w.value)return"";const p=((l=w.value)==null?void 0:l.name)||((o=w.value)==null?void 0:o.code)||"",y=((c=C.value)==null?void 0:c.name)||((g=C.value)==null?void 0:g.code)||"";return`${p}-${y}`}),u=e.computed(()=>{var g,P,$,m,M,I;if(!w.value)return"";const p=((g=w.value)==null?void 0:g.name)||((P=w.value)==null?void 0:P.code)||"",y=(($=C.value)==null?void 0:$.name)||((m=C.value)==null?void 0:m.code)||"",l=((M=w.value)==null?void 0:M.code)||"",o=((I=C.value)==null?void 0:I.code)||"",c=w.value.containerId?`, 所属外部容器: ${w.value.containerId}`:"";return`${p} (${l}${c})
|
|
3
|
-
${y} (${o})`}),s=e.computed(()=>B.value?"目标表单已失效,请删除当前方法。":F.value?"目标命令已失效,请删除当前方法。":"");function i(){var p,y;if((y=(p=V.value)==null?void 0:p.target)!=null&&y.formId){const l=L.value.find(o=>o.id===V.value.target.formId&&o.containerId===V.value.target.externalContainerId);B.value=!l,w.value=l||{containerId:V.value.target.externalContainerId,id:V.value.target.formId,code:V.value.target.formCode}}else B.value=!1}function r(){var y,l;const p=d.externalFormSchema;Array.from(p.keys()).forEach(o=>{var g,P;const c=p.get(o);((P=(g=V.value)==null?void 0:g.source)==null?void 0:P.externalContainerId)!==o&&L.value.push({containerId:o,id:c.id,code:c.code,name:c.name})}),((l=(y=V.value)==null?void 0:y.source)==null?void 0:l.formId)!==v.id&&L.value.unshift({containerId:"",id:v.id,code:v.code,name:v.name}),i()}function h(){var p,y;if((y=(p=V.value)==null?void 0:p.target)!=null&&y.commandCode){const{commandCode:l,commandViewmodelId:o}=V.value.target,c=k.value.find(g=>g.code===l&&g.viewmodelId===o);C.value=c||{code:V.value.target.commandCode},F.value=!c}else C.value=null,F.value=!1}function E(p){var c,g;const{viewmodels:y,components:l}=p.module;if((y==null?void 0:y.length)===0||(l==null?void 0:l.length)===0)return[];k.value=[];const o=(g=(c=n.sourceCommunication)==null?void 0:c.parameterData)==null?void 0:g.getViewModelName;y.forEach(P=>{if(!P||!P.commands||P.commands.length===0)return[];const $=l.find(M=>M.viewModel===P.id),m=o&&$?o($,P.name,p):"";k.value.push({id:P.id,code:P.code,name:m||P.name}),P.commands.forEach(M=>{M.isInvalid||k.value.push({...M,viewmodelId:P.id,isCommandNode:!0})})})}function t(){var p,y,l;if(!((p=w.value)!=null&&p.id))return[];if(w.value.id===v.id)E(d.getFormSchema());else{const o=d.externalFormSchema.get((y=w.value)==null?void 0:y.containerId);(l=o==null?void 0:o.content)!=null&&l.module&&E(o.content)}h()}e.onMounted(()=>{r(),t()}),e.watch(()=>n.communication,p=>{f.value=n.communication.paramMappings&&n.communication.paramMappings.length>0,i(),t()},{deep:!0});function R(){x.emit("addParameter")}function _(){b.question(`确定删除命令【${a.value}】吗?`,"",()=>{x.emit("deleteCommand")})}function T(){x.emit("toggleParameterPanel")}return()=>e.createVNode("div",{class:"form-container position-relative"},[a.value&&e.createVNode("div",{class:"f-page-parameter-editor-first-row"},[e.createVNode("span",{class:"f-page-parameter-editor-command-name",title:u.value},[a.value]),e.createVNode("div",{class:"f-page-parameter-editor-first-row-icon"},[B.value||F.value?e.createVNode("div",null,[e.createVNode("span",{title:s.value},[e.createVNode("i",{class:"ml-2 f-icon f-icon-flowline-warning text-danger text-tip"},null)]),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:p=>_()},null)]):e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-icon f-icon-home-add",title:"新增参数",style:"font-size: 11px;",onClick:R},null),f.value&&e.createVNode("div",{class:"f-icon f-icon-edit-button",title:"收折参数",onClick:()=>T()},null),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:p=>_()},null)])])])])}}),gn=e.defineComponent({name:"FCombineForm",props:re,emits:["changed","deleteCommand","addCommand"],setup(n,x){const V=e.inject("useFormSchema"),{saveCommunication:b}=le(V),d=e.ref(n.communication),v=e.computed(()=>{var i,r,h,E;return((r=(i=d.value)==null?void 0:i.source)==null?void 0:r.componentId)&&((E=(h=d.value)==null?void 0:h.source)==null?void 0:E.event)}),L=e.ref(!0),w=e.ref(!0),B=e.ref(),k=e.ref();function C(){b(d.value),x.emit("changed",d.value)}function F(){B.value&&B.value.addParameter(),w.value=!1}function f(){x.emit("deleteCommand")}function a(){w.value=!w.value}const u=e.computed(()=>({"d-none":w.value}));function s(){B.value&&B.value.closeAllParameterPanel()}return x.expose({closeAllParameterPanel:s}),()=>e.createVNode("div",{class:"combine-form-container pb-2"},[v.value&&e.createVNode(e.Fragment,null,[e.createVNode(Cn,{ref:k,communication:d.value,sourceCommunication:n.sourceCommunication,onAddParameter:F,onDeleteCommand:f,onToggleParameterPanel:a},null),L.value&&e.createVNode("div",{class:u.value},[e.createVNode(vn,{ref:B,communication:d.value,onChanged:C,sourceCommunication:n.sourceCommunication},null)])])])}}),pn=e.defineComponent({name:"FSelectCommunicationCommand",props:re,emits:["selectCommand","addParameter","deleteCommand","toggleParameterPanel"],setup(n,x){const V=e.inject("useFormSchema"),b=V.getFormMetadataBasicInfo(),d=e.ref([]),v=e.ref(),L=e.ref([]),w=e.ref(),B=e.ref(!0),k=e.ref(!1);function C(){var h;const r=V.externalFormSchema;Array.from(r.keys()).forEach(E=>{var R;const t=r.get(E);((R=n.sourceCommunication)==null?void 0:R.externalContainerId)!==E&&d.value.push({containerId:E,id:t.id,code:t.code,name:t.name})}),((h=n.sourceCommunication)==null?void 0:h.formId)!==b.id&&d.value.unshift({containerId:"",id:b.id,code:b.code,name:b.name})}function F(r){var R,_;const{viewmodels:h,components:E}=r.module;if((h==null?void 0:h.length)===0||(E==null?void 0:E.length)===0)return[];L.value=[];const t=(_=(R=n.sourceCommunication)==null?void 0:R.parameterData)==null?void 0:_.getViewModelName;h.forEach(T=>{if(!T||!T.commands||T.commands.length===0)return[];const p=E.find(l=>l.viewModel===T.id),y=t&&p?t(p,T.name,r):"";L.value.push({id:T.id,code:T.code,name:y||T.name}),T.commands.forEach(l=>{l.isInvalid||L.value.push({...l,viewmodelId:T.id,isCommandNode:!0})})})}function f(){var r,h,E;if(!((r=v.value)!=null&&r.id))return[];if(v.value.id===b.id)F(V.getFormSchema());else{const t=V.externalFormSchema.get((h=v.value)==null?void 0:h.containerId);(E=t==null?void 0:t.content)!=null&&E.module&&F(t.content)}}e.onMounted(()=>{C(),f()});function a(r){v.value=r,B.value=!1,k.value=!0,f()}const u=e.computed(()=>r=>{var h,E;return{item:!0,selected:((h=v.value)==null?void 0:h.id)===r.id&&((E=v.value)==null?void 0:E.containerId)===r.containerId}}),s=e.computed(()=>r=>{var h;return{item:!0,selected:((h=w.value)==null?void 0:h.id)===r.id,"pl-4":r.isCommandNode,disabled:!r.isCommandNode}});function i(r){r.isCommandNode&&(k.value=!1,w.value=r,x.emit("selectCommand",{targetForm:v.value,targetCommand:r}))}return()=>e.createVNode("div",{class:"form-container position-relative"},[B.value&&e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择目标页面")]),d.value.map(r=>e.createVNode("span",{class:u.value(r),onClick:()=>a(r),title:r.containerId?`所属外部容器:${r.containerId}`:"当前页面"},[r.name]))]),k.value?e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择目标命令")]),L.value.map(r=>e.createVNode("span",{class:s.value(r),title:r.code,onClick:()=>i(r)},[r.name]))]):""])}}),bn=e.defineComponent({name:"FInteractionItem",props:cn,emits:["addAction","delete","toggle"],setup(n,x){var ie,de;const{guid:V}=me.useGuid(),b=e.inject("FMessageBoxService"),d=e.inject("useMethodsComposition"),{toggleSelectingMethod:v,emitFinalState:L,getViewModeId:w,getMethodsOnViewModel:B,getComponentList:k,updateTarget:C,updateCommandHasPath:F}=d,f=e.inject("useFormSchema"),{clearCommunicationById:a,resolveSourceControlEventTitle:u,resolveCommunication:s,createNewCommunication:i,saveCommunication:r,resolveCommunicationSource:h}=le(f),E=e.ref(n.controllers),t=e.ref(n.interaction),R=e.ref(!1),_=e.computed(()=>{const S=t.value.showSwitch[0];return S.showSection[S.showSwitchNumber][2]}),T=e.ref(n.sourceCommunication.needSelectSourceControl);t.value.shouldShowCommunicationPanel=t.value.shouldShowCommunicationPanel===!1?!1:!!((de=(ie=t.value)==null?void 0:ie.communication)!=null&&de.length)||T.value;const p=e.computed(()=>{var O;const S=!!((O=t.value.command)!=null&&O.id),D=t.value.showSwitch[0],j=D.showSection[D.showSwitchNumber][3];return S&&j}),y=e.ref(t.value.needSelectCommunicationCommand||!1),l=e.ref(),o=e.ref(),c=e.ref(!1),g=e.ref(),P=e.ref([]);function $(){if(T.value){const S=u(t.value.communication);if(S){const{title:D,titleTip:j,isControlInvalid:O}=S;l.value=D,o.value=O?"源表单或事件已失效,请删除":j||D,c.value=O}}else o.value=t.value.event.label,l.value=t.value.event.name}e.onBeforeMount(()=>{s(t.value),$(),g.value=h(t.value)||n.sourceCommunication});const m=e.computed(()=>({"f-icon":!0,"f-icon-arrow-chevron-down":p.value||t.value.shouldShowCommunicationPanel,"f-icon-arrow-chevron-left":!p.value&&!t.value.shouldShowCommunicationPanel}));function M(){var j,O;let S=(j=t.value.command)!=null&&j.id?1:0;S=S+(((O=t.value.communication)==null?void 0:O.length)||0);const D=`确定删除【${l.value}】吗?`;b.question(D,"",()=>{x.emit("delete",n.displayOrder)})}function I(){var O;const S=t.value.showSwitch[0],D=!!((O=t.value.command)!=null&&O.id);t.value.communication&&t.value.communication.length>0&&(t.value.shouldShowCommunicationPanel=!t.value.shouldShowCommunicationPanel),D&&(S.showSection[S.showSwitchNumber][3]=!S.showSection[S.showSwitchNumber][3],x.emit("toggle",n.displayOrder))}function A(){var O,G;const S=!!((O=t.value.command)!=null&&O.id),D=t.value.communication&&t.value.communication.length>0;if(T.value){y.value=!y.value,(G=P.value)!=null&&G.length&&P.value.map(Y=>{Y.closeAllParameterPanel()});return}D&&(t.value.shouldShowCommunicationPanel=!t.value.shouldShowCommunicationPanel);const j=t.value.showSwitch[0];v(j,S),x.emit("addAction",n.displayOrder)}function U(S){const D=t.value.communication!==void 0;S===null&&t.value.command===null&&!D&&x.emit("delete",n.displayOrder),t.value.communication&&(t.value.shouldShowCommunicationPanel=_.value);const j=t.value.showSwitch[0];v(j,D)}function J(S,D,j){let O=`${D}${j}${S}`,G=-1;const Y=B();for(;G===-1;){let Q=!1;for(let X=0;X<Y.length;X++)Y[X].controllerList.forEach(Z=>{Z.label||Z.label===""?Q=Z.label.toLowerCase()===O.toLowerCase()?!0:Q:Q=!1});if(Q)S+=1,O=`${D}${j}${S}`;else{G=0;break}}return{newName:O,suffix:S}}function N(S){const{method:D,controller:j}=S,{label:O,handlerName:G,property:Y,componentLists:Q,hasPath:X}=D,Z=w().replace(/-/g,"").replace("component","").replace("viewmodel",""),pe=O.slice(0,1).toUpperCase()+O.slice(1),{newName:be,suffix:we}=J(1,Z,pe),{controllerName:te}=j,Ne=te.id,Se={id:V(),label:be,name:`${D.name}${we}`,handlerName:G,hasPath:X,cmpId:Ne,property:Y,componentLists:Q};t.value.command=F(j,Se),t.value.command&&f.designerMode==="PC_RTC"&&(t.value.command.isRtcCommand=!0),t.value.controller={id:te.id,label:te.label,name:te.name,isCommon:te.isCommon};const H=t.value.showSwitch[0];H.showSwitchNumber=2,H.showSection[H.showSwitchNumber][2]=!1,H.showSection[H.showSwitchNumber][3]=!0,R.value=!0,t.value.communication&&t.value.communication.length>0&&(t.value.shouldShowCommunicationPanel=!0),L(!1,null)}function z(){t.value.command={id:"abandoned",label:"未绑定方法",name:"未绑定方法",property:[],hasPath:!1,handlerName:"未绑定方法",cmpId:"",shortcut:{},isRtcCommand:f.designerMode==="PC_RTC"?!0:void 0,isNewGenerated:void 0,extensions:[],isInvalid:!1},t.value.controller={label:"",name:"",id:""},L(!0,t.value.event);const S=t.value.showSwitch[0];v(S,!0)}function K(S,D){var G;if(t.value.communication||(t.value.communication=[]),t.value.communication.find(Y=>{var Q,X,Z;return((Q=Y.target)==null?void 0:Q.formId)===S.formId&&((X=Y.target)==null?void 0:X.externalContainerId)===S.externalContainerId&&((Z=Y.target)==null?void 0:Z.commandCode)===S.commandCode})){new ae.FNotifyService().info({position:"top-center",message:"方法已存在,请勿重复添加。"});return}let O;t.value.communication.length===1&&!((G=t.value.communication[0].target)!=null&&G.formId)?(Object.assign(t.value.communication[0].target,S),O=t.value.communication[0]):(O=i(n,t.value.event.label,S,D),t.value.communication.push(O)),L(!1,null),r(O)}function ee(S){var j;const D=t.value.showSwitch[0];if(D.showSection[D.showSwitchNumber][2]=!1,(j=t.value.command)!=null&&j.id&&(D.showSection[D.showSwitchNumber][3]=!0),t.value.shouldShowCommunicationPanel=!0,S){const{selectedCommand:O,selectedForm:G}=S,Y={formId:(G==null?void 0:G.id)||"",formCode:(G==null?void 0:G.code)||"",externalContainerId:(G==null?void 0:G.containerId)||"",commandCode:(O==null?void 0:O.code)||"",commandViewmodelId:(O==null?void 0:O.viewmodelId)||""};K(Y)}}function Ee(){const S=t.value.showSwitch[0];S.showSwitchNumber=2,S.showSection[S.showSwitchNumber][2]=!1,S.showSection[S.showSwitchNumber][3]=!0,R.value=!1,t.value.communication&&t.value.communication.length>0&&(t.value.shouldShowCommunicationPanel=!0),L(!1,null)}function Pe(){return e.createVNode(mn,{controllers:E.value,sourceCommunication:n.sourceCommunication,onClose:U,onSelectMethod:N,onNewFunctionChanged:()=>z(),onAddCommunication:ee,haveBoundCommand:n.haveBoundCommand,iteractionDisplayOrder:n.displayOrder,onSelectBoundMethod:Ee,event:t.value.event},null)}function ye(){const S=t.value.showSwitch[0];S.showSection[S.showSwitchNumber][3]=!1}function Me(S){t.value.command=q.cloneDeep(S),L(!1,null)}function xe(S){S.componentLists=k(),C(S),t.value.command=q.cloneDeep(S),L(!1,null)}function Ie(S){var j;const{controller:D}=t.value;D.isCommon||(j=n.viewSourceHandle)==null||j.call(n,{...S,...t.value})}function Le(){t.value.command=null,L(!1,null)}function Be(){return e.createVNode(hn,{command:t.value.command,controller:t.value.controller,showParameter:R.value,showDeleteIcon:t.value.communication&&t.value.communication.length>0,onConfirm:()=>ye(),onChange:S=>Me(S),onTargetChange:S=>xe(S),onViewSource:S=>Ie(S),onDeleteCommand:Le},null)}function Te(S,D){t.value.communication&&t.value.communication.length>D&&(t.value.communication[D]=S,L(!1,null))}function De(S,D){var j;t.value.communication&&t.value.communication.length>D&&(t.value.communication.splice(D,1),a(S.id),t.value.communication.length===0&&!((j=t.value.command)!=null&&j.id)?x.emit("delete",n.displayOrder):L(!1,null))}function he(S,D){const{source:j,target:O}=S;K(O,j),t.value.shouldShowCommunicationPanel=!0}function ve(S,D){return e.createVNode(gn,{ref:j=>{j&&(P.value[D]=j)},communication:S,event:t.value.event.label,sourceCommunication:n.sourceCommunication,onChanged:j=>Te(j,D),onDeleteCommand:()=>De(S,D),onAddCommand:j=>he(j)},null)}function Ce(S){const{targetForm:D,targetCommand:j}=S,O={formId:D.id,formCode:D.code,externalContainerId:D.containerId,commandCode:j.code,commandViewmodelId:j.viewmodelId};K(O,g.value),t.value.shouldShowCommunicationPanel=!0,y.value=!1,t.value.needSelectCommunicationCommand=!1}function ge(){return e.createVNode(pn,{sourceCommunication:n.sourceCommunication,onSelectCommand:S=>Ce(S)},null)}return()=>e.createVNode("div",{class:"show-switch"},[e.createVNode("div",{class:"f-page-events-editor-bound-event"},[e.createVNode("div",{class:"f-page-events-editor-bound-event-name",title:o.value},[l.value]),!c.value&&e.createVNode("div",{style:"float:right;margin:5px;"},[e.createVNode("div",{class:m.value,style:"font-size: 10px;",onClick:I},null)]),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",style:"font-size: 13px;float: right; margin:8px;",onClick:M},null),!c.value&&e.createVNode("div",{class:"f-icon f-icon-home-add",style:"float:right; font-size: 10px; margin:8px;",onClick:A},null),c.value&&e.createVNode("div",{class:"f-icon f-icon-flowline-warning text-danger text-tip",title:"源表单或事件已失效,请删除",style:"float:right; font-size: 13px; margin:8px;"},null)]),_.value&&Pe(),y.value&&ge(),p.value&&Be(),!c.value&&t.value.shouldShowCommunicationPanel&&t.value.communication&&t.value.communication.length>0?t.value.communication.map((S,D)=>ve(S,D)):""])}});function wn(n,x,V){const{interactions:b}=x,{setComponentLists:d}=$e(),v=e.ref(n.value.internalCommandList);function L(l){b.value[l].showSwitch=[],b.value[l].showSwitch.push(q.cloneDeep({showSection:[[!1,!1,!1,!1,!1],[!1,!1,!0,!1,!1],[!1,!0,!1,!0,!1]],showSwitchNumber:2})),b.value=q.cloneDeep(b.value)}function w(l){var c;const o=[];return(c=n.value.newController)==null||c.forEach(g=>{l.forEach(P=>{g.Code===P.controller.label&&o.push(q.cloneDeep(g))})}),o}function B(l){if(n.value.repititionCommand.length!==0)return n.value.repititionCommand.forEach(o=>{l.forEach(c=>{var g,P,$,m;if(o.command.id===((g=c.command)==null?void 0:g.id)){o.command.params=q.cloneDeep((P=c.command)==null?void 0:P.property);const M=($=c.command)==null?void 0:$.targetComponent;(m=c.command)==null||m.componentLists.forEach(I=>{o.targetComponent=I.componentId===M?{id:I.componentId,viewModelId:I.viewModelId}:o.targetComponent})}})}),n.value.repititionCommand}function k(l=!1,o=null){var m;n.value.newFuncEvents=o?q.cloneDeep(o):null,n.value.isAddControllerMethod=l;const c=[],g=q.cloneDeep(n.value.internalCommandList);b.value.map(M=>{const I=q.cloneDeep(M.controller),A=q.cloneDeep(M.command),U=q.cloneDeep(M.event),J=q.cloneDeep(M.communication),N={controller:I,command:A,boundEvents:U,communication:J};c.push(q.cloneDeep(N))});const P=(m=n.value.newController)!=null&&m.length&&c.length?q.cloneDeep(w(c)):[];n.value.repititionCommand&&(n.value.repititionCommand=B(c));const $={viewModelId:n.value.viewModelId,savedCommand:q.cloneDeep(n.value.viewModel),boundEventsList:q.cloneDeep(c),events:q.cloneDeep(n.value.events),internalCommandList:q.cloneDeep(g),componentLists:[],relativePath:n.value.relativePath,envType:n.value.envType,newController:q.cloneDeep(P),isAddControllerMethod:n.value.isAddControllerMethod,repititionCommand:n.value.repititionCommand,preCommand:n.value.preCommand,newFuncEvents:n.value.newFuncEvents};V.emit("savedCommandListChanged",$)}function C(l){l.showSection[l.showSwitchNumber][2]=!0}function F(l){l.showSection[l.showSwitchNumber][2]=!1}function f(l){l.showSection[l.showSwitchNumber][3]=!0}function a(l){l.showSection[l.showSwitchNumber][3]=!1}function u(l,o=!1){l.showSection[l.showSwitchNumber][2]?(F(l),o&&f(l)):(C(l),o&&a(l))}function s(){return n.value.componentLists}function i(l){n.value.viewModel.forEach(o=>{for(let c=0;c<o.controllerList.length;c++)o.controllerList[c].label===l.label&&(o.controllerList[c]=q.cloneDeep(l))})}function r(){return n.value.viewModelId}function h(){return n.value.getEventPath?n.value.getEventPath().viewModelDisplay:[]}function E(l,o){return d(l,o,n.value)}function t(l){n.value.newController=n.value.newController||[],n.value.newController.push(q.cloneDeep(l));const o=n.value.newController;for(let c=0;c<o.length;c++)for(let g=c+1;g<o.length;g++)o[c].Id===o[g].Id&&(o.splice(g,1),g--)}function R(l){let o=!1;return n.value.internalCommandList.forEach(c=>{if(c.controllerName.label===l.controllerName.label){o=!0;return}}),o||n.value.internalCommandList.push(l),o}function _(){var l;if((l=n.value)!=null&&l.getEventPath)return n.value.getEventPath()}function T(l,o){b.value.forEach(c=>{var g;((g=c.command)==null?void 0:g.label)===o.label&&(c.command=o)})}function p(l,o){T(l,o)}function y(l,o){const c=b.value[o];l.event=l.event.label?l.event:q.cloneDeep(c.event);let g=!1;n.value.repititionCommand||(n.value.repititionCommand=[]),n.value.repititionCommand.forEach(m=>{m.command.id===l.command.id&&m.event.label===l.event.label&&m.targetComponent.viewModelId===l.targetComponent.viewModelId&&(g=!0),m.command.id===l.command.id&&m.event.label===l.event.label&&m.targetComponent.viewModelId!==l.targetComponent.viewModelId&&(m=q.cloneDeep(l))}),g||n.value.repititionCommand.push(q.cloneDeep(l));let P={id:l.command.id,label:l.command.label,name:l.command.name,handlerName:l.command.handlerName,cmpId:l.controller.id,componentLists:[],hasPath:!1,targetComponent:l.targetComponent.id,property:q.cloneDeep(l.command.params),shortcut:{},isRtcCommand:l.command.isRtcCommand,isNewGenerated:l.command.isNewGenerated||!1,isInvalid:!1};const $={controllerName:l.controller};P=d($,P,n.value),c.command=q.cloneDeep(P),c.controller=q.cloneDeep(l.controller),p(c,P)}return{controllers:v,onClosed:L,emitFinalState:k,toggleSelectingMethod:u,getViewModeId:r,getComponentList:s,updateTarget:i,updateCommandHasPath:E,addNewController:t,checkIfNewControllerExists:R,getMethodsOnViewModel:h,getEventPath:_,selectBoundCommand:y}}const fe=e.defineComponent({name:"FEventsEditor",props:Fe,emits:["savedCommandListChanged"],setup(n,x){const V=e.ref(n.initialData),b=e.inject("designer-host-service"),d=Ze(V),{loadEvents:v,resetBoundEvents:L}=d,w=e.inject("useFormSchema"),B=Xe(w,d),{addNewInteraction:k,deleteInteracton:C,interactions:F,loadInteractions:f}=B,a=wn(V,B,x),{emitFinalState:u,controllers:s}=a;e.provide("useEventsComposition",d),e.provide("useInteractionCompostion",B),e.provide("useMethodsComposition",a);function i(){V.value.isAddControllerMethod=!1}function r(){var p,y;const T=(y=(p=V.value)==null?void 0:p.sourceCommunication)==null?void 0:y.externalContainerId;if(T){const{assembleSourceOutline:l}=le(w),o=l(b,x,T);e.provide("sourceOutlineData",o)}}e.onMounted(()=>{i(),L(),v(),f(),r()});function h(T){C(T),u(!1,null)}function E(T,p){const y=T.showSwitch[0],l=y.showSection[y.showSwitchNumber][3];let o=!1;return n.initialData.getEventPath&&(n.initialData.getEventPath().actionWithPath.length!==0?o=!0:o=!1),e.createVNode(bn,{key:`${p}`,controllers:s.value,interaction:T,displayOrder:p,collapsed:l,onDelete:h,sourceCommunication:V.value.sourceCommunication,viewSourceHandle:n.viewSourceHandle,haveBoundCommand:o},null)}function t(){var T;return(T=F.value)==null?void 0:T.map((p,y)=>{var o;let l=p.event.label;return(o=p.communication)!=null&&o.length&&(l=`${p.communication.map(g=>g.id).join("-")}_${l}`),e.createVNode("div",{class:"events-display-order",key:`${l}_${y}`},[E(p,y)])})}function R(T){k(T)}function _(T){const p=T.source;if(F.value.find(l=>{var o;if((o=l.communication)!=null&&o.length&&l.communication.find(g=>{var P,$,m;return((P=g.source)==null?void 0:P.formId)===p.formId&&(($=g.source)==null?void 0:$.componentId)===p.componentId&&((m=g.source)==null?void 0:m.event)===p.event}))return!0})){new ae.FNotifyService().info({position:"top-center",message:"事件已存在,请勿重复添加。"});return}k({label:"onCommunication",name:"组件通讯"},T)}return()=>e.createVNode("div",{class:"f-page-events-editor"},[e.createVNode("div",{class:"f-page-events-editor-content"},[e.createVNode(an,{sourceCommunication:V.value.sourceCommunication,onClickEventItem:R,onSelectSourceControl:_},null),t()])])}}),Nn={install(n){n.component(fe.name,fe)},register(n,x,V,b){n["events-editor"]=fe,x["events-editor"]=Ae}};W.FEventsEditor=fe,W.default=Nn,W.eventsEditorProps=Fe,W.propsResolver=Ae,Object.defineProperties(W,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("../dynamic-resolver/index.umd.js"),require("lodash-es"),require("../common/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../notify/index.umd.js"),require("../tree-view/index.umd.js"),require("../schema-selector/index.umd.js"),require("../modal/index.umd.js"),require("../input-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../event-parameter/index.umd.js"),require("../locale/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../../designer/capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../../designer/date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../../designer/dynamic-form/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../../designer/list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../../designer/number-spinner/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../../designer/rate/index.umd.js"),require("../../designer/response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../../designer/response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../../designer/section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../../designer/switch/index.umd.js"),require("../../designer/tabs/index.umd.js"),require("../../designer/tags/index.umd.js"),require("../text/index.umd.js"),require("../../designer/time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../../designer/textarea/index.umd.js"),require("../../designer/tree-grid/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../../designer/drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../collection-property-editor/index.umd.js"),require("../../designer/modal/index.umd.js"),require("../external-container/index.umd.js"),require("../language-textbox/index.umd.js"),require("../image/index.umd.js"),require("../comment/index.umd.js"),require("../property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../dynamic-resolver/index.umd.js","lodash-es","../common/index.umd.js","../designer-canvas/index.umd.js","../notify/index.umd.js","../tree-view/index.umd.js","../schema-selector/index.umd.js","../modal/index.umd.js","../input-group/index.umd.js","../combo-list/index.umd.js","../event-parameter/index.umd.js","../locale/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../../designer/capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../../designer/date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../../designer/dynamic-form/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../../designer/list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../../designer/number-spinner/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../../designer/radio-group/index.umd.js","../../designer/rate/index.umd.js","../../designer/response-toolbar/index.umd.js","../response-layout/index.umd.js","../../designer/response-layout-editor/index.umd.js","../search-box/index.umd.js","../../designer/section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../../designer/switch/index.umd.js","../../designer/tabs/index.umd.js","../../designer/tags/index.umd.js","../text/index.umd.js","../../designer/time-picker/index.umd.js","../transfer/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../../designer/textarea/index.umd.js","../../designer/tree-grid/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../../designer/drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../collection-property-editor/index.umd.js","../../designer/modal/index.umd.js","../external-container/index.umd.js","../language-textbox/index.umd.js","../image/index.umd.js","../comment/index.umd.js","../property-panel/index.umd.js"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b["events-editor"]={},b.Vue,b.dynamicResolver,b.LodashES,b.common,b.designerCanvas,b.notify,b.FTreeview,b.FSchemaSelector,b.modal,b.FInputGroup,b.FComboList,b.FEventParameter,b.locale,b.FAccordion,b.FAvatar,b.FButtonEdit,b.FButtonGroup,b.FCalendar,b.FCapsule,b.FCheckbox,b.FCheckboxGroup,b.FComboTree,b.FComponent,b.FColorPicker,b.FContentContainer,b.FDatePicker,b.FDataGrid,b.FDropdown,b.FDynamicForm,b.FEventsEditor$1,b.FFilterBar,b.FFieldSelector,b.FBindingSelector,b.FImageCropper,b.FInputGroup$1,b.FLayout,b.FListNav,b.FListView,b.FLookup,b.FMappingEditor,b.FNav,b.FNumberRange,b.FNumberSpinner,b.FOrder,b.FPageHeader,b.FPageFooter,b.FPagination,b.FProgress,b.FQuerySolution,b.FRadioGroup,b.FRate,b.FResponseToolbar,b.FResponseLayout,b.FResponseLayoutEditorSetting,b.FSearchBox,b.FSection,b.FSmokeDetector,b.FSplitter,b.FStep,b.FSwitch,b.FTabs,b.FTags,b.FText,b.FTimePicker,b.FTransfer,b.FUploader,b.FVerifyDetail,b.FVideo,b.FTextArea,b.FTreeGrid,b.FFilterConditionEditor,b.FFieldset,b.FSortConditionEditor,b.FMenuLookup,b.FDrawer,b.FJsonEditor,b.FPropertyEditor,b.FExpressionEditor,b.FCodeEditor,b.FHtmlTemplate,b.FCollectionPropertyEditor,b.FModal,b.FExternalContainer,b.FLanguageTextbox,b.FImage,b.FComment))})(this,function(b,e,ae,H,se,Qe,de,Ue,Ge,Ye,Xe,_e,Ee,Ze,en,nn,tn,on,an,rn,ze,He,cn,ln,dn,sn,un,mn,fn,hn,vn,gn,pn,Cn,wn,bn,Nn,Sn,Vn,xn,Fn,yn,jn,En,Pn,Mn,Tn,Ln,Bn,In,kn,qn,Dn,An,$n,On,Rn,Un,Gn,_n,zn,Hn,Wn,Kn,Jn,Qn,Yn,Xn,Zn,et,nt,tt,ot,at,rt,it,ct,lt,dt,st,ut,mt,ft,ht,vt,gt,pt){"use strict";const Ct=new Map([["appearance",ae.resolveAppearance]]);function wt(n,x,g){return x}const bt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/events-editor.schema.json",title:"events-editor",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for events-editor",type:"string"},type:{description:"The type events of events-editor",type:"events",default:"events-editor"},initialData:{description:"",type:"object",default:{}},viewSourceHandle:{description:"",type:"function",default:null}},required:["id","type"]},Nt={title:"events-editor",description:"A Farris Component",type:"object",categories:{}},We=[{label:"pageChange",name:"MockMock切换页码"},{label:"pageSizeChanged",name:"Mock分页条数变化事件"},{label:"scrollYLoad",name:"Mock滚动加载事件"},{label:"onEditClicked",name:"Mock操作列点击编辑"},{label:"onDeleteClicked",name:"Mock操作列点击删除"}],Pe={initialData:{type:Object,default:{propertyID:"data-grid-component-viewmodel",propertyType:"events",internalCommandList:[{controllerName:{id:"70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72",label:"ListController",name:"列表控制器"},controllerList:[{id:"93ee1cd2-cf0b-40b3-b99f-958a3d1fad1c",label:"Load",name:"Mock加载数据",handlerName:"Load"},{id:"71ae8a4c-6202-4875-9246-2e2d959da37f",label:"Search",name:"Mock查询",handlerName:"Search"},{id:"77556491-41c0-4356-8ccf-25e39817060e",label:"Add",name:"Mock添加数据",handlerName:"Add"},{id:"52fdcac3-46c8-466e-aa5d-19920ece2076",label:"View",name:"Mock查看数据",handlerName:"View"},{id:"7ade9996-0531-4401-b1bc-fb9ec8ee3f8e",label:"Edit",name:"Mock编辑数据",handlerName:"Edit"},{id:"6d5a354f-871f-43e6-82bc-7837184380d3",label:"RemoveRows",name:"Mock删除选中行",handlerName:"RemoveRows"},{id:"1a1b7c33-38f0-469f-a017-223086ee6259",label:"ChangePage",name:"Mock切换页码",handlerName:"ChangePage"},{id:"debae2dd-3387-48cf-90ba-96e74ab5a8e5",label:"Remove",name:"Mock删除指定数据",handlerName:"Remove"}]}],events:We,boundEventsList:[],viewModel:[],componentLists:[{componentId:"root-component",viewModelId:"root-viewmodel"},{componentId:"data-grid-component",viewModelId:"data-grid-component-viewmodel"}],allComponentList:[{componentId:"root-component",viewModelId:"root-viewmodel"},{componentId:"data-grid-component",viewModelId:"data-grid-component-viewmodel"}],newController:[],isAddControllerMethod:!1,getEventList:()=>({events:We,boundEventsList:[]})}},viewSourceHandle:{type:Function,default:()=>{}}},Ke=ae.createPropsResolver(Pe,bt,Ct,wt,Nt);function Je(){function n(g,v){const a=[{controllerId:"45be24f9-c1f7-44f7-b447-fe2ada458a61",controllerLabel:"AdvancedListCardController",controllerName:"高级列卡控制器",commands:[{name:"增加子表数据",id:"250cd2a2-9995-4c01-64aa-5029afba08ca",handlerName:"AddItem"},{name:"删除子表数据",id:"a2c06958-29b1-0582-5f3e-c3cfcc741f8f",handlerName:"RemoveItem"},{name:"插入数据",id:"3208b00c-543d-c050-3c54-081715972dda",handlerName:"Insert"},{name:"查询从表数据(分页)",id:"b60b7754-35cf-7eaa-0f1d-bc5e5d61c0bc",handlerName:"queryChild"},{name:"批量删除子表",id:"378fcd7d-ce91-c052-5947-d60ecdb38df9",handlerName:"batchDelete"},{name:"移动数据",id:"fcac5d5e-2367-2b61-a82a-f8e874e8efc0",handlerName:"move"},{name:"打开批量编辑界面",id:"8d8b05d6-2d22-b0b7-7cb8-51bbb8cd8a18",handlerName:"openBatchEditDialog"}]},{controllerId:"d7ce1ba6-49c7-4a27-805f-f78f42e72725",controllerLabel:"EditableListController",controllerName:"可编辑列表控制器",commands:[{name:"打开批量编辑界面",id:"c3831e36-27d1-1c98-dd60-30e2d7ec04d2",handlerName:"openBatchEditDialog"},{name:"加载列表数据",id:"f80e026b-bd9b-002b-d2aa-52c44a633bec",handlerName:"Load"}]},{controllerId:"8fe977a1-2b32-4f0f-a6b3-2657c4d03574",controllerLabel:"TreeCardController",controllerName:"树卡控制器",commands:[{name:"新增子表数据",id:"21b0c3af-3caf-b11d-2360-d9af20016501",handlerName:"AddItem"},{name:"删除子表数据",id:"113f1d77-65a4-63bf-3973-80dd15f294d1",handlerName:"RemoveItem"},{name:"批量删除子表",id:"bf13585c-a8f3-384b-356c-bd8bf06751c4",handlerName:"batchDelete"}]},{controllerId:"8d21e69c-70b3-44f6-88b5-fd6a8d3ce11b",controllerLabel:"PopController",controllerName:"弹出控制器",commands:[{name:"新增子表数据",id:"d6933772-8047-9bde-220b-449481883142",handlerName:"AddItem"},{name:"删除子表数据",id:"03c233eb-e39e-8e34-6809-ee4ab3a0d97c",handlerName:"RemoveItem"},{name:"加载并新增",id:"6882ab4a-9c23-8d59-6aac-de891eae20d2",handlerName:"LoadAndAdd"}]},{controllerId:"43f68561-eae4-4495-b318-d629615523f8",controllerLabel:"BatchEditCommands",controlleName:"批量编辑控制器",commands:[{name:"打开批量编辑界面",id:"a659aaba-daa4-3c07-8b26-164b01726022",handlerName:"openBatchEditDialog"},{name:"复制行",id:"d5f67e0a-767d-a238-5ad4-b1285476c16f",handlerName:"copyRow"},{name:"复制行",id:"229d2dd3-2fe7-f06a-b705-cfa0fc711614",handlerName:"clone"}]},{controllerId:"c121742e-6028-48bf-817c-1dda7fb098df",controllerLabel:"AdvancedListCardWithSidebarController",controllerName:"高级列卡控制器(侧边栏)",commands:[{name:"增加子表数据(侧边栏)",id:"250cd2a2-9995-4c01-64aa-5029afba08ca",handlerName:"AddItem"},{name:"删除子表数据(侧边栏)",id:"a2c06958-29b1-0582-5f3e-c3cfcc741f8f",handlerName:"RemoveItem"}]},{controllerId:"8172a979-2c80-4637-ace7-b13074d3f393",controllerLabel:"CardController",controllerName:"卡片控制器",commands:[{name:"新增子表数据",id:"6f987222-ebe2-0f3c-1594-a12408b22801",handlerName:"AddItem"},{name:"删除子表数据",id:"0cdeddcc-8332-f13f-be96-b5eeac84a334",handlerName:"RemoveItem"},{name:"插入数据",id:"2666b526-a1b2-f268-1629-b1b95b71c8dd",handlerName:"Insert"},{name:"打开批量编辑界面",id:"8104dd8e-bb27-a659-ff7c-a0321523f727",handlerName:"openBatchEditDialog"},{name:"新增子节点(子表树)",id:"bbd11957-de2a-c727-11d6-64788c4b0fa8",handlerName:"addSubChild"},{name:"删除子表树节点",id:"c8c9f652-ba52-3a9b-5eb9-dadd42c832cd",handlerName:"RemoveTreeItem"},{name:"批量删除子表",id:"e96857fa-1617-fd92-8a05-5c684e0819a1",handlerName:"batchDelete"}]},{controllerId:"31c1022c-ab40-4e8d-bc31-85d539f1d36c",controllerLabel:"FileController",controllerName:"文件控制器",commands:[{name:"批量删除文件数据",id:"d5bf021b-1aa4-06fe-3236-188fd218f4f7",handlerName:"removeFileRows"}]},{controllerId:"2eb7bbd1-fabd-4d0f-991d-7242f53225b1",controllerLabel:"AttachmentController",controllerName:"附件控制器",commands:[{name:"上传并更新行",id:"2a84e28f-7202-d858-1466-748a8040c1f9",handlerName:"UploadAndUpdateRow"},{name:"通过属性名上传并更新行",id:"0f98c9b8-a01b-55d4-3115-269a73f7ccff",handlerName:"uploadAndUpdateRowWithPropertyName"},{name:"移除版本附件行",id:"b441b6a7-9e13-9f75-77a2-10b2c1f7ef26",handlerName:"RemoveAttachmentItem"},{name:"上传并批量新增行",id:"e6fc25ca-853b-0b2d-76c9-a1f7a253679b",handlerName:"UploadAndBatchAddRows"},{name:"通过属性名上传并批量更新行",id:"e00b70db-9de3-8e3e-eb59-1c550a255fec",handlerName:"uploadAndBatchAddRowsWithPropertyName"}]},{controllerId:"e353b4e9-e073-4e18-b9f7-ec4cc8ac72b1",controllerLabel:"PrintService",controllerName:"打印控制器",commands:[{name:"根据数据条件批量打印",id:"774fa275-2da1-e927-e8bf-d27d9886a168",handlerName:"printMulti"}]},{controllerId:"70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72",controllerLabel:"ListController",controllerName:"列表控制器",commands:[{name:"加载数据",id:"86c9f281-e5bc-5d5c-1b86-d1e17ab2e850",handlerName:"Load"}]},{controllerId:"7c48ef46-339c-42d4-8365-a21236c63044",controllerLabel:"ListCardController",controllerName:"列卡控制器",commands:[{name:"加载列表数据",id:"e573d6a2-8261-9ad4-c9f1-2e59af53302d",handlerName:"loadList"}]},{controllerId:"26436aa8-88a7-4aee-bf0b-9843c1e8afbf",controllerLabel:"ListListController",controllerName:"双列表控制器",commands:[{name:"加载导航列表数据",id:"f7dd2c84-7abd-d4bf-6b31-71d96035c034",handlerName:"LoadNavList"}]}];let u=-1;const S=a.findIndex(p=>g===p.controllerId);return S!==-1&&(u=a[S].commands.findIndex(p=>v===p.handlerName)),u!==-1}function x(g,v,a){const u=n(g.controllerName.id,v.handlerName);return a.componentLists.length!==0&&u&&(v.hasPath=!0,v.targetComponent=v.targetComponent||a.componentLists[0].componentId,v.componentLists=H.cloneDeep(a.componentLists)),v}return{isContextDependent:n,setComponentLists:x}}var ce=(n=>(n.Frame="frame",n.dataGrid="data-grid",n.listView="list-view",n.form="form",n.uploader="uploader",n.calendar="calendar",n.page="page",n))(ce||{});function St(n,x){const g=e.inject("designerContext"),v=g&&g.dgControl?g.dgControl:Qe.DgControl,a=e.ref(""),u=e.ref("");function S(r){var l,N,B,o;let h="controlIcon fd-i-Family ",f="";switch(r==null?void 0:r.type){case"form-group":{f=((l=v[r.type])==null?void 0:l.icon)||((N=r.editor)==null?void 0:N.type)||"",(B=v[r.editor.type])!=null&&B.icon&&(f=v[r.editor.type].icon);break}default:f=((o=v[r.type])==null?void 0:o.icon)||r.type}const s=`fd_pc-${f}`;return h+=s,h}function p(r,h){var l;let f=r.id;const s=h==null?void 0:h.contents;if((h==null?void 0:h.type)==="splitter"&&s&&s.length===2){const N=h.direction!=="column";r.id===((l=s[0])==null?void 0:l.id)?f=N?"左侧区域":"上方区域":f=N?"右侧区域":"下方区域"}return f}function q(r){if(r.isLikeCardContainer)return"区块";const h=r.appearance&&r.appearance.class||"",f=h.split(" ");return r.id==="page-header"&&h&&h==="f-page-header"?"页头":f.includes("f-page-header-base")?"页头容器":f.includes("f-page-header-extend")?"页头扩展容器":f.includes("f-title")?"标题容器":f.includes("f-page")?"根容器":f.includes("f-page-main")?"内容区域":f.includes("f-scrollspy-content")&&r.isScrollspyContainer?"滚动监听容器":f.includes("f-grid-is-sub")?"表格容器":f.includes("f-filter-container")?"筛选条容器":"容器"}function O(r){const{componentType:h}=r;switch(h){case ce.Frame:return"根组件";case ce.dataGrid:return(n==null?void 0:n.formSchemaUtils.selectNode(r,s=>s.type===(v["tree-grid"]&&v["tree-grid"].type)))?"树表格组件":"表格组件";case ce.uploader:return"附件组件";case ce.listView:return"列表视图组件";case ce.form:return"卡片组件";case ce.calendar:return"日历组件";case ce.page:return r.name||"页面";default:return"组件"}}function w(r,h){const f=r.name||r.text||r.label||r.title||r.mainTitle;if(r.type!=="component"&&f&&typeof f=="string")return f.trim();switch(r.type){case"content-container":return q(r);case"splitter-pane":return p(r,h);case"component":return O(r);default:return v[r.type]&&v[r.type].name||r.id}}function y(r,h){const f=r.length?r[0]:null;if(!f)return;u.value="",a.value=f.originalId;const s=f?`${f.originalId}-design-item`:"",l=document.getElementById(s);l&&l.click(),x.emit("selectionChanged",f)}function C(r){if(!r)return;const h=`${r}-design-item`,f=document.getElementById(h);f&&f.click()}return{getIcon:S,getTitle:w,onChanged:y,currentSelectedNodeId:a,currentSelectedOutsideNodeId:u,triggerOutsideClick:C}}function Vt(n,x){const{getIcon:g,getTitle:v}=x;function a(w,y,C,r,h){var s;const f=(s=n.data.module)==null?void 0:s.components.find(l=>l.id===w.component);f&&u([f],y,C,r,h)}function u(w,y,C,r,h){return w.forEach(f=>{if(f.type==="component"&&(h=f.id),f.type==="component-ref"){a(f,y,C,r,h);return}const s={originalId:f.id,layer:C,originalParent:r==null?void 0:r.id,componentId:h,name:v(f,r),type:f.type,controlIcon:g(f),rawSchema:f};y.push(H.cloneDeep(s)),(f.contents||f.buttons)&&u(f.contents||f.buttons,y,C+1,f,h)}),y}function S(w){const y=[],C=w.find(s=>s.layer===0);w=w.filter(s=>s.layer!==0),y.push(C);let r=C.originalId,h=0,f=1e3;for(;w.length!==0||f===0;){const s=w.find(l=>l.originalParent===r);s?(y.push(s),r=s.originalId,w=w.filter(l=>l.originalId!==r),h=0):(h-=1,r=y.slice(h)[0].originalId),f-=1}return y}function p(w){return w.forEach((y,C)=>{y.id=(C+1).toString()}),w.forEach(y=>{var C;y.parent=((C=w.find(r=>r.originalId===y.originalParent))==null?void 0:C.id)||""}),w.forEach(y=>{y.hasChildren=w.findIndex(C=>C.parent===y.id)>0}),w}function q(w){const y={originalId:n.data.module.id,layer:0,originalParent:null,name:"页面",type:"module",controlIcon:"controlIcon fd-i-Family fd_pc-module",rawSchema:n.data.module},C=[];return w.forEach(r=>{r[0].originalParent=y.originalId,C.push(...r)}),C.unshift(y),C}function O(){const w=n.data.module?e.ref(n.data.module.components):e.ref([n.data]);if(!w.value)return;const y=[];w.value.forEach(f=>{if(f){const s=[];s.push(f);const B=u(s,[],1,null,f.id);y.push(B)}});const C=q(y),r=S(C);return p(r)}return{getData:O}}function me(n){const x=e.inject("sourceOutlineData")||[],g=e.ref(),v=e.ref(!1),a=e.ref([]),u=e.ref();function S(s,l,N,B){var o,_,W,$;return{id:se.useGuid().guid(),source:B||{formId:(o=s.sourceCommunication)==null?void 0:o.formId,formCode:(_=s.sourceCommunication)==null?void 0:_.formCode,componentId:(W=s.sourceCommunication)==null?void 0:W.componentId,externalContainerId:($=s.sourceCommunication)==null?void 0:$.externalContainerId,event:l||"onCommunication"},target:{formId:(N==null?void 0:N.formId)||"",formCode:(N==null?void 0:N.formCode)||"",externalContainerId:(N==null?void 0:N.externalContainerId)||"",commandCode:(N==null?void 0:N.commandCode)||"",commandViewmodelId:(N==null?void 0:N.commandViewmodelId)||""},paramMappings:[]}}function p(s){var l,N;(l=s==null?void 0:s.communication)!=null&&l.length&&((N=s==null?void 0:s.communication)==null||N.map(B=>{var o,_;if(B!=null&&B.id&&!((o=B==null?void 0:B.source)!=null&&o.componentId)){const W=(_=n.getFormSchema().module.communications)==null?void 0:_.find($=>$.id===(B==null?void 0:B.id));W&&Object.assign(B,W)}}))}function q(s){const l=n.getFormSchema(),{communications:N}=l.module;N||(l.module.communications=[]);const B=l.module.communications.findIndex(o=>o.id===s.id);B===-1?l.module.communications.push(s):Object.assign(l.module.communications[B],s)}function O(s){var l;if((l=s==null?void 0:s.communication)!=null&&l.length){const N=n.getFormSchema();s.communication.map(B=>{N.module.communications&&B&&(N.module.communications=N.module.communications.filter(o=>o.id!==B.id))}),s.communication=[]}}function w(s){var N;const l=n.getFormSchema();s&&((N=l.module.communications)!=null&&N.length)&&(l.module.communications=l.module.communications.filter(B=>B.id!==s))}function y(s,l,N){const B=St(s,l),o=n.externalFormSchema.get(N);if(o!=null&&o.content){const _={data:o.content},{getData:W}=Vt(_,B);return W()}return[]}function C(s){var N;if(!((N=s==null?void 0:s.source)!=null&&N.componentId)){v.value=!1;return}const l=x.find(B=>B.originalId===s.source.componentId);l?(v.value=!1,g.value=l):(v.value=!0,g.value={id:s.source.componentId})}function r(s){var o,_,W,$;a.value=[];const l=(o=g.value)==null?void 0:o.rawSchema;if(!l){u.value=null;return}const N=l.type==="form-group"&&l.editor?l.editor.type:l.type,B=(_=ae.schemaMap[N])==null?void 0:_.events;B&&Object.keys(B).forEach(V=>{a.value.push({eventCode:V,eventName:B[V]})}),(W=s.source)!=null&&W.event&&(($=a.value)!=null&&$.length)&&(u.value=a.value.find(V=>{var k;return V.eventCode===((k=s.source)==null?void 0:k.event)}))}function h(s){var B,o,_,W,$,V,k,c;if(!(s!=null&&s.length))return;C(s[0]),r(s[0]);let l="",N="";return v.value?l=`${((B=s[0].source)==null?void 0:B.componentId)||""}-${((o=s[0].source)==null?void 0:o.event)||""}`:(l=(_=g.value)==null?void 0:_.name,l&&((W=u.value)!=null&&W.eventName)&&(l+=`-${($=u.value)==null?void 0:$.eventName}`),N=`${(V=g.value)==null?void 0:V.name} (${(k=g.value)==null?void 0:k.originalId})`,N=`${N}
|
|
2
|
+
${(c=u.value)==null?void 0:c.eventName} (${u.value.eventCode})`),{title:l,titleTip:N,isControlInvalid:v.value}}function f(s){var l;if((l=s==null?void 0:s.communication)!=null&&l.length){const N=s==null?void 0:s.communication[0];return N==null?void 0:N.source}}return{createNewCommunication:S,resolveCommunication:p,clearAllCommunication:O,clearCommunicationById:w,saveCommunication:q,assembleSourceOutline:y,resolveSourceControlEventTitle:h,resolveCommunicationSource:f}}function xt(n,x,g){const v=e.ref([]),{boundEvents:a,unBoundEvent:u}=x;function S(C){var h,f;return{event:{label:(h=C.boundEvents)==null?void 0:h.label,name:(f=C.boundEvents)==null?void 0:f.name},showSwitch:[{showSection:[[!1,!1,!1,!1,!1],[!1,!1,!0,!1,!1],[!1,!0,!1,!0,!1]],showSwitchNumber:2}],command:H.cloneDeep(C.command),controller:H.cloneDeep(C.controller),communication:C.communication}}function p(){var C;v.value=(C=a.value)==null?void 0:C.map(r=>S(r))}function q(C,r){const f=S({boundEvents:C,command:null,controller:{id:"",name:"",label:""},communication:r?[r]:[]});if(r){f.showSwitch[0].showSwitchNumber=2,f.showSwitch[0].showSection[2][2]=!1,f.showSwitch[0].showSection[2][3]=!1,f.needSelectCommunicationCommand=!0,v.value.unshift(f);return}C&&(f.showSwitch[0].showSwitchNumber=1,f.showSwitch[0].showSection[2][3]=!0,v.value.unshift(f))}function O(){var C;(C=v.value)==null||C.forEach(r=>{r.showSwitch.forEach(h=>{h.showSection[2][3]=!1}),r.shouldShowCommunicationPanel=!1})}function w(C){v.value[C].showSwitch.forEach(r=>{r.showSection[2][3]=!r.showSection[2][3]})}function y(C){if(C>=0&&C<=v.value.length-1){const r=v.value[C];u(r.event),v.value.splice(C,1);const{clearAllCommunication:h}=me(n);h(r)}}return{addNewInteraction:q,collapseInteractions:O,deleteInteracton:y,toggleMethodInInteraction:w,interactions:v,loadInteractions:p}}function Ft(n){const x=e.ref([]),g=e.ref([]),v=e.ref([]),{isContextDependent:a}=Je();function u(){const{allComponentList:C}=n.value;n.value.componentLists.length&&n.value.viewModel&&n.value.viewModel.forEach(r=>{r.controllerList.forEach(h=>{if(h.targetComponent){const f=C.find(l=>l.componentId===h.targetComponent);if((f?f.viewModelId:void 0)===n.value.viewModelId)h.hasPath=!1;else{const l=a(r.controllerName.id,h.handlerName);h.hasPath=l?!0:h.hasPath,h.componentLists=l?H.cloneDeep(n.value.componentLists):h.componentLists}}})}),n.value.componentLists.length&&n.value.boundEventsList&&n.value.boundEventsList.forEach(r=>{var h;if((h=r.command)!=null&&h.targetComponent){const f=C.find(l=>{var N;return l.componentId===(((N=r.command)==null?void 0:N.targetComponent)||"")});if((f?f.viewModelId:void 0)===n.value.viewModelId)r.command.hasPath=!1;else{const l=a(r.controller.id,r.command.handlerName);r.command.hasPath=l?!0:r.command.hasPath,r.command.componentLists=l?H.cloneDeep(n.value.componentLists):r.command.componentLists}}})}function S(){const C=g.value.reduce((h,f)=>(h.set(f.boundEvents.label,!0),h),new Map);return x.value.filter(h=>!C.has(h.label))}function p(){var r;const C=((r=g.value)==null?void 0:r.length)>0;v.value=C?S():x.value}function q(){u(),x.value=n.value.events,g.value=n.value.boundEventsList,p()}function O(C){v.value=v.value.filter(r=>r.label!==C.label)}function w(C){g.value=g.value.filter(r=>r.boundEvents.label!==C.label),p()}function y(){var h;const C=(h=n.value)==null?void 0:h.getEventList(),{events:r}=C;C&&(n.value.events=H.cloneDeep(r),n.value.boundEventsList=C.boundEventsList),n.value.boundEventsList&&(n.value.boundEventsList=n.value.boundEventsList.filter(function(f){return r.find(s=>s.label===f.boundEvents.label)}))}return{allEvents:x,boundEvents:g,candidateEvents:v,excludeFromCandidates:O,loadEvents:q,resetBoundEvents:y,unBoundEvent:w}}const yt={sourceCommunication:{type:Object,default:{}}},jt={events:{type:Array,default:[]}},Et=e.defineComponent({name:"FEventList",props:jt,emits:["click"],setup(n,x){const g=e.ref(n.events);function v(u){x.emit("click",u)}function a(u){return e.createVNode("div",{class:"f-page-events-editor-first-bound-event"},[e.createVNode("div",{onClick:()=>v(u),class:"f-page-events-editor-first-bound-event-name"},[u.name])])}return()=>e.createVNode("div",{class:"f-page-events-editor-events"},[g.value.map(u=>a(u))])}}),fe={communication:{type:Object},sourceCommunication:{type:Object,default:{}},event:{type:String,default:""}},Pt=e.defineComponent({name:"FSelectSourceControl",props:fe,emits:["selectSourceEvent","deleteControl"],setup(n,x){const g=e.inject("useFormSchema"),{createNewCommunication:v}=me(g),a=e.ref();a.value=v(n);const u=e.ref([{field:"name",title:"",dataType:"string"}]),S=e.ref([]),p=e.ref(),q=e.ref(),O=e.ref(!0),w=e.ref(!1),y=e.ref([]),C=e.ref(),r=e.ref(!0),h=e.ref(!1);function f(){const V=e.inject("sourceOutlineData");S.value=V||[],q.value.updateDataSource(S.value)}function s(){var k,c,t;if(!((c=(k=a.value)==null?void 0:k.source)!=null&&c.componentId)){h.value=!1;return}const V=(t=S.value)==null?void 0:t.find(i=>i.originalId===a.value.source.componentId);V?(q.value.selectItemById(V.id),h.value=!1):(h.value=!0,p.value={id:a.value.source.componentId})}function l(){var V,k,c;(k=(V=a.value)==null?void 0:V.source)!=null&&k.event&&((c=y.value)!=null&&c.length)&&(C.value=y.value.find(t=>{var i,d;return t.eventCode===((d=(i=a.value)==null?void 0:i.source)==null?void 0:d.event)}))}e.onMounted(()=>{f(),s(),l(),r.value=!1});function N(){var t;y.value=[];const V=p.value.rawSchema,k=V.type==="form-group"&&V.editor?V.editor.type:V.type,c=(t=ae.schemaMap[k])==null?void 0:t.events;c&&Object.keys(c).forEach(i=>{y.value.push({eventCode:i,eventName:c[i]})})}function B(V){O.value=!1,h.value=!1;const k=p.value!==V[0];k&&(p.value=V[0],N()),r.value||(w.value=!0),!r.value&&k&&(C.value=null)}const o=e.computed(()=>({"item-list":!0,"d-none":!O.value})),_=e.computed(()=>V=>{var k;return{item:!0,selected:((k=C.value)==null?void 0:k.eventCode)===V}});function W(V){var k;O.value=!1,w.value=!1,C.value=V,a.value.source.componentId=p.value.rawSchema.id,a.value.source.event=(k=C.value)==null?void 0:k.eventCode,x.emit("selectSourceEvent",a.value)}const $=e.computed(()=>({"form-container":!0,"position-relative":!0,invalid:h.value}));return()=>e.createVNode("div",{class:$.value},[e.createVNode("div",{class:o.value,style:"min-height:220px;"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择源控件")]),e.createVNode(Ue.FTreeView,{ref:q,data:S.value,columns:u.value,columnOption:{fitColumns:!0,fitMode:"expand"},showTreeNodeIcons:!0,fit:!0,iconField:"controlIcon",onSelectionChange:B},null)]),w.value&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择事件")]),y.value.map(V=>e.createVNode("span",{class:_.value(V.eventCode),onClick:()=>W(V)},[V.eventName]))])])])}}),Mt=e.defineComponent({name:"FInteractionButton",props:yt,emits:["clickEventItem","selectSourceControl"],setup(n,x){const g=new de.FNotifyService,v=e.inject("useEventsComposition"),a=e.inject("useInteractionCompostion"),{candidateEvents:u}=v,{collapseInteractions:S}=a,p=e.ref(!1),q=e.ref(!1);function O(h){u.value=u.value.filter(f=>f.label!==h.label)}function w(){var h;(h=n.sourceCommunication)!=null&&h.needSelectSourceControl?q.value=!q.value:p.value=!p.value}function y(h){w(),O(h),x.emit("clickEventItem",h)}function C(){var h;if(!((h=n.sourceCommunication)!=null&&h.needSelectSourceControl)&&u.value.length===0){g.info({position:"top-center",message:"事件已全部绑定"});return}S(),w()}function r(h){q.value=!1,x.emit("selectSourceControl",h)}return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-page-events-editor-top-button"},[e.createVNode("button",{class:"f-page-events-editor-button",onClick:C},[e.createVNode("span",{class:"f-page-events-editor-text"},[e.createTextVNode("新建交互事件")])])]),p.value&&e.createVNode(Et,{events:u.value,onClick:y},null),q.value&&e.createVNode(Pt,{sourceCommunication:n.sourceCommunication,onSelectSourceEvent:r},null)])}}),Tt={collapsed:{type:Boolean,default:!0},displayOrder:{type:Number,default:-1},interaction:{type:Object,default:{}},controllers:{type:Array,default:[]},sourceCommunication:{type:Object,default:{}},viewSourceHandle:{type:Function,default:()=>{}},haveBoundCommand:{Type:Boolean,default:!1}},Lt={newImport:{Type:Boolean,default:!1},addInternalCommandList:{Type:Array,default:[]},outerLayerValue:{Type:Number,default:0},exit:{Type:Number,default:-1},haveBoundCommand:{Type:Boolean,default:!1},controllers:{type:Array,default:[]},iteractionDisplayOrder:{Type:Number,default:0},event:{Type:Object},sourceCommunication:{type:Object,default:{}}},Bt={controllers:{type:Array,default:[]}},It=e.defineComponent({name:"FCommandList",props:Bt,emits:["selectMethod"],setup(n,x){function g(p){return p.controllerList.length!==0}function v(p){return g(p)&&e.createVNode("div",{class:"f-page-internals-controller"},[e.createVNode("div",{class:"f-page-internals-controller-name",title:p.controllerName.name},[p.controllerName.name])])}function a(p,q){x.emit("selectMethod",{method:p,controller:q})}function u(p){return p.controllerList.map(q=>e.createVNode("div",{class:"f-page-internals-command",onClick:()=>a(q,p)},[e.createVNode("div",{class:"f-page-internals-command-name",title:q.label},[q.name])]))}function S(p){return e.createVNode("div",null,[v(p),u(p)])}return()=>e.createVNode("div",{class:"f-page-internals"},[n.controllers.map(p=>S(p))])}}),kt={getEventPath:{type:Function,default:null},notifyService:{type:Object},useFormSchema:{type:Object},sourceCommunication:{type:Object,default:{}},event:{Type:Object}},qt=e.defineComponent({name:"FBoundEventSelector",props:kt,emits:["cancel","submit"],setup(n,x){var F,A;const g=e.ref(),v=e.ref([]),a=e.ref('<i class="f-icon f-icon-search"></i>'),u=n.useFormSchema.getFormMetadataBasicInfo(),S=e.ref(""),p=e.ref(),q=((F=n.sourceCommunication)==null?void 0:F.unSupportedEventCodes)||[],O=e.ref(!q.includes(n.event.label)&&((A=n.useFormSchema.externalFormSchema)==null?void 0:A.size)>0),w=e.ref(),y=e.ref([]);e.onBeforeMount(()=>{if(n.getEventPath){const m=n.getEventPath();g.value=m.viewModelDisplay;const{actionWithPath:I}=m;I.forEach(D=>{D.sourceComponent.map.forEach(U=>{U.active=!1,U.hide=!1})}),v.value=H.cloneDeep(I)}});function C(m=""){m=m.replace(/ /g,"").replace(/>/g,"").toLowerCase(),m===""&&(m=" "),v.value.forEach(I=>{const D=I.path;I.sourceComponent.map.forEach(U=>{const K=U.command.name,X=U.event.name,P=U.command.label;`${D}${K}${X}${P}`.toLowerCase().includes(m)?U.hide=!1:U.hide=!0})})}function r(m=""){m=m.replace(/ /g,"").replace(/>/g,"").toLowerCase(),y.value.forEach(I=>{if(!I.isCommandNode)return;const D=I.name||"",U=I.code||"",K=I.viewmodelName||"",X=`${D}${U}${K}`.toLowerCase();m&&!X.includes(m)?I.hide=!0:I.hide=!1})}function h(m=""){!w.value||w.value.id===u.id?C(m):r(m)}function f(){const m=e.createVNode("div",{class:"f-vm-search"},[e.createVNode("div",{class:"f-vm-searchBar"},[e.createVNode(Xe,{updateOn:"change",groupText:a.value,modelValue:S.value,"onUpdate:modelValue":I=>S.value=I,onChange:h,placeholder:"请输入名称/编号/路径搜索"},null)])]);return O.value?e.createVNode("div",{class:"f-navSelector-header"},[e.createVNode("div",{class:"f-navSelector-recommand"},[e.createVNode("div",{class:"f-navSelector-recommand-text"},[e.createTextVNode("方法列表")])]),e.createVNode("div",{class:"f-navSelector-remainder"},[e.createVNode("div",{class:"f-vm-search"},[m])])]):m}function s(m){return{"f-vm-item":!0,"f-vm-item-focus":m.active}}function l(m,I){let D=0;v.value.forEach(U=>{U.sourceComponent.map.forEach(K=>{!K.command.isInvalid&&m.controller.id===K.controller.id&&m.command.id===K.command.id&&m.event.label===K.event.label&&I.sourceComponent.id===U.sourceComponent.id?(m.active=!m.active,p.value=H.cloneDeep(m)):(K.command.isInvalid&&m.controller.id===K.controller.id&&m.command.id===K.command.id&&m.event.label===K.event.label&&I.sourceComponent.id===U.sourceComponent.id&&(D++,D===1&&(new de.FNotifyService().info({position:"top-center",message:"该方法已失效"}),p.value=null)),K.active=!1)})})}function N(m){return{"f-event-func":!m.command.isInvalid,"f-event-func-invalid":m.command.isInvalid}}function B(m){return m.sourceComponent.map.filter(I=>!I.hide).map(I=>{if(!I.command.isInvalid)return e.createVNode("div",{class:s(I),onClick:()=>l(I,m)},[e.createVNode("div",{class:"f-event-commandItem"},[e.createVNode("div",{class:"f-icon-command"},[e.createVNode("div",{class:"f-icon f-icon-source-code",style:"font-size:10px;color:#30B471;"},[e.createTextVNode(" ")])]),e.createVNode("div",{class:N(I)},[I.command.name,e.createTextVNode("("),I.command.label,e.createTextVNode(")")])]),e.createVNode("div",{class:"f-event-path"},[m.path,I.event.name])])})}function o(){return v.value.length>0?e.createVNode("div",{class:"f-vm-viewModel flex-fill"},[v.value.map(m=>B(m))]):e.createVNode("div",{class:"f-list-view-emptydata",style:"height: 360px;position: relative;"},[e.createVNode("div",{class:"f-datagrid-norecords"},[e.createVNode("div",{class:"f-datagrid-norecords-content"},[e.createTextVNode(" 暂无数据")])])])}function _(){x.emit("cancel")}function W(){if(!p.value){n.notifyService.info({position:"top-center",message:"请选择需要绑定的方法"});return}x.emit("submit",{selectedCommand:p.value,selectedForm:w.value})}function $(){const m=n.useFormSchema.externalFormSchema,I=[];return I.push({containerId:"",id:u.id,code:u.code,name:u.name}),Array.from(m.keys()).forEach(D=>{const U=m.get(D);I.push({containerId:D,id:U.id,code:U.code,name:U.name})}),I}const V=e.computed(()=>({"f-vm-all":!0," h-100":!0,"has-page-list":O.value}));function k(m){var K,X;const{viewmodels:I,components:D}=m.module;if((I==null?void 0:I.length)===0||(D==null?void 0:D.length)===0)return[];y.value=[];const U=(X=(K=n.sourceCommunication)==null?void 0:K.parameterData)==null?void 0:X.getViewModelName;I.forEach(P=>{if(!P||!P.commands||P.commands.length===0)return[];const J=D.find(re=>re.viewModel===P.id),Z=U&&J?U(J,P.name,m):"";y.value.push({id:P.id,code:P.code,name:Z||P.name}),P.commands.forEach(re=>{re.isInvalid||y.value.push({...re,viewmodelId:P.id,viewmodelName:Z||P.name,isCommandNode:!0})})})}function c(m){var I,D,U;if(!(m.id===w.value.id&&m.containerId===w.value.containerId))if(w.value=m,S.value="",p.value=null,w.value.id!==u.id){const K=(D=n.useFormSchema.externalFormSchema)==null?void 0:D.get((I=w.value)==null?void 0:I.containerId);(U=K==null?void 0:K.content)!=null&&U.module&&k(K.content)}else v.value.map(K=>{K.sourceComponent.map.map(X=>{X.hide=!1,X.active=!1})})}function t(){const m=$();w.value||(w.value=m[0]);const I=e.computed(()=>D=>{var U;return{"f-list-view-group-item":!0,"f-listview-active":D.id===((U=w.value)==null?void 0:U.id)&&D.containerId===w.value.containerId}});return e.createVNode("div",{class:"f-page-nav"},[e.createVNode("div",{class:"f-list-view"},[e.createVNode("div",{class:"f-list-view-content"},[e.createVNode("ul",{class:"f-list-view-group",style:"list-style: none;"},[m.map(D=>{let U=D.name;return D.containerId&&(U+=`, 所属外部容器:${D.containerId}`),e.createVNode("li",{class:I.value(D),onClick:()=>c(D)},[e.createVNode("div",{class:"f-list-content"},[e.createVNode("div",{class:"f-navSelector-leftCategory",title:U},[D.name])])])})])])])])}function i(m){y.value.map(I=>I.active=!1),m.active=!0,p.value=m}function d(){return e.createVNode("div",{class:"f-vm-viewModel flex-fill"},[y.value.filter(m=>!m.hide).map(m=>{if(m.isCommandNode)return e.createVNode("div",{class:s(m),onClick:()=>i(m)},[e.createVNode("div",{class:"f-event-commandItem"},[e.createVNode("div",{class:"f-icon-command"},[e.createVNode("div",{class:"f-icon f-icon-source-code",style:"font-size: 10px; color: rgb(48, 180, 113);"},null)]),e.createVNode("div",{class:"f-event-func"},[m.name,e.createTextVNode("("),m.code,e.createTextVNode(")")])]),e.createVNode("div",{class:"f-event-path"},[m.viewmodelName])])})])}return()=>e.createVNode("div",{class:V.value},[e.createVNode("div",{class:"d-flex f-utils-fill-flex-row splitter"},[O.value?t():"",e.createVNode("div",{class:"f-utils-fill-flex-column"},[f(),!w.value||w.value.id===u.id?o():d()])]),e.createVNode("div",{class:"modal-footer"},[e.createVNode("button",{type:"button",class:"btn btn-secondary",onClick:_},[e.createTextVNode("取消")]),e.createVNode("button",{type:"button",class:"btn btn-primary",onClick:W},[e.createTextVNode("确定")])])])}}),Dt=e.defineComponent({name:"FCommandSource",props:Lt,emits:["addInternalCommandListChanged","newImportChanged","selectBoundMethod","click","existChanged","newFunctionChanged","close","selectMethod","addCommunication"],setup(n,x){const g=e.inject("useMethodsComposition"),v=e.inject("useFormCommand"),a=new de.FNotifyService,{checkIfNewControllerExists:u,addNewController:S}=g,p=e.ref(n.controllers),q=e.inject("useFormSchema"),O=e.inject(Ye.F_MODAL_SERVICE_TOKEN);let w,y;const C=e.ref(!1);e.onMounted(()=>{C.value=q.externalFormSchema.size>0});function r(i,d,F){if(S(i),i.Commands){const A=v.getInternalControllerFromControllerMetadata(i,d,F);u(A)&&a.info({position:"top-center",message:"该控制器已存在"})}}async function h(i){v.getSupportedControllerMetadata(i).then(d=>{d&&r(d.controller,d.code,d.nameSpace)}).finally(()=>{w&&w.destroy&&w.destroy()})}function f(i){w&&w.destroy&&w.destroy()}function s(){const i={formBasicInfo:q==null?void 0:q.getFormMetadataBasicInfo()};return e.createVNode(Ge.FSchemaSelector,{injectSymbolToken:se.ControllerSchemaRepositorySymbol,"view-type":"NavList",editorParams:i,showFooter:!0,onCancel:f,onSubmit:h},null)}function l(){w=O.open({title:"选择控制器",width:950,render:s,showButtons:!1})}function N(){x.emit("newFunctionChanged")}function B(){y&&y.destroy&&y.destroy()}function o(i){const{selectedCommand:d,selectedForm:F}=i;!F||(F==null?void 0:F.id)===q.getFormMetadataBasicInfo().id?(g.selectBoundCommand(d,n.iteractionDisplayOrder),x.emit("selectBoundMethod")):x.emit("addCommunication",i),B()}function _(){const{getEventPath:i}=g;return e.createVNode(qt,{getEventPath:i,notifyService:a,useFormSchema:q,sourceCommunication:n.sourceCommunication,event:n.event,onCancel:B,onSubmit:o},null)}function W(){y=O.open({title:"已有方法",width:950,height:500,fitContent:!1,render:_,showButtons:!1,enableEsc:!1,draggable:!0})}function $(){x.emit("close",null)}function V(){return e.createVNode("div",{class:"f-command-breakline"},[e.createTextVNode("------------------------------------------------------------")])}function k(){return e.createVNode("div",{class:"f-page-internals-new-command"},[e.createVNode("div",{class:"f-page-internals-new-command-func1"},[e.createVNode("div",{class:"f-icon f-icon-panel-retraction"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>l()},[e.createTextVNode("引入控制器")])]),e.createVNode("div",{class:"f-page-internals-new-command-func2"},[e.createVNode("div",{class:"f-icon f-icon-new-edit"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>N()},[e.createTextVNode("添加新方法")])]),(n.haveBoundCommand||C.value)&&e.createVNode("div",{class:"f-page-internals-new-command-func3"},[e.createVNode("div",{class:"f-icon f-icon-licensed"},null),e.createVNode("div",{class:"f-function-class",onClick:()=>W()},[e.createTextVNode("已有方法")])])])}function c(i){x.emit("selectMethod",i)}function t(){return e.createVNode("div",{class:"f-page-command-source-choice"},[e.createVNode(It,{controllers:p.value,onSelectMethod:c},null)])}return()=>e.createVNode("div",{class:"f-page-events-editor-command-source"},[t(),V(),k(),V(),e.createVNode("div",null,[e.createVNode("div",{class:"f-page-internals-close",onClick:$},[e.createTextVNode("取消")])])])}}),At={command:{type:Object,default:{}},showParameter:{type:Boolean,default:!1},controller:{type:Object,default:{}},showDeleteIcon:{type:Boolean,default:!1}},$t=e.defineComponent({name:"FParameterEditor",props:At,emits:["confirm","change","targetChange","viewSource","deleteCommand"],setup(n,x){const g=new de.FNotifyService,v=e.inject("FMessageBoxService"),a=e.ref(H.cloneDeep(n.command)),u=e.ref(n.controller),S=e.ref(0),p=e.computed(()=>a.value.id==="abandoned"),q=e.computed(()=>a.value.id==="deleted"),O=e.computed(()=>n.showDeleteIcon),w=e.computed(()=>a.value!==null),y=e.inject("useMethodsComposition"),C=e.ref(n.showParameter),r=e.inject("useFormSchema"),h=e.computed(()=>a.value.componentLists&&a.value.hasPath),f=e.computed(()=>{const P=a.value.id!=="abandoned"&&a.value.id!=="deleted",J=h.value,Z=a.value.property&&a.value.property.length>0;return P&&(J||Z)});function s(){const{targetComponent:P}=a.value;let J="";return a.value.componentLists&&a.value.componentLists.forEach(Z=>{if(Z.componentId===P){J=Z.viewModelId;return}}),J}const l=e.ref(s()),N=e.computed(()=>a.value.targetComponent||"");function B(){g.info({position:"top-center",message:"方法已被移除,请重新绑定"})}function o(){return e.createVNode("div",{title:"方法已被移除,请重新绑定",class:"f-icon f-icon-flowline-warning text-danger text-center ",style:"font-size: 13px;margin-right:10px;width: 30px;height: 20px;",onClick:()=>B()},null)}function _(){g.info({position:"top-center",message:"方法已失效,请重新绑定"})}function W(){return e.createVNode("div",{title:"'方法已被删除,请绑定其他方法'",class:"f-icon f-icon-flowline-warning text-danger text-center ",style:"font-size: 13px;margin-right:10px;width: 30px;height: 20px;",onClick:()=>_()},null)}function $(P){C.value=!C.value}function V(){return e.createVNode("div",{class:"f-icon f-icon-edit-button",style:"font-size: 13px;margin-right:10px;",onClick:()=>$(S.value)},null)}function k(P,J){a.value.targetComponent=P[0].componentId,x.emit("targetChange",a.value)}function c(){const P=e.reactive({content:"将此方法添加到指定的组件",placement:"top"});return e.createVNode("div",null,[e.createVNode("div",{class:"f-page-parameter-editor-targetComponent"},[e.createVNode("div",{class:"f-page-parameter-editor-targetComponent-topic"},[e.createTextVNode("挂载到目标组件"),e.withDirectives(e.createVNode("span",{class:"farris-label-tips ml-2"},[e.createVNode("i",{class:"f-icon f-icon-description-tips"},null)]),[[e.resolveDirective("tooltip"),P]])]),e.createVNode("div",{class:"f-page-parameter-editor-targetComponent-dropdown"},[e.createVNode(_e,{modelValue:l.value,"onUpdate:modelValue":J=>l.value=J,enableClear:!1,idField:"viewModelId",valueField:"viewModelId",textField:"componentId",data:a.value.componentLists,editable:!1,onChange:k},null)])])])}function t(P,J){J.value=P}function i(){x.emit("change",a.value)}function d(){let P="";return N.value?P=r.getViewModelIdByComponentId(N.value):P=y.getViewModeId(),P}function F(P,J){var Ce,we,be,Ne,he,ve,T,R,G,z,Q,ee,ne,te,oe,Se,Ve,xe,le,Fe,ye;const Z=d(),Le=r.getViewModelById(Z).commands.find(Y=>{var ie;return(Y==null?void 0:Y.id)===((ie=n.command)==null?void 0:ie.id)}),Be=e.reactive(P.context.data),{assembleSchemaFieldsByComponent:Ie,assembleOutline:ke,assembleStateVariables:qe,assembleSchemaFieldsUnderBoundEntity:De,getEditor:Ae}=P.context.generalData,{designerMode:$e}=r,Oe=Y=>{t(Y,P),i()},Re=Y=>{var ie,ge,ue,je;return((je=(ue=(ge=(ie=P==null?void 0:P.origin)==null?void 0:ie.controlSource)==null?void 0:ge.context)==null?void 0:ue.data)==null?void 0:je.value)===":Entity"||Y.raw.children&&Y.raw.children.length&&(Y.disabled=!0),Y};return e.createVNode(Ee,{readonly:$e==="PC_RTC"&&!J.isRtcCommand,defaultValue:P==null?void 0:P.origin.defaultValue,modelValue:P.value,"onUpdate:modelValue":Y=>P.value=Y,data:Be,editor:Ae(P.value,P,Le,Z,Oe),fieldData:Ie(),formData:ke(),varData:qe(),activeViewModelFieldData:De(N.value),editorControlSource:(Ce=P==null?void 0:P.origin)==null?void 0:Ce.controlSource,customRowStatus:Re,idField:((he=(Ne=(be=(we=P==null?void 0:P.origin)==null?void 0:we.controlSource)==null?void 0:be.context)==null?void 0:Ne.data)==null?void 0:he.value)===":Entity"?"bindTo":((G=(R=(T=(ve=P==null?void 0:P.origin)==null?void 0:ve.controlSource)==null?void 0:T.context)==null?void 0:R.valueField)==null?void 0:G.value)||((ne=(ee=(Q=(z=P==null?void 0:P.origin)==null?void 0:z.controlSource)==null?void 0:Q.context)==null?void 0:ee.idField)==null?void 0:ne.value)||"id",textField:((Ve=(Se=(oe=(te=P==null?void 0:P.origin)==null?void 0:te.controlSource)==null?void 0:oe.context)==null?void 0:Se.textField)==null?void 0:Ve.value)||"label",editable:(ye=(Fe=(le=(xe=P==null?void 0:P.origin)==null?void 0:xe.controlSource)==null?void 0:le.context)==null?void 0:Fe.editable)==null?void 0:ye.value,onConfirm:Y=>{t(Y,P),i()},onValueChange:Y=>{var ie,ge;if(((ie=P.origin)==null?void 0:ie.Code)==="lookupId"){const ue=(ge=a.value.property)==null?void 0:ge.find(je=>je.name==="mappingFields");ue&&ue.value&&(ue.value="")}t(Y,P),i()}},null)}function A(){var P;return(P=a.value.property)==null?void 0:P.map((J,Z)=>{const re=e.reactive({content:J.description,placement:"top"});return e.createVNode("div",{key:J.name+Z},[e.createVNode("div",{class:"f-page-parameter-editor-row1"},[e.createVNode("div",{class:"f-page-parameter-editor-parameter-name"},[J.shownName,J.description&&e.withDirectives(e.createVNode("div",{class:"ml-2 farris-label-tips"},[e.createVNode("i",{class:"f-icon f-icon-description-tips"},null)]),[[e.resolveDirective("tooltip"),re]])])]),e.createVNode("div",{class:"f-page-parameter-editor-row2"},[F(J,a.value)])])})}function m(){return e.createVNode("div",{class:"f-page-parameter-editor-group"},[h.value&&c(),A()])}function I(P){P.stopPropagation(),x.emit("viewSource",{command:a.value,event:P})}function D(){v.question(`确定删除命令【${a.value.name}】吗?`,"",()=>{x.emit("deleteCommand")})}function U(){return e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:P=>D()},null)}const K=e.computed(()=>{var P;return{cursor:p.value||u.value.isCommon||((P=u.value)==null?void 0:P.label.indexOf(r==null?void 0:r.getModule().code))===-1?"default":"pointer"}});function X(){return e.createVNode("div",null,[e.createVNode("div",{class:"f-page-parameter-editor-first-row"},[e.createVNode("span",{class:"f-page-parameter-editor-command-name",style:K.value,title:a.value.label,onDblclick:I},[a.value.name]),e.createVNode("div",{class:"f-page-parameter-editor-first-row-icon"},[p.value&&o(),q.value&&W(),f.value&&V(),O.value&&U()])]),C.value&&m()])}return()=>e.createVNode("div",{class:"f-page-parameter-editor"},[w.value&&X()])}}),Ot={customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0},adaptForLanguage:{type:Boolean,default:!0}},Me=e.defineComponent({name:"FResponseForm",props:Ot,emits:[],setup(n,x){const g=e.ref(),v=e.computed(()=>{const a=Ze.LocaleService.getLocale(),u=n.customClass.split(" "),S={"drag-container":!0};return u.reduce((p,q)=>(p[q]=!0,p),S),n.adaptForLanguage&&a&&(S["farris-form-controls-inline"]=a!=="en"),S});return()=>n.visible&&e.withDirectives(e.createVNode("div",{ref:g,class:v.value,style:n.customStyle},[x.slots.default&&x.slots.default()]),[[e.resolveDirective("area-response")]])}}),Rt={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number]},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},showLabelType:{type:String,default:"visible"},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null},fill:{type:Boolean,default:!1}},Ut={id:{type:String},required:{type:Boolean,default:!1},text:{type:String,default:""},title:{type:String},valid:{type:Boolean,default:!0},inValidTip:{type:String,default:""},showType:{type:String,default:"visible"}},Gt=e.defineComponent({name:"FDynamicFormLabel",props:Ut,emits:[],setup(n,x){e.ref(n.title||n.text);const g=e.ref(n.required),v=e.ref(n.text),a=e.ref(n.valid),u=e.ref(n.inValidTip);e.watch(()=>n.text,()=>{v.value=n.text}),e.watch(()=>n.required,(w,y)=>{w!==y&&(g.value=w)}),e.watch([()=>n.valid,()=>n.inValidTip],([w,y])=>{a.value=w,u.value=y});const S=e.computed(()=>a.value?v.value:u.value),p=e.computed(()=>a.value?"":"color:red"),q=e.computed(()=>({"col-form-label":!0,"f-width-auto":g.value&&(n.showType==="none"||!v.value)})),O=e.computed(()=>n.showType==="force-none"?!1:n.showType==="reserve-space"||g.value||!!v.value&&n.showType!=="none");return()=>O.value&&e.createVNode("label",{class:q.value,title:S.value,style:p.value},[!a.value&&e.createVNode("span",{class:"f-icon f-icon-warning mr-1",style:"color: red; min-width: 16px;",title:u.value},null),e.createVNode("span",{class:"farris-label-text"},[g.value&&e.createVNode("span",{class:"farris-label-info text-danger"},[e.createTextVNode("*")]),n.showType==="visible"&&v.value])])}}),{globalStorageKey:_t}=se.useThirdComponent(),j={},E={},M={},L={};async function zt(){{const n={schemaMap:ae.schemaMap,propertyConfigSchemaMap:ae.propertyConfigSchemaMap,propertyEffectMap:ae.propertyEffectMap,schemaResolverMap:ae.schemaResolverMap};nn.register(j,E,M,L),en.register(j,E,M,L),tn.register(j,E,M,L),on.register(j,E,M,L),an.register(j,E,M,L,n),rn.register(j,E,M,L),ze.register(j,E,M,L,n),He.register(j,E,M,L,n),ze.register(j,E,M,L,n),He.register(j,E,M,L,n),_e.register(j,E,M,L,n),cn.register(j,E,M,L),ln.register(j,E,M,L),sn.register(j,E,M,L,n),dn.register(j,E,M,L),un.register(j,E,M,L,n),mn.register(j,E,M,L,n),fn.register(j,E,M,L),hn.register(j,E,M,L,n),vn.register(j,E,M,L),dt.register(j,E,M,L),gn.register(j,E,M,L),pn.register(j,E,M,L),tt.register(j,E,M,L),wn.register(j,E,M,L),bn.register(j,E,M,L,n),Nn.register(j,E,M,L,n),Vn.register(j,E,M,L,n),Sn.register(j,E,M,L),xn.register(j,E,M,L,n),Fn.register(j,E,M,L),yn.register(j,E,M,L),jn.register(j,E,M,L),En.register(j,E,M,L,n),Pn.register(j,E,M,L),Mn.register(j,E,M,L,n),Tn.register(j,E,M,L),Ln.register(j,E,M,L),Bn.register(j,E,M,L),In.register(j,E,M,L,n),kn.register(j,E,M,L,n),qn.register(j,E,M,L),An.register(j,E,M,L,n),$n.register(j,E,M,L),Dn.register(j,E,M,L),Ge.register(j,E,M),On.register(j,E,M,L),Rn.register(j,E,M,L,n),Un.register(j,E,M,L),Gn.register(j,E,M,L),_n.register(j,E,M,L),zn.register(j,E,M,L,n),at.register(j,E,M,L),Hn.register(j,E,M,L,n),Wn.register(j,E,M,L),Kn.register(j,E,M,L),Jn.register(j,E,M,L,n),Qn.register(j,E,M,L),Ue.register(j,E,M,L),Xn.register(j,E,M,L),Yn.register(j,E,M,L),Zn.register(j,E,M,L),et.register(j,E,M,L,n),nt.register(j,E,M,L),Cn.register(j,E,M,L),Ee.register(j,E,M,L),ot.register(j,E,M,L,n),rt.register(j,E,M,L),it.register(j,E,M,L),ct.register(j,E,M,L),lt.register(j,E,M,L),st.register(j,E,M,L),ut.register(j,E,M,L,n),mt.register(j,E,M,L),ft.register(j,E,M,L),ht.register(j,E,M,L),vt.register(j,E,M,L,n),gt.register(j,E,M,L,n),pt.register(j,E,M,L);const x=window[_t];if(x)for(const g in x)x[g].createPropsResolver=ae.createPropsResolver,x[g].register(j,E,M)}}function Ht(){zt();function n(S){const p=j[S];if(!p)throw new Error(`Could not find the editor of type '${S}'`);return p}function x(S,p){const q=E[S];return q?q(p):{}}function g(S){switch(S){case"check-box":return"onChangeValue";case"switch":return"onModelValueChanged";case"check-group":return"onChangeValue";case"combo-list":case"combo-tree":return"onChange";case"combo-lookup":return"";case"year-range":case"year-picker":case"month-range":case"month-picker":case"date-range":case"datetime-range":case"datetime-picker":return"onDatePicked";case"date-picker":return"onUpdate:modelValue";case"time-picker":return"onValueChange";case"input-group":return"onChange";case"lookup":case"sort-condition-editor":case"filter-condition-editor":case"code-editor":case"language-textbox":case"rich-text-editor":return"onUpdate:modelValue";case"number-range":return"onValueChange";case"number-spinner":return"onValueChange";case"radio-group":return"onChangeValue";case"text":return"";case"events-editor":return"onSavedCommandListChanged";case"grid-field-editor":case"item-collection-editor":case"response-form-layout-setting":case"response-layout-editor-setting":case"response-layout-splitter":case"menu-lookup":case"json-editor":return"onChange";case"field-selector":case"binding-selector":return"onFieldSelected";case"schema-selector":return"onSchemaSelected";case"mapping-editor":return"onMappingFieldsChanged";case"textarea":return"onChange";case"query-solution-config":case"solution-preset":case"filter-bar-config":return"onFieldsChanged";case"property-editor":return"onValueChange";case"expression-editor":return"onExpressionChanged";case"collection-property-editor":return"onValueChange";default:return"onUpdate:modelValue"}}function v(S){switch(S){case"combo-list":case"input-group":case"textarea":return"onClear"}}function a(S){switch(S){case"input-group":case"textarea":return"onMousedownEvent"}}function u(S){switch(S){case"input-group":case"textarea":return"onMouseupEvent"}}return{resolveEditorProps:x,resolveEditorType:n,getChangeFunctionName:g,getClearFunctionName:v,getMousedownFunctionName:a,getMouseupFunctionName:u}}const Wt={errors:{type:Object,default:null}},Kt=e.defineComponent({name:"FValidationMessage",props:Wt,emits:[],setup(n,x){const g=e.ref(n.errors);e.watch(()=>n.errors,u=>{g.value=u});const v=e.ref(!0),a=e.computed(()=>{if(g.value){const u=Object.keys(g.value).map(S=>{var p;return(p=g.value[S])==null?void 0:p.name});return u.length?u.join(" "):""}return""});return()=>a.value&&e.createVNode("div",{class:"farris-feedback f-state-invalid",onClick:()=>v.value=!v.value},[!v.value&&e.createVNode("span",{class:"f-icon f-icon-message_warning f-feedback-icon"},null),v.value&&e.createVNode("span",{class:"f-feedback-message"},[a.value])])}}),Te=e.defineComponent({name:"FDynamicFormGroup",props:Rt,emits:["change","update:modelValue"],setup(n,x){var i;const g=e.ref(n.id),v=e.ref(n.customClass),a=e.ref(n.editor),u=e.ref(n.label),S=e.ref(n.modelValue),p=e.ref(n.readonly),q=e.ref(((i=n.editor)==null?void 0:i.required)||n.required),O=e.ref(n.showLabel),w=e.ref(n.visible);e.ref(n.type);const y=e.ref(),C=e.ref(n.errors),r=se.isMobilePhone(),h=e.ref(n.editor.type||"input-group"),f=e.computed(()=>O.value?n.showLabelType:"none"),{resolveEditorProps:s,resolveEditorType:l,getChangeFunctionName:N,getClearFunctionName:B}=Ht(),o=e.computed(()=>{const d={"form-group":!0,"farris-form-group":!0,"common-group":!0,"q-state-readonly":p.value,"form-group--in-mobile":r};return d["form-group--has-"+h.value]=!0,d}),_=e.computed(()=>{if(n.fill)return{maxWidth:"none"}});function W(d,F,A){S.value=F!==void 0?F:d,x.emit("update:modelValue",S.value),x.emit("change",S.value,{newValue:d,newModelValue:F,parameters:A})}function $(){x.emit("update:modelValue","")}function V(d){return(...F)=>{$(),typeof d=="function"&&d(...F)}}function k(d){return(F,A,m)=>{W(F,A,m),typeof d=="function"&&d(F,A,m)}}const c=e.computed(()=>{const d=a.value.type||"input-group",F=l(d),A=s(d,a.value),m=N(d),I=B(a.value.type);return I&&(A[I]=V(A[I])),m&&(A[m]=k(A[m])),(A.id==null||A.id==="")&&(A.id=g.value),d==="number-range"&&a.value.onBeginValueChange&&typeof a.value.onBeginValueChange=="function"?(a.value.onBeginValueChange&&typeof a.value.onBeginValueChange=="function"&&(A.onBeginValueChange=a.value.onBeginValueChange),a.value.onEndValueChange&&typeof a.value.onEndValueChange=="function"&&(A.onEndValueChange=a.value.onEndValueChange)):d==="lookup"&&a.value["onUpdate:idValue"]&&typeof a.value["onUpdate:idValue"]=="function"?(A["onUpdate:idValue"]=a.value["onUpdate:idValue"],A.id=g.value):d==="collection-property-editor"&&a.value.onSelectionChange&&typeof a.value.onSelectionChange=="function"?A.onSelectionChange=a.value.onSelectionChange:d==="property-editor"&&(A.onBeforeOpenVariables=a.value.onBeforeOpenVariables),()=>e.createVNode(F,e.mergeProps({ref:y},A,{modelValue:S.value,"onUpdate:modelValue":D=>S.value=D}),x.slots)});function t(){return e.createVNode(Kt,{id:`${g.value}-validation-message`,errors:C.value},null)}return e.watch([()=>n.id,()=>n.customClass,()=>n.editor,()=>n.label,()=>n.modelValue,()=>n.readonly,()=>n.required,()=>n.showLabel,()=>n.visible,()=>n.errors],([d,F,A,m,I,D,U,K,X,P])=>{var J;g.value=d,v.value=F,a.value=A,u.value=m,S.value=I,p.value=D,q.value=((J=a.value)==null?void 0:J.required)||U,O.value=K,w.value=X,C.value=P}),x.expose({editorRef:y}),()=>w.value&&e.createVNode("div",{id:`${g.value}-form-group`,class:v.value,style:n.customStyle},[e.createVNode("div",{class:"farris-group-wrap",style:_.value},[e.createVNode("div",{class:o.value},[e.createVNode(Gt,{id:`${g.value}-lable`,showType:f.value,required:q.value,text:u.value,title:u.value},null),e.createVNode("div",{class:"farris-input-wrap"},[c.value(),t()])])])])}});Me.install=n=>{n.component(Me.name,Me).component(Te.name,Te)};const Jt=e.defineComponent({name:"FSelectParameters",props:fe,emits:["changed"],setup(n,x){var c;const g=new de.FNotifyService;g.globalConfig={position:"top-center"};const v=e.inject("FMessageBoxService"),a=e.ref(n.communication),u=e.ref(((c=a.value)==null?void 0:c.paramMappings)||[]),S=e.inject("useFormSchema"),p=S.getFormMetadataBasicInfo(),q=e.ref([]),O=e.ref([]),w=e.ref({}),y=e.ref({}),C=e.computed(()=>t=>{let i="",d="";if(t.sourceValue&&t.targetVariable){const F=O.value.find(A=>A.statePath===`${t.targetVariableViewModelId}.${t.targetVariable}`);F&&F.name?(y.value[t.targetVariable]=!1,i=`${t.sourceValue}--->${F.name}`,d=`将 ${t.sourceValue} 赋值给 ${F.name}`):(y.value[t.targetVariable]=!0,i=`${t.sourceValue}--->${t.targetVariable}`,d=`将 ${t.sourceValue} 赋值给 ${t.targetVariable}`)}return{displayText:i,displayTextTip:d}});e.watch(()=>n.communication,t=>{a.value=t,u.value=a.value.paramMappings||[]},{deep:!0});function r(){var i;const t=u.value.length||0;u.value.length&&(u.value=u.value.filter(d=>!(!d.sourceValue&&!d.targetVariable))),a.value.paramMappings=u.value,t!==((i=a.value.paramMappings)==null?void 0:i.length)&&x.emit("changed")}e.onUnmounted(()=>{r()});function h(t){var m,I;const{viewmodels:i,components:d}=t.module;if((i==null?void 0:i.length)===0||(d==null?void 0:d.length)===0)return[];const F=[];O.value=[];const A=(I=(m=n.sourceCommunication)==null?void 0:m.parameterData)==null?void 0:I.getViewModelName;return i.forEach(D=>{if(!D||!D.states||D.states.length===0)return[];const U=[],K=d.find(J=>J.viewModel===D.id),X=A&&K?A(K,D.name,t):"";D.states.forEach(J=>{const Z={...J,statePath:D.id+"."+J.code};U.push({data:Z,children:[]}),O.value.push(Z)});const P={data:{id:D.id,code:D.code,name:X||D.name,statePath:D.id},children:U};F.push(P)}),F}function f(){var t,i;if(!((t=a.value)!=null&&t.target.formId))return[];if(a.value.target.formId===p.id)q.value=h(S.getFormSchema());else{const d=S.externalFormSchema.get(a.value.target.externalContainerId);(i=d==null?void 0:d.content)!=null&&i.module&&(q.value=h(d==null?void 0:d.content))}}function s(){Object.keys(w.value).forEach(t=>{w.value[t]=!1})}function l(){s();const t=se.useGuid().guid();u.value.push({id:t,sourceValue:"",targetVariable:"",targetVariableViewModelId:""}),a.value.paramMappings=u.value,w.value[t]=!0}function N(t,i,d){t.stopPropagation();function F(){u.value=u.value.filter(A=>A.id!==i.id),a.value.paramMappings=u.value,s(),x.emit("changed")}d?v.question(`确定删除参数【${d}】吗?`,"",()=>{F()}):F()}function B(t){w.value[t.id]||(s(),w.value[t.id]=!0)}function o(t,i){if(!i.sourceValue){g.warning("请选择源参数");return}if(!i.targetVariable){g.warning("请选择目标参数");return}w.value[t.id]=!1,Object.assign(t,i),delete t.statePath,x.emit("changed")}function _(t){w.value[t.id]=!1,!t.sourceValue&&!t.targetVariable&&!t.targetVariableViewModelId&&(u.value=u.value.filter(i=>i.id!==t.id),a.value.paramMappings=u.value,x.emit("changed"))}e.onMounted(()=>{f()}),e.watch(()=>n.communication,t=>{f()},{deep:!0});function W(t,i,d){var F;if((F=d.newValue)!=null&&F.length){const{statePath:A}=d.newValue[0];if((A==null?void 0:A.indexOf("."))>0){const m=A.split(".");i.targetVariableViewModelId=m[0],i.targetVariable=m[1]}}}function $(t){return{type:"combo-tree",textField:"name",valueField:"statePath",idField:"statePath",data:q.value,editable:!1,enableClear:!1,customRowStatus:i=>i.raw.parent?(u.value.find(F=>F.id!==t.id&&`${F.targetVariableViewModelId}.${F.targetVariable}`===i.raw.statePath)&&(i.disabled=!0),i):(i.disabled=!0,i)}}function V(t){const i=H.cloneDeep(t);i.statePath=`${i.targetVariableViewModelId}.${i.targetVariable}`;const d=$(t);let F=S.getFormSchema();if(a.value.source.formId!==p.id){const D=S.externalFormSchema.get(a.value.source.externalContainerId);D!=null&&D.content&&(F=D==null?void 0:D.content)}const{assembleSchemaFieldsByComponent:A,assembleOutline:m,assembleStateVariables:I}=n.sourceCommunication.parameterData;return e.createVNode("div",{class:"param-panel"},[e.createVNode("div",{class:"col-12"},[e.createVNode("div",{class:"farris-group-wrap"},[e.createVNode("div",{class:"form-group farris-form-group"},[e.createVNode("label",{class:"col-form-label",title:"源参数"},[e.createVNode("span",{class:"farris-label-text"},[e.createTextVNode("源参数")])])])])]),e.createVNode(Ee,{class:"col-12 mb-2",modelValue:i.sourceValue,"onUpdate:modelValue":D=>i.sourceValue=D,fieldData:A(F),formData:m(F),varData:I(F),editorType:"Default",editable:!0},null),e.createVNode(Te,{label:"目标参数",modelValue:i.statePath,"onUpdate:modelValue":D=>i.statePath=D,customClass:"col-12 mb-2",editor:d,onChange:(D,U)=>W(D,i,U)},null),e.createVNode("div",{class:"d-flex justify-content-end"},[e.createVNode("button",{class:"btn btn-secondary mr-2",onClick:()=>_(t)},[e.createTextVNode("取消")]),e.createVNode("button",{class:"btn btn-primary",onClick:()=>o(t,i)},[e.createTextVNode("确定")])])])}x.expose({addParameter:l,closeAllParameterPanel:s});const k=e.computed(()=>t=>({"param-container":!0,"ml-3":!0,invalid:t}));return()=>u.value.length?u.value.map(t=>{const{displayText:i,displayTextTip:d}=C.value(t),F=y.value[t.targetVariable];return e.createVNode("div",{class:k.value(F)},[e.createVNode("div",{class:"selected-item position-relative"},[e.createVNode("span",{class:"form-control mr-3",title:d,onClick:()=>B(t)},[i||"请配置参数"]),F?e.createVNode("span",{title:"目标参数已失效,请重新选择"},[e.createVNode("i",{class:"f-icon f-icon-flowline-warning text-danger text-tip"},null)]):"",e.createVNode("div",{class:"remove-icon"},[e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除参数",onClick:A=>N(A,t,i)},null)])]),w.value[t.id]?V(t):""])}):""}}),Qt=e.defineComponent({name:"FCommunicationCommandItem",props:fe,emits:["addParameter","deleteCommand","toggleParameterPanel"],setup(n,x){const g=e.ref(n.communication),v=e.inject("FMessageBoxService"),a=e.inject("useFormSchema"),u=a.getFormMetadataBasicInfo(),S=e.ref([]),p=e.ref(),q=e.ref(!1),O=e.ref([]),w=e.ref(),y=e.ref(!1),C=e.ref(n.communication.paramMappings&&n.communication.paramMappings.length>0),r=e.computed(()=>{var c,t,i,d;if(!p.value)return"";const V=((c=p.value)==null?void 0:c.name)||((t=p.value)==null?void 0:t.code)||"",k=((i=w.value)==null?void 0:i.name)||((d=w.value)==null?void 0:d.code)||"";return`${V}-${k}`}),h=e.computed(()=>{var d,F,A,m,I,D;if(!p.value)return"";const V=((d=p.value)==null?void 0:d.name)||((F=p.value)==null?void 0:F.code)||"",k=((A=w.value)==null?void 0:A.name)||((m=w.value)==null?void 0:m.code)||"",c=((I=p.value)==null?void 0:I.code)||"",t=((D=w.value)==null?void 0:D.code)||"",i=p.value.containerId?`, 所属外部容器: ${p.value.containerId}`:"";return`${V} (${c}${i})
|
|
3
|
+
${k} (${t})`}),f=e.computed(()=>q.value?"目标表单已失效,请删除当前方法。":y.value?"目标命令已失效,请删除当前方法。":"");function s(){var V,k;if((k=(V=g.value)==null?void 0:V.target)!=null&&k.formId){const c=S.value.find(t=>t.id===g.value.target.formId&&t.containerId===g.value.target.externalContainerId);q.value=!c,p.value=c||{containerId:g.value.target.externalContainerId,id:g.value.target.formId,code:g.value.target.formCode}}else q.value=!1}function l(){var k,c;const V=a.externalFormSchema;Array.from(V.keys()).forEach(t=>{var d,F;const i=V.get(t);((F=(d=g.value)==null?void 0:d.source)==null?void 0:F.externalContainerId)!==t&&S.value.push({containerId:t,id:i.id,code:i.code,name:i.name})}),((c=(k=g.value)==null?void 0:k.source)==null?void 0:c.formId)!==u.id&&S.value.unshift({containerId:"",id:u.id,code:u.code,name:u.name}),s()}function N(){var V,k;if((k=(V=g.value)==null?void 0:V.target)!=null&&k.commandCode){const{commandCode:c,commandViewmodelId:t}=g.value.target,i=O.value.find(d=>d.code===c&&d.viewmodelId===t);w.value=i||{code:g.value.target.commandCode},y.value=!i}else w.value=null,y.value=!1}function B(V){var i,d;const{viewmodels:k,components:c}=V.module;if((k==null?void 0:k.length)===0||(c==null?void 0:c.length)===0)return[];O.value=[];const t=(d=(i=n.sourceCommunication)==null?void 0:i.parameterData)==null?void 0:d.getViewModelName;k.forEach(F=>{if(!F||!F.commands||F.commands.length===0)return[];const A=c.find(I=>I.viewModel===F.id),m=t&&A?t(A,F.name,V):"";O.value.push({id:F.id,code:F.code,name:m||F.name}),F.commands.forEach(I=>{I.isInvalid||O.value.push({...I,viewmodelId:F.id,isCommandNode:!0})})})}function o(){var V,k,c;if(!((V=p.value)!=null&&V.id))return[];if(p.value.id===u.id)B(a.getFormSchema());else{const t=a.externalFormSchema.get((k=p.value)==null?void 0:k.containerId);(c=t==null?void 0:t.content)!=null&&c.module&&B(t.content)}N()}e.onMounted(()=>{l(),o()}),e.watch(()=>n.communication,V=>{C.value=n.communication.paramMappings&&n.communication.paramMappings.length>0,s(),o()},{deep:!0});function _(){x.emit("addParameter")}function W(){v.question(`确定删除命令【${r.value}】吗?`,"",()=>{x.emit("deleteCommand")})}function $(){x.emit("toggleParameterPanel")}return()=>e.createVNode("div",{class:"form-container position-relative"},[r.value&&e.createVNode("div",{class:"f-page-parameter-editor-first-row"},[e.createVNode("span",{class:"f-page-parameter-editor-command-name",title:h.value},[r.value]),e.createVNode("div",{class:"f-page-parameter-editor-first-row-icon"},[q.value||y.value?e.createVNode("div",null,[e.createVNode("span",{title:f.value},[e.createVNode("i",{class:"ml-2 f-icon f-icon-flowline-warning text-danger text-tip"},null)]),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:V=>W()},null)]):e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-icon f-icon-home-add",title:"新增参数",style:"font-size: 11px;",onClick:_},null),C.value&&e.createVNode("div",{class:"f-icon f-icon-edit-button",title:"收折参数",onClick:()=>$()},null),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",title:"删除命令",onClick:V=>W()},null)])])])])}}),Yt=e.defineComponent({name:"FCombineForm",props:fe,emits:["changed","deleteCommand","addCommand"],setup(n,x){const g=e.inject("useFormSchema"),{saveCommunication:v}=me(g),a=e.ref(n.communication),u=e.computed(()=>{var s,l,N,B;return((l=(s=a.value)==null?void 0:s.source)==null?void 0:l.componentId)&&((B=(N=a.value)==null?void 0:N.source)==null?void 0:B.event)}),S=e.ref(!0),p=e.ref(!0),q=e.ref(),O=e.ref();function w(){v(a.value),x.emit("changed",a.value)}function y(){q.value&&q.value.addParameter(),p.value=!1}function C(){x.emit("deleteCommand")}function r(){p.value=!p.value}const h=e.computed(()=>({"d-none":p.value}));function f(){q.value&&q.value.closeAllParameterPanel()}return x.expose({closeAllParameterPanel:f}),()=>e.createVNode("div",{class:"combine-form-container pb-2"},[u.value&&e.createVNode(e.Fragment,null,[e.createVNode(Qt,{ref:O,communication:a.value,sourceCommunication:n.sourceCommunication,onAddParameter:y,onDeleteCommand:C,onToggleParameterPanel:r},null),S.value&&e.createVNode("div",{class:h.value},[e.createVNode(Jt,{ref:q,communication:a.value,onChanged:w,sourceCommunication:n.sourceCommunication},null)])])])}}),Xt=e.defineComponent({name:"FSelectCommunicationCommand",props:fe,emits:["selectCommand","addParameter","deleteCommand","toggleParameterPanel"],setup(n,x){const g=e.inject("useFormSchema"),v=g.getFormMetadataBasicInfo(),a=e.ref([]),u=e.ref(),S=e.ref([]),p=e.ref(),q=e.ref(!0),O=e.ref(!1);function w(){var N;const l=g.externalFormSchema;Array.from(l.keys()).forEach(B=>{var _;const o=l.get(B);((_=n.sourceCommunication)==null?void 0:_.externalContainerId)!==B&&a.value.push({containerId:B,id:o.id,code:o.code,name:o.name})}),((N=n.sourceCommunication)==null?void 0:N.formId)!==v.id&&a.value.unshift({containerId:"",id:v.id,code:v.code,name:v.name})}function y(l){var _,W;const{viewmodels:N,components:B}=l.module;if((N==null?void 0:N.length)===0||(B==null?void 0:B.length)===0)return[];S.value=[];const o=(W=(_=n.sourceCommunication)==null?void 0:_.parameterData)==null?void 0:W.getViewModelName;N.forEach($=>{if(!$||!$.commands||$.commands.length===0)return[];const V=B.find(c=>c.viewModel===$.id),k=o&&V?o(V,$.name,l):"";S.value.push({id:$.id,code:$.code,name:k||$.name}),$.commands.forEach(c=>{c.isInvalid||S.value.push({...c,viewmodelId:$.id,isCommandNode:!0})})})}function C(){var l,N,B;if(!((l=u.value)!=null&&l.id))return[];if(u.value.id===v.id)y(g.getFormSchema());else{const o=g.externalFormSchema.get((N=u.value)==null?void 0:N.containerId);(B=o==null?void 0:o.content)!=null&&B.module&&y(o.content)}}e.onMounted(()=>{w(),C()});function r(l){u.value=l,q.value=!1,O.value=!0,C()}const h=e.computed(()=>l=>{var N,B;return{item:!0,selected:((N=u.value)==null?void 0:N.id)===l.id&&((B=u.value)==null?void 0:B.containerId)===l.containerId}}),f=e.computed(()=>l=>{var N;return{item:!0,selected:((N=p.value)==null?void 0:N.id)===l.id,"pl-4":l.isCommandNode,disabled:!l.isCommandNode}});function s(l){l.isCommandNode&&(O.value=!1,p.value=l,x.emit("selectCommand",{targetForm:u.value,targetCommand:l}))}return()=>e.createVNode("div",{class:"form-container position-relative"},[q.value&&e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择目标页面")]),a.value.map(l=>e.createVNode("span",{class:h.value(l),onClick:()=>r(l),title:l.containerId?`所属外部容器:${l.containerId}`:"当前页面"},[l.name]))]),O.value?e.createVNode("div",{class:"item-list"},[e.createVNode("span",{class:"tip"},[e.createTextVNode("请选择目标命令")]),S.value.map(l=>e.createVNode("span",{class:f.value(l),title:l.code,onClick:()=>s(l)},[l.name]))]):""])}}),Zt=e.defineComponent({name:"FInteractionItem",props:Tt,emits:["addAction","delete","toggle"],setup(n,x){var he,ve;const{guid:g}=se.useGuid(),v=e.inject("FMessageBoxService"),a=e.inject("useMethodsComposition"),{toggleSelectingMethod:u,emitFinalState:S,getViewModeId:p,getMethodsOnViewModel:q,getComponentList:O,updateTarget:w,updateCommandHasPath:y}=a,C=e.inject("useFormSchema"),{clearCommunicationById:r,resolveSourceControlEventTitle:h,resolveCommunication:f,createNewCommunication:s,saveCommunication:l,resolveCommunicationSource:N}=me(C),B=e.ref(n.controllers),o=e.ref(n.interaction),_=e.ref(!1),W=e.computed(()=>{const T=o.value.showSwitch[0];return T.showSection[T.showSwitchNumber][2]}),$=e.ref(n.sourceCommunication.needSelectSourceControl);o.value.shouldShowCommunicationPanel=o.value.shouldShowCommunicationPanel===!1?!1:!!((ve=(he=o.value)==null?void 0:he.communication)!=null&&ve.length)||$.value;const V=e.computed(()=>{var z;const T=!!((z=o.value.command)!=null&&z.id),R=o.value.showSwitch[0],G=R.showSection[R.showSwitchNumber][3];return T&&G}),k=e.ref(o.value.needSelectCommunicationCommand||!1),c=e.ref(),t=e.ref(),i=e.ref(!1),d=e.ref(),F=e.ref([]);function A(){if($.value){const T=h(o.value.communication);if(T){const{title:R,titleTip:G,isControlInvalid:z}=T;c.value=R,t.value=z?"源表单或事件已失效,请删除":G||R,i.value=z}}else t.value=o.value.event.label,c.value=o.value.event.name}e.onBeforeMount(()=>{f(o.value),A(),d.value=N(o.value)||n.sourceCommunication});const m=e.computed(()=>({"f-icon":!0,"f-icon-arrow-chevron-down":V.value||o.value.shouldShowCommunicationPanel,"f-icon-arrow-chevron-left":!V.value&&!o.value.shouldShowCommunicationPanel}));function I(){var G,z;let T=(G=o.value.command)!=null&&G.id?1:0;T=T+(((z=o.value.communication)==null?void 0:z.length)||0);const R=`确定删除【${c.value}】吗?`;v.question(R,"",()=>{x.emit("delete",n.displayOrder)})}function D(){var z;const T=o.value.showSwitch[0],R=!!((z=o.value.command)!=null&&z.id);o.value.communication&&o.value.communication.length>0&&(o.value.shouldShowCommunicationPanel=!o.value.shouldShowCommunicationPanel),R&&(T.showSection[T.showSwitchNumber][3]=!T.showSection[T.showSwitchNumber][3],x.emit("toggle",n.displayOrder))}function U(){var z,Q;const T=!!((z=o.value.command)!=null&&z.id),R=o.value.communication&&o.value.communication.length>0;if($.value){k.value=!k.value,(Q=F.value)!=null&&Q.length&&F.value.map(ee=>{ee.closeAllParameterPanel()});return}R&&(o.value.shouldShowCommunicationPanel=!o.value.shouldShowCommunicationPanel);const G=o.value.showSwitch[0];u(G,T),x.emit("addAction",n.displayOrder)}function K(T){const R=o.value.communication!==void 0;T===null&&o.value.command===null&&!R&&x.emit("delete",n.displayOrder),o.value.communication&&(o.value.shouldShowCommunicationPanel=W.value);const G=o.value.showSwitch[0];u(G,R)}function X(T,R,G){let z=`${R}${G}${T}`,Q=-1;const ee=q();for(;Q===-1;){let ne=!1;for(let te=0;te<ee.length;te++)ee[te].controllerList.forEach(oe=>{oe.label||oe.label===""?ne=oe.label.toLowerCase()===z.toLowerCase()?!0:ne:ne=!1});if(ne)T+=1,z=`${R}${G}${T}`;else{Q=0;break}}return{newName:z,suffix:T}}function P(T){const{method:R,controller:G}=T,{label:z,handlerName:Q,property:ee,componentLists:ne,hasPath:te}=R,oe=p().replace(/-/g,"").replace("component","").replace("viewmodel",""),Se=z.slice(0,1).toUpperCase()+z.slice(1),{newName:Ve,suffix:xe}=X(1,oe,Se),{controllerName:le}=G,Fe=le.id,ye={id:g(),label:Ve,name:`${R.name}${xe}`,handlerName:Q,hasPath:te,cmpId:Fe,property:ee,componentLists:ne};o.value.command=y(G,ye),o.value.command&&C.designerMode==="PC_RTC"&&(o.value.command.isRtcCommand=!0),o.value.controller={id:le.id,label:le.label,name:le.name,isCommon:le.isCommon};const Y=o.value.showSwitch[0];Y.showSwitchNumber=2,Y.showSection[Y.showSwitchNumber][2]=!1,Y.showSection[Y.showSwitchNumber][3]=!0,_.value=!0,o.value.communication&&o.value.communication.length>0&&(o.value.shouldShowCommunicationPanel=!0),S(!1,null)}function J(){o.value.command={id:"abandoned",label:"未绑定方法",name:"未绑定方法",property:[],hasPath:!1,handlerName:"未绑定方法",cmpId:"",shortcut:{},isRtcCommand:C.designerMode==="PC_RTC"?!0:void 0,isNewGenerated:void 0,extensions:[],isInvalid:!1},o.value.controller={label:"",name:"",id:""},S(!0,o.value.event);const T=o.value.showSwitch[0];u(T,!0)}function Z(T,R){var Q;if(o.value.communication||(o.value.communication=[]),o.value.communication.find(ee=>{var ne,te,oe;return((ne=ee.target)==null?void 0:ne.formId)===T.formId&&((te=ee.target)==null?void 0:te.externalContainerId)===T.externalContainerId&&((oe=ee.target)==null?void 0:oe.commandCode)===T.commandCode})){new de.FNotifyService().info({position:"top-center",message:"方法已存在,请勿重复添加。"});return}let z;o.value.communication.length===1&&!((Q=o.value.communication[0].target)!=null&&Q.formId)?(Object.assign(o.value.communication[0].target,T),z=o.value.communication[0]):(z=s(n,o.value.event.label,T,R),o.value.communication.push(z)),S(!1,null),l(z)}function re(T){var G;const R=o.value.showSwitch[0];if(R.showSection[R.showSwitchNumber][2]=!1,(G=o.value.command)!=null&&G.id&&(R.showSection[R.showSwitchNumber][3]=!0),o.value.shouldShowCommunicationPanel=!0,T){const{selectedCommand:z,selectedForm:Q}=T,ee={formId:(Q==null?void 0:Q.id)||"",formCode:(Q==null?void 0:Q.code)||"",externalContainerId:(Q==null?void 0:Q.containerId)||"",commandCode:(z==null?void 0:z.code)||"",commandViewmodelId:(z==null?void 0:z.viewmodelId)||""};Z(ee)}}function Le(){const T=o.value.showSwitch[0];T.showSwitchNumber=2,T.showSection[T.showSwitchNumber][2]=!1,T.showSection[T.showSwitchNumber][3]=!0,_.value=!1,o.value.communication&&o.value.communication.length>0&&(o.value.shouldShowCommunicationPanel=!0),S(!1,null)}function Be(){return e.createVNode(Dt,{controllers:B.value,sourceCommunication:n.sourceCommunication,onClose:K,onSelectMethod:P,onNewFunctionChanged:()=>J(),onAddCommunication:re,haveBoundCommand:n.haveBoundCommand,iteractionDisplayOrder:n.displayOrder,onSelectBoundMethod:Le,event:o.value.event},null)}function Ie(){const T=o.value.showSwitch[0];T.showSection[T.showSwitchNumber][3]=!1}function ke(T){o.value.command=H.cloneDeep(T),S(!1,null)}function qe(T){T.componentLists=O(),w(T),o.value.command=H.cloneDeep(T),S(!1,null)}function De(T){var G;const{controller:R}=o.value;R.isCommon||(G=n.viewSourceHandle)==null||G.call(n,{...T,...o.value})}function Ae(){o.value.command=null,S(!1,null)}function $e(){return e.createVNode($t,{command:o.value.command,controller:o.value.controller,showParameter:_.value,showDeleteIcon:o.value.communication&&o.value.communication.length>0,onConfirm:()=>Ie(),onChange:T=>ke(T),onTargetChange:T=>qe(T),onViewSource:T=>De(T),onDeleteCommand:Ae},null)}function Oe(T,R){o.value.communication&&o.value.communication.length>R&&(o.value.communication[R]=T,S(!1,null))}function Re(T,R){var G;o.value.communication&&o.value.communication.length>R&&(o.value.communication.splice(R,1),r(T.id),o.value.communication.length===0&&!((G=o.value.command)!=null&&G.id)?x.emit("delete",n.displayOrder):S(!1,null))}function Ce(T,R){const{source:G,target:z}=T;Z(z,G),o.value.shouldShowCommunicationPanel=!0}function we(T,R){return e.createVNode(Yt,{ref:G=>{G&&(F.value[R]=G)},communication:T,event:o.value.event.label,sourceCommunication:n.sourceCommunication,onChanged:G=>Oe(G,R),onDeleteCommand:()=>Re(T,R),onAddCommand:G=>Ce(G)},null)}function be(T){const{targetForm:R,targetCommand:G}=T,z={formId:R.id,formCode:R.code,externalContainerId:R.containerId,commandCode:G.code,commandViewmodelId:G.viewmodelId};Z(z,d.value),o.value.shouldShowCommunicationPanel=!0,k.value=!1,o.value.needSelectCommunicationCommand=!1}function Ne(){return e.createVNode(Xt,{sourceCommunication:n.sourceCommunication,onSelectCommand:T=>be(T)},null)}return()=>e.createVNode("div",{class:"show-switch"},[e.createVNode("div",{class:"f-page-events-editor-bound-event"},[e.createVNode("div",{class:"f-page-events-editor-bound-event-name",title:t.value},[c.value]),!i.value&&e.createVNode("div",{style:"float:right;margin:5px;"},[e.createVNode("div",{class:m.value,style:"font-size: 10px;",onClick:D},null)]),e.createVNode("div",{class:"f-icon f-icon-yxs_delete",style:"font-size: 13px;float: right; margin:8px;",onClick:I},null),!i.value&&e.createVNode("div",{class:"f-icon f-icon-home-add",style:"float:right; font-size: 10px; margin:8px;",onClick:U},null),i.value&&e.createVNode("div",{class:"f-icon f-icon-flowline-warning text-danger text-tip",title:"源表单或事件已失效,请删除",style:"float:right; font-size: 13px; margin:8px;"},null)]),W.value&&Be(),k.value&&Ne(),V.value&&$e(),!i.value&&o.value.shouldShowCommunicationPanel&&o.value.communication&&o.value.communication.length>0?o.value.communication.map((T,R)=>we(T,R)):""])}});function eo(n,x,g){const{interactions:v}=x,{setComponentLists:a}=Je(),u=e.ref(n.value.internalCommandList);function S(c){v.value[c].showSwitch=[],v.value[c].showSwitch.push(H.cloneDeep({showSection:[[!1,!1,!1,!1,!1],[!1,!1,!0,!1,!1],[!1,!0,!1,!0,!1]],showSwitchNumber:2})),v.value=H.cloneDeep(v.value)}function p(c){var i;const t=[];return(i=n.value.newController)==null||i.forEach(d=>{c.forEach(F=>{d.Code===F.controller.label&&t.push(H.cloneDeep(d))})}),t}function q(c){if(n.value.repititionCommand.length!==0)return n.value.repititionCommand.forEach(t=>{c.forEach(i=>{var d,F,A,m;if(t.command.id===((d=i.command)==null?void 0:d.id)){t.command.params=H.cloneDeep((F=i.command)==null?void 0:F.property);const I=(A=i.command)==null?void 0:A.targetComponent;(m=i.command)==null||m.componentLists.forEach(D=>{t.targetComponent=D.componentId===I?{id:D.componentId,viewModelId:D.viewModelId}:t.targetComponent})}})}),n.value.repititionCommand}function O(c=!1,t=null){var m;n.value.newFuncEvents=t?H.cloneDeep(t):null,n.value.isAddControllerMethod=c;const i=[],d=H.cloneDeep(n.value.internalCommandList);v.value.map(I=>{const D=H.cloneDeep(I.controller),U=H.cloneDeep(I.command),K=H.cloneDeep(I.event),X=H.cloneDeep(I.communication),P={controller:D,command:U,boundEvents:K,communication:X};i.push(H.cloneDeep(P))});const F=(m=n.value.newController)!=null&&m.length&&i.length?H.cloneDeep(p(i)):[];n.value.repititionCommand&&(n.value.repititionCommand=q(i));const A={viewModelId:n.value.viewModelId,savedCommand:H.cloneDeep(n.value.viewModel),boundEventsList:H.cloneDeep(i),events:H.cloneDeep(n.value.events),internalCommandList:H.cloneDeep(d),componentLists:[],relativePath:n.value.relativePath,envType:n.value.envType,newController:H.cloneDeep(F),isAddControllerMethod:n.value.isAddControllerMethod,repititionCommand:n.value.repititionCommand,preCommand:n.value.preCommand,newFuncEvents:n.value.newFuncEvents};g.emit("savedCommandListChanged",A)}function w(c){c.showSection[c.showSwitchNumber][2]=!0}function y(c){c.showSection[c.showSwitchNumber][2]=!1}function C(c){c.showSection[c.showSwitchNumber][3]=!0}function r(c){c.showSection[c.showSwitchNumber][3]=!1}function h(c,t=!1){c.showSection[c.showSwitchNumber][2]?(y(c),t&&C(c)):(w(c),t&&r(c))}function f(){return n.value.componentLists}function s(c){n.value.viewModel.forEach(t=>{for(let i=0;i<t.controllerList.length;i++)t.controllerList[i].label===c.label&&(t.controllerList[i]=H.cloneDeep(c))})}function l(){return n.value.viewModelId}function N(){return n.value.getEventPath?n.value.getEventPath().viewModelDisplay:[]}function B(c,t){return a(c,t,n.value)}function o(c){n.value.newController=n.value.newController||[],n.value.newController.push(H.cloneDeep(c));const t=n.value.newController;for(let i=0;i<t.length;i++)for(let d=i+1;d<t.length;d++)t[i].Id===t[d].Id&&(t.splice(d,1),d--)}function _(c){let t=!1;return n.value.internalCommandList.forEach(i=>{if(i.controllerName.label===c.controllerName.label){t=!0;return}}),t||n.value.internalCommandList.push(c),t}function W(){var c;if((c=n.value)!=null&&c.getEventPath)return n.value.getEventPath()}function $(c,t){v.value.forEach(i=>{var d;((d=i.command)==null?void 0:d.label)===t.label&&(i.command=t)})}function V(c,t){$(c,t)}function k(c,t){const i=v.value[t];c.event=c.event.label?c.event:H.cloneDeep(i.event);let d=!1;n.value.repititionCommand||(n.value.repititionCommand=[]),n.value.repititionCommand.forEach(m=>{m.command.id===c.command.id&&m.event.label===c.event.label&&m.targetComponent.viewModelId===c.targetComponent.viewModelId&&(d=!0),m.command.id===c.command.id&&m.event.label===c.event.label&&m.targetComponent.viewModelId!==c.targetComponent.viewModelId&&(m=H.cloneDeep(c))}),d||n.value.repititionCommand.push(H.cloneDeep(c));let F={id:c.command.id,label:c.command.label,name:c.command.name,handlerName:c.command.handlerName,cmpId:c.controller.id,componentLists:[],hasPath:!1,targetComponent:c.targetComponent.id,property:H.cloneDeep(c.command.params),shortcut:{},isRtcCommand:c.command.isRtcCommand,isNewGenerated:c.command.isNewGenerated||!1,isInvalid:!1};const A={controllerName:c.controller};F=a(A,F,n.value),i.command=H.cloneDeep(F),i.controller=H.cloneDeep(c.controller),V(i,F)}return{controllers:u,onClosed:S,emitFinalState:O,toggleSelectingMethod:h,getViewModeId:l,getComponentList:f,updateTarget:s,updateCommandHasPath:B,addNewController:o,checkIfNewControllerExists:_,getMethodsOnViewModel:N,getEventPath:W,selectBoundCommand:k}}const pe=e.defineComponent({name:"FEventsEditor",props:Pe,emits:["savedCommandListChanged"],setup(n,x){const g=e.ref(n.initialData),v=e.inject("designer-host-service"),a=Ft(g),{loadEvents:u,resetBoundEvents:S}=a,p=e.inject("useFormSchema"),q=xt(p,a),{addNewInteraction:O,deleteInteracton:w,interactions:y,loadInteractions:C}=q,r=eo(g,q,x),{emitFinalState:h,controllers:f}=r;e.provide("useEventsComposition",a),e.provide("useInteractionCompostion",q),e.provide("useMethodsComposition",r);function s(){g.value.isAddControllerMethod=!1}function l(){var V,k;const $=(k=(V=g.value)==null?void 0:V.sourceCommunication)==null?void 0:k.externalContainerId;if($){const{assembleSourceOutline:c}=me(p),t=c(v,x,$);e.provide("sourceOutlineData",t)}}e.onMounted(()=>{s(),S(),u(),C(),l()});function N($){w($),h(!1,null)}function B($,V){const k=$.showSwitch[0],c=k.showSection[k.showSwitchNumber][3];let t=!1;return n.initialData.getEventPath&&(n.initialData.getEventPath().actionWithPath.length!==0?t=!0:t=!1),e.createVNode(Zt,{key:`${V}`,controllers:f.value,interaction:$,displayOrder:V,collapsed:c,onDelete:N,sourceCommunication:g.value.sourceCommunication,viewSourceHandle:n.viewSourceHandle,haveBoundCommand:t},null)}function o(){var $;return($=y.value)==null?void 0:$.map((V,k)=>{var t;let c=V.event.label;return(t=V.communication)!=null&&t.length&&(c=`${V.communication.map(d=>d.id).join("-")}_${c}`),e.createVNode("div",{class:"events-display-order",key:`${c}_${k}`},[B(V,k)])})}function _($){O($)}function W($){const V=$.source;if(y.value.find(c=>{var t;if((t=c.communication)!=null&&t.length&&c.communication.find(d=>{var F,A,m;return((F=d.source)==null?void 0:F.formId)===V.formId&&((A=d.source)==null?void 0:A.componentId)===V.componentId&&((m=d.source)==null?void 0:m.event)===V.event}))return!0})){new de.FNotifyService().info({position:"top-center",message:"事件已存在,请勿重复添加。"});return}O({label:"onCommunication",name:"组件通讯"},$)}return()=>e.createVNode("div",{class:"f-page-events-editor"},[e.createVNode("div",{class:"f-page-events-editor-content"},[e.createVNode(Mt,{sourceCommunication:g.value.sourceCommunication,onClickEventItem:_,onSelectSourceControl:W},null),o()])])}}),no={install(n){n.component(pe.name,pe)},register(n,x,g,v){n["events-editor"]=pe,x["events-editor"]=Ke}};b.FEventsEditor=pe,b.default=no,b.eventsEditorProps=Pe,b.propsResolver=Ke,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.expression-editor{border:1px solid #cccccc}.expression-editor .layout-border{border:1px solid #cccccc;border-top:0;border-bottom:0;box-shadow:none!important}.expression-editor .expression-left .search-bar{justify-content:center}.expression-editor .expression-left .layout-border{border:0}.expression-editor .functions-list .empty-message{color:#ccc;text-align:center;margin-top:10px;-webkit-user-select:none;user-select:none}.expression-editor .functions-list .functions-type{overflow:hidden;transition:all .2s ease-in}.expression-editor .functions-list .functions-type.open{max-height:1300px}.expression-editor .functions-list .functions-type.closed{max-height:28px}.expression-editor .functions-list .functions-type .functions-type-name{cursor:pointer;height:28px;line-height:28px;font-weight:700}.expression-editor .functions-list .functions-type .functions-type-name:hover{background:#e7f1ff;border-radius:6px}.expression-editor .functions-list .functions-type li{height:28px;line-height:28px;list-style:none}.expression-editor .functions-list .functions-type .functions-item{cursor:pointer}.expression-editor .functions-list .functions-type .functions-item.selected{background:#dae9ff;border-radius:6px}.expression-editor .functions-list .functions-type .functions-item:hover:not(.selected){background:#e7f1ff;border-radius:6px}.expression-editor .function-remark{resize:none;outline:none;background:#f4f4f4;border:1px solid #cbcbcb;border-left:0;border-bottom:0;border-right:0;color:#4682b4}.expression-editor .entity-variable ul{list-style:none}.expression-editor .entity-variable ul li.list-group{overflow:hidden;transition:all .2s ease-in}.expression-editor .entity-variable ul li.list-group.expand{max-height:calc(100% - 32px)}.expression-editor .entity-variable ul li.list-group.collapse{max-height:32px}.expression-editor .entity-variable ul li.list-group .title{cursor:pointer;border-bottom:1px solid #d9d9d9;justify-content:space-between;background:#f7f8fb;height:32px;min-height:32px;font-weight:700;line-height:32px}.expression-editor .entity-variable ul li.list-group .data-area{background-color:#fff}.expression-editor .monaco-editor .suggest-widget{z-index:9999!important}.expression-editor .fv-grid-row-selected .entity-field .d-none,.expression-editor .entity-field:hover .d-none{display:block!important}.expression-editor .expression-code-editor{position:fixed;z-index:201}.expression-editor .f-layout-horizontal-resize-proxy,.expression-editor .f-layout-vertical-resize-proxy{z-index:300!important}
|
|
1
|
+
@charset "UTF-8";.fade-enter-active,.fade-leave-active{transition:opacity .5s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fv-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.fv-resizable-handle:hover{background:transparent}.fv-resizable-handle.fv-resizable-n{cursor:n-resize;height:.4375rem;width:100%;top:-.3125rem;left:0}.fv-resizable-handle.fv-resizable-e{cursor:e-resize;width:.4375rem;right:-.3125rem;height:100%;top:0}.fv-resizable-handle.fv-resizable-s{cursor:s-resize;height:.4375rem;width:100%;bottom:-.3125rem;left:0}.fv-resizable-handle.fv-resizable-w{cursor:w-resize;height:100%;width:.4375rem;left:-.3125rem;top:0}.fv-resizable-handle.fv-resizable-ne{cursor:ne-resize;width:.75rem;height:.75rem;right:1px;top:1px}.fv-resizable-handle.fv-resizable-se{cursor:se-resize;width:.75rem;height:.75rem;right:1px;bottom:1px}.fv-resizable-handle.fv-resizable-nw{cursor:nw-resize;width:.75rem;height:.75rem;left:1px;top:1px}.fv-resizable-handle.fv-resizable-sw{cursor:sw-resize;width:.75rem;height:.75rem;left:1px;bottom:1px}.expression-editor{border:1px solid #cccccc}.expression-editor .layout-border{border:1px solid #cccccc;border-top:0;border-bottom:0;box-shadow:none!important}.expression-editor .expression-left .search-bar{justify-content:center}.expression-editor .expression-left .layout-border{border:0}.expression-editor .functions-list .empty-message{color:#ccc;text-align:center;margin-top:10px;-webkit-user-select:none;user-select:none}.expression-editor .functions-list .functions-type{overflow:hidden;transition:all .2s ease-in}.expression-editor .functions-list .functions-type.open{max-height:1300px}.expression-editor .functions-list .functions-type.closed{max-height:28px}.expression-editor .functions-list .functions-type .functions-type-name{cursor:pointer;height:28px;line-height:28px;font-weight:700}.expression-editor .functions-list .functions-type .functions-type-name:hover{background:#e7f1ff;border-radius:6px}.expression-editor .functions-list .functions-type li{height:28px;line-height:28px;list-style:none}.expression-editor .functions-list .functions-type .functions-item{cursor:pointer}.expression-editor .functions-list .functions-type .functions-item.selected{background:#dae9ff;border-radius:6px}.expression-editor .functions-list .functions-type .functions-item:hover:not(.selected){background:#e7f1ff;border-radius:6px}.expression-editor .function-remark{resize:none;outline:none;background:#f4f4f4;border:1px solid #cbcbcb;border-left:0;border-bottom:0;border-right:0;color:#4682b4}.expression-editor .entity-variable ul{list-style:none}.expression-editor .entity-variable ul li.list-group{overflow:hidden;transition:all .2s ease-in}.expression-editor .entity-variable ul li.list-group.expand{max-height:calc(100% - 32px)}.expression-editor .entity-variable ul li.list-group.collapse{max-height:32px}.expression-editor .entity-variable ul li.list-group .title{cursor:pointer;border-bottom:1px solid #d9d9d9;justify-content:space-between;background:#f7f8fb;height:32px;min-height:32px;font-weight:700;line-height:32px}.expression-editor .entity-variable ul li.list-group .data-area{background-color:#fff}.expression-editor .monaco-editor .suggest-widget{z-index:9999!important}.expression-editor .fv-grid-row-selected .entity-field .d-none,.expression-editor .entity-field:hover .d-none{display:block!important}.expression-editor .expression-code-editor{position:fixed;z-index:201}.expression-editor .f-layout-horizontal-resize-proxy,.expression-editor .f-layout-vertical-resize-proxy{z-index:300!important}
|