@farris/ui-vue 1.7.3 → 1.7.5
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 +1816 -1790
- 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/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 +5192 -4408
- 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-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 +68724 -67244
- 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,13 +1,89 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var Ge = (e, n, t) => n in e ? je(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var V = (e, n, t) => Ge(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { ref as I, computed as H, defineComponent as re, watch as Z, createVNode as w, createTextVNode as Se, mergeProps as We, reactive as ze, withDirectives as Ee, resolveDirective as _e, Fragment as Pe, inject as ve, onMounted as he, onBeforeMount as He, vModelText as Xe, nextTick as xe } from "vue";
|
|
5
|
+
import { isPlainObject as ye, cloneDeep as me, debounce as Je } from "lodash-es";
|
|
6
|
+
import Qe from "../accordion/index.esm.js";
|
|
7
|
+
import Ye from "../avatar/index.esm.js";
|
|
8
|
+
import Ze from "../../designer/button-edit/index.esm.js";
|
|
9
|
+
import Ke from "../button-group/index.esm.js";
|
|
10
|
+
import et from "../calendar/index.esm.js";
|
|
11
|
+
import tt from "../../designer/capsule/index.esm.js";
|
|
12
|
+
import be from "../../designer/checkbox/index.esm.js";
|
|
13
|
+
import Ce from "../../designer/checkbox-group/index.esm.js";
|
|
14
|
+
import nt from "../combo-list/index.esm.js";
|
|
15
|
+
import rt from "../combo-tree/index.esm.js";
|
|
16
|
+
import it from "../component/index.esm.js";
|
|
17
|
+
import ot from "../color-picker/index.esm.js";
|
|
18
|
+
import st from "../content-container/index.esm.js";
|
|
19
|
+
import at from "../../designer/date-picker/index.esm.js";
|
|
20
|
+
import lt from "../../designer/data-grid/index.esm.js";
|
|
21
|
+
import dt from "../dropdown/index.esm.js";
|
|
22
|
+
import ct from "../../designer/dynamic-form/index.esm.js";
|
|
23
|
+
import ut from "../events-editor/index.esm.js";
|
|
24
|
+
import pt from "../filter-bar/index.esm.js";
|
|
25
|
+
import ft from "../field-selector/index.esm.js";
|
|
26
|
+
import mt from "../binding-selector/index.esm.js";
|
|
27
|
+
import gt from "../image-cropper/index.esm.js";
|
|
28
|
+
import vt from "../../designer/input-group/index.esm.js";
|
|
29
|
+
import ht from "../layout/index.esm.js";
|
|
30
|
+
import yt from "../list-nav/index.esm.js";
|
|
31
|
+
import bt from "../../designer/list-view/index.esm.js";
|
|
32
|
+
import Ct from "../lookup/index.esm.js";
|
|
33
|
+
import Ft from "../mapping-editor/index.esm.js";
|
|
34
|
+
import wt from "../nav/index.esm.js";
|
|
35
|
+
import St from "../number-range/index.esm.js";
|
|
36
|
+
import Et from "../../designer/number-spinner/index.esm.js";
|
|
37
|
+
import Pt from "../order/index.esm.js";
|
|
38
|
+
import xt from "../page-header/index.esm.js";
|
|
39
|
+
import Tt from "../page-footer/index.esm.js";
|
|
40
|
+
import It from "../pagination/index.esm.js";
|
|
41
|
+
import kt from "../progress/index.esm.js";
|
|
42
|
+
import Vt from "../query-solution/index.esm.js";
|
|
43
|
+
import Mt from "../../designer/radio-group/index.esm.js";
|
|
44
|
+
import Bt from "../../designer/rate/index.esm.js";
|
|
45
|
+
import Nt from "../../designer/response-toolbar/index.esm.js";
|
|
46
|
+
import Lt from "../response-layout/index.esm.js";
|
|
47
|
+
import Ot from "../../designer/response-layout-editor/index.esm.js";
|
|
48
|
+
import $t from "../search-box/index.esm.js";
|
|
49
|
+
import Rt from "../../designer/section/index.esm.js";
|
|
50
|
+
import Ut from "../smoke-detector/index.esm.js";
|
|
51
|
+
import At from "../splitter/index.esm.js";
|
|
52
|
+
import qt from "../step/index.esm.js";
|
|
53
|
+
import Dt from "../../designer/switch/index.esm.js";
|
|
54
|
+
import jt from "../../designer/tabs/index.esm.js";
|
|
55
|
+
import Gt from "../../designer/tags/index.esm.js";
|
|
56
|
+
import Wt from "../text/index.esm.js";
|
|
57
|
+
import zt from "../../designer/time-picker/index.esm.js";
|
|
58
|
+
import _t from "../transfer/index.esm.js";
|
|
59
|
+
import Ht from "../tree-view/index.esm.js";
|
|
60
|
+
import Xt from "../uploader/index.esm.js";
|
|
61
|
+
import Jt from "../verify-detail/index.esm.js";
|
|
62
|
+
import Qt from "../video/index.esm.js";
|
|
63
|
+
import Yt from "../../designer/textarea/index.esm.js";
|
|
64
|
+
import Zt from "../schema-selector/index.esm.js";
|
|
65
|
+
import Kt from "../../designer/tree-grid/index.esm.js";
|
|
66
|
+
import en from "../event-parameter/index.esm.js";
|
|
67
|
+
import tn from "../filter-condition-editor/index.esm.js";
|
|
68
|
+
import nn from "../fieldset/index.esm.js";
|
|
69
|
+
import rn from "../sort-condition-editor/index.esm.js";
|
|
70
|
+
import on from "../menu-lookup/index.esm.js";
|
|
71
|
+
import sn from "../../designer/drawer/index.esm.js";
|
|
72
|
+
import an from "../json-editor/index.esm.js";
|
|
73
|
+
import ln from "../property-editor/index.esm.js";
|
|
74
|
+
import dn from "../expression-editor/index.esm.js";
|
|
75
|
+
import cn from "../code-editor/index.esm.js";
|
|
76
|
+
import un from "../html-template/index.esm.js";
|
|
77
|
+
import pn from "../collection-property-editor/index.esm.js";
|
|
78
|
+
import fn from "../../designer/modal/index.esm.js";
|
|
79
|
+
import mn from "../external-container/index.esm.js";
|
|
80
|
+
import gn from "../language-textbox/index.esm.js";
|
|
81
|
+
import vn from "../image/index.esm.js";
|
|
82
|
+
import hn from "../comment/index.esm.js";
|
|
83
|
+
import { schemaResolverMap as yn, propertyEffectMap as bn, propertyConfigSchemaMap as Cn, schemaMap as Fn, createPropsResolver as wn } from "../dynamic-resolver/index.esm.js";
|
|
84
|
+
import { useThirdComponent as Sn, isMobilePhone as En, FormSchemaEntityField$Type as Fe, FormSchemaEntityFieldType$Type as Pn } from "../common/index.esm.js";
|
|
85
|
+
import { DgControl as v, canvasChanged as ce, refreshCanvas as xn } from "../designer-canvas/index.esm.js";
|
|
86
|
+
const Tn = {
|
|
11
87
|
width: { type: String, default: "300px" },
|
|
12
88
|
height: { type: Number, default: 10 },
|
|
13
89
|
isWidePanel: { type: Boolean, default: !1 },
|
|
@@ -35,7 +111,570 @@ const Ke = {
|
|
|
35
111
|
schema: { type: Object, default: {} },
|
|
36
112
|
/** 属性变更后事件 */
|
|
37
113
|
propertyChanged: { type: Function }
|
|
38
|
-
}
|
|
114
|
+
};
|
|
115
|
+
function In(e = {}) {
|
|
116
|
+
function n(p, m, s, c) {
|
|
117
|
+
if (typeof s == "number")
|
|
118
|
+
return c[p].length === s;
|
|
119
|
+
if (typeof s == "object") {
|
|
120
|
+
const f = Object.keys(s)[0], l = s[f];
|
|
121
|
+
if (f === "not")
|
|
122
|
+
return Number(c[p].length) !== Number(l);
|
|
123
|
+
if (f === "moreThan")
|
|
124
|
+
return Number(c[p].length) >= Number(l);
|
|
125
|
+
if (f === "lessThan")
|
|
126
|
+
return Number(c[p].length) <= Number(l);
|
|
127
|
+
}
|
|
128
|
+
return !1;
|
|
129
|
+
}
|
|
130
|
+
function t(p, m, s, c) {
|
|
131
|
+
return c[p] && c[p].propertyValue && String(c[p].propertyValue.value) === String(s);
|
|
132
|
+
}
|
|
133
|
+
const r = /* @__PURE__ */ new Map([
|
|
134
|
+
["length", n],
|
|
135
|
+
["getProperty", t]
|
|
136
|
+
]);
|
|
137
|
+
Object.keys(e).reduce((p, m) => (p.set(m, e[m]), p), r);
|
|
138
|
+
function i(p, m) {
|
|
139
|
+
const s = p;
|
|
140
|
+
return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!m }] : typeof m == "object" ? Object.keys(m).map((c) => {
|
|
141
|
+
if (c === "length")
|
|
142
|
+
return { target: s, operator: "length", param: null, value: m[c] };
|
|
143
|
+
const f = c, l = m[c];
|
|
144
|
+
return { target: s, operator: "getProperty", param: f, value: l };
|
|
145
|
+
}) : [];
|
|
146
|
+
}
|
|
147
|
+
function o(p) {
|
|
148
|
+
return Object.keys(p).reduce((s, c) => {
|
|
149
|
+
const f = i(c, p[c]);
|
|
150
|
+
return s.push(...f), s;
|
|
151
|
+
}, []);
|
|
152
|
+
}
|
|
153
|
+
function a(p, m) {
|
|
154
|
+
if (r.has(p.operator)) {
|
|
155
|
+
const s = r.get(p.operator);
|
|
156
|
+
return s && s(p.target, p.param, p.value, m) || !1;
|
|
157
|
+
}
|
|
158
|
+
return !1;
|
|
159
|
+
}
|
|
160
|
+
function g(p, m) {
|
|
161
|
+
return o(p).reduce((f, l) => f && a(l, m), !0);
|
|
162
|
+
}
|
|
163
|
+
function d(p, m) {
|
|
164
|
+
const s = Object.keys(p), c = s.includes("allOf"), f = s.includes("anyOf"), l = c || f, E = (l ? p[l ? c ? "allOf" : "anyOf" : "allOf"] : [p]).map((U) => g(U, m));
|
|
165
|
+
return c ? !E.includes(!1) : E.includes(!0);
|
|
166
|
+
}
|
|
167
|
+
return { parseValueSchema: d };
|
|
168
|
+
}
|
|
169
|
+
const kn = {
|
|
170
|
+
convertTo: (e, n, t, r) => {
|
|
171
|
+
e.appearance || (e.appearance = {}), e.appearance[n] = t;
|
|
172
|
+
},
|
|
173
|
+
convertFrom: (e, n, t) => e.appearance ? e.appearance[n] : e[n]
|
|
174
|
+
}, Vn = {
|
|
175
|
+
convertFrom: (e, n, t) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
176
|
+
}, Mn = {
|
|
177
|
+
convertTo: (e, n, t, r) => {
|
|
178
|
+
e.editor && (e.editor[n] = t);
|
|
179
|
+
},
|
|
180
|
+
convertFrom: (e, n, t) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, n) ? e.editor[n] : e[n]
|
|
181
|
+
}, Bn = {
|
|
182
|
+
button: { type: "button", name: "按钮" },
|
|
183
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
184
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
185
|
+
"content-container": { type: "content-container", name: "容器" },
|
|
186
|
+
"input-group": { type: "input-group", name: "文本" },
|
|
187
|
+
textarea: { type: "textarea", name: "多行文本" },
|
|
188
|
+
lookup: { type: "lookup", name: "帮助" },
|
|
189
|
+
"number-spinner": { type: "number-spinner", name: "数值" },
|
|
190
|
+
"date-picker": { type: "date-picker", name: "日期" },
|
|
191
|
+
switch: { type: "switch", name: "开关" },
|
|
192
|
+
"radio-group": { type: "radio-group", name: "单选组" },
|
|
193
|
+
"check-box": { type: "check-box", name: "复选框" },
|
|
194
|
+
"check-group": { type: "check-group", name: "复选框组" },
|
|
195
|
+
"combo-list": { type: "combo-list", name: "下拉列表" },
|
|
196
|
+
"response-form": { type: "response-form", name: "卡片面板" },
|
|
197
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
|
|
198
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
|
|
199
|
+
"tree-grid": { type: "tree-grid", name: "树表格" },
|
|
200
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
201
|
+
"data-grid": { type: "data-grid", name: "表格" },
|
|
202
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
203
|
+
module: { type: "Module", name: "模块" },
|
|
204
|
+
component: { type: "component", name: "组件" },
|
|
205
|
+
tabs: { type: "tabs", name: "标签页" },
|
|
206
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
207
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
208
|
+
"drawer-toolbar-item": { type: "drawer-toolbar-item", name: "抽屉工具栏按钮" },
|
|
209
|
+
"html-template": { type: "html-template", name: "模板容器" },
|
|
210
|
+
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
211
|
+
section: { type: "section", name: "分组面板" },
|
|
212
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
213
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
214
|
+
splitter: { type: "splitter", name: "分栏面板" },
|
|
215
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
216
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
217
|
+
uploader: { type: "uploader", name: "附件上传" },
|
|
218
|
+
"page-header": { type: "page-header", name: "页头" },
|
|
219
|
+
"page-footer": { type: "page-footer", name: "页脚" },
|
|
220
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
221
|
+
"drawer-toolbar": { type: "drawer-toolbar", name: "抽屉工具栏" },
|
|
222
|
+
fieldset: { type: "fieldset", name: "分组" },
|
|
223
|
+
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
224
|
+
drawer: { type: "drawer", name: "抽屉" },
|
|
225
|
+
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
226
|
+
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
227
|
+
"list-view": { type: "list-view", name: "列表" },
|
|
228
|
+
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
229
|
+
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
230
|
+
image: { type: "image", name: "图像" },
|
|
231
|
+
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
232
|
+
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
233
|
+
comment: { type: "comment", name: "评论区" },
|
|
234
|
+
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
235
|
+
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
236
|
+
}, Nn = {
|
|
237
|
+
convertFrom: (e, n, t) => {
|
|
238
|
+
var i;
|
|
239
|
+
const r = e.editor && e.editor[n] ? e.editor[n] : e[n];
|
|
240
|
+
return ((i = Bn[r]) == null ? void 0 : i.name) || r;
|
|
241
|
+
}
|
|
242
|
+
}, Ln = {
|
|
243
|
+
convertTo: (e, n, t, r) => {
|
|
244
|
+
e[n] = e[n];
|
|
245
|
+
},
|
|
246
|
+
convertFrom: (e, n, t) => e.editor ? t.getRealEditorType(e.editor.type) : ""
|
|
247
|
+
}, On = {
|
|
248
|
+
convertTo: (e, n, t, r) => {
|
|
249
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[n] = t : e.formatter = {
|
|
250
|
+
[n]: t
|
|
251
|
+
});
|
|
252
|
+
},
|
|
253
|
+
convertFrom: (e, n, t) => {
|
|
254
|
+
if (e.formatter) {
|
|
255
|
+
if (n === "trueText")
|
|
256
|
+
return e.formatter.trueText;
|
|
257
|
+
if (n === "falseText")
|
|
258
|
+
return e.formatter.falseText;
|
|
259
|
+
if (n === "prefix")
|
|
260
|
+
return e.formatter.prefix;
|
|
261
|
+
if (n === "suffix")
|
|
262
|
+
return e.formatter.suffix;
|
|
263
|
+
if (n === "precision")
|
|
264
|
+
return e.formatter.precision;
|
|
265
|
+
if (n === "decimal")
|
|
266
|
+
return e.formatter.decimal;
|
|
267
|
+
if (n === "thousand")
|
|
268
|
+
return e.formatter.thousand;
|
|
269
|
+
if (n === "dateFormat")
|
|
270
|
+
return e.formatter.dateFormat || "yyyy-MM-dd";
|
|
271
|
+
if (n === "customFormat")
|
|
272
|
+
return e.formatter.customFormat;
|
|
273
|
+
if (n === "type")
|
|
274
|
+
return e.formatter.type || "none";
|
|
275
|
+
}
|
|
276
|
+
return "none";
|
|
277
|
+
}
|
|
278
|
+
}, $n = {
|
|
279
|
+
convertTo: (e, n, t, r) => {
|
|
280
|
+
e.command ? e.command[n] = t : e.command = {
|
|
281
|
+
[n]: t
|
|
282
|
+
}, n === "enableType" && t === "default" && (e.command.enable = !0, e.command.commands = [
|
|
283
|
+
{
|
|
284
|
+
text: "编辑",
|
|
285
|
+
type: "primary",
|
|
286
|
+
command: "edit"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
text: "删除",
|
|
290
|
+
type: "danger",
|
|
291
|
+
command: "remove"
|
|
292
|
+
}
|
|
293
|
+
]), n === "enableType" && t === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
294
|
+
{
|
|
295
|
+
value: "add",
|
|
296
|
+
text: {
|
|
297
|
+
en: "add",
|
|
298
|
+
"zh-CHS": "增加",
|
|
299
|
+
"zh-CHT": "增加"
|
|
300
|
+
},
|
|
301
|
+
type: "link"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
value: "edit",
|
|
305
|
+
text: {
|
|
306
|
+
en: "edit",
|
|
307
|
+
"zh-CHS": "编辑",
|
|
308
|
+
"zh-CHT": "編輯"
|
|
309
|
+
},
|
|
310
|
+
type: "danger"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
value: "remove",
|
|
314
|
+
text: {
|
|
315
|
+
en: "remove",
|
|
316
|
+
"zh-CHS": "删除",
|
|
317
|
+
"zh-CHT": "刪除"
|
|
318
|
+
},
|
|
319
|
+
type: "remove"
|
|
320
|
+
}
|
|
321
|
+
]), n === "enableType" && t === "unable" && (e.command.enable = !1);
|
|
322
|
+
},
|
|
323
|
+
convertFrom: (e, n, t) => {
|
|
324
|
+
var r, i;
|
|
325
|
+
if (e.command) {
|
|
326
|
+
if (n === "enableType") {
|
|
327
|
+
const o = (i = (r = e.command) == null ? void 0 : r.commands) == null ? void 0 : i.find((a) => a.command === "edit" && a.type === "primary");
|
|
328
|
+
return e.command.enable ? o ? "default" : "custom" : "unable";
|
|
329
|
+
}
|
|
330
|
+
if (n === "commands")
|
|
331
|
+
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
332
|
+
if (n === "formatter")
|
|
333
|
+
return e.command.formatter;
|
|
334
|
+
if (n === "count")
|
|
335
|
+
return e.command.count;
|
|
336
|
+
}
|
|
337
|
+
return "";
|
|
338
|
+
}
|
|
339
|
+
}, Rn = {
|
|
340
|
+
convertTo: (e, n, t, r) => {
|
|
341
|
+
e.column ? e.column[n] = t : e.column = {
|
|
342
|
+
[n]: t
|
|
343
|
+
}, n === "fitColumns" && t && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
344
|
+
},
|
|
345
|
+
convertFrom: (e, n, t) => {
|
|
346
|
+
if (e.column) {
|
|
347
|
+
if (n === "fitColumns")
|
|
348
|
+
return e.column.fitColumns;
|
|
349
|
+
if (n === "fitMode")
|
|
350
|
+
return e.column.fitMode;
|
|
351
|
+
}
|
|
352
|
+
return "";
|
|
353
|
+
}
|
|
354
|
+
}, Un = {
|
|
355
|
+
convertTo: (e, n, t, r) => {
|
|
356
|
+
e.summary ? e.summary[n] = t : e.summary = {
|
|
357
|
+
[n]: t
|
|
358
|
+
}, n === "enable" && t && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
359
|
+
enable: t,
|
|
360
|
+
groupFields: []
|
|
361
|
+
});
|
|
362
|
+
},
|
|
363
|
+
convertFrom: (e, n, t) => e.summary && n === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
364
|
+
}, An = {
|
|
365
|
+
convertTo: (e, n, t, r) => {
|
|
366
|
+
e.group ? e.group[n] = t : e.group = {
|
|
367
|
+
[n]: t
|
|
368
|
+
}, n === "enable" && t && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
369
|
+
enable: t,
|
|
370
|
+
groupFields: [],
|
|
371
|
+
showSummary: !1
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
convertFrom: (e, n, t) => {
|
|
375
|
+
if (e.group) {
|
|
376
|
+
if (n === "enable")
|
|
377
|
+
return e.group.enable;
|
|
378
|
+
if (n === "showSummary")
|
|
379
|
+
return e.group.showSummary;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}, qn = {
|
|
383
|
+
convertFrom: (e, n) => e.binding ? e.binding.path : "",
|
|
384
|
+
convertTo: (e, n, t) => {
|
|
385
|
+
if (t && t.length > 0) {
|
|
386
|
+
const r = t[0];
|
|
387
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = r.bindingField, e.binding.field = r.id, e.binding.fullPath = r.path, e.path = r.bindingPath;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}, Dn = {
|
|
391
|
+
convertTo: (e, n, t, r) => {
|
|
392
|
+
e.pagination || (e.pagination = {}), e.pagination[n] = t;
|
|
393
|
+
},
|
|
394
|
+
convertFrom: (e, n, t) => e.pagination ? e.pagination[n] : e[n]
|
|
395
|
+
}, jn = {
|
|
396
|
+
convertTo: (e, n, t, r) => {
|
|
397
|
+
e.rowNumber || (e.rowNumber = {}), e.rowNumber[n] = t;
|
|
398
|
+
},
|
|
399
|
+
convertFrom: (e, n, t) => e.rowNumber ? e.rowNumber[n] : e[n]
|
|
400
|
+
}, Gn = {
|
|
401
|
+
convertTo: (e, n, t, r) => {
|
|
402
|
+
e.selection || (e.selection = {}), e.selection[n] = t;
|
|
403
|
+
},
|
|
404
|
+
convertFrom: (e, n, t) => {
|
|
405
|
+
var r, i;
|
|
406
|
+
return n === "showCheckbox" ? (r = e.selection) != null && r.multiSelect ? !0 : (i = e.selection) == null ? void 0 : i.showCheckbox : e.selection ? e.selection[n] : e[n];
|
|
407
|
+
}
|
|
408
|
+
}, Wn = {
|
|
409
|
+
convertFrom: (e, n, t) => e[n] && e[n].length ? `共 ${e[n].length} 项` : ""
|
|
410
|
+
}, zn = {
|
|
411
|
+
convertFrom: (e, n) => e[n] || "",
|
|
412
|
+
convertTo: (e, n, t) => {
|
|
413
|
+
e[n] = t;
|
|
414
|
+
}
|
|
415
|
+
}, _n = {
|
|
416
|
+
convertTo: (e, n, t, r) => {
|
|
417
|
+
e.size || (e.size = {}), e.size[n] = t;
|
|
418
|
+
},
|
|
419
|
+
convertFrom: (e, n, t) => e.size ? e.size[n] : e[n]
|
|
420
|
+
}, Hn = {
|
|
421
|
+
convertFrom: (e, n, t) => {
|
|
422
|
+
var r, i;
|
|
423
|
+
return (r = e.formatter) != null && r.data && n === "formatterEnumData" && !e.formatterEnumData ? (i = e.formatter) == null ? void 0 : i.data : e.formatterEnumData;
|
|
424
|
+
}
|
|
425
|
+
}, Xn = {
|
|
426
|
+
convertTo: (e, n, t, r) => {
|
|
427
|
+
e.sort || (e.sort = {}), e.sort[n] = t;
|
|
428
|
+
},
|
|
429
|
+
convertFrom: (e, n, t) => {
|
|
430
|
+
var r, i;
|
|
431
|
+
if (n === "mode")
|
|
432
|
+
return ((r = e.sort) == null ? void 0 : r.mode) || "client";
|
|
433
|
+
if (n === "multiSort")
|
|
434
|
+
return !!((i = e.sort) != null && i.multiSort);
|
|
435
|
+
}
|
|
436
|
+
}, Jn = {
|
|
437
|
+
convertTo: (e, n, t, r) => {
|
|
438
|
+
e.filter || (e.filter = {}), e.filter[n] = t;
|
|
439
|
+
},
|
|
440
|
+
convertFrom: (e, n, t) => {
|
|
441
|
+
var r;
|
|
442
|
+
if (n === "mode")
|
|
443
|
+
return ((r = e.filter) == null ? void 0 : r.mode) || "client";
|
|
444
|
+
}
|
|
445
|
+
}, Qn = {
|
|
446
|
+
convertTo: (e, n, t, r) => {
|
|
447
|
+
e.rowOption ? e.rowOption[n] = t : e.rowOption = {
|
|
448
|
+
[n]: t
|
|
449
|
+
};
|
|
450
|
+
},
|
|
451
|
+
convertFrom: (e, n, t) => {
|
|
452
|
+
if (e.rowOption) {
|
|
453
|
+
if (n === "customRowStyle")
|
|
454
|
+
return e.rowOption.customRowStyle;
|
|
455
|
+
if (n === "customCellStyle")
|
|
456
|
+
return e.rowOption.customCellStyle;
|
|
457
|
+
}
|
|
458
|
+
return "";
|
|
459
|
+
}
|
|
460
|
+
}, Yn = {
|
|
461
|
+
convertTo: (e, n, t, r) => {
|
|
462
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[n] = t, n === "columnTemplateType" && t === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
463
|
+
<span class="f-pretend-link f-cursor-pointer"
|
|
464
|
+
@click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
|
|
465
|
+
{{rowData.${e.field}}}
|
|
466
|
+
</span>` : e.columnTemplate = `
|
|
467
|
+
<span class="f-pretend-link f-cursor-pointer">
|
|
468
|
+
{{rowData.${e.field}}}
|
|
469
|
+
</span>`), n === "columnTemplateType" && t === "default" && (e.columnTemplate = ""), n === "columnTemplateType" && t === "custom" && (e.columnTemplate = ""));
|
|
470
|
+
},
|
|
471
|
+
convertFrom: (e, n, t) => n === "columnTemplate" ? e.columnTemplate : n === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
472
|
+
};
|
|
473
|
+
function Zn(e, n, t) {
|
|
474
|
+
const r = /* @__PURE__ */ new Map([
|
|
475
|
+
["/converter/appearance.converter", kn],
|
|
476
|
+
["/converter/buttons.converter", Vn],
|
|
477
|
+
["/converter/property-editor.converter", Mn],
|
|
478
|
+
["/converter/items-count.converter", Wn],
|
|
479
|
+
["/converter/type.converter", Nn],
|
|
480
|
+
["/converter/change-editor.converter", Ln],
|
|
481
|
+
["/converter/change-formatter.converter", On],
|
|
482
|
+
["/converter/column-command.converter", $n],
|
|
483
|
+
["/converter/column-option.converter", Rn],
|
|
484
|
+
["/converter/summary.converter", Un],
|
|
485
|
+
["/converter/group.converter", An],
|
|
486
|
+
["/converter/form-group-label.converter", zn],
|
|
487
|
+
["/converter/field-selector.converter", qn],
|
|
488
|
+
["/converter/pagination.converter", Dn],
|
|
489
|
+
["/converter/row-number.converter", jn],
|
|
490
|
+
["/converter/grid-selection.converter", Gn],
|
|
491
|
+
["/converter/size.converter", _n],
|
|
492
|
+
["/converter/change-formatter-enum.converter", Hn],
|
|
493
|
+
["/converter/grid-sort.converter", Xn],
|
|
494
|
+
["/converter/grid-filter.converter", Jn],
|
|
495
|
+
["/converter/row-option.converter", Qn],
|
|
496
|
+
["/converter/change-formatter-type.converter", Yn]
|
|
497
|
+
]), i = /* @__PURE__ */ new Map([
|
|
498
|
+
["string", { type: "input-group", enableClear: !1 }],
|
|
499
|
+
["boolean", {
|
|
500
|
+
type: "combo-list",
|
|
501
|
+
textField: "name",
|
|
502
|
+
valueField: "value",
|
|
503
|
+
idField: "value",
|
|
504
|
+
enableClear: !1,
|
|
505
|
+
editable: !1,
|
|
506
|
+
data: [
|
|
507
|
+
{
|
|
508
|
+
value: !0,
|
|
509
|
+
name: "是"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
value: !1,
|
|
513
|
+
name: "否"
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}],
|
|
517
|
+
["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
|
|
518
|
+
["array", { type: "button-edit" }],
|
|
519
|
+
["number", { type: "number-spinner", placeholder: "" }],
|
|
520
|
+
["events-editor", { type: "events-editor", hide: !0 }]
|
|
521
|
+
]), o = In();
|
|
522
|
+
function a(l, u) {
|
|
523
|
+
return () => o.parseValueSchema(l, u);
|
|
524
|
+
}
|
|
525
|
+
function g(l, u, h) {
|
|
526
|
+
return l.includes("visible") && u.visible !== void 0 ? typeof u.visible == "boolean" ? () => !!u.visible : u.visible === void 0 ? !0 : a(u.visible, h) : () => !0;
|
|
527
|
+
}
|
|
528
|
+
function d(l, u, h) {
|
|
529
|
+
return l.includes("readonly") && u.readonly !== void 0 ? typeof u.readonly == "boolean" ? () => !!u.readonly : a(u.readonly, h) : () => !1;
|
|
530
|
+
}
|
|
531
|
+
function p(l, u) {
|
|
532
|
+
const h = l.$converter || u;
|
|
533
|
+
return typeof h == "string" && h && r.has(h) ? r.get(h) || null : h || null;
|
|
534
|
+
}
|
|
535
|
+
function m(l, u, h, E, k, U = "", A = "") {
|
|
536
|
+
return Object.keys(l).map((N) => {
|
|
537
|
+
const M = I(1), D = N, L = l[N], T = Object.keys(L), J = L.title, _ = L.type, B = i.get(_) || { type: "input-group", enableClear: !1 }, q = L.editor ? Object.assign({}, B, L.editor) : Object.assign({}, B), O = g(T, L, u), G = d(T, L, u);
|
|
538
|
+
q.readonly = q.readonly === void 0 ? G() : q.readonly;
|
|
539
|
+
const W = L.type === "cascade" ? m(L.properties, u, h, E, k, U, A) : [], Q = !0;
|
|
540
|
+
let z = p(L, A);
|
|
541
|
+
const ie = H({
|
|
542
|
+
get() {
|
|
543
|
+
if (M.value) {
|
|
544
|
+
if (["class", "style"].find((ae) => ae === D) && !z && (z = r.get("/converter/appearance.converter") || null), z && z.convertFrom)
|
|
545
|
+
return z.convertFrom(h, N, k, U);
|
|
546
|
+
const X = h[N];
|
|
547
|
+
return Object.prototype.hasOwnProperty.call(L, "defaultValue") && (X === void 0 || typeof X == "string" && X === "") ? L.type === "boolean" ? L.defaultValue : L.defaultValue || "" : X;
|
|
548
|
+
}
|
|
549
|
+
return null;
|
|
550
|
+
},
|
|
551
|
+
set(X) {
|
|
552
|
+
M.value += 1, z && z.convertTo ? (z.convertTo(E, N, X, k, U), z.convertTo(h, N, X, k, U)) : (E[N] = X, h[N] = X);
|
|
553
|
+
}
|
|
554
|
+
}), { refreshPanelAfterChanged: oe, description: K, isExpand: te, parentPropertyID: ee } = L, se = { propertyID: D, propertyName: J, propertyType: _, propertyValue: ie, editor: q, visible: O, readonly: G, cascadeConfig: W, hideCascadeTitle: Q, refreshPanelAfterChanged: oe, description: K, isExpand: te, parentPropertyID: ee };
|
|
555
|
+
return u[D] = se, se;
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
function s(l, u, h = {}) {
|
|
559
|
+
const E = {}, k = e[l];
|
|
560
|
+
return k && k.categories ? Object.keys(k.categories).map((A) => {
|
|
561
|
+
const R = k.categories[A], N = R == null ? void 0 : R.title, M = m(R.properties || {}, E, {}, h, u);
|
|
562
|
+
return { categoryId: A, categoryName: N, properties: M };
|
|
563
|
+
}) : [];
|
|
564
|
+
}
|
|
565
|
+
function c(l, u, h, E, k = "") {
|
|
566
|
+
const U = u.$ref.schema, A = u.$ref.converter, R = h[U], N = R.type, M = t(R), D = {}, L = e[N];
|
|
567
|
+
if (L && L.categories) {
|
|
568
|
+
const T = L.categories[l], J = T == null ? void 0 : T.title;
|
|
569
|
+
A && Object.keys(T.properties).forEach((q) => {
|
|
570
|
+
T.properties[q].$converter = A;
|
|
571
|
+
});
|
|
572
|
+
const _ = (T == null ? void 0 : T.properties) || {}, B = m(_, D, M, R, E, k);
|
|
573
|
+
return { categoryId: l, categoryName: J, properties: B };
|
|
574
|
+
}
|
|
575
|
+
return { categoryId: l, categoryName: "", properties: [] };
|
|
576
|
+
}
|
|
577
|
+
function f(l, u, h, E, k) {
|
|
578
|
+
const U = l.type, A = t(l), R = {};
|
|
579
|
+
let N = k || e[U];
|
|
580
|
+
if (!(N && Object.keys(N).length > 0) && h && h.getPropConfig && (N = h.getPropConfig(E)), N && N.categories) {
|
|
581
|
+
const D = [];
|
|
582
|
+
return Object.keys(N.categories).map((L) => {
|
|
583
|
+
const T = N.categories[L];
|
|
584
|
+
if (T.$ref) {
|
|
585
|
+
D.push(c(L, T, l, u, E));
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
const J = T == null ? void 0 : T.title, _ = T == null ? void 0 : T.tabId, B = T == null ? void 0 : T.tabName, q = T == null ? void 0 : T.hide, O = T == null ? void 0 : T.hideTitle, G = m(T.properties || {}, R, A, l, u, E, T.$converter), { setPropertyRelates: W } = T, Q = T == null ? void 0 : T.parentPropertyID;
|
|
589
|
+
D.push({ categoryId: L, categoryName: J, tabId: _, tabName: B, hide: q, properties: G, hideTitle: O, setPropertyRelates: W, parentPropertyID: Q });
|
|
590
|
+
}), D;
|
|
591
|
+
}
|
|
592
|
+
return [];
|
|
593
|
+
}
|
|
594
|
+
return {
|
|
595
|
+
getPropertyConfigBySchema: f,
|
|
596
|
+
getPropertyConfigByType: s,
|
|
597
|
+
propertyConverterMap: r
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function Kn(e, n) {
|
|
601
|
+
let t;
|
|
602
|
+
function r(s) {
|
|
603
|
+
const { properties: c, title: f, ignore: l } = s, u = l && Array.isArray(l), h = Object.keys(c).reduce((E, k) => ((!u || !l.find((U) => U === k)) && (E[k] = c[k].type === "object" && c[k].properties ? r(c[k]) : me(c[k].default)), E), {});
|
|
604
|
+
if (f && (!u || !l.find((E) => E === "id"))) {
|
|
605
|
+
const E = f.toLowerCase().replace(/-/g, "_");
|
|
606
|
+
h.id = `${E}_${Math.random().toString().slice(2, 6)}`;
|
|
607
|
+
}
|
|
608
|
+
return h;
|
|
609
|
+
}
|
|
610
|
+
function i(s) {
|
|
611
|
+
const { properties: c, title: f, required: l } = s;
|
|
612
|
+
if (l && Array.isArray(l)) {
|
|
613
|
+
const u = l.reduce((h, E) => (h[E] = c[E].type === "object" && c[E].properties ? r(c[E]) : me(c[E].default), h), {});
|
|
614
|
+
if (f && l.find((h) => h === "id")) {
|
|
615
|
+
const h = f.toLowerCase().replace(/-/g, "_");
|
|
616
|
+
u.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
617
|
+
}
|
|
618
|
+
return u;
|
|
619
|
+
}
|
|
620
|
+
return {
|
|
621
|
+
type: f
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
function o(s, c = {}, f) {
|
|
625
|
+
const l = e[s];
|
|
626
|
+
if (l) {
|
|
627
|
+
let u = i(l);
|
|
628
|
+
const h = n[s];
|
|
629
|
+
return u = h ? h({ getSchemaByType: o }, u, c, f) : u, t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(u), u;
|
|
630
|
+
}
|
|
631
|
+
return null;
|
|
632
|
+
}
|
|
633
|
+
function a(s, c) {
|
|
634
|
+
const f = r(c);
|
|
635
|
+
return Object.keys(f).reduce((l, u) => (Object.prototype.hasOwnProperty.call(s, u) && (l[u] && ye(l[u]) && ye(s[u] || !s[u]) ? Object.assign(l[u], s[u] || {}) : l[u] = s[u]), l), f), f;
|
|
636
|
+
}
|
|
637
|
+
function g(s, c) {
|
|
638
|
+
return Object.keys(s).filter((l) => s[l] != null).reduce((l, u) => {
|
|
639
|
+
if (c.has(u)) {
|
|
640
|
+
const h = c.get(u);
|
|
641
|
+
if (typeof h == "string")
|
|
642
|
+
l[h] = s[u];
|
|
643
|
+
else {
|
|
644
|
+
const E = h(u, s[u], s);
|
|
645
|
+
Object.assign(l, E);
|
|
646
|
+
}
|
|
647
|
+
} else
|
|
648
|
+
l[u] = s[u];
|
|
649
|
+
return l;
|
|
650
|
+
}, {});
|
|
651
|
+
}
|
|
652
|
+
function d(s, c, f = /* @__PURE__ */ new Map()) {
|
|
653
|
+
const l = a(s, c);
|
|
654
|
+
return g(l, f);
|
|
655
|
+
}
|
|
656
|
+
function p(s) {
|
|
657
|
+
var f;
|
|
658
|
+
const c = s.type;
|
|
659
|
+
if (c) {
|
|
660
|
+
const l = e[c];
|
|
661
|
+
if (!l)
|
|
662
|
+
return s;
|
|
663
|
+
const u = a(s, l), h = ((f = s.editor) == null ? void 0 : f.type) || "";
|
|
664
|
+
if (h) {
|
|
665
|
+
const E = e[h], k = a(s.editor, E);
|
|
666
|
+
u.editor = k;
|
|
667
|
+
}
|
|
668
|
+
return u;
|
|
669
|
+
}
|
|
670
|
+
return s;
|
|
671
|
+
}
|
|
672
|
+
function m(s) {
|
|
673
|
+
t = s;
|
|
674
|
+
}
|
|
675
|
+
return { getSchemaByType: o, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: d, mappingSchemaToProps: g, setDesignerContext: m };
|
|
676
|
+
}
|
|
677
|
+
const er = {}, tr = {}, { resolveSchemaWithDefaultValue: nr } = Kn(er, tr), rr = {}, ir = {}, { getPropertyConfigBySchema: fe } = Zn(rr, ir, nr), or = {
|
|
39
678
|
/** 某一分类下的属性配置 */
|
|
40
679
|
// as PropType<ElementPropertyConfig>
|
|
41
680
|
category: { type: Object, default: {} },
|
|
@@ -44,513 +683,828 @@ const Ke = {
|
|
|
44
683
|
propertyData: { type: Object, default: {} },
|
|
45
684
|
valueChanged: { type: Function },
|
|
46
685
|
triggerRefreshPanel: { type: Function }
|
|
47
|
-
},
|
|
686
|
+
}, sr = {
|
|
48
687
|
elementConfig: { type: Object, default: {} },
|
|
49
688
|
category: { type: Object, default: {} }
|
|
50
|
-
},
|
|
689
|
+
}, ar = {
|
|
690
|
+
id: { type: String, default: "" },
|
|
691
|
+
customClass: { type: String, default: "" },
|
|
692
|
+
customStyle: { type: String, default: "" },
|
|
693
|
+
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
694
|
+
editor: { type: Object, default: {} },
|
|
695
|
+
label: { type: String, default: "" },
|
|
696
|
+
/** value is uncertain because type is uncertain, default value should not be set */
|
|
697
|
+
modelValue: { type: [String, Boolean, Array, Number] },
|
|
698
|
+
// readonly: { type: Boolean, default: false },
|
|
699
|
+
visible: { type: Boolean, default: !0 },
|
|
700
|
+
required: { type: Boolean, default: !1 },
|
|
701
|
+
showLabel: { type: Boolean, default: !0 },
|
|
702
|
+
/**
|
|
703
|
+
* visible相当于showLabel为true,none相当于showLabel为false
|
|
704
|
+
*/
|
|
705
|
+
showLabelType: { type: String, default: "visible" },
|
|
706
|
+
type: { type: String, default: "input-group" },
|
|
707
|
+
componentId: { type: String, default: "" },
|
|
708
|
+
errors: { type: Object, default: null },
|
|
709
|
+
fill: { type: Boolean, default: !1 }
|
|
710
|
+
}, lr = {
|
|
711
|
+
id: { type: String },
|
|
712
|
+
required: { type: Boolean, default: !1 },
|
|
713
|
+
text: { type: String, default: "" },
|
|
714
|
+
title: { type: String },
|
|
715
|
+
valid: { type: Boolean, default: !0 },
|
|
716
|
+
inValidTip: { type: String, default: "" },
|
|
717
|
+
/**
|
|
718
|
+
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
719
|
+
*/
|
|
720
|
+
showType: { type: String, default: "visible" }
|
|
721
|
+
}, dr = /* @__PURE__ */ re({
|
|
722
|
+
name: "FDynamicFormLabel",
|
|
723
|
+
props: lr,
|
|
724
|
+
emits: [],
|
|
725
|
+
setup(e, n) {
|
|
726
|
+
I(e.title || e.text);
|
|
727
|
+
const t = I(e.required), r = I(e.text), i = I(e.valid), o = I(e.inValidTip);
|
|
728
|
+
Z(() => e.text, () => {
|
|
729
|
+
r.value = e.text;
|
|
730
|
+
}), Z(() => e.required, (m, s) => {
|
|
731
|
+
m !== s && (t.value = m);
|
|
732
|
+
}), Z([() => e.valid, () => e.inValidTip], ([m, s]) => {
|
|
733
|
+
i.value = m, o.value = s;
|
|
734
|
+
});
|
|
735
|
+
const a = H(() => i.value ? r.value : o.value), g = H(() => i.value ? "" : "color:red"), d = H(() => ({
|
|
736
|
+
"col-form-label": !0,
|
|
737
|
+
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
738
|
+
"f-width-auto": t.value && (e.showType === "none" || !r.value)
|
|
739
|
+
})), p = H(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || t.value || !!r.value && e.showType !== "none");
|
|
740
|
+
return () => p.value && w("label", {
|
|
741
|
+
class: d.value,
|
|
742
|
+
title: a.value,
|
|
743
|
+
style: g.value
|
|
744
|
+
}, [!i.value && w("span", {
|
|
745
|
+
class: "f-icon f-icon-warning mr-1",
|
|
746
|
+
style: "color: red; min-width: 16px;",
|
|
747
|
+
title: o.value
|
|
748
|
+
}, null), w("span", {
|
|
749
|
+
class: "farris-label-text"
|
|
750
|
+
}, [t.value && w("span", {
|
|
751
|
+
class: "farris-label-info text-danger"
|
|
752
|
+
}, [Se("*")]), e.showType === "visible" && r.value])]);
|
|
753
|
+
}
|
|
754
|
+
}), { globalStorageKey: cr } = Sn(), y = {}, b = {}, C = {}, F = {};
|
|
755
|
+
async function ur() {
|
|
756
|
+
{
|
|
757
|
+
const e = {
|
|
758
|
+
schemaMap: Fn,
|
|
759
|
+
propertyConfigSchemaMap: Cn,
|
|
760
|
+
propertyEffectMap: bn,
|
|
761
|
+
schemaResolverMap: yn
|
|
762
|
+
};
|
|
763
|
+
Ye.register(y, b, C, F), Qe.register(y, b, C, F), Ze.register(y, b, C, F), Ke.register(y, b, C, F), et.register(y, b, C, F, e), tt.register(y, b, C, F), be.register(y, b, C, F, e), Ce.register(y, b, C, F, e), be.register(y, b, C, F, e), Ce.register(y, b, C, F, e), nt.register(y, b, C, F, e), rt.register(y, b, C, F), it.register(y, b, C, F), st.register(y, b, C, F, e), ot.register(y, b, C, F), at.register(y, b, C, F, e), lt.register(y, b, C, F, e), dt.register(y, b, C, F), ct.register(y, b, C, F, e), ut.register(y, b, C, F), dn.register(y, b, C, F), pt.register(y, b, C, F), ft.register(y, b, C, F), tn.register(y, b, C, F), gt.register(y, b, C, F), vt.register(y, b, C, F, e), ht.register(y, b, C, F, e), bt.register(y, b, C, F, e), yt.register(y, b, C, F), Ct.register(y, b, C, F, e), Ft.register(y, b, C, F), wt.register(y, b, C, F), St.register(y, b, C, F), Et.register(y, b, C, F, e), Pt.register(y, b, C, F), xt.register(y, b, C, F, e), Tt.register(y, b, C, F), It.register(y, b, C, F), kt.register(y, b, C, F), Vt.register(y, b, C, F, e), Mt.register(y, b, C, F, e), Bt.register(y, b, C, F), Lt.register(y, b, C, F, e), Ot.register(y, b, C, F), Nt.register(y, b, C, F), Zt.register(y, b, C), $t.register(y, b, C, F), Rt.register(y, b, C, F, e), Ut.register(y, b, C, F), At.register(y, b, C, F), qt.register(y, b, C, F), Dt.register(y, b, C, F, e), rn.register(y, b, C, F), jt.register(y, b, C, F, e), Gt.register(y, b, C, F), Wt.register(y, b, C, F), zt.register(y, b, C, F, e), _t.register(y, b, C, F), Ht.register(y, b, C, F), Jt.register(y, b, C, F), Xt.register(y, b, C, F), Qt.register(y, b, C, F), Yt.register(y, b, C, F, e), Kt.register(y, b, C, F), mt.register(y, b, C, F), en.register(y, b, C, F), nn.register(y, b, C, F, e), on.register(y, b, C, F), sn.register(y, b, C, F), an.register(y, b, C, F), ln.register(y, b, C, F), cn.register(y, b, C, F), un.register(y, b, C, F, e), pn.register(y, b, C, F), fn.register(y, b, C, F), mn.register(y, b, C, F), gn.register(y, b, C, F, e), vn.register(y, b, C, F, e), hn.register(y, b, C, F);
|
|
764
|
+
const n = window[cr];
|
|
765
|
+
if (n)
|
|
766
|
+
for (const t in n)
|
|
767
|
+
n[t].createPropsResolver = wn, n[t].register(y, b, C);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function pr() {
|
|
771
|
+
ur();
|
|
772
|
+
function e(a) {
|
|
773
|
+
const g = y[a];
|
|
774
|
+
if (!g)
|
|
775
|
+
throw new Error(`Could not find the editor of type '${a}'`);
|
|
776
|
+
return g;
|
|
777
|
+
}
|
|
778
|
+
function n(a, g) {
|
|
779
|
+
const d = b[a];
|
|
780
|
+
return d ? d(g) : {};
|
|
781
|
+
}
|
|
782
|
+
function t(a) {
|
|
783
|
+
switch (a) {
|
|
784
|
+
case "check-box":
|
|
785
|
+
return "onChangeValue";
|
|
786
|
+
case "switch":
|
|
787
|
+
return "onModelValueChanged";
|
|
788
|
+
case "check-group":
|
|
789
|
+
return "onChangeValue";
|
|
790
|
+
case "combo-list":
|
|
791
|
+
case "combo-tree":
|
|
792
|
+
return "onChange";
|
|
793
|
+
case "combo-lookup":
|
|
794
|
+
return "";
|
|
795
|
+
case "year-range":
|
|
796
|
+
case "year-picker":
|
|
797
|
+
case "month-range":
|
|
798
|
+
case "month-picker":
|
|
799
|
+
case "date-range":
|
|
800
|
+
case "datetime-range":
|
|
801
|
+
case "datetime-picker":
|
|
802
|
+
return "onDatePicked";
|
|
803
|
+
case "date-picker":
|
|
804
|
+
return "onUpdate:modelValue";
|
|
805
|
+
case "time-picker":
|
|
806
|
+
return "onValueChange";
|
|
807
|
+
case "input-group":
|
|
808
|
+
return "onChange";
|
|
809
|
+
case "lookup":
|
|
810
|
+
case "sort-condition-editor":
|
|
811
|
+
case "filter-condition-editor":
|
|
812
|
+
case "code-editor":
|
|
813
|
+
case "language-textbox":
|
|
814
|
+
case "rich-text-editor":
|
|
815
|
+
return "onUpdate:modelValue";
|
|
816
|
+
case "number-range":
|
|
817
|
+
return "onValueChange";
|
|
818
|
+
case "number-spinner":
|
|
819
|
+
return "onValueChange";
|
|
820
|
+
case "radio-group":
|
|
821
|
+
return "onChangeValue";
|
|
822
|
+
case "text":
|
|
823
|
+
return "";
|
|
824
|
+
case "events-editor":
|
|
825
|
+
return "onSavedCommandListChanged";
|
|
826
|
+
case "grid-field-editor":
|
|
827
|
+
case "item-collection-editor":
|
|
828
|
+
case "response-form-layout-setting":
|
|
829
|
+
case "response-layout-editor-setting":
|
|
830
|
+
case "response-layout-splitter":
|
|
831
|
+
case "menu-lookup":
|
|
832
|
+
case "json-editor":
|
|
833
|
+
return "onChange";
|
|
834
|
+
case "field-selector":
|
|
835
|
+
case "binding-selector":
|
|
836
|
+
return "onFieldSelected";
|
|
837
|
+
case "schema-selector":
|
|
838
|
+
return "onSchemaSelected";
|
|
839
|
+
case "mapping-editor":
|
|
840
|
+
return "onMappingFieldsChanged";
|
|
841
|
+
case "textarea":
|
|
842
|
+
return "onChange";
|
|
843
|
+
case "query-solution-config":
|
|
844
|
+
case "solution-preset":
|
|
845
|
+
case "filter-bar-config":
|
|
846
|
+
return "onFieldsChanged";
|
|
847
|
+
case "property-editor":
|
|
848
|
+
return "onValueChange";
|
|
849
|
+
case "expression-editor":
|
|
850
|
+
return "onExpressionChanged";
|
|
851
|
+
case "collection-property-editor":
|
|
852
|
+
return "onValueChange";
|
|
853
|
+
default:
|
|
854
|
+
return "onUpdate:modelValue";
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
function r(a) {
|
|
858
|
+
switch (a) {
|
|
859
|
+
case "combo-list":
|
|
860
|
+
case "input-group":
|
|
861
|
+
case "textarea":
|
|
862
|
+
return "onClear";
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function i(a) {
|
|
866
|
+
switch (a) {
|
|
867
|
+
case "input-group":
|
|
868
|
+
case "textarea":
|
|
869
|
+
return "onMousedownEvent";
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
function o(a) {
|
|
873
|
+
switch (a) {
|
|
874
|
+
case "input-group":
|
|
875
|
+
case "textarea":
|
|
876
|
+
return "onMouseupEvent";
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return { resolveEditorProps: n, resolveEditorType: e, getChangeFunctionName: t, getClearFunctionName: r, getMousedownFunctionName: i, getMouseupFunctionName: o };
|
|
880
|
+
}
|
|
881
|
+
const fr = {
|
|
882
|
+
/**
|
|
883
|
+
* 显示的错误信息
|
|
884
|
+
*/
|
|
885
|
+
errors: {
|
|
886
|
+
type: Object,
|
|
887
|
+
default: null
|
|
888
|
+
}
|
|
889
|
+
}, mr = /* @__PURE__ */ re({
|
|
890
|
+
name: "FValidationMessage",
|
|
891
|
+
props: fr,
|
|
892
|
+
emits: [],
|
|
893
|
+
setup(e, n) {
|
|
894
|
+
const t = I(e.errors);
|
|
895
|
+
Z(() => e.errors, (o) => {
|
|
896
|
+
t.value = o;
|
|
897
|
+
});
|
|
898
|
+
const r = I(!0), i = H(() => {
|
|
899
|
+
if (t.value) {
|
|
900
|
+
const o = Object.keys(t.value).map((a) => {
|
|
901
|
+
var g;
|
|
902
|
+
return (g = t.value[a]) == null ? void 0 : g.name;
|
|
903
|
+
});
|
|
904
|
+
return o.length ? o.join(" ") : "";
|
|
905
|
+
}
|
|
906
|
+
return "";
|
|
907
|
+
});
|
|
908
|
+
return () => i.value && w("div", {
|
|
909
|
+
class: "farris-feedback f-state-invalid",
|
|
910
|
+
onClick: () => r.value = !r.value
|
|
911
|
+
}, [!r.value && w("span", {
|
|
912
|
+
class: "f-icon f-icon-message_warning f-feedback-icon"
|
|
913
|
+
}, null), r.value && w("span", {
|
|
914
|
+
class: "f-feedback-message"
|
|
915
|
+
}, [i.value])]);
|
|
916
|
+
}
|
|
917
|
+
}), gr = /* @__PURE__ */ re({
|
|
918
|
+
name: "FDynamicFormGroup",
|
|
919
|
+
props: ar,
|
|
920
|
+
emits: ["change", "update:modelValue"],
|
|
921
|
+
setup(e, n) {
|
|
922
|
+
var _;
|
|
923
|
+
const t = I(e.id), r = I(e.customClass), i = I(e.editor), o = I(e.label), a = I(e.modelValue), g = I(e.readonly), d = I(((_ = e.editor) == null ? void 0 : _.required) || e.required), p = I(e.showLabel), m = I(e.visible);
|
|
924
|
+
I(e.type);
|
|
925
|
+
const s = I(), c = I(e.errors), f = En(), l = I(e.editor.type || "input-group"), u = H(() => p.value ? e.showLabelType : "none"), {
|
|
926
|
+
resolveEditorProps: h,
|
|
927
|
+
resolveEditorType: E,
|
|
928
|
+
getChangeFunctionName: k,
|
|
929
|
+
getClearFunctionName: U
|
|
930
|
+
} = pr(), A = H(() => {
|
|
931
|
+
const B = {
|
|
932
|
+
"form-group": !0,
|
|
933
|
+
"farris-form-group": !0,
|
|
934
|
+
"common-group": !0,
|
|
935
|
+
"q-state-readonly": g.value,
|
|
936
|
+
"form-group--in-mobile": f
|
|
937
|
+
};
|
|
938
|
+
return B["form-group--has-" + l.value] = !0, B;
|
|
939
|
+
}), R = H(() => {
|
|
940
|
+
if (e.fill)
|
|
941
|
+
return {
|
|
942
|
+
maxWidth: "none"
|
|
943
|
+
};
|
|
944
|
+
});
|
|
945
|
+
function N(B, q, O) {
|
|
946
|
+
a.value = q !== void 0 ? q : B, n.emit("update:modelValue", a.value), n.emit("change", a.value, {
|
|
947
|
+
newValue: B,
|
|
948
|
+
newModelValue: q,
|
|
949
|
+
parameters: O
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
function M() {
|
|
953
|
+
n.emit("update:modelValue", "");
|
|
954
|
+
}
|
|
955
|
+
function D(B) {
|
|
956
|
+
return (...q) => {
|
|
957
|
+
M(), typeof B == "function" && B(...q);
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
function L(B) {
|
|
961
|
+
return (q, O, G) => {
|
|
962
|
+
N(q, O, G), typeof B == "function" && B(q, O, G);
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
const T = H(() => {
|
|
966
|
+
const B = i.value.type || "input-group", q = E(B), O = h(B, i.value), G = k(B), W = U(i.value.type);
|
|
967
|
+
return W && (O[W] = D(O[W])), G && (O[G] = L(O[G])), (O.id == null || O.id === "") && (O.id = t.value), B === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && (O.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && (O.onEndValueChange = i.value.onEndValueChange)) : B === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? (O["onUpdate:idValue"] = i.value["onUpdate:idValue"], O.id = t.value) : B === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? O.onSelectionChange = i.value.onSelectionChange : B === "property-editor" && (O.onBeforeOpenVariables = i.value.onBeforeOpenVariables), () => w(q, We({
|
|
968
|
+
ref: s
|
|
969
|
+
}, O, {
|
|
970
|
+
modelValue: a.value,
|
|
971
|
+
"onUpdate:modelValue": (Q) => a.value = Q
|
|
972
|
+
}), n.slots);
|
|
973
|
+
});
|
|
974
|
+
function J() {
|
|
975
|
+
return w(mr, {
|
|
976
|
+
id: `${t.value}-validation-message`,
|
|
977
|
+
errors: c.value
|
|
978
|
+
}, null);
|
|
979
|
+
}
|
|
980
|
+
return Z([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([B, q, O, G, W, Q, z, ie, oe, K]) => {
|
|
981
|
+
var te;
|
|
982
|
+
t.value = B, r.value = q, i.value = O, o.value = G, a.value = W, g.value = Q, d.value = ((te = i.value) == null ? void 0 : te.required) || z, p.value = ie, m.value = oe, c.value = K;
|
|
983
|
+
}), n.expose({
|
|
984
|
+
editorRef: s
|
|
985
|
+
}), () => m.value && w("div", {
|
|
986
|
+
id: `${t.value}-form-group`,
|
|
987
|
+
class: r.value,
|
|
988
|
+
style: e.customStyle
|
|
989
|
+
}, [w("div", {
|
|
990
|
+
class: "farris-group-wrap",
|
|
991
|
+
style: R.value
|
|
992
|
+
}, [w("div", {
|
|
993
|
+
class: A.value
|
|
994
|
+
}, [w(dr, {
|
|
995
|
+
id: `${t.value}-lable`,
|
|
996
|
+
showType: u.value,
|
|
997
|
+
required: d.value,
|
|
998
|
+
text: o.value,
|
|
999
|
+
title: o.value
|
|
1000
|
+
}, null), w("div", {
|
|
1001
|
+
class: "farris-input-wrap"
|
|
1002
|
+
}, [T.value(), J()])])])]);
|
|
1003
|
+
}
|
|
1004
|
+
}), vr = /* @__PURE__ */ re({
|
|
51
1005
|
name: "FPropertyPanelItem",
|
|
52
|
-
props:
|
|
1006
|
+
props: sr,
|
|
53
1007
|
emits: ["propertyChange", "triggerRefreshPanel"],
|
|
54
|
-
setup(
|
|
55
|
-
var
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
const
|
|
1008
|
+
setup(e, n) {
|
|
1009
|
+
var s;
|
|
1010
|
+
const t = I((s = e.category) == null ? void 0 : s.categoryId), r = I(e.elementConfig.propertyID), i = I(e.elementConfig.propertyName);
|
|
1011
|
+
I(e.elementConfig.editor);
|
|
1012
|
+
const o = I(e.elementConfig.propertyValue), a = H(() => {
|
|
1013
|
+
const c = e.elementConfig.visible;
|
|
60
1014
|
return {
|
|
61
1015
|
"farris-group-wrap": !0,
|
|
62
1016
|
"property-item": !0,
|
|
63
|
-
"d-none": !(typeof
|
|
1017
|
+
"d-none": !(typeof c == "boolean" ? c : c === void 0 ? !0 : c())
|
|
64
1018
|
};
|
|
65
1019
|
});
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
return (
|
|
69
|
-
}, (
|
|
70
|
-
|
|
71
|
-
}),
|
|
72
|
-
var
|
|
73
|
-
return (
|
|
74
|
-
}, (
|
|
75
|
-
|
|
1020
|
+
Z(() => {
|
|
1021
|
+
var c;
|
|
1022
|
+
return (c = e.elementConfig) == null ? void 0 : c.propertyValue;
|
|
1023
|
+
}, (c) => {
|
|
1024
|
+
o.value = c;
|
|
1025
|
+
}), Z(() => {
|
|
1026
|
+
var c;
|
|
1027
|
+
return (c = e.elementConfig) == null ? void 0 : c.propertyName;
|
|
1028
|
+
}, (c) => {
|
|
1029
|
+
i.value = c;
|
|
76
1030
|
});
|
|
77
|
-
function g(
|
|
1031
|
+
function g(c, f) {
|
|
78
1032
|
const {
|
|
79
|
-
parameters:
|
|
80
|
-
} =
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
propertyID:
|
|
84
|
-
propertyValue:
|
|
1033
|
+
parameters: l
|
|
1034
|
+
} = f;
|
|
1035
|
+
e.elementConfig.propertyValue = c;
|
|
1036
|
+
const u = {
|
|
1037
|
+
propertyID: e.elementConfig.propertyID,
|
|
1038
|
+
propertyValue: c
|
|
85
1039
|
};
|
|
86
|
-
n.emit("propertyChange",
|
|
1040
|
+
n.emit("propertyChange", u, l), e.elementConfig.refreshPanelAfterChanged && n.emit("triggerRefreshPanel");
|
|
87
1041
|
}
|
|
88
|
-
const
|
|
1042
|
+
const d = e.elementConfig.description ? `<div style="color: gray; "> 描述 :${e.elementConfig.description}</div>` : "", p = ze({
|
|
89
1043
|
content: `
|
|
90
1044
|
<div>
|
|
91
|
-
<div style="color: black; ">${
|
|
92
|
-
<div style="color: gray; ">ID:${
|
|
93
|
-
${
|
|
1045
|
+
<div style="color: black; ">${e.elementConfig.propertyName}</div>
|
|
1046
|
+
<div style="color: gray; ">ID:${e.elementConfig.propertyID}</div>
|
|
1047
|
+
${d}
|
|
94
1048
|
</div>`,
|
|
95
1049
|
placement: "left"
|
|
96
|
-
}),
|
|
97
|
-
return
|
|
98
|
-
class:
|
|
99
|
-
}, [
|
|
100
|
-
class: `col-form-label ${
|
|
101
|
-
}, [
|
|
1050
|
+
}), m = I("");
|
|
1051
|
+
return m.value = `${t.value}-${r.value}`, () => w("div", {
|
|
1052
|
+
class: a.value
|
|
1053
|
+
}, [e.elementConfig.propertyName && Ee(w("label", {
|
|
1054
|
+
class: `col-form-label ${m.value}`
|
|
1055
|
+
}, [w("span", {
|
|
102
1056
|
class: "farris-label-text"
|
|
103
|
-
}, [
|
|
104
|
-
id:
|
|
1057
|
+
}, [i.value])]), [[_e("tooltip"), p]]), w(gr, {
|
|
1058
|
+
id: m.value,
|
|
105
1059
|
showLabel: !1,
|
|
106
|
-
editor:
|
|
107
|
-
modelValue:
|
|
1060
|
+
editor: e.elementConfig.editor,
|
|
1061
|
+
modelValue: o.value,
|
|
108
1062
|
onChange: g,
|
|
109
|
-
editorParams:
|
|
1063
|
+
editorParams: e.elementConfig.editorParams
|
|
110
1064
|
}, null)]);
|
|
111
1065
|
}
|
|
112
|
-
}),
|
|
1066
|
+
}), hr = /* @__PURE__ */ re({
|
|
113
1067
|
name: "FPropertyPanelItemList",
|
|
114
|
-
props:
|
|
1068
|
+
props: or,
|
|
115
1069
|
emits: ["valueChanged", "submitModal", "triggerRefreshPanel"],
|
|
116
|
-
setup(
|
|
117
|
-
const
|
|
118
|
-
function
|
|
119
|
-
if (!
|
|
120
|
-
return
|
|
1070
|
+
setup(e, n) {
|
|
1071
|
+
const t = I(e.category);
|
|
1072
|
+
function r(f) {
|
|
1073
|
+
if (!f.hideCascadeTitle)
|
|
1074
|
+
return w("div", {
|
|
121
1075
|
class: "farris-input-wrap"
|
|
122
|
-
}, [
|
|
1076
|
+
}, [w("input", {
|
|
123
1077
|
title: "summary",
|
|
124
1078
|
type: "input",
|
|
125
1079
|
class: "form-control form-control-sm",
|
|
126
|
-
value:
|
|
1080
|
+
value: f.cascadeSummary,
|
|
127
1081
|
readonly: !0
|
|
128
1082
|
}, null)]);
|
|
129
1083
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
1084
|
+
function i(f, l) {
|
|
1085
|
+
l.isExpand = !l.isExpand;
|
|
132
1086
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
1087
|
+
function o(f) {
|
|
1088
|
+
return w("div", {
|
|
135
1089
|
class: "landscape"
|
|
136
|
-
}, [
|
|
1090
|
+
}, [w("button", {
|
|
137
1091
|
title: "expand-button",
|
|
138
1092
|
class: ["btn f-btn-collapse-expand f-btn-mx px-1", {
|
|
139
|
-
"f-state-expand":
|
|
1093
|
+
"f-state-expand": f.isExpand
|
|
140
1094
|
}],
|
|
141
|
-
onClick: (
|
|
142
|
-
}, [
|
|
1095
|
+
onClick: (l) => i(l, f)
|
|
1096
|
+
}, [w("span", null, null)])]);
|
|
143
1097
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
146
|
-
class: `f-section-formgroup-legend ${
|
|
147
|
-
}, [
|
|
1098
|
+
function a(f) {
|
|
1099
|
+
return w("div", {
|
|
1100
|
+
class: `f-section-formgroup-legend ${t.value.categoryId}-${f.propertyID}`
|
|
1101
|
+
}, [w("div", {
|
|
148
1102
|
class: "f-header px-0 my-0 col-form-label",
|
|
149
1103
|
style: "font-size: inherit;"
|
|
150
|
-
}, [
|
|
1104
|
+
}, [w("div", {
|
|
151
1105
|
class: "wrap"
|
|
152
|
-
}, [
|
|
1106
|
+
}, [w("span", {
|
|
153
1107
|
class: ["f-icon mr-1", {
|
|
154
|
-
"f-icon-arrow-60-right": !
|
|
155
|
-
"f-icon-arrow-60-down":
|
|
1108
|
+
"f-icon-arrow-60-right": !f.isExpand,
|
|
1109
|
+
"f-icon-arrow-60-down": f.isExpand
|
|
156
1110
|
}]
|
|
157
|
-
}, null),
|
|
1111
|
+
}, null), w("span", {
|
|
158
1112
|
class: "farris-label-text"
|
|
159
|
-
}, [
|
|
1113
|
+
}, [f.propertyName])])])]);
|
|
160
1114
|
}
|
|
161
|
-
function g(
|
|
162
|
-
return `${
|
|
1115
|
+
function g(f) {
|
|
1116
|
+
return `${e.categoryKey}_${f.propertyID}`;
|
|
163
1117
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
changeObject:
|
|
1118
|
+
function d(f, l) {
|
|
1119
|
+
f.categoryId = t.value.categoryId, t.value.enableCascade && (f.propertyPath = t.value.parentPropertyID), t.value.setPropertyRelates && t.value.setPropertyRelates(f, e.propertyData, l), n.emit("valueChanged", {
|
|
1120
|
+
changeObject: f
|
|
167
1121
|
});
|
|
168
1122
|
}
|
|
169
|
-
function
|
|
1123
|
+
function p() {
|
|
170
1124
|
n.emit("triggerRefreshPanel");
|
|
171
1125
|
}
|
|
172
|
-
function
|
|
173
|
-
return
|
|
1126
|
+
function m(f) {
|
|
1127
|
+
return w("div", {
|
|
174
1128
|
class: "px-2 mb-2"
|
|
175
|
-
}, [
|
|
176
|
-
key: g(
|
|
177
|
-
elementConfig:
|
|
178
|
-
category:
|
|
179
|
-
onPropertyChange:
|
|
180
|
-
onTriggerRefreshPanel:
|
|
1129
|
+
}, [w(vr, {
|
|
1130
|
+
key: g(f),
|
|
1131
|
+
elementConfig: f,
|
|
1132
|
+
category: t.value,
|
|
1133
|
+
onPropertyChange: d,
|
|
1134
|
+
onTriggerRefreshPanel: p
|
|
181
1135
|
}, null)]);
|
|
182
1136
|
}
|
|
183
|
-
function
|
|
184
|
-
var
|
|
185
|
-
return
|
|
1137
|
+
function s(f) {
|
|
1138
|
+
var l;
|
|
1139
|
+
return w("div", {
|
|
186
1140
|
class: "propertyCascadeItem farris-panel px-2 mb-2"
|
|
187
|
-
}, [
|
|
1141
|
+
}, [w("div", {
|
|
188
1142
|
class: ["farris-panel-item card", {
|
|
189
|
-
hidden: !
|
|
1143
|
+
hidden: !f.isExpand
|
|
190
1144
|
}]
|
|
191
|
-
}, [
|
|
1145
|
+
}, [w("div", {
|
|
192
1146
|
class: "card-header",
|
|
193
|
-
onClick: (
|
|
194
|
-
}, [
|
|
1147
|
+
onClick: (u) => i(u, f)
|
|
1148
|
+
}, [w("div", {
|
|
195
1149
|
class: "panel-item-title"
|
|
196
|
-
}, [
|
|
1150
|
+
}, [w("div", {
|
|
197
1151
|
class: "form-group farris-form-group line-item"
|
|
198
|
-
}, [
|
|
1152
|
+
}, [a(f), r(f), o(f)])])]), w("div", {
|
|
199
1153
|
class: ["card-body", {
|
|
200
|
-
hidden: !
|
|
1154
|
+
hidden: !f.isExpand
|
|
201
1155
|
}]
|
|
202
|
-
}, [(
|
|
1156
|
+
}, [(l = f.cascadeConfig) == null ? void 0 : l.map((u) => m(u))])])]);
|
|
203
1157
|
}
|
|
204
|
-
|
|
205
|
-
|
|
1158
|
+
Z(() => e.category, () => {
|
|
1159
|
+
t.value = e.category;
|
|
206
1160
|
});
|
|
207
|
-
function
|
|
208
|
-
return
|
|
1161
|
+
function c(f) {
|
|
1162
|
+
return f.propertyType === "cascade" ? s : m;
|
|
209
1163
|
}
|
|
210
|
-
return () =>
|
|
1164
|
+
return () => w(Pe, null, [t.value.properties.map((f) => c(f)(f))]);
|
|
211
1165
|
}
|
|
212
|
-
}),
|
|
1166
|
+
}), we = /* @__PURE__ */ re({
|
|
213
1167
|
name: "FPropertyPanel",
|
|
214
|
-
props:
|
|
1168
|
+
props: Tn,
|
|
215
1169
|
emits: ["propertyChanged"],
|
|
216
|
-
setup(
|
|
217
|
-
const
|
|
218
|
-
let
|
|
219
|
-
const
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
function
|
|
223
|
-
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
}),
|
|
228
|
-
|
|
1170
|
+
setup(e, n) {
|
|
1171
|
+
const t = I(e.width), r = I(e.isWidePanel), i = I(e.enableSearch), o = I(e.mode), a = I(e.isPersitOpenState), g = I(e.isShowPanel), d = I(), p = I(), m = I(e.showCloseBtn), s = I(e.selectedTabId), c = I(!0), f = I(e.isWhiteTheme);
|
|
1172
|
+
let l = [], u = [];
|
|
1173
|
+
const h = I(""), E = I(), k = I(), U = ve("SchemaService");
|
|
1174
|
+
let A = [], R = null, N = "";
|
|
1175
|
+
const M = I(), D = I(0), L = H(() => l.map((x) => !x.hide).length === 1), T = ve("designerContext");
|
|
1176
|
+
function J() {
|
|
1177
|
+
u = [], M.value && M.value.categoryList && Array.isArray(M.value.categoryList) && M.value.categoryList.length > 0 && M.value.categoryList.forEach((P) => {
|
|
1178
|
+
if (P.properties && Array.isArray(P.properties) && P.properties.length > 0) {
|
|
1179
|
+
const S = P.properties.map(($) => ($.category = P, $.propertyType === "cascade" && $.cascadeConfig && $.cascadeConfig.map((j) => {
|
|
1180
|
+
j.category = P, j.cascadeParent = $, u = u.concat(j);
|
|
1181
|
+
}), $));
|
|
1182
|
+
u = u.concat(S);
|
|
229
1183
|
}
|
|
230
1184
|
});
|
|
231
1185
|
}
|
|
232
|
-
function
|
|
233
|
-
let
|
|
234
|
-
for (;
|
|
235
|
-
|
|
236
|
-
return
|
|
237
|
-
}
|
|
238
|
-
function
|
|
239
|
-
|
|
240
|
-
var
|
|
241
|
-
const
|
|
242
|
-
(
|
|
1186
|
+
function _(x) {
|
|
1187
|
+
let P = x.offsetTop, S = x.offsetParent;
|
|
1188
|
+
for (; S !== null; )
|
|
1189
|
+
P += S.offsetTop, S = S.offsetParent;
|
|
1190
|
+
return P;
|
|
1191
|
+
}
|
|
1192
|
+
function B(x, P) {
|
|
1193
|
+
x && P && Object.keys(P).length > 0 && Object.keys(P).forEach((S) => {
|
|
1194
|
+
var j;
|
|
1195
|
+
const $ = P[S];
|
|
1196
|
+
(j = x.style) == null || j.setProperty(S, $);
|
|
243
1197
|
});
|
|
244
1198
|
}
|
|
245
|
-
function
|
|
246
|
-
return
|
|
247
|
-
if (typeof
|
|
1199
|
+
function q() {
|
|
1200
|
+
return u.filter((P) => {
|
|
1201
|
+
if (typeof P.visible == "function" && !P.visible() || typeof P.visible == "boolean" && !P.visible)
|
|
248
1202
|
return !1;
|
|
249
|
-
const
|
|
250
|
-
return !!(
|
|
1203
|
+
const S = P.propertyID.toLowerCase(), $ = P.propertyName.toLowerCase();
|
|
1204
|
+
return !!(S && S.includes(h.value.toLowerCase()) || $ && $.includes(h.value.toLowerCase()));
|
|
251
1205
|
});
|
|
252
1206
|
}
|
|
253
|
-
function
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
top:
|
|
1207
|
+
function O(x, P, S) {
|
|
1208
|
+
if (x === 0) {
|
|
1209
|
+
const $ = _(P), le = _(S) - $ - 5;
|
|
1210
|
+
P == null || P.scroll({
|
|
1211
|
+
top: le,
|
|
258
1212
|
behavior: "smooth"
|
|
259
1213
|
});
|
|
260
1214
|
}
|
|
261
1215
|
}
|
|
262
|
-
function
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}),
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
268
|
-
|
|
269
|
-
else if (
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
let
|
|
273
|
-
|
|
274
|
-
const
|
|
275
|
-
|
|
1216
|
+
function G(x) {
|
|
1217
|
+
A && A.length > 0 && (A.forEach((S) => {
|
|
1218
|
+
S.style.cssText = "";
|
|
1219
|
+
}), A = []);
|
|
1220
|
+
const P = k.value;
|
|
1221
|
+
if (!h.value)
|
|
1222
|
+
E.value && P && (P.scrollTop = 0);
|
|
1223
|
+
else if (J(), u && u.length > 0) {
|
|
1224
|
+
const S = q();
|
|
1225
|
+
S && S.length > 0 && setTimeout(() => {
|
|
1226
|
+
let $ = null, j = -1, le = !1;
|
|
1227
|
+
S.forEach((Y, qe) => {
|
|
1228
|
+
const De = Y.propertyType === "cascade" ? `.${Y.category.categoryId}-${Y.propertyID} .farris-label-text` : `.property-item .${Y.category.categoryId}-${Y.propertyID}.col-form-label`, de = document.querySelector(De);
|
|
1229
|
+
de && (Y.category.status !== "open" && (Y.category.status = "open", le = j < 0), Y.cascadeParent && (Y.cascadeParent.isExpand = !0), j < 0 && ($ = de, j = qe), B(de, {
|
|
276
1230
|
color: "#5B89FE"
|
|
277
|
-
}),
|
|
278
|
-
}),
|
|
279
|
-
|
|
280
|
-
}) :
|
|
1231
|
+
}), A.push(de));
|
|
1232
|
+
}), j > -1 && (le ? xe(() => {
|
|
1233
|
+
O(j, P, $);
|
|
1234
|
+
}) : O(j, P, $));
|
|
281
1235
|
}, 50);
|
|
282
1236
|
}
|
|
283
1237
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
1238
|
+
function W(x) {
|
|
1239
|
+
G();
|
|
286
1240
|
}
|
|
287
|
-
const
|
|
288
|
-
function
|
|
1241
|
+
const Q = Je(W, 200);
|
|
1242
|
+
function z(x) {
|
|
289
1243
|
const {
|
|
290
|
-
value:
|
|
291
|
-
} =
|
|
292
|
-
|
|
1244
|
+
value: P
|
|
1245
|
+
} = x.target;
|
|
1246
|
+
Q(P);
|
|
293
1247
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
1248
|
+
function ie(x) {
|
|
1249
|
+
W(h.value);
|
|
296
1250
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
1251
|
+
function oe() {
|
|
1252
|
+
a.value || (c.value = !1), n.emit("closePropertyPanel");
|
|
299
1253
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
1254
|
+
function K(x) {
|
|
1255
|
+
h.value = "", G();
|
|
302
1256
|
}
|
|
303
|
-
function
|
|
304
|
-
!
|
|
1257
|
+
function te(x) {
|
|
1258
|
+
!x.status || x.status === "open" ? x.status = "closed" : x.status = "open";
|
|
305
1259
|
}
|
|
306
|
-
function
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
|
|
1260
|
+
function ee() {
|
|
1261
|
+
var x, P;
|
|
1262
|
+
if (l = [], !d.value || d.value.length === 0) {
|
|
1263
|
+
l = [{
|
|
310
1264
|
tabId: "default",
|
|
311
1265
|
tabName: "属性",
|
|
312
1266
|
categoryList: []
|
|
313
|
-
}],
|
|
1267
|
+
}], M.value = null;
|
|
314
1268
|
return;
|
|
315
1269
|
}
|
|
316
|
-
if ((
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
tabId:
|
|
321
|
-
tabName:
|
|
322
|
-
categoryList: [
|
|
323
|
-
hide:
|
|
1270
|
+
if ((x = d == null ? void 0 : d.value) == null || x.forEach((S) => {
|
|
1271
|
+
if (S.tabId) {
|
|
1272
|
+
const $ = l.find((j) => j.tabId === S.tabId);
|
|
1273
|
+
$ ? ($.categoryList.push(S), $.hide && ($.hide = S.hide || S.properties.length === 0)) : l.push({
|
|
1274
|
+
tabId: S.tabId,
|
|
1275
|
+
tabName: S.tabName,
|
|
1276
|
+
categoryList: [S],
|
|
1277
|
+
hide: S.hide || S.properties.length === 0
|
|
324
1278
|
});
|
|
325
1279
|
} else {
|
|
326
|
-
const
|
|
327
|
-
|
|
1280
|
+
const $ = l.find((j) => j.tabId === "default");
|
|
1281
|
+
$ ? $.categoryList.push(S) : l.push({
|
|
328
1282
|
tabId: "default",
|
|
329
1283
|
tabName: "属性",
|
|
330
|
-
categoryList: [
|
|
1284
|
+
categoryList: [S]
|
|
331
1285
|
});
|
|
332
1286
|
}
|
|
333
|
-
}),
|
|
334
|
-
const
|
|
335
|
-
|
|
1287
|
+
}), s.value) {
|
|
1288
|
+
const S = l == null ? void 0 : l.find(($) => $.tabId === s.value && !$.hide);
|
|
1289
|
+
M.value = S || l[0];
|
|
336
1290
|
} else
|
|
337
|
-
|
|
338
|
-
|
|
1291
|
+
M.value = l[0];
|
|
1292
|
+
s.value = (P = M.value) == null ? void 0 : P.tabId;
|
|
339
1293
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}),
|
|
343
|
-
|
|
1294
|
+
Z(() => [e.schema, e.isShowPanel], () => {
|
|
1295
|
+
p.value = e.schema, !e.schema || !e.schema.type ? d.value = [] : (d.value = fe(p.value, U, R, N), T.filterPropertyEntity && (d.value = T.filterPropertyEntity(d.value, p.value))), ee(), K(h.value), D.value++;
|
|
1296
|
+
}), he(() => {
|
|
1297
|
+
ee();
|
|
344
1298
|
});
|
|
345
|
-
function
|
|
346
|
-
(!
|
|
1299
|
+
function se(x, P, S = !0) {
|
|
1300
|
+
(!p.value || P) && (p.value = P || e.schema), d.value = fe(p.value, U, R, N, x), T.filterPropertyEntity && (d.value = T.filterPropertyEntity(d.value, p.value)), ee(), i.value && K(h.value), S && D.value++;
|
|
347
1301
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
1302
|
+
function X(x, P) {
|
|
1303
|
+
R = x, N = P;
|
|
350
1304
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}, 100),
|
|
1305
|
+
function ae() {
|
|
1306
|
+
o.value = o.value === "panel" ? "sidebar" : "panel", o.value === "panel" ? (setTimeout(() => {
|
|
1307
|
+
W();
|
|
1308
|
+
}, 100), t.value = "300px") : t.value = "41px";
|
|
355
1309
|
}
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
358
|
-
return
|
|
1310
|
+
function Ie() {
|
|
1311
|
+
if (m.value)
|
|
1312
|
+
return w("div", {
|
|
359
1313
|
class: "title-actions"
|
|
360
|
-
}, [
|
|
1314
|
+
}, [w("div", {
|
|
361
1315
|
class: "monaco-toolbar"
|
|
362
|
-
}, [
|
|
1316
|
+
}, [w("div", {
|
|
363
1317
|
class: "monaco-action-bar animated"
|
|
364
|
-
}, [
|
|
1318
|
+
}, [w("ul", {
|
|
365
1319
|
class: "actions-container",
|
|
366
1320
|
role: "toolbar"
|
|
367
|
-
}, [
|
|
1321
|
+
}, [w("li", {
|
|
368
1322
|
class: "action-item",
|
|
369
|
-
onClick:
|
|
370
|
-
}, [
|
|
1323
|
+
onClick: oe
|
|
1324
|
+
}, [w("span", {
|
|
371
1325
|
class: "f-icon f-icon-close"
|
|
372
1326
|
}, null)])])])])]);
|
|
373
1327
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
1328
|
+
function ge() {
|
|
1329
|
+
d.value = fe(p.value, U, R, N), T.filterPropertyEntity && (d.value = T.filterPropertyEntity(d.value, p.value)), ee();
|
|
376
1330
|
}
|
|
377
|
-
function
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
380
|
-
return
|
|
1331
|
+
function ke() {
|
|
1332
|
+
var x;
|
|
1333
|
+
if (i.value && ((x = M.value) == null ? void 0 : x.tabId) !== "commands")
|
|
1334
|
+
return w("div", {
|
|
381
1335
|
class: "search"
|
|
382
|
-
}, [
|
|
1336
|
+
}, [w("div", {
|
|
383
1337
|
class: "input-group f-state-editable border-left-0 border-right-0"
|
|
384
|
-
}, [
|
|
1338
|
+
}, [Ee(w("input", {
|
|
385
1339
|
class: "form-control f-utils-fill text-left pt-3 pb-3 textbox",
|
|
386
1340
|
type: "text",
|
|
387
1341
|
placeholder: "输入属性名称或编号快速定位",
|
|
388
1342
|
autocomplete: "off",
|
|
389
|
-
onKeyup: (
|
|
390
|
-
"onUpdate:modelValue": (
|
|
391
|
-
}, null), [[
|
|
1343
|
+
onKeyup: (P) => z(P),
|
|
1344
|
+
"onUpdate:modelValue": (P) => h.value = P
|
|
1345
|
+
}, null), [[Xe, h.value]]), w("div", {
|
|
392
1346
|
class: "input-group-append",
|
|
393
1347
|
style: "margin-left: 0px; background:none;"
|
|
394
|
-
}, [
|
|
1348
|
+
}, [w("span", {
|
|
395
1349
|
class: "input-group-text input-group-clear",
|
|
396
1350
|
style: [{
|
|
397
|
-
display:
|
|
1351
|
+
display: h.value && h.value.length > 0 ? "" : "none"
|
|
398
1352
|
}],
|
|
399
|
-
onClick: (
|
|
400
|
-
}, [
|
|
1353
|
+
onClick: (P) => K()
|
|
1354
|
+
}, [w("i", {
|
|
401
1355
|
class: "f-icon modal_close"
|
|
402
|
-
}, null)]),
|
|
1356
|
+
}, null)]), w("span", {
|
|
403
1357
|
class: "input-group-text input-group-clear",
|
|
404
|
-
onClick: (
|
|
405
|
-
}, [
|
|
1358
|
+
onClick: (P) => ie()
|
|
1359
|
+
}, [w("i", {
|
|
406
1360
|
class: "f-icon f-icon-search"
|
|
407
1361
|
}, null)])])])]);
|
|
408
1362
|
}
|
|
409
|
-
function
|
|
410
|
-
return `${
|
|
1363
|
+
function Ve(x) {
|
|
1364
|
+
return `${e.propertyName}_${x.categoryId}`;
|
|
411
1365
|
}
|
|
412
|
-
function
|
|
1366
|
+
function Me(x) {
|
|
413
1367
|
n.emit("propertyChanged", {
|
|
414
|
-
...
|
|
415
|
-
designerItem:
|
|
1368
|
+
...x,
|
|
1369
|
+
designerItem: R
|
|
416
1370
|
});
|
|
417
1371
|
}
|
|
418
|
-
function
|
|
419
|
-
var
|
|
420
|
-
if (
|
|
421
|
-
return
|
|
1372
|
+
function Be() {
|
|
1373
|
+
var x, P;
|
|
1374
|
+
if (M.value)
|
|
1375
|
+
return w("div", {
|
|
422
1376
|
class: "panel-body",
|
|
423
|
-
ref:
|
|
424
|
-
}, [
|
|
1377
|
+
ref: k
|
|
1378
|
+
}, [w("ul", {
|
|
425
1379
|
class: ["property-grid", {
|
|
426
|
-
"wide-panel":
|
|
1380
|
+
"wide-panel": r.value
|
|
427
1381
|
}]
|
|
428
|
-
}, [(
|
|
429
|
-
key:
|
|
430
|
-
"data-category-id":
|
|
431
|
-
}, [!
|
|
1382
|
+
}, [(P = (x = M.value) == null ? void 0 : x.categoryList) == null ? void 0 : P.map((S) => !S.hide && w("li", {
|
|
1383
|
+
key: Ve(S),
|
|
1384
|
+
"data-category-id": S == null ? void 0 : S.categoryId
|
|
1385
|
+
}, [!S.hideTitle && w("span", {
|
|
432
1386
|
class: "group-label",
|
|
433
|
-
onClick: () =>
|
|
434
|
-
}, [
|
|
1387
|
+
onClick: () => te(S)
|
|
1388
|
+
}, [w("span", {
|
|
435
1389
|
class: ["f-icon mr-2", {
|
|
436
|
-
"f-legend-show":
|
|
1390
|
+
"f-legend-show": S.status === "closed"
|
|
437
1391
|
}, {
|
|
438
|
-
"f-legend-collapse":
|
|
1392
|
+
"f-legend-collapse": S.status === "open" || S.status === void 0
|
|
439
1393
|
}]
|
|
440
|
-
}, null),
|
|
441
|
-
hidden:
|
|
442
|
-
}, [
|
|
443
|
-
key: `${
|
|
444
|
-
category:
|
|
445
|
-
propertyData:
|
|
446
|
-
onTriggerRefreshPanel:
|
|
447
|
-
onValueChanged:
|
|
1394
|
+
}, null), S.categoryName]), w("div", {
|
|
1395
|
+
hidden: S.status === "closed"
|
|
1396
|
+
}, [w(hr, {
|
|
1397
|
+
key: `${S == null ? void 0 : S.categoryId}-${D.value}`,
|
|
1398
|
+
category: S,
|
|
1399
|
+
propertyData: p.value,
|
|
1400
|
+
onTriggerRefreshPanel: ge,
|
|
1401
|
+
onValueChanged: Me
|
|
448
1402
|
}, null)])]))])]);
|
|
449
1403
|
}
|
|
450
|
-
function
|
|
451
|
-
if (
|
|
452
|
-
return
|
|
1404
|
+
function Ne() {
|
|
1405
|
+
if (o.value === "sidebar")
|
|
1406
|
+
return w("div", {
|
|
453
1407
|
class: "side-panel h-100",
|
|
454
|
-
onClick:
|
|
455
|
-
}, [
|
|
1408
|
+
onClick: ae
|
|
1409
|
+
}, [w("i", {
|
|
456
1410
|
class: "f-icon f-icon-engineering w-100 icon"
|
|
457
|
-
}, null),
|
|
1411
|
+
}, null), w("span", null, [Se("属性")])]);
|
|
458
1412
|
}
|
|
459
|
-
function
|
|
1413
|
+
function Le() {
|
|
460
1414
|
return {
|
|
461
|
-
display:
|
|
462
|
-
width:
|
|
1415
|
+
display: c.value ? "block" : "none",
|
|
1416
|
+
width: t.value
|
|
463
1417
|
};
|
|
464
1418
|
}
|
|
465
|
-
function
|
|
466
|
-
return
|
|
1419
|
+
function Oe() {
|
|
1420
|
+
return w("div", {
|
|
467
1421
|
class: "switcher"
|
|
468
|
-
}, [
|
|
1422
|
+
}, [w("i", {
|
|
469
1423
|
class: "f-icon f-icon-exhale-discount",
|
|
470
1424
|
style: [{
|
|
471
|
-
transform:
|
|
1425
|
+
transform: o.value === "sidebar" ? "none" : "rotate(180deg)"
|
|
472
1426
|
}],
|
|
473
|
-
onClick:
|
|
1427
|
+
onClick: ae
|
|
474
1428
|
}, null)]);
|
|
475
1429
|
}
|
|
476
|
-
function
|
|
477
|
-
|
|
1430
|
+
function $e(x) {
|
|
1431
|
+
M.value && M.value.tabId === x.tabId || (M.value = x, s.value = M.value.tabId, h.value = "");
|
|
478
1432
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
1433
|
+
function Re() {
|
|
1434
|
+
return l.map((x) => w("div", {
|
|
481
1435
|
class: ["title-label", {
|
|
482
|
-
active:
|
|
1436
|
+
active: M.value && M.value.tabId === x.tabId
|
|
483
1437
|
}, {
|
|
484
|
-
"d-none":
|
|
1438
|
+
"d-none": x.hide
|
|
485
1439
|
}],
|
|
486
|
-
onClick: () =>
|
|
487
|
-
}, [
|
|
1440
|
+
onClick: () => $e(x)
|
|
1441
|
+
}, [w("span", null, [x.tabName])]));
|
|
488
1442
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}),
|
|
492
|
-
|
|
1443
|
+
he(() => {
|
|
1444
|
+
W(h.value);
|
|
1445
|
+
}), He(() => {
|
|
1446
|
+
a.value && (c.value = g.value), ee(), W(h.value);
|
|
493
1447
|
});
|
|
494
|
-
function
|
|
495
|
-
|
|
1448
|
+
function Ue() {
|
|
1449
|
+
D.value++;
|
|
496
1450
|
}
|
|
497
|
-
function
|
|
498
|
-
|
|
1451
|
+
function Ae() {
|
|
1452
|
+
ge();
|
|
499
1453
|
}
|
|
500
1454
|
return n.expose({
|
|
501
|
-
updatePropertyConfig:
|
|
502
|
-
updateDesignerItem:
|
|
503
|
-
reloadPropertyPanel:
|
|
504
|
-
refreshPanel:
|
|
505
|
-
}), () =>
|
|
506
|
-
ref:
|
|
1455
|
+
updatePropertyConfig: se,
|
|
1456
|
+
updateDesignerItem: X,
|
|
1457
|
+
reloadPropertyPanel: Ue,
|
|
1458
|
+
refreshPanel: Ae
|
|
1459
|
+
}), () => w(Pe, null, [w("div", {
|
|
1460
|
+
ref: E,
|
|
507
1461
|
class: ["property-panel", {
|
|
508
|
-
"white-theme":
|
|
1462
|
+
"white-theme": f.value
|
|
509
1463
|
}],
|
|
510
|
-
style:
|
|
511
|
-
}, [
|
|
1464
|
+
style: Le()
|
|
1465
|
+
}, [w("div", {
|
|
512
1466
|
class: "propertyPanel panel flex-column",
|
|
513
|
-
hidden:
|
|
514
|
-
}, [
|
|
1467
|
+
hidden: o.value !== "panel"
|
|
1468
|
+
}, [w("div", {
|
|
515
1469
|
class: ["title d-flex", {
|
|
516
|
-
"p-right":
|
|
1470
|
+
"p-right": m.value
|
|
517
1471
|
}, {
|
|
518
|
-
only:
|
|
1472
|
+
only: L.value
|
|
519
1473
|
}]
|
|
520
|
-
}, [
|
|
1474
|
+
}, [Re(), Ie()]), ke(), Be()]), Oe(), Ne()])]);
|
|
521
1475
|
}
|
|
522
1476
|
});
|
|
523
|
-
function
|
|
524
|
-
const { formSchemaUtils: n, formStateMachineUtils:
|
|
525
|
-
function
|
|
1477
|
+
function yr(e) {
|
|
1478
|
+
const { formSchemaUtils: n, formStateMachineUtils: t } = e;
|
|
1479
|
+
function r(d, p = "") {
|
|
526
1480
|
return {
|
|
527
|
-
path:
|
|
528
|
-
field:
|
|
529
|
-
fullPath:
|
|
1481
|
+
path: p + d.code,
|
|
1482
|
+
field: d.id,
|
|
1483
|
+
fullPath: d.code
|
|
530
1484
|
};
|
|
531
1485
|
}
|
|
532
|
-
function
|
|
533
|
-
const
|
|
534
|
-
return
|
|
1486
|
+
function i(d, p = "") {
|
|
1487
|
+
const m = n.getViewModelById(d);
|
|
1488
|
+
return m ? m.states.map((s) => r(s, p)) : [];
|
|
535
1489
|
}
|
|
536
|
-
function
|
|
537
|
-
const
|
|
538
|
-
if (
|
|
539
|
-
return
|
|
540
|
-
const
|
|
541
|
-
return [...
|
|
1490
|
+
function o(d) {
|
|
1491
|
+
const p = n.getRootViewModelId(), m = i(d);
|
|
1492
|
+
if (d === p)
|
|
1493
|
+
return m;
|
|
1494
|
+
const s = i(p, "root-component.");
|
|
1495
|
+
return [...m, ...s];
|
|
542
1496
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
1497
|
+
function a(d) {
|
|
1498
|
+
return d.binding && d.binding.path || d.id || "";
|
|
545
1499
|
}
|
|
546
1500
|
function g() {
|
|
547
|
-
return
|
|
1501
|
+
return t && t.getRenderStates() || [];
|
|
548
1502
|
}
|
|
549
|
-
return { getVariables:
|
|
1503
|
+
return { getVariables: o, getControlName: a, getStateMachines: g };
|
|
550
1504
|
}
|
|
551
|
-
class
|
|
1505
|
+
class Te {
|
|
552
1506
|
constructor(n) {
|
|
553
|
-
|
|
1507
|
+
V(this, "sessionVariables", [
|
|
554
1508
|
{
|
|
555
1509
|
key: "CurrentSysOrgName",
|
|
556
1510
|
name: "当前组织Name",
|
|
@@ -587,7 +1541,7 @@ class ae {
|
|
|
587
1541
|
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
588
1542
|
}
|
|
589
1543
|
]);
|
|
590
|
-
|
|
1544
|
+
V(this, "expressionNames", {
|
|
591
1545
|
compute: "计算表达式",
|
|
592
1546
|
dependency: "依赖表达式",
|
|
593
1547
|
validate: "验证表达式",
|
|
@@ -596,102 +1550,102 @@ class ae {
|
|
|
596
1550
|
readonly: "只读表达式",
|
|
597
1551
|
required: "必填表达式"
|
|
598
1552
|
});
|
|
599
|
-
|
|
600
|
-
convertFrom: (
|
|
601
|
-
const g =
|
|
1553
|
+
V(this, "getExpressionConverter", (n, t) => ({
|
|
1554
|
+
convertFrom: (r, i, o, a) => {
|
|
1555
|
+
const g = o.getExpressionRuleValue(n, t || i);
|
|
602
1556
|
return g && g.value || "";
|
|
603
1557
|
},
|
|
604
|
-
convertTo: (
|
|
605
|
-
var
|
|
606
|
-
if (
|
|
607
|
-
const
|
|
608
|
-
((
|
|
609
|
-
(
|
|
610
|
-
)) ?
|
|
1558
|
+
convertTo: (r, i, o, a, g) => {
|
|
1559
|
+
var d;
|
|
1560
|
+
if (i === "dataPicking" && (o != null && o.target)) {
|
|
1561
|
+
const p = `${o.target}_dataPicking`;
|
|
1562
|
+
((d = o.rules) == null ? void 0 : d.some(
|
|
1563
|
+
(s) => s.id === p && s.value
|
|
1564
|
+
)) ? r.dictPickingExpressionId = p : delete r.dictPickingExpressionId;
|
|
611
1565
|
}
|
|
612
|
-
|
|
1566
|
+
a.updateExpression(o);
|
|
613
1567
|
}
|
|
614
1568
|
}));
|
|
615
1569
|
this.formSchemaService = n;
|
|
616
1570
|
}
|
|
617
|
-
getExpressionRule(n,
|
|
618
|
-
const
|
|
619
|
-
if (!
|
|
1571
|
+
getExpressionRule(n, t) {
|
|
1572
|
+
const r = this.formSchemaService.getExpressions();
|
|
1573
|
+
if (!r)
|
|
620
1574
|
return "";
|
|
621
|
-
const
|
|
622
|
-
if (!
|
|
1575
|
+
const i = r.find((a) => a.target === n);
|
|
1576
|
+
if (!i)
|
|
623
1577
|
return "";
|
|
624
|
-
const
|
|
625
|
-
return
|
|
1578
|
+
const o = i.rules.find((a) => a.type === t);
|
|
1579
|
+
return o || "";
|
|
626
1580
|
}
|
|
627
1581
|
// 获取上下文表单变量
|
|
628
1582
|
getContextFormVariables() {
|
|
629
1583
|
const { module: n } = this.formSchemaService.getFormSchema();
|
|
630
1584
|
if (!n.viewmodels || n.viewmodels.length === 0)
|
|
631
1585
|
return [];
|
|
632
|
-
const
|
|
633
|
-
if (!
|
|
1586
|
+
const t = this.formSchemaService.getRootViewModelId(), r = this.formSchemaService.getViewModelById(t);
|
|
1587
|
+
if (!r || !r.states || r.states.length === 0)
|
|
634
1588
|
return [];
|
|
635
|
-
const
|
|
636
|
-
return
|
|
637
|
-
|
|
638
|
-
key:
|
|
639
|
-
name:
|
|
640
|
-
description:
|
|
641
|
-
category:
|
|
1589
|
+
const i = [];
|
|
1590
|
+
return r.states.filter((o) => o.category === "remote").forEach((o) => {
|
|
1591
|
+
i.push({
|
|
1592
|
+
key: o.code,
|
|
1593
|
+
name: o.name,
|
|
1594
|
+
description: o.name,
|
|
1595
|
+
category: o.category
|
|
642
1596
|
});
|
|
643
|
-
}),
|
|
1597
|
+
}), i;
|
|
644
1598
|
}
|
|
645
|
-
createTreeNode(n,
|
|
1599
|
+
createTreeNode(n, t, r = "label") {
|
|
646
1600
|
return {
|
|
647
1601
|
id: n.id,
|
|
648
1602
|
name: n.name,
|
|
649
|
-
bindingPath: n[
|
|
650
|
-
parents:
|
|
1603
|
+
bindingPath: n[r],
|
|
1604
|
+
parents: t,
|
|
651
1605
|
type: "field"
|
|
652
1606
|
};
|
|
653
1607
|
}
|
|
654
|
-
buildEntityFieldsTreeData(n = null,
|
|
655
|
-
const
|
|
656
|
-
return n == null || n.forEach((
|
|
1608
|
+
buildEntityFieldsTreeData(n = null, t) {
|
|
1609
|
+
const r = [];
|
|
1610
|
+
return n == null || n.forEach((i) => {
|
|
657
1611
|
var g;
|
|
658
|
-
const
|
|
659
|
-
let
|
|
660
|
-
(g =
|
|
661
|
-
data:
|
|
662
|
-
children:
|
|
1612
|
+
const o = this.createTreeNode(i, t);
|
|
1613
|
+
let a = [];
|
|
1614
|
+
(g = i.type) != null && g.fields && (a = this.buildEntityFieldsTreeData(i.type.fields, [...t, i.label])), r.push({
|
|
1615
|
+
data: o,
|
|
1616
|
+
children: a,
|
|
663
1617
|
expanded: !0
|
|
664
1618
|
});
|
|
665
|
-
}),
|
|
666
|
-
}
|
|
667
|
-
buildChildEntityTreeData(n = null,
|
|
668
|
-
const
|
|
669
|
-
return n == null || n.forEach((
|
|
670
|
-
var
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
g != null && g.length && (
|
|
675
|
-
data:
|
|
676
|
-
children:
|
|
1619
|
+
}), r;
|
|
1620
|
+
}
|
|
1621
|
+
buildChildEntityTreeData(n = null, t) {
|
|
1622
|
+
const r = [];
|
|
1623
|
+
return n == null || n.forEach((i) => {
|
|
1624
|
+
var d, p;
|
|
1625
|
+
const o = this.createTreeNode(i, t);
|
|
1626
|
+
o.type = "entity";
|
|
1627
|
+
const a = this.buildEntityFieldsTreeData((d = i.type) == null ? void 0 : d.fields, [...t, i.label]), g = this.buildChildEntityTreeData((p = i.type) == null ? void 0 : p.entities, [...t, i.label]);
|
|
1628
|
+
g != null && g.length && (a == null || a.push(...g)), r.push({
|
|
1629
|
+
data: o,
|
|
1630
|
+
children: a || [],
|
|
677
1631
|
// 空值回退
|
|
678
1632
|
expanded: !0
|
|
679
1633
|
});
|
|
680
|
-
}),
|
|
1634
|
+
}), r;
|
|
681
1635
|
}
|
|
682
1636
|
getEntitiesTreeData() {
|
|
683
1637
|
const n = this.formSchemaService.getSchemaEntities();
|
|
684
1638
|
if (!(n != null && n.length))
|
|
685
1639
|
return [];
|
|
686
|
-
const
|
|
687
|
-
if (!(
|
|
1640
|
+
const t = n[0];
|
|
1641
|
+
if (!(t != null && t.type))
|
|
688
1642
|
return [];
|
|
689
|
-
const
|
|
690
|
-
return
|
|
691
|
-
entityCode:
|
|
1643
|
+
const r = this.buildEntityFieldsTreeData(t.type.fields, [t.code]), i = this.buildChildEntityTreeData(t.type.entities, [t.code]);
|
|
1644
|
+
return i != null && i.length && (r == null || r.push(...i)), {
|
|
1645
|
+
entityCode: t.code,
|
|
692
1646
|
fields: [{
|
|
693
|
-
data: this.createTreeNode(
|
|
694
|
-
children:
|
|
1647
|
+
data: this.createTreeNode(t, [], "code"),
|
|
1648
|
+
children: r || []
|
|
695
1649
|
}]
|
|
696
1650
|
};
|
|
697
1651
|
}
|
|
@@ -712,147 +1666,147 @@ class ae {
|
|
|
712
1666
|
}
|
|
713
1667
|
};
|
|
714
1668
|
}
|
|
715
|
-
onBeforeOpenExpression(n,
|
|
716
|
-
const
|
|
717
|
-
message: ["validate", "required", "dataPicking"].includes(
|
|
718
|
-
...
|
|
1669
|
+
onBeforeOpenExpression(n, t, r) {
|
|
1670
|
+
const i = r === "Field" ? n.binding.field : n.id, o = this.getExpressionRule(i, t), a = this.getEntitiesAndVariables(), g = {
|
|
1671
|
+
message: ["validate", "required", "dataPicking"].includes(t) && o ? o.message : "",
|
|
1672
|
+
...a
|
|
719
1673
|
};
|
|
720
|
-
return
|
|
1674
|
+
return o.messageType != null && (g.messageType = o.messageType), g;
|
|
721
1675
|
}
|
|
722
|
-
buildRule(n,
|
|
723
|
-
const { expression:
|
|
724
|
-
id: `${n}_${
|
|
725
|
-
type:
|
|
726
|
-
value:
|
|
1676
|
+
buildRule(n, t, r, i) {
|
|
1677
|
+
const { expression: o, message: a, messageType: g } = t, d = {
|
|
1678
|
+
id: `${n}_${r}`,
|
|
1679
|
+
type: r,
|
|
1680
|
+
value: o
|
|
727
1681
|
};
|
|
728
|
-
return (
|
|
1682
|
+
return (r === "validate" || r === "dataPicking" || r === "required") && (d.message = a), r === "dataPicking" && (d.messageType = g), r === "validate" && i && (d.elementId = i), d;
|
|
729
1683
|
}
|
|
730
1684
|
getExpressionData() {
|
|
731
1685
|
const { expressions: n } = this.formSchemaService.getFormSchema().module;
|
|
732
1686
|
return n || [];
|
|
733
1687
|
}
|
|
734
|
-
updateExpression(n,
|
|
735
|
-
const
|
|
736
|
-
let
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
741
|
-
|
|
1688
|
+
updateExpression(n, t, r, i) {
|
|
1689
|
+
const o = t === "Field" ? n.binding.field : n.id, a = this.buildRule(o, r, i, n.type === "form-group" ? n.id : "");
|
|
1690
|
+
let d = this.getExpressionData().find((m) => m.targetType === t && m.target === o);
|
|
1691
|
+
const p = (m) => m.value.trim() === "";
|
|
1692
|
+
if (d) {
|
|
1693
|
+
const m = d.rules.find((s) => s.id === a.id);
|
|
1694
|
+
if (m)
|
|
1695
|
+
p(a) ? d.rules = d.rules.filter((s) => s.id !== a.id) : (Object.assign(m, a), i === "validate" && n.type === "form-group" && (m.elementId = n.id));
|
|
742
1696
|
else {
|
|
743
|
-
if (
|
|
1697
|
+
if (p(a))
|
|
744
1698
|
return null;
|
|
745
|
-
|
|
1699
|
+
d.rules = d.rules || [], d.rules.push(a);
|
|
746
1700
|
}
|
|
747
1701
|
} else {
|
|
748
|
-
if (
|
|
1702
|
+
if (p(a))
|
|
749
1703
|
return null;
|
|
750
|
-
|
|
751
|
-
target: `${
|
|
752
|
-
rules: [
|
|
753
|
-
targetType:
|
|
1704
|
+
d = {
|
|
1705
|
+
target: `${o}`,
|
|
1706
|
+
rules: [a],
|
|
1707
|
+
targetType: t
|
|
754
1708
|
};
|
|
755
1709
|
}
|
|
756
|
-
return
|
|
757
|
-
}
|
|
758
|
-
getExpressionEditorOptions(n,
|
|
759
|
-
return
|
|
760
|
-
var
|
|
761
|
-
const g =
|
|
762
|
-
return
|
|
763
|
-
hide:
|
|
1710
|
+
return d;
|
|
1711
|
+
}
|
|
1712
|
+
getExpressionEditorOptions(n, t, r, i) {
|
|
1713
|
+
return r.reduce((o, a) => {
|
|
1714
|
+
var d, p;
|
|
1715
|
+
const g = t === "Field" ? (d = n == null ? void 0 : n.binding) == null ? void 0 : d.field : n.id;
|
|
1716
|
+
return o[a] = {
|
|
1717
|
+
hide: t === "Field" ? !!((p = n == null ? void 0 : n.binding) != null && p.field) : !1,
|
|
764
1718
|
description: "",
|
|
765
|
-
title: this.expressionNames[
|
|
1719
|
+
title: this.expressionNames[a],
|
|
766
1720
|
type: "string",
|
|
767
1721
|
$converter: this.getExpressionConverter(g),
|
|
768
1722
|
refreshPanelAfterChanged: !0,
|
|
769
1723
|
editor: {
|
|
770
1724
|
type: "expression-editor",
|
|
771
1725
|
singleExpand: !1,
|
|
772
|
-
dialogTitle: `${this.expressionNames[
|
|
773
|
-
showMessage:
|
|
774
|
-
showMessageType:
|
|
775
|
-
beforeOpen: () => this.onBeforeOpenExpression(n,
|
|
776
|
-
onSubmitModal: (
|
|
777
|
-
const
|
|
778
|
-
if (
|
|
779
|
-
const
|
|
780
|
-
|
|
1726
|
+
dialogTitle: `${this.expressionNames[a]}编辑器`,
|
|
1727
|
+
showMessage: a === "validate" || a === "dataPicking" || a === "required",
|
|
1728
|
+
showMessageType: a === "dataPicking",
|
|
1729
|
+
beforeOpen: () => this.onBeforeOpenExpression(n, a, t),
|
|
1730
|
+
onSubmitModal: (m) => {
|
|
1731
|
+
const s = this.updateExpression(n, t, m, a);
|
|
1732
|
+
if (i) {
|
|
1733
|
+
const c = this.buildRule(g, m, a);
|
|
1734
|
+
i(c);
|
|
781
1735
|
}
|
|
782
|
-
return
|
|
1736
|
+
return s;
|
|
783
1737
|
}
|
|
784
1738
|
}
|
|
785
|
-
},
|
|
1739
|
+
}, o;
|
|
786
1740
|
}, {});
|
|
787
1741
|
}
|
|
788
|
-
getExpressionInfo(n,
|
|
789
|
-
const
|
|
790
|
-
value:
|
|
791
|
-
targetId:
|
|
792
|
-
targetType:
|
|
793
|
-
expressionType:
|
|
1742
|
+
getExpressionInfo(n, t, r) {
|
|
1743
|
+
const i = t === "Field" ? n.binding.field : n.id, o = this.getExpressionRule(i, r), a = {
|
|
1744
|
+
value: o && o.value,
|
|
1745
|
+
targetId: i,
|
|
1746
|
+
targetType: t,
|
|
1747
|
+
expressionType: r
|
|
794
1748
|
};
|
|
795
|
-
return
|
|
1749
|
+
return o && o.message && (a.message = o.message), a;
|
|
796
1750
|
}
|
|
797
|
-
getExpressionConfig(n,
|
|
1751
|
+
getExpressionConfig(n, t, r = ["compute", "dependency", "validate"], i) {
|
|
798
1752
|
return {
|
|
799
1753
|
description: "表达式",
|
|
800
1754
|
title: "表达式",
|
|
801
1755
|
hide: !n.binding,
|
|
802
1756
|
properties: {
|
|
803
|
-
...this.getExpressionEditorOptions(n,
|
|
1757
|
+
...this.getExpressionEditorOptions(n, t, r, i)
|
|
804
1758
|
}
|
|
805
1759
|
};
|
|
806
1760
|
}
|
|
807
|
-
getExpressionOptions(n,
|
|
808
|
-
const
|
|
1761
|
+
getExpressionOptions(n, t, r) {
|
|
1762
|
+
const i = this.getExpressionInfo(n, t, r);
|
|
809
1763
|
return {
|
|
810
|
-
dialogTitle: `${this.expressionNames[
|
|
1764
|
+
dialogTitle: `${this.expressionNames[r]}编辑器`,
|
|
811
1765
|
singleExpand: !1,
|
|
812
|
-
showMessage:
|
|
813
|
-
beforeOpen: () => this.onBeforeOpenExpression(n,
|
|
814
|
-
expressionInfo:
|
|
1766
|
+
showMessage: r === "required",
|
|
1767
|
+
beforeOpen: () => this.onBeforeOpenExpression(n, r, t),
|
|
1768
|
+
expressionInfo: i
|
|
815
1769
|
};
|
|
816
1770
|
}
|
|
817
1771
|
}
|
|
818
|
-
class
|
|
819
|
-
constructor(n,
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1772
|
+
class br {
|
|
1773
|
+
constructor(n, t) {
|
|
1774
|
+
V(this, "componentId");
|
|
1775
|
+
V(this, "viewModelId");
|
|
1776
|
+
V(this, "eventsEditorUtils");
|
|
1777
|
+
V(this, "formSchemaUtils");
|
|
1778
|
+
V(this, "formMetadataConverter");
|
|
1779
|
+
V(this, "designViewModelUtils");
|
|
1780
|
+
V(this, "designViewModelField");
|
|
1781
|
+
V(this, "controlCreatorUtils");
|
|
1782
|
+
V(this, "designerHostService");
|
|
1783
|
+
V(this, "designerContext");
|
|
1784
|
+
V(this, "schemaService", null);
|
|
1785
|
+
V(this, "metadataService", null);
|
|
1786
|
+
V(this, "propertyConfig", {
|
|
833
1787
|
type: "object",
|
|
834
1788
|
categories: {}
|
|
835
1789
|
});
|
|
836
|
-
var
|
|
837
|
-
this.componentId = n, this.designerHostService =
|
|
1790
|
+
var r;
|
|
1791
|
+
this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService, this.designerContext = t.designerContext;
|
|
838
1792
|
}
|
|
839
1793
|
getFormDesignerInstance() {
|
|
840
|
-
var n,
|
|
841
|
-
return (
|
|
1794
|
+
var n, t;
|
|
1795
|
+
return (t = (n = this.designerContext) == null ? void 0 : n.instances) == null ? void 0 : t.formDesigner.value;
|
|
842
1796
|
}
|
|
843
1797
|
getTableInfo() {
|
|
844
1798
|
var n;
|
|
845
1799
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
846
1800
|
}
|
|
847
1801
|
setDesignViewModelField(n) {
|
|
848
|
-
var
|
|
849
|
-
const
|
|
850
|
-
if (
|
|
1802
|
+
var r;
|
|
1803
|
+
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
1804
|
+
if (t) {
|
|
851
1805
|
if (!this.designViewModelField) {
|
|
852
|
-
const
|
|
853
|
-
this.designViewModelField =
|
|
1806
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1807
|
+
this.designViewModelField = i.fields.find((o) => o.id === t);
|
|
854
1808
|
}
|
|
855
|
-
n.updateOn = (
|
|
1809
|
+
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
856
1810
|
}
|
|
857
1811
|
}
|
|
858
1812
|
getBasicPropConfig(n) {
|
|
@@ -876,17 +1830,17 @@ class Qe {
|
|
|
876
1830
|
valueField: "value",
|
|
877
1831
|
idField: "value",
|
|
878
1832
|
editable: !1,
|
|
879
|
-
data: [{ value: n.type, name:
|
|
1833
|
+
data: [{ value: n.type, name: v[n.type] && v[n.type].name }]
|
|
880
1834
|
}
|
|
881
1835
|
}
|
|
882
1836
|
}
|
|
883
1837
|
};
|
|
884
1838
|
}
|
|
885
|
-
getAppearanceConfig(n = null,
|
|
886
|
-
const
|
|
1839
|
+
getAppearanceConfig(n = null, t = {}, r) {
|
|
1840
|
+
const i = {
|
|
887
1841
|
title: "外观",
|
|
888
1842
|
description: "Appearance"
|
|
889
|
-
},
|
|
1843
|
+
}, o = {
|
|
890
1844
|
class: {
|
|
891
1845
|
title: "class样式",
|
|
892
1846
|
type: "string",
|
|
@@ -902,21 +1856,21 @@ class Qe {
|
|
|
902
1856
|
parentPropertyID: "appearance"
|
|
903
1857
|
}
|
|
904
1858
|
};
|
|
905
|
-
for (const
|
|
906
|
-
|
|
1859
|
+
for (const a in t)
|
|
1860
|
+
o[a] = Object.assign(o[a] || {}, t[a]);
|
|
907
1861
|
return {
|
|
908
|
-
...
|
|
909
|
-
properties: { ...
|
|
910
|
-
setPropertyRelates(
|
|
911
|
-
if (
|
|
912
|
-
switch (
|
|
1862
|
+
...i,
|
|
1863
|
+
properties: { ...o },
|
|
1864
|
+
setPropertyRelates(a, g) {
|
|
1865
|
+
if (a) {
|
|
1866
|
+
switch (a && a.propertyID) {
|
|
913
1867
|
case "class":
|
|
914
1868
|
case "style": {
|
|
915
|
-
|
|
1869
|
+
ce.value++;
|
|
916
1870
|
break;
|
|
917
1871
|
}
|
|
918
1872
|
}
|
|
919
|
-
|
|
1873
|
+
r && r(a, n, g);
|
|
920
1874
|
}
|
|
921
1875
|
}
|
|
922
1876
|
};
|
|
@@ -931,49 +1885,49 @@ class Qe {
|
|
|
931
1885
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
932
1886
|
* @returns
|
|
933
1887
|
*/
|
|
934
|
-
getPropertyEditorParams(n,
|
|
935
|
-
const { getVariables: g, getControlName:
|
|
1888
|
+
getPropertyEditorParams(n, t = [], r = "visible", i = {}, o = {}, a = "") {
|
|
1889
|
+
const { getVariables: g, getControlName: d, getStateMachines: p } = yr(this.designerHostService), m = this.getRealTargetType(n), s = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], c = {
|
|
936
1890
|
type: "property-editor",
|
|
937
|
-
propertyTypes:
|
|
1891
|
+
propertyTypes: s
|
|
938
1892
|
};
|
|
939
|
-
return
|
|
940
|
-
switch (
|
|
1893
|
+
return s.map((f) => {
|
|
1894
|
+
switch (f) {
|
|
941
1895
|
case "Const":
|
|
942
|
-
Object.assign(
|
|
1896
|
+
Object.assign(c, {
|
|
943
1897
|
constType: "enum",
|
|
944
1898
|
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
945
|
-
},
|
|
1899
|
+
}, i);
|
|
946
1900
|
break;
|
|
947
1901
|
case "Expression":
|
|
948
|
-
|
|
1902
|
+
c.expressionConfig = this.getExpressionOptions(n, m, a || r);
|
|
949
1903
|
break;
|
|
950
1904
|
case "StateMachine":
|
|
951
|
-
|
|
1905
|
+
c.stateMachines = p();
|
|
952
1906
|
break;
|
|
953
1907
|
case "Variable":
|
|
954
|
-
Object.assign(
|
|
955
|
-
controlName:
|
|
1908
|
+
Object.assign(c, {
|
|
1909
|
+
controlName: d(n),
|
|
956
1910
|
newVariablePrefix: "is",
|
|
957
1911
|
newVariableType: "Boolean",
|
|
958
1912
|
variables: g(this.viewModelId),
|
|
959
1913
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
960
|
-
onBeforeOpenVariables: (
|
|
961
|
-
|
|
1914
|
+
onBeforeOpenVariables: (l) => {
|
|
1915
|
+
l.value = g(this.viewModelId);
|
|
962
1916
|
}
|
|
963
|
-
},
|
|
1917
|
+
}, o), this.designerContext.designerMode === "PC_RTC" && (c.newVariablePrefix = "ext_" + c.newVariablePrefix);
|
|
964
1918
|
break;
|
|
965
1919
|
}
|
|
966
|
-
}),
|
|
1920
|
+
}), c;
|
|
967
1921
|
}
|
|
968
|
-
getVisibleProperty(n,
|
|
969
|
-
var
|
|
970
|
-
let
|
|
971
|
-
return
|
|
1922
|
+
getVisibleProperty(n, t = "") {
|
|
1923
|
+
var o;
|
|
1924
|
+
let r = ["Const", "Variable", "StateMachine", "Expression"];
|
|
1925
|
+
return t === "gridFieldEditor" ? r = ["Const", "Expression"] : t === "form-group" && !((o = n.binding) != null && o.field) && (r = ["Const", "Variable", "StateMachine"]), {
|
|
972
1926
|
visible: {
|
|
973
1927
|
title: "是否可见",
|
|
974
1928
|
type: "boolean",
|
|
975
1929
|
description: "运行时组件是否可见",
|
|
976
|
-
editor: this.getPropertyEditorParams(n,
|
|
1930
|
+
editor: this.getPropertyEditorParams(n, r, "visible")
|
|
977
1931
|
}
|
|
978
1932
|
};
|
|
979
1933
|
}
|
|
@@ -983,27 +1937,27 @@ class Qe {
|
|
|
983
1937
|
* @param viewModelId
|
|
984
1938
|
* @returns
|
|
985
1939
|
*/
|
|
986
|
-
getBehaviorConfig(n,
|
|
987
|
-
const
|
|
1940
|
+
getBehaviorConfig(n, t = "", r = {}, i) {
|
|
1941
|
+
const o = {
|
|
988
1942
|
title: "行为",
|
|
989
1943
|
description: ""
|
|
990
|
-
},
|
|
991
|
-
for (const
|
|
992
|
-
|
|
1944
|
+
}, a = this.getVisibleProperty(n, t);
|
|
1945
|
+
for (const d in r)
|
|
1946
|
+
a[d] = Object.assign(a[d] || {}, r[d]);
|
|
993
1947
|
const g = this;
|
|
994
1948
|
return {
|
|
995
|
-
...
|
|
996
|
-
properties: { ...
|
|
997
|
-
setPropertyRelates(
|
|
998
|
-
if (
|
|
999
|
-
switch (
|
|
1949
|
+
...o,
|
|
1950
|
+
properties: { ...a },
|
|
1951
|
+
setPropertyRelates(d, p) {
|
|
1952
|
+
if (d) {
|
|
1953
|
+
switch (d.propertyID) {
|
|
1000
1954
|
case "disabled":
|
|
1001
1955
|
case "readonly":
|
|
1002
1956
|
case "visible":
|
|
1003
|
-
g.afterMutilEditorChanged(n,
|
|
1957
|
+
g.afterMutilEditorChanged(n, d);
|
|
1004
1958
|
break;
|
|
1005
1959
|
}
|
|
1006
|
-
|
|
1960
|
+
i && i(d, p);
|
|
1007
1961
|
}
|
|
1008
1962
|
}
|
|
1009
1963
|
};
|
|
@@ -1013,8 +1967,8 @@ class Qe {
|
|
|
1013
1967
|
* @param propertyData
|
|
1014
1968
|
* @param changeObject
|
|
1015
1969
|
*/
|
|
1016
|
-
afterMutilEditorChanged(n,
|
|
1017
|
-
this.addNewVariableToViewModel(
|
|
1970
|
+
afterMutilEditorChanged(n, t) {
|
|
1971
|
+
this.addNewVariableToViewModel(t, this.viewModelId), this.updateExpressionValue(t), this.clearExpression(t, n);
|
|
1018
1972
|
}
|
|
1019
1973
|
/**
|
|
1020
1974
|
*
|
|
@@ -1022,12 +1976,12 @@ class Qe {
|
|
|
1022
1976
|
* @param componentInstance
|
|
1023
1977
|
* @returns
|
|
1024
1978
|
*/
|
|
1025
|
-
updateElementByParentContainer(n,
|
|
1026
|
-
const
|
|
1027
|
-
if (!
|
|
1979
|
+
updateElementByParentContainer(n, t) {
|
|
1980
|
+
const r = t && t.parent && t.parent.schema;
|
|
1981
|
+
if (!r)
|
|
1028
1982
|
return;
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1983
|
+
const i = r.contents.findIndex((a) => a.id === n), o = me(r.contents[i]);
|
|
1984
|
+
r.contents.splice(i, 1), r.contents.splice(i, 0, o), xn();
|
|
1031
1985
|
}
|
|
1032
1986
|
/**
|
|
1033
1987
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1035,41 +1989,41 @@ class Qe {
|
|
|
1035
1989
|
* @param viewModelId
|
|
1036
1990
|
* @returns
|
|
1037
1991
|
*/
|
|
1038
|
-
addNewVariableToViewModel(n,
|
|
1039
|
-
const
|
|
1040
|
-
if (!(
|
|
1992
|
+
addNewVariableToViewModel(n, t) {
|
|
1993
|
+
const r = n.propertyValue;
|
|
1994
|
+
if (!(r && typeof r == "object") || !(r.type === "Variable" && r.isNewVariable))
|
|
1041
1995
|
return;
|
|
1042
|
-
const
|
|
1043
|
-
id:
|
|
1996
|
+
const a = {
|
|
1997
|
+
id: r.field,
|
|
1044
1998
|
category: "locale",
|
|
1045
|
-
code:
|
|
1046
|
-
name:
|
|
1047
|
-
type:
|
|
1999
|
+
code: r.fullPath,
|
|
2000
|
+
name: r.fullPath,
|
|
2001
|
+
type: r.newVariableType || "String",
|
|
1048
2002
|
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
1049
2003
|
};
|
|
1050
|
-
delete
|
|
2004
|
+
delete r.newVariableType, delete r.isNewVariable, this.formSchemaUtils.getVariableByCode(a.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(a);
|
|
1051
2005
|
}
|
|
1052
2006
|
/**
|
|
1053
2007
|
* 更新表达式到expressions节点
|
|
1054
2008
|
* @param changeObject
|
|
1055
2009
|
*/
|
|
1056
2010
|
updateExpressionValue(n) {
|
|
1057
|
-
const
|
|
1058
|
-
if (!((
|
|
2011
|
+
const t = n.propertyValue;
|
|
2012
|
+
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
1059
2013
|
return;
|
|
1060
|
-
const { expressionId:
|
|
1061
|
-
|
|
1062
|
-
const { expressions:
|
|
1063
|
-
let
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
2014
|
+
const { expressionId: o, expressionInfo: a } = t, { targetId: g, targetType: d, expressionType: p, value: m, message: s } = a, c = this.formSchemaUtils.getModule();
|
|
2015
|
+
c.expressions = c.expressions || [];
|
|
2016
|
+
const { expressions: f } = c;
|
|
2017
|
+
let l = f.find((h) => h.target === g);
|
|
2018
|
+
l || (l = { target: g, rules: [], targetType: d }, f.push(l));
|
|
2019
|
+
const u = l.rules.find((h) => h.type === p);
|
|
2020
|
+
if (u)
|
|
2021
|
+
u.value = m, u.message = s;
|
|
1068
2022
|
else {
|
|
1069
|
-
const
|
|
1070
|
-
|
|
2023
|
+
const h = { id: o, type: p, value: m, message: s };
|
|
2024
|
+
l.rules.push(h);
|
|
1071
2025
|
}
|
|
1072
|
-
delete
|
|
2026
|
+
delete t.expressionInfo;
|
|
1073
2027
|
}
|
|
1074
2028
|
/**
|
|
1075
2029
|
* 属性类型切换为非表达式后,清除原表达式
|
|
@@ -1077,55 +2031,55 @@ class Qe {
|
|
|
1077
2031
|
* @param propertyData
|
|
1078
2032
|
* @returns
|
|
1079
2033
|
*/
|
|
1080
|
-
clearExpression(n,
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
2034
|
+
clearExpression(n, t) {
|
|
2035
|
+
const r = n.propertyValue;
|
|
2036
|
+
if (r && r.type === "Expression")
|
|
1083
2037
|
return;
|
|
1084
|
-
const
|
|
1085
|
-
!
|
|
2038
|
+
const o = n.propertyID, a = this.formSchemaUtils.getExpressions(), g = t.binding ? t.binding.field : t.id, d = a.find((p) => p.target === g);
|
|
2039
|
+
!d || !d.rules || (d.rules = d.rules.filter((p) => p.type !== o));
|
|
1086
2040
|
}
|
|
1087
|
-
getExpressionOptions(n,
|
|
1088
|
-
return new
|
|
2041
|
+
getExpressionOptions(n, t, r) {
|
|
2042
|
+
return new Te(this.formSchemaUtils).getExpressionOptions(n, t, r);
|
|
1089
2043
|
}
|
|
1090
2044
|
getRealTargetType(n) {
|
|
1091
2045
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
|
|
1092
2046
|
}
|
|
1093
2047
|
createBaseEventProperty(n) {
|
|
1094
|
-
const
|
|
1095
|
-
return
|
|
2048
|
+
const t = {};
|
|
2049
|
+
return t[this.viewModelId] = {
|
|
1096
2050
|
type: "events-editor",
|
|
1097
2051
|
editor: {
|
|
1098
2052
|
initialData: n,
|
|
1099
|
-
viewSourceHandle: (
|
|
1100
|
-
var
|
|
1101
|
-
((
|
|
2053
|
+
viewSourceHandle: (r) => {
|
|
2054
|
+
var i;
|
|
2055
|
+
((i = r.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(r);
|
|
1102
2056
|
}
|
|
1103
2057
|
}
|
|
1104
|
-
},
|
|
2058
|
+
}, t;
|
|
1105
2059
|
}
|
|
1106
2060
|
}
|
|
1107
|
-
const
|
|
2061
|
+
const ne = class ne {
|
|
1108
2062
|
/**
|
|
1109
2063
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1110
2064
|
*/
|
|
1111
|
-
static getEditorTypesByMDataType(n,
|
|
1112
|
-
if (
|
|
1113
|
-
return [{ key:
|
|
1114
|
-
let
|
|
1115
|
-
if (
|
|
1116
|
-
const
|
|
1117
|
-
|
|
2065
|
+
static getEditorTypesByMDataType(n, t = !1, r = "") {
|
|
2066
|
+
if (t)
|
|
2067
|
+
return [{ key: v["language-textbox"].type, value: v["language-textbox"].name }];
|
|
2068
|
+
let i = ne.fieldControlTypeMapping[n];
|
|
2069
|
+
if (r === "data-grid-column" && (i != null && i.length)) {
|
|
2070
|
+
const o = [v["check-group"].type, v["radio-group"].type, v.image.type, v["rich-text-editor"].type];
|
|
2071
|
+
i = i.filter((a) => !o.includes(a.key));
|
|
1118
2072
|
}
|
|
1119
|
-
return
|
|
2073
|
+
return i;
|
|
1120
2074
|
}
|
|
1121
2075
|
/**
|
|
1122
2076
|
* 获取所有输入类控件
|
|
1123
2077
|
*/
|
|
1124
2078
|
static getAllInputTypes() {
|
|
1125
2079
|
const n = [];
|
|
1126
|
-
for (const
|
|
1127
|
-
|
|
1128
|
-
n.find((
|
|
2080
|
+
for (const t in ne.fieldControlTypeMapping)
|
|
2081
|
+
ne.fieldControlTypeMapping[t].forEach((r) => {
|
|
2082
|
+
n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
1129
2083
|
});
|
|
1130
2084
|
return n;
|
|
1131
2085
|
}
|
|
@@ -1133,205 +2087,205 @@ const $ = class $ {
|
|
|
1133
2087
|
* 提供schema字段基础属性和DOM控件属性的映射
|
|
1134
2088
|
* @param control 控件元数据
|
|
1135
2089
|
*/
|
|
1136
|
-
static mappingDomPropAndSchemaProp(n,
|
|
1137
|
-
var
|
|
1138
|
-
const
|
|
1139
|
-
return (n.type ===
|
|
2090
|
+
static mappingDomPropAndSchemaProp(n, t) {
|
|
2091
|
+
var o;
|
|
2092
|
+
const r = (o = n.editor) == null ? void 0 : o.type, i = [];
|
|
2093
|
+
return (n.type === v["data-grid-column"].type || n.type === v["tree-grid-column"].type) && t && t.categoryId && t.categoryId.indexOf("gridFieldEditor") < 0 && i.push({ domField: "title", schemaField: "name" }), i.push({ domField: "label", schemaField: "name" }), i.push({ domField: "editor.required", schemaField: "require" }), i.push({ domField: "editor.readonly", schemaField: "readonly" }), (r === v["input-group"].type || r === v.textarea.type || r === v["number-spinner"].type) && i.push({ domField: "editor.maxLength", schemaField: "type.length" }), r === v["number-spinner"].type && i.push({ domField: "editor.precision", schemaField: "type.precision" }), (n.type === v["data-grid-column"].type || n.type === v["tree-grid-column"].type) && i.push({ domField: "formatter.precision", schemaField: "type.precision" }), (r === v["combo-list"].type || r === v["radio-group"].type) && i.push({ domField: "editor.data", schemaField: "type.enumValues" }), (n.type === v["data-grid-column"].type || n.type === v["tree-grid-column"].type) && i.push({ domField: "formatter.data", schemaField: "type.enumValues" }), r === v["date-picker"].type && (i.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), i.push({ domField: "editor.fieldType", schemaField: "type.name" })), r === v["number-spinner"].type && (i.push({ domField: "editor.max", schemaField: "editor.maxValue" }), i.push({ domField: "editor.min", schemaField: "editor.minValue" })), r === v.lookup.type && (i.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), i.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), i.push({ domField: "editor.textField", schemaField: "editor.textField" }), i.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), i.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), i.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), i.push({ domField: "path", schemaField: "bindingPath" }), i.push({ domField: "binding.path", schemaField: "bindingField" }), i.push({ domField: "binding.fullPath", schemaField: "path" }), (n.type === v["data-grid-column"].type || n.type === v["tree-grid-column"].type) && i.push({ domField: "field", schemaField: "bindingPath" }), i;
|
|
1140
2094
|
}
|
|
1141
2095
|
};
|
|
1142
2096
|
/**
|
|
1143
2097
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1144
2098
|
*/
|
|
1145
|
-
|
|
2099
|
+
V(ne, "fieldControlTypeMapping", {
|
|
1146
2100
|
String: [
|
|
1147
|
-
{ key:
|
|
1148
|
-
{ key:
|
|
1149
|
-
{ key:
|
|
1150
|
-
{ key:
|
|
1151
|
-
{ key:
|
|
1152
|
-
{ key:
|
|
1153
|
-
{ key:
|
|
1154
|
-
{ key:
|
|
1155
|
-
{ key:
|
|
1156
|
-
{ key:
|
|
1157
|
-
{ key:
|
|
2101
|
+
{ key: v["input-group"].type, value: v["input-group"].name },
|
|
2102
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
2103
|
+
{ key: v.image.type, value: v.image.name },
|
|
2104
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name },
|
|
2105
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
2106
|
+
{ key: v["check-box"].type, value: v["check-box"].name },
|
|
2107
|
+
{ key: v["check-group"].type, value: v["check-group"].name },
|
|
2108
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name },
|
|
2109
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
2110
|
+
{ key: v.textarea.type, value: v.textarea.name },
|
|
2111
|
+
{ key: v["time-picker"].type, value: v["time-picker"].name }
|
|
1158
2112
|
],
|
|
1159
2113
|
Text: [
|
|
1160
|
-
{ key:
|
|
1161
|
-
{ key:
|
|
1162
|
-
{ key:
|
|
1163
|
-
{ key:
|
|
2114
|
+
{ key: v.textarea.type, value: v.textarea.name },
|
|
2115
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
2116
|
+
{ key: v.image.type, value: v.image.name },
|
|
2117
|
+
{ key: v["rich-text-editor"].type, value: v["rich-text-editor"].name }
|
|
1164
2118
|
],
|
|
1165
2119
|
Decimal: [
|
|
1166
|
-
{ key:
|
|
2120
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1167
2121
|
],
|
|
1168
2122
|
Integer: [
|
|
1169
|
-
{ key:
|
|
2123
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1170
2124
|
],
|
|
1171
2125
|
Number: [
|
|
1172
|
-
{ key:
|
|
1173
|
-
{ key:
|
|
1174
|
-
{ key:
|
|
2126
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name },
|
|
2127
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
2128
|
+
{ key: v["check-box"].type, value: v["check-box"].name }
|
|
1175
2129
|
],
|
|
1176
2130
|
BigNumber: [
|
|
1177
|
-
{ key:
|
|
2131
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1178
2132
|
],
|
|
1179
2133
|
Date: [
|
|
1180
|
-
{ key:
|
|
2134
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name }
|
|
1181
2135
|
],
|
|
1182
2136
|
DateTime: [
|
|
1183
|
-
{ key:
|
|
2137
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name }
|
|
1184
2138
|
],
|
|
1185
2139
|
Boolean: [
|
|
1186
|
-
{ key:
|
|
1187
|
-
{ key:
|
|
2140
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
2141
|
+
{ key: v["check-box"].type, value: v["check-box"].name }
|
|
1188
2142
|
],
|
|
1189
2143
|
Enum: [
|
|
1190
|
-
{ key:
|
|
1191
|
-
{ key:
|
|
2144
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
2145
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name }
|
|
1192
2146
|
],
|
|
1193
2147
|
Object: [
|
|
1194
|
-
{ key:
|
|
1195
|
-
{ key:
|
|
1196
|
-
{ key:
|
|
2148
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
2149
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
2150
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name }
|
|
1197
2151
|
]
|
|
1198
2152
|
});
|
|
1199
|
-
let
|
|
1200
|
-
var
|
|
1201
|
-
class
|
|
2153
|
+
let pe = ne;
|
|
2154
|
+
var Cr = /* @__PURE__ */ ((e) => (e.string = "string", e.boolean = "boolean", e.number = "number", e.select = "select", e.boolOrExp = "boolOrExp", e.editableSelect = "editableSelect", e.multiSelect = "multiSelect", e.date = "date", e.datetime = "datetime", e.modal = "modal", e.cascade = "cascade", e.custom = "custom", e.unity = "unity", e.events = "events", e.switch = "switch", e.multiLanguage = "multiLanguage", e))(Cr || {}), ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {});
|
|
2155
|
+
class Fr {
|
|
1202
2156
|
constructor() {
|
|
1203
2157
|
/** 控件标题 */
|
|
1204
|
-
|
|
2158
|
+
V(this, "label", "");
|
|
1205
2159
|
/** 控件id */
|
|
1206
|
-
|
|
2160
|
+
V(this, "id", "");
|
|
1207
2161
|
/** 每个控件占用的栅格数 */
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
2162
|
+
V(this, "columnInSM", 12);
|
|
2163
|
+
V(this, "columnInMD", 6);
|
|
2164
|
+
V(this, "columnInLG", 3);
|
|
2165
|
+
V(this, "columnInEL", 2);
|
|
1212
2166
|
/** 每个控件占用的列数 */
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
2167
|
+
V(this, "displayWidthInSM", 1);
|
|
2168
|
+
V(this, "displayWidthInMD", 1);
|
|
2169
|
+
V(this, "displayWidthInLG", 1);
|
|
2170
|
+
V(this, "displayWidthInEL", 1);
|
|
1217
2171
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1218
|
-
|
|
2172
|
+
V(this, "displayColumnCountAtBreakPoint", "md");
|
|
1219
2173
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1220
|
-
|
|
2174
|
+
V(this, "tagRow", 0);
|
|
1221
2175
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1222
|
-
|
|
2176
|
+
V(this, "showTopBorder", 0);
|
|
1223
2177
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1224
|
-
|
|
2178
|
+
V(this, "group", 1);
|
|
1225
2179
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1226
|
-
|
|
2180
|
+
V(this, "isSupportedClass", !0);
|
|
1227
2181
|
/** 控件所在分组id(设计器用的) */
|
|
1228
|
-
|
|
2182
|
+
V(this, "fieldSetId", "");
|
|
1229
2183
|
}
|
|
1230
2184
|
}
|
|
1231
|
-
function
|
|
1232
|
-
let n,
|
|
1233
|
-
const
|
|
1234
|
-
let
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1237
|
-
if (
|
|
1238
|
-
|
|
2185
|
+
function wr(e) {
|
|
2186
|
+
let n, t;
|
|
2187
|
+
const r = /* @__PURE__ */ new Map();
|
|
2188
|
+
let i = [];
|
|
2189
|
+
function o(m, s) {
|
|
2190
|
+
const f = m.split(" ").filter((k) => k.startsWith("col-"));
|
|
2191
|
+
if (f.length === 0) {
|
|
2192
|
+
s.isSupportedClass = !1;
|
|
1239
2193
|
return;
|
|
1240
2194
|
}
|
|
1241
|
-
let
|
|
1242
|
-
|
|
1243
|
-
}
|
|
1244
|
-
function
|
|
1245
|
-
let
|
|
1246
|
-
|
|
1247
|
-
if (
|
|
1248
|
-
|
|
2195
|
+
let l = f.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), u = f.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), h = f.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), E = f.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
|
|
2196
|
+
l = l || "col-12", s.columnInSM = parseInt(l.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1), u = u || "col-md-" + s.columnInSM, s.columnInMD = parseInt(u.replace("col-md-", ""), 10), s.displayWidthInMD = s.columnInMD / 6, [1, 2].includes(s.displayWidthInMD) || (s.isSupportedClass = !1), h = h || "col-xl-" + s.columnInMD, s.columnInLG = parseInt(h.replace("col-xl-", ""), 10), s.displayWidthInLG = s.columnInLG / 3, [1, 2, 3, 4].includes(s.displayWidthInLG) || (s.isSupportedClass = !1), E = E || "col-el-" + s.columnInLG, s.columnInEL = parseInt(E.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
2197
|
+
}
|
|
2198
|
+
function a(m, s, c, f = !1) {
|
|
2199
|
+
let l = !1;
|
|
2200
|
+
m.contents.forEach((u) => {
|
|
2201
|
+
if (u.type === "fieldset") {
|
|
2202
|
+
c += 1, a(u, s, c, !0), l = !0;
|
|
1249
2203
|
return;
|
|
1250
2204
|
}
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
|
|
2205
|
+
l && (c += 1, l = !1);
|
|
2206
|
+
const h = u.appearance && u.appearance.class, E = new Fr();
|
|
2207
|
+
h ? o(h, E) : E.isSupportedClass = !1, E.label = u.label || u.id, E.id = u.id, E.group = c, f && (E.fieldSetId = m.id), t === u.id && (n = c), r.set(u.id, u), s.push(E);
|
|
1254
2208
|
});
|
|
1255
2209
|
}
|
|
1256
|
-
function g(
|
|
1257
|
-
const
|
|
1258
|
-
if (!
|
|
2210
|
+
function g(m) {
|
|
2211
|
+
const s = e.getComponentById(m);
|
|
2212
|
+
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
1259
2213
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1260
|
-
const
|
|
1261
|
-
return !
|
|
1262
|
-
}
|
|
1263
|
-
function
|
|
1264
|
-
|
|
1265
|
-
const { result:
|
|
1266
|
-
if (!
|
|
1267
|
-
return { result:
|
|
1268
|
-
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
const
|
|
2214
|
+
const c = e.selectNode(s, (f) => f.type === v["response-form"].type);
|
|
2215
|
+
return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
|
|
2216
|
+
}
|
|
2217
|
+
function d(m, s) {
|
|
2218
|
+
s = s || m.id;
|
|
2219
|
+
const { result: c, message: f, formNode: l } = g(s);
|
|
2220
|
+
if (!c)
|
|
2221
|
+
return { result: c, message: f };
|
|
2222
|
+
t = m.id, i = [], r.clear();
|
|
2223
|
+
const u = l.contents[0].type === v.fieldset.type ? 0 : 1;
|
|
2224
|
+
a(l, i, u);
|
|
2225
|
+
const h = i.find((k) => !k.isSupportedClass);
|
|
1272
2226
|
return {
|
|
1273
2227
|
defaultState: {
|
|
1274
2228
|
defaultGroupNumber: n || 1,
|
|
1275
|
-
model:
|
|
2229
|
+
model: h ? "customize" : "standard"
|
|
1276
2230
|
},
|
|
1277
|
-
importData:
|
|
2231
|
+
importData: i
|
|
1278
2232
|
};
|
|
1279
2233
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1282
|
-
const { result:
|
|
1283
|
-
if (!
|
|
2234
|
+
function p(m, s) {
|
|
2235
|
+
s = s;
|
|
2236
|
+
const { result: c, formNode: f } = g(s);
|
|
2237
|
+
if (!c)
|
|
1284
2238
|
return "";
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1287
|
-
var
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
const
|
|
1291
|
-
|
|
2239
|
+
const l = [];
|
|
2240
|
+
return m.forEach((u) => {
|
|
2241
|
+
var k;
|
|
2242
|
+
const h = r.get(u.id), E = h.appearance && h.appearance.class;
|
|
2243
|
+
if (E) {
|
|
2244
|
+
const A = E.split(" ").filter((T) => !T.startsWith("col-")), R = "col-" + u.columnInSM, N = "col-md-" + u.columnInMD, M = "col-xl-" + u.columnInLG, D = "col-el-" + u.columnInEL, L = [R, N, M, D].concat(A);
|
|
2245
|
+
h.appearance.class = L.join(" ");
|
|
1292
2246
|
}
|
|
1293
|
-
if (
|
|
1294
|
-
const
|
|
1295
|
-
|
|
2247
|
+
if (u.fieldSetId) {
|
|
2248
|
+
const U = f.contents.find((R) => R.id === u.fieldSetId), A = l.find((R) => R.id === u.fieldSetId);
|
|
2249
|
+
A ? (k = A.contents) == null || k.push(h) : (l.push(U), U.contents = [h]);
|
|
1296
2250
|
} else
|
|
1297
|
-
|
|
1298
|
-
}),
|
|
2251
|
+
l.push(h);
|
|
2252
|
+
}), f.contents = l, f.id;
|
|
1299
2253
|
}
|
|
1300
2254
|
return {
|
|
1301
2255
|
checkCanFindFormNode: g,
|
|
1302
|
-
checkCanOpenLayoutEditor:
|
|
1303
|
-
changeFormControlsByResponseLayoutConfig:
|
|
1304
|
-
getResonseFormLayoutConfig:
|
|
2256
|
+
checkCanOpenLayoutEditor: d,
|
|
2257
|
+
changeFormControlsByResponseLayoutConfig: p,
|
|
2258
|
+
getResonseFormLayoutConfig: a
|
|
1305
2259
|
};
|
|
1306
2260
|
}
|
|
1307
|
-
class
|
|
1308
|
-
constructor(
|
|
1309
|
-
super(
|
|
1310
|
-
|
|
2261
|
+
class Zi extends br {
|
|
2262
|
+
constructor(t, r) {
|
|
2263
|
+
super(t, r);
|
|
2264
|
+
V(this, "responseLayoutEditorFunction");
|
|
1311
2265
|
/** 控件绑定的变量 */
|
|
1312
|
-
|
|
1313
|
-
|
|
2266
|
+
V(this, "bindingVarible");
|
|
2267
|
+
V(this, "numberEditorOptions", {
|
|
1314
2268
|
type: "number-spinner",
|
|
1315
2269
|
useThousands: !1,
|
|
1316
2270
|
keyboard: !1,
|
|
1317
2271
|
showButton: !1
|
|
1318
2272
|
});
|
|
1319
|
-
this.responseLayoutEditorFunction =
|
|
2273
|
+
this.responseLayoutEditorFunction = wr(this.formSchemaUtils);
|
|
1320
2274
|
}
|
|
1321
|
-
getCommonPropertyConfig(
|
|
1322
|
-
this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
2275
|
+
getCommonPropertyConfig(t, r, i = "Card") {
|
|
2276
|
+
this.propertyConfig.categories.basic = this.getBasicProperties(t, r, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.behavior = this.getBehaviorConfig(t, "form-group");
|
|
1323
2277
|
}
|
|
1324
|
-
getPropertyConfig(
|
|
1325
|
-
return this.getCommonPropertyConfig(
|
|
2278
|
+
getPropertyConfig(t, r) {
|
|
2279
|
+
return this.getCommonPropertyConfig(t, r, "Card"), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig.categories.expressions = this.getExpressionConfig(t, "Field"), this.propertyConfig.categories.eventsEditor = this.getEventPropertyConfig(t), this.propertyConfig;
|
|
1326
2280
|
}
|
|
1327
|
-
getGridFieldEdtiorPropConfig(
|
|
1328
|
-
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(
|
|
2281
|
+
getGridFieldEdtiorPropConfig(t, r) {
|
|
2282
|
+
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(t, r, "Grid"), this.getGridFieldEdtiorProperties ? this.propertyConfig.categories.editor = this.getGridFieldEdtiorProperties(t) : this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig.categories.expressons = this.getExpressionConfig(t, "Field"), this.propertyConfig.categories;
|
|
1329
2283
|
}
|
|
1330
|
-
getBasicProperties(
|
|
1331
|
-
var
|
|
1332
|
-
const
|
|
1333
|
-
this.setDesignViewModelField(
|
|
1334
|
-
const { canChangeControlType:
|
|
2284
|
+
getBasicProperties(t, r, i = "Card") {
|
|
2285
|
+
var p;
|
|
2286
|
+
const o = this;
|
|
2287
|
+
this.setDesignViewModelField(t);
|
|
2288
|
+
const { canChangeControlType: a, editorTypeList: g } = this.getAvailableEditorType(t), d = {
|
|
1335
2289
|
description: "Basic Information",
|
|
1336
2290
|
title: "基本信息",
|
|
1337
2291
|
properties: {
|
|
@@ -1354,7 +2308,7 @@ class at extends Qe {
|
|
|
1354
2308
|
idField: "key",
|
|
1355
2309
|
editable: !1,
|
|
1356
2310
|
data: g,
|
|
1357
|
-
readonly: !
|
|
2311
|
+
readonly: !a
|
|
1358
2312
|
}
|
|
1359
2313
|
},
|
|
1360
2314
|
label: {
|
|
@@ -1369,7 +2323,7 @@ class at extends Qe {
|
|
|
1369
2323
|
editor: {
|
|
1370
2324
|
data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
|
|
1371
2325
|
},
|
|
1372
|
-
defaultValue: ((
|
|
2326
|
+
defaultValue: ((p = t.editor) == null ? void 0 : p.type) === "image" ? "none" : "visible"
|
|
1373
2327
|
},
|
|
1374
2328
|
binding: {
|
|
1375
2329
|
description: "绑定的表单字段",
|
|
@@ -1378,7 +2332,7 @@ class at extends Qe {
|
|
|
1378
2332
|
type: "binding-selector",
|
|
1379
2333
|
bindingType: { enable: !1 },
|
|
1380
2334
|
editorParams: {
|
|
1381
|
-
componentSchema:
|
|
2335
|
+
componentSchema: t,
|
|
1382
2336
|
needSyncToViewModel: !0,
|
|
1383
2337
|
viewModelId: this.viewModelId,
|
|
1384
2338
|
designerHostService: this.designerHostService,
|
|
@@ -1387,65 +2341,65 @@ class at extends Qe {
|
|
|
1387
2341
|
textField: "bindingField"
|
|
1388
2342
|
},
|
|
1389
2343
|
refreshPanelAfterChanged: !0,
|
|
1390
|
-
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !
|
|
2344
|
+
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !t.isRtcControl
|
|
1391
2345
|
}
|
|
1392
2346
|
},
|
|
1393
|
-
setPropertyRelates(
|
|
1394
|
-
if (
|
|
1395
|
-
switch (
|
|
2347
|
+
setPropertyRelates(m, s, c) {
|
|
2348
|
+
if (m)
|
|
2349
|
+
switch (m && m.propertyID) {
|
|
1396
2350
|
case "type": {
|
|
1397
|
-
|
|
2351
|
+
o.changeControlType(t, m, r);
|
|
1398
2352
|
break;
|
|
1399
2353
|
}
|
|
1400
2354
|
case "label": {
|
|
1401
|
-
|
|
2355
|
+
m.needRefreshControlTree = !0;
|
|
1402
2356
|
break;
|
|
1403
2357
|
}
|
|
1404
2358
|
case "binding": {
|
|
1405
|
-
|
|
2359
|
+
o.changeBindingField(t, m, c);
|
|
1406
2360
|
break;
|
|
1407
2361
|
}
|
|
1408
2362
|
}
|
|
1409
2363
|
}
|
|
1410
2364
|
};
|
|
1411
|
-
return
|
|
2365
|
+
return i.toLocaleLowerCase() !== "card" && delete d.properties.showLabelType, d;
|
|
1412
2366
|
}
|
|
1413
2367
|
/**
|
|
1414
2368
|
* 校验控件是否支持切换类型
|
|
1415
2369
|
* @param control 控件
|
|
1416
2370
|
*/
|
|
1417
|
-
checkCanChangeControlType(
|
|
1418
|
-
if (!
|
|
2371
|
+
checkCanChangeControlType(t, r) {
|
|
2372
|
+
if (!t.binding)
|
|
1419
2373
|
return !1;
|
|
1420
|
-
if (
|
|
1421
|
-
if (this.bindingVarible = this.formSchemaUtils.getVariableById(
|
|
2374
|
+
if (t.binding.type === "Variable") {
|
|
2375
|
+
if (this.bindingVarible = this.formSchemaUtils.getVariableById(t.binding.field), !this.bindingVarible)
|
|
1422
2376
|
return !1;
|
|
1423
|
-
} else if (!this.designViewModelField || this.designViewModelField.$type !==
|
|
2377
|
+
} else if (!this.designViewModelField || this.designViewModelField.$type !== Fe.SimpleField)
|
|
1424
2378
|
return !1;
|
|
1425
2379
|
return !0;
|
|
1426
2380
|
}
|
|
1427
2381
|
/**
|
|
1428
2382
|
* 获取可选的编辑器类型
|
|
1429
2383
|
*/
|
|
1430
|
-
getAvailableEditorType(
|
|
1431
|
-
var
|
|
1432
|
-
const
|
|
1433
|
-
if (!
|
|
2384
|
+
getAvailableEditorType(t) {
|
|
2385
|
+
var o;
|
|
2386
|
+
const r = this.checkCanChangeControlType(t, this.viewModelId);
|
|
2387
|
+
if (!r)
|
|
1434
2388
|
return {
|
|
1435
2389
|
canChangeControlType: !1,
|
|
1436
2390
|
editorTypeList: [{
|
|
1437
|
-
key:
|
|
1438
|
-
value: ((
|
|
2391
|
+
key: t.editor.type,
|
|
2392
|
+
value: ((o = v[t.editor.type]) == null ? void 0 : o.name) || t.editor.type
|
|
1439
2393
|
}]
|
|
1440
2394
|
};
|
|
1441
|
-
let
|
|
1442
|
-
return this.designViewModelField && this.designViewModelField.$type ===
|
|
2395
|
+
let i = [];
|
|
2396
|
+
return this.designViewModelField && this.designViewModelField.$type === Fe.SimpleField ? i = pe.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = pe.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: r, editorTypeList: i };
|
|
1443
2397
|
}
|
|
1444
|
-
changeBindingField(
|
|
1445
|
-
|
|
2398
|
+
changeBindingField(t, r, i) {
|
|
2399
|
+
r.needRefreshEntityTree = !0;
|
|
1446
2400
|
}
|
|
1447
|
-
getAppearanceProperties(
|
|
1448
|
-
const
|
|
2401
|
+
getAppearanceProperties(t, r) {
|
|
2402
|
+
const i = this;
|
|
1449
2403
|
return {
|
|
1450
2404
|
title: "外观",
|
|
1451
2405
|
description: "Appearance",
|
|
@@ -1479,84 +2433,84 @@ class at extends Qe {
|
|
|
1479
2433
|
refreshPanelAfterChanged: !0,
|
|
1480
2434
|
editor: {
|
|
1481
2435
|
type: "response-layout-editor-setting",
|
|
1482
|
-
beforeOpen: () =>
|
|
2436
|
+
beforeOpen: () => i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, i.componentId)
|
|
1483
2437
|
}
|
|
1484
2438
|
}
|
|
1485
2439
|
},
|
|
1486
|
-
setPropertyRelates(
|
|
1487
|
-
if (
|
|
1488
|
-
switch (
|
|
2440
|
+
setPropertyRelates(o, a) {
|
|
2441
|
+
if (o)
|
|
2442
|
+
switch (o && o.propertyID) {
|
|
1489
2443
|
case "responseLayout":
|
|
1490
|
-
|
|
2444
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(o.propertyValue, i.componentId || t.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(t.id, r), delete t.responseLayout;
|
|
1491
2445
|
break;
|
|
1492
2446
|
case "class":
|
|
1493
|
-
|
|
2447
|
+
i.updateUnifiedLayoutAfterControlChanged(o.propertyValue, t.id, this.componentId), ce.value++;
|
|
1494
2448
|
break;
|
|
1495
2449
|
case "style": {
|
|
1496
|
-
|
|
2450
|
+
ce.value++;
|
|
1497
2451
|
break;
|
|
1498
2452
|
}
|
|
1499
2453
|
}
|
|
1500
2454
|
}
|
|
1501
2455
|
};
|
|
1502
2456
|
}
|
|
1503
|
-
getEditorProperties(
|
|
1504
|
-
return this.getComponentConfig(
|
|
2457
|
+
getEditorProperties(t) {
|
|
2458
|
+
return this.getComponentConfig(t);
|
|
1505
2459
|
}
|
|
1506
2460
|
/**
|
|
1507
2461
|
* 卡片控件:切换控件类型后事件
|
|
1508
2462
|
* @param propertyData 控件DOM属性
|
|
1509
2463
|
* @param newControlType 新控件类型
|
|
1510
2464
|
*/
|
|
1511
|
-
changeControlType(
|
|
1512
|
-
const
|
|
1513
|
-
if (!
|
|
2465
|
+
changeControlType(t, r, i) {
|
|
2466
|
+
const o = r.propertyValue, a = i && i.parent && i.parent.schema;
|
|
2467
|
+
if (!a)
|
|
1514
2468
|
return;
|
|
1515
|
-
const g =
|
|
2469
|
+
const g = a.contents.findIndex((m) => m.id === t.id);
|
|
1516
2470
|
if (g === -1)
|
|
1517
2471
|
return;
|
|
1518
|
-
const
|
|
1519
|
-
let
|
|
2472
|
+
const d = a.contents[g];
|
|
2473
|
+
let p;
|
|
1520
2474
|
if (this.designViewModelField) {
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
id:
|
|
1526
|
-
appearance:
|
|
1527
|
-
size:
|
|
1528
|
-
label:
|
|
1529
|
-
binding:
|
|
1530
|
-
}), Object.prototype.hasOwnProperty.call(
|
|
1531
|
-
Object.prototype.hasOwnProperty.call(
|
|
1532
|
-
}),
|
|
1533
|
-
(
|
|
2475
|
+
const c = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((l) => l.id === this.designViewModelField.id).fieldSchema || {};
|
|
2476
|
+
c.editor || (c.editor = {}), c.editor.$type = o, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, c, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o);
|
|
2477
|
+
}
|
|
2478
|
+
p || (p = this.controlCreatorUtils.createFormGroupWithoutField(o)), Object.assign(p, {
|
|
2479
|
+
id: d.id,
|
|
2480
|
+
appearance: d.appearance,
|
|
2481
|
+
size: d.size,
|
|
2482
|
+
label: d.label,
|
|
2483
|
+
binding: d.binding
|
|
2484
|
+
}), Object.prototype.hasOwnProperty.call(d, "visible") && Object.assign(p, { visible: d.visible }), d.editor && ["readonly", "required", "placeholder"].map((m) => {
|
|
2485
|
+
Object.prototype.hasOwnProperty.call(d.editor, m) && (p.editor[m] = d.editor[m]);
|
|
2486
|
+
}), i != null && i.updateContextSchema ? i.updateContextSchema(p) : (i.schema = Object.assign(d, p), Object.assign(t, p)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2487
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
1534
2488
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1535
|
-
(
|
|
1536
|
-
),
|
|
2489
|
+
(m) => m.classList.remove("dgComponentFocused")
|
|
2490
|
+
), ce.value++, xe(() => {
|
|
1537
2491
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1538
2492
|
});
|
|
1539
2493
|
}
|
|
1540
|
-
getComponentConfig(
|
|
1541
|
-
var
|
|
1542
|
-
const
|
|
2494
|
+
getComponentConfig(t, r = {}, i = {}, o) {
|
|
2495
|
+
var c, f;
|
|
2496
|
+
const a = Object.assign({
|
|
1543
2497
|
description: "编辑器",
|
|
1544
2498
|
title: "编辑器",
|
|
1545
2499
|
type: "input-group",
|
|
1546
2500
|
$converter: "/converter/property-editor.converter",
|
|
1547
2501
|
parentPropertyID: "editor"
|
|
1548
|
-
},
|
|
2502
|
+
}, r), g = (c = t.binding) != null && c.field ? [] : ["Const", "Variable", "StateMachine"], d = this.getPropertyEditorParams(t, g, "readonly"), p = this.getPropertyEditorParams(t, g, "required"), m = {
|
|
1549
2503
|
readonly: {
|
|
1550
2504
|
description: "",
|
|
1551
2505
|
title: "只读",
|
|
1552
|
-
editor:
|
|
2506
|
+
editor: d
|
|
1553
2507
|
},
|
|
1554
2508
|
required: {
|
|
1555
2509
|
description: "",
|
|
1556
2510
|
title: "必填",
|
|
1557
2511
|
type: "boolean",
|
|
1558
|
-
editor:
|
|
1559
|
-
visible: !!((
|
|
2512
|
+
editor: p,
|
|
2513
|
+
visible: !!((f = t.binding) != null && f.field)
|
|
1560
2514
|
},
|
|
1561
2515
|
placeholder: {
|
|
1562
2516
|
description: "当控件没有值时在输入框中显示的文本",
|
|
@@ -1564,21 +2518,21 @@ class at extends Qe {
|
|
|
1564
2518
|
type: "string"
|
|
1565
2519
|
}
|
|
1566
2520
|
};
|
|
1567
|
-
for (const
|
|
1568
|
-
|
|
1569
|
-
const
|
|
2521
|
+
for (const l in i)
|
|
2522
|
+
m[l] = Object.assign(m[l] || {}, i[l]);
|
|
2523
|
+
const s = this;
|
|
1570
2524
|
return {
|
|
1571
|
-
...
|
|
1572
|
-
properties: { ...
|
|
1573
|
-
setPropertyRelates(
|
|
1574
|
-
if (
|
|
1575
|
-
switch (
|
|
2525
|
+
...a,
|
|
2526
|
+
properties: { ...m },
|
|
2527
|
+
setPropertyRelates(l, u) {
|
|
2528
|
+
if (l) {
|
|
2529
|
+
switch (l.propertyID) {
|
|
1576
2530
|
case "readonly":
|
|
1577
2531
|
case "required":
|
|
1578
|
-
|
|
2532
|
+
s.afterMutilEditorChanged(t, l);
|
|
1579
2533
|
break;
|
|
1580
2534
|
}
|
|
1581
|
-
|
|
2535
|
+
o && o.bind(s)(l, t, u);
|
|
1582
2536
|
}
|
|
1583
2537
|
}
|
|
1584
2538
|
};
|
|
@@ -1589,47 +2543,47 @@ class at extends Qe {
|
|
|
1589
2543
|
* @param controlId 控件Id
|
|
1590
2544
|
* @param componentId 控件所在组件id
|
|
1591
2545
|
*/
|
|
1592
|
-
updateUnifiedLayoutAfterControlChanged(
|
|
1593
|
-
const
|
|
1594
|
-
let
|
|
1595
|
-
|
|
1596
|
-
const
|
|
1597
|
-
id:
|
|
1598
|
-
columnInSM: parseInt(
|
|
2546
|
+
updateUnifiedLayoutAfterControlChanged(t, r, i) {
|
|
2547
|
+
const o = t.split(" ");
|
|
2548
|
+
let a = o.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), g = o.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), d = o.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), p = o.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
2549
|
+
a = a || "col-12", g = g || "col-md-" + a.replace("col-", ""), d = d || "col-xl-" + g.replace("col-md-", ""), p = p || "col-el-" + d.replace("col-xl-", "");
|
|
2550
|
+
const m = {
|
|
2551
|
+
id: r,
|
|
2552
|
+
columnInSM: parseInt(a.replace("col-", ""), 10),
|
|
1599
2553
|
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
1600
|
-
columnInLG: parseInt(
|
|
1601
|
-
columnInEL: parseInt(
|
|
2554
|
+
columnInLG: parseInt(d.replace("col-xl-", ""), 10),
|
|
2555
|
+
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
1602
2556
|
};
|
|
1603
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
2557
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, m);
|
|
1604
2558
|
}
|
|
1605
2559
|
/**
|
|
1606
2560
|
* 修改控件布局配置后更新Form统一布局配置
|
|
1607
2561
|
* @param componentId 组件Id
|
|
1608
2562
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1609
2563
|
*/
|
|
1610
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1611
|
-
const { formNode:
|
|
1612
|
-
if (!
|
|
2564
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(t, r) {
|
|
2565
|
+
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
2566
|
+
if (!i || !i.unifiedLayout)
|
|
1613
2567
|
return;
|
|
1614
|
-
const
|
|
1615
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
1616
|
-
const
|
|
1617
|
-
Object.assign(
|
|
1618
|
-
}
|
|
1619
|
-
const
|
|
1620
|
-
Object.assign(
|
|
1621
|
-
uniqueColClassInSM:
|
|
1622
|
-
uniqueColClassInMD:
|
|
1623
|
-
uniqueColClassInLG:
|
|
1624
|
-
uniqueColClassInEL:
|
|
2568
|
+
const o = [];
|
|
2569
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, o, 1), r) {
|
|
2570
|
+
const l = o.find((u) => u.id === r.id);
|
|
2571
|
+
Object.assign(l || {}, r);
|
|
2572
|
+
}
|
|
2573
|
+
const a = o.map((l) => l.columnInSM), g = o.map((l) => l.columnInMD), d = o.map((l) => l.columnInLG), p = o.map((l) => l.columnInEL), m = this.checkIsUniqueColumn(a) ? a[0] : null, s = this.checkIsUniqueColumn(g) ? g[0] : null, c = this.checkIsUniqueColumn(d) ? d[0] : null, f = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
2574
|
+
Object.assign(i.unifiedLayout, {
|
|
2575
|
+
uniqueColClassInSM: m,
|
|
2576
|
+
uniqueColClassInMD: s,
|
|
2577
|
+
uniqueColClassInLG: c,
|
|
2578
|
+
uniqueColClassInEL: f
|
|
1625
2579
|
});
|
|
1626
2580
|
}
|
|
1627
2581
|
/**
|
|
1628
2582
|
* 校验宽度样式值是否一致
|
|
1629
2583
|
*/
|
|
1630
|
-
checkIsUniqueColumn(
|
|
1631
|
-
const
|
|
1632
|
-
return Array.from(
|
|
2584
|
+
checkIsUniqueColumn(t) {
|
|
2585
|
+
const r = new Set(t);
|
|
2586
|
+
return Array.from(r).length === 1;
|
|
1633
2587
|
}
|
|
1634
2588
|
/**
|
|
1635
2589
|
* 枚举项编辑器
|
|
@@ -1638,20 +2592,20 @@ class at extends Qe {
|
|
|
1638
2592
|
* @param textField
|
|
1639
2593
|
* @returns
|
|
1640
2594
|
*/
|
|
1641
|
-
getItemCollectionEditor(
|
|
1642
|
-
return
|
|
2595
|
+
getItemCollectionEditor(t, r, i) {
|
|
2596
|
+
return r = r || "value", i = i || "name", {
|
|
1643
2597
|
editor: {
|
|
1644
2598
|
columns: [
|
|
1645
|
-
{ field:
|
|
1646
|
-
{ field:
|
|
2599
|
+
{ field: r, title: "值", dataType: "string" },
|
|
2600
|
+
{ field: i, title: "名称", dataType: "string" }
|
|
1647
2601
|
// { field: 'disabled', title: '禁用', dataType: 'boolean', editor: { type: 'switch' } },
|
|
1648
2602
|
],
|
|
1649
2603
|
type: "item-collection-editor",
|
|
1650
|
-
valueField:
|
|
1651
|
-
nameField:
|
|
1652
|
-
requiredFields: [
|
|
1653
|
-
uniqueFields: [
|
|
1654
|
-
readonly: this.checkEnumDataReadonly(
|
|
2604
|
+
valueField: r,
|
|
2605
|
+
nameField: i,
|
|
2606
|
+
requiredFields: [r, i],
|
|
2607
|
+
uniqueFields: [r, i],
|
|
2608
|
+
readonly: this.checkEnumDataReadonly(t)
|
|
1655
2609
|
}
|
|
1656
2610
|
};
|
|
1657
2611
|
}
|
|
@@ -1661,26 +2615,26 @@ class at extends Qe {
|
|
|
1661
2615
|
* 2、绑定类型为字段,且字段为枚举字段,则不可新增、删除、修改枚举值。只能从be修改然后同步到表单上。
|
|
1662
2616
|
* @param propertyData 下拉框控件属性值
|
|
1663
2617
|
*/
|
|
1664
|
-
checkEnumDataReadonly(
|
|
1665
|
-
return !
|
|
2618
|
+
checkEnumDataReadonly(t) {
|
|
2619
|
+
return !t.binding || t.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === Pn.EnumType);
|
|
1666
2620
|
}
|
|
1667
2621
|
/**
|
|
1668
2622
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
1669
2623
|
* 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
|
|
1670
2624
|
*/
|
|
1671
|
-
appendFieldValueChangeEvents(
|
|
1672
|
-
|
|
1673
|
-
}
|
|
1674
|
-
getControlMethodType(
|
|
1675
|
-
if (!
|
|
1676
|
-
return
|
|
1677
|
-
switch (
|
|
1678
|
-
case
|
|
1679
|
-
return
|
|
1680
|
-
case
|
|
1681
|
-
return
|
|
2625
|
+
appendFieldValueChangeEvents(t, r) {
|
|
2626
|
+
t.binding && t.binding.type === ue.Form && t.binding.field ? (r.find((i) => i.label === "fieldValueChanging"), r.find((i) => i.label === "fieldValueChanged"), this.designViewModelField && (t.fieldValueChanging = this.designViewModelField.valueChanging, t.fieldValueChanged = this.designViewModelField.valueChanged)) : r = r.filter((i) => i.label !== "fieldValueChanging" && i.label !== "fieldValueChanged");
|
|
2627
|
+
}
|
|
2628
|
+
getControlMethodType(t) {
|
|
2629
|
+
if (!t.binding)
|
|
2630
|
+
return t.type;
|
|
2631
|
+
switch (t.binding.type) {
|
|
2632
|
+
case ue.Form:
|
|
2633
|
+
return t.binding.path || t.type;
|
|
2634
|
+
case ue.Variable:
|
|
2635
|
+
return t.binding.fullPath || t.type;
|
|
1682
2636
|
}
|
|
1683
|
-
return
|
|
2637
|
+
return t.type;
|
|
1684
2638
|
}
|
|
1685
2639
|
/**
|
|
1686
2640
|
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
@@ -1689,10 +2643,10 @@ class at extends Qe {
|
|
|
1689
2643
|
* @param showPosition 面板展示位置
|
|
1690
2644
|
* @param customEvent 输入控件特有的事件配置
|
|
1691
2645
|
*/
|
|
1692
|
-
getEventPropertyConfig(
|
|
1693
|
-
const
|
|
2646
|
+
getEventPropertyConfig(t, r = "card", i, o) {
|
|
2647
|
+
const a = this;
|
|
1694
2648
|
let g = [];
|
|
1695
|
-
if (
|
|
2649
|
+
if (i && (g = g.concat(i)), g.length === 0)
|
|
1696
2650
|
return {
|
|
1697
2651
|
title: "事件",
|
|
1698
2652
|
hideTitle: !0,
|
|
@@ -1701,28 +2655,28 @@ class at extends Qe {
|
|
|
1701
2655
|
tabName: "交互",
|
|
1702
2656
|
hide: !0
|
|
1703
2657
|
};
|
|
1704
|
-
this.appendFieldValueChangeEvents(
|
|
1705
|
-
const
|
|
2658
|
+
this.appendFieldValueChangeEvents(t, g);
|
|
2659
|
+
const d = a.eventsEditorUtils.formProperties(t, a.viewModelId, g);
|
|
1706
2660
|
return {
|
|
1707
2661
|
title: "事件",
|
|
1708
2662
|
hideTitle: !0,
|
|
1709
|
-
properties:
|
|
2663
|
+
properties: a.createBaseEventProperty(d),
|
|
1710
2664
|
tabId: "commands",
|
|
1711
2665
|
tabName: "交互",
|
|
1712
|
-
setPropertyRelates(
|
|
1713
|
-
const
|
|
1714
|
-
delete
|
|
1715
|
-
const
|
|
1716
|
-
|
|
2666
|
+
setPropertyRelates(s, c) {
|
|
2667
|
+
const f = s.propertyValue;
|
|
2668
|
+
delete t[a.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, f.controlInfo = { type: a.getControlMethodType(t), name: t.title }, a.eventsEditorUtils.saveRelatedParameters(t, a.viewModelId, f.events, f)), o && o(s, c, f);
|
|
2669
|
+
const l = a.designViewModelUtils.getDgViewModel(a.viewModelId);
|
|
2670
|
+
l && a.designViewModelField && l.changeField(a.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged });
|
|
1717
2671
|
}
|
|
1718
2672
|
};
|
|
1719
2673
|
}
|
|
1720
|
-
getExpressionConfig(
|
|
1721
|
-
return new
|
|
1722
|
-
e,
|
|
1723
|
-
i,
|
|
2674
|
+
getExpressionConfig(t, r, i = ["compute", "dependency", "validate"], o) {
|
|
2675
|
+
return new Te(this.formSchemaUtils).getExpressionConfig(
|
|
1724
2676
|
t,
|
|
1725
|
-
|
|
2677
|
+
r,
|
|
2678
|
+
i,
|
|
2679
|
+
o
|
|
1726
2680
|
);
|
|
1727
2681
|
}
|
|
1728
2682
|
getBindingDataType() {
|
|
@@ -1731,39 +2685,39 @@ class at extends Qe {
|
|
|
1731
2685
|
getEditor() {
|
|
1732
2686
|
return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
|
|
1733
2687
|
}
|
|
1734
|
-
updatePropertyValue(
|
|
1735
|
-
var
|
|
1736
|
-
|
|
2688
|
+
updatePropertyValue(t, r, i) {
|
|
2689
|
+
var o;
|
|
2690
|
+
t.editor[r] !== i ? t.editor[r] = i : (o = this.getFormDesignerInstance()) == null || o.reloadPropertyPanel();
|
|
1737
2691
|
}
|
|
1738
|
-
setBooleanValue(
|
|
1739
|
-
let
|
|
1740
|
-
this.getBindingDataType() === "string" && (
|
|
1741
|
-
const g =
|
|
1742
|
-
|
|
2692
|
+
setBooleanValue(t, r, i) {
|
|
2693
|
+
let o = i;
|
|
2694
|
+
this.getBindingDataType() === "string" && (o = (o || "").trim() || (r === "trueValue" ? "true" : "false"));
|
|
2695
|
+
const g = r === "trueValue" ? "falseValue" : "trueValue";
|
|
2696
|
+
t.editor[g] === o && (o = o + 1), this.updatePropertyValue(t, r, o);
|
|
1743
2697
|
}
|
|
1744
2698
|
getBooleanValueConverter() {
|
|
1745
2699
|
return {
|
|
1746
|
-
convertFrom: (
|
|
1747
|
-
convertTo: (
|
|
1748
|
-
this.setBooleanValue(
|
|
2700
|
+
convertFrom: (t, r) => t.editor[r],
|
|
2701
|
+
convertTo: (t, r, i) => {
|
|
2702
|
+
this.setBooleanValue(t, r, i);
|
|
1749
2703
|
}
|
|
1750
2704
|
};
|
|
1751
2705
|
}
|
|
1752
2706
|
}
|
|
1753
|
-
const
|
|
1754
|
-
install(
|
|
1755
|
-
|
|
2707
|
+
const Ki = {
|
|
2708
|
+
install(e) {
|
|
2709
|
+
e.component(we.name, we);
|
|
1756
2710
|
}
|
|
1757
2711
|
};
|
|
1758
2712
|
export {
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
2713
|
+
br as BaseControlProperty,
|
|
2714
|
+
Te as ExpressionProperty,
|
|
2715
|
+
we as FPropertyPanel,
|
|
2716
|
+
ue as FormBindingType,
|
|
2717
|
+
Zi as InputBaseProperty,
|
|
2718
|
+
Cr as PropertyType,
|
|
2719
|
+
pe as SchemaDOMMapping,
|
|
2720
|
+
Ki as default,
|
|
2721
|
+
sr as propertyPanelItemProps,
|
|
2722
|
+
Tn as propertyPanelProps
|
|
1769
2723
|
};
|