@farris/ui-vue 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3791 -2760
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-view/index.esm.js +1815 -1789
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +2975 -2615
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +427 -466
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +2 -3
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +427 -646
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1190 -850
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3863
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2447 -2221
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +760 -543
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +105 -104
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +320 -153
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5191 -4407
- package/designer/data-grid/index.umd.cjs +17 -10
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +12665 -12117
- package/designer/farris-designer.all.umd.cjs +12 -12
- package/designer/list-view/index.esm.js +327 -327
- package/designer/list-view/index.umd.cjs +3 -3
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +0 -1
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +9 -9
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2829 -2540
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +822 -464
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +69725 -68244
- package/farris.all.umd.cjs +92 -92
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +14 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +6 -1
- package/types/condition/index.d.ts +55 -0
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → flow-canvas/src/components/flow-node-item.component.d.ts} +1 -1
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +1 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-view/src/tree-view.props.d.ts +1 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/layout/designer.d.ts +0 -32
- package/types/list-nav/designer.d.ts +0 -6
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
|
@@ -1,11 +1,92 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
var qe = Object.defineProperty;
|
|
2
|
+
var Ae = (e, t, r) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var L = (e, t, r) => Ae(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { ref as M, computed as W, watch as _, defineComponent as Q, onBeforeUnmount as Te, withDirectives as ce, createVNode as B, resolveDirective as de, createTextVNode as $e, mergeProps as pe, inject as D, onMounted as ke } from "vue";
|
|
5
|
+
import { FDynamicFormGroup as Re, dynamicFormGroupProps as ze, FDynamicFormLabel as Ue } from "../dynamic-form/index.esm.js";
|
|
6
|
+
import { cloneDeep as re, isPlainObject as ve } from "lodash-es";
|
|
7
|
+
import { useDateFormat as we, resolveField as We, useNumberFormat as Ze, useThirdComponent as xe, isMobilePhone as Je, useTextBoxDesign as _e, areaResponseDirective as Qe } from "../common/index.esm.js";
|
|
8
|
+
import { LocaleService as ne } from "../locale/index.esm.js";
|
|
9
|
+
import Xe from "../accordion/index.esm.js";
|
|
10
|
+
import Ye from "../avatar/index.esm.js";
|
|
11
|
+
import He from "../../designer/button-edit/index.esm.js";
|
|
12
|
+
import De from "../button-group/index.esm.js";
|
|
13
|
+
import Ke from "../calendar/index.esm.js";
|
|
14
|
+
import et from "../../designer/capsule/index.esm.js";
|
|
15
|
+
import he from "../../designer/checkbox/index.esm.js";
|
|
16
|
+
import ye from "../../designer/checkbox-group/index.esm.js";
|
|
17
|
+
import le from "../combo-list/index.esm.js";
|
|
18
|
+
import tt from "../combo-tree/index.esm.js";
|
|
19
|
+
import rt from "../component/index.esm.js";
|
|
20
|
+
import nt from "../color-picker/index.esm.js";
|
|
21
|
+
import ot from "../content-container/index.esm.js";
|
|
22
|
+
import it from "../../designer/date-picker/index.esm.js";
|
|
23
|
+
import at from "../../designer/data-grid/index.esm.js";
|
|
24
|
+
import lt from "../dropdown/index.esm.js";
|
|
25
|
+
import st from "../../designer/dynamic-form/index.esm.js";
|
|
26
|
+
import ut from "../events-editor/index.esm.js";
|
|
27
|
+
import ct from "../filter-bar/index.esm.js";
|
|
28
|
+
import dt from "../field-selector/index.esm.js";
|
|
29
|
+
import pt from "../binding-selector/index.esm.js";
|
|
30
|
+
import mt from "../image-cropper/index.esm.js";
|
|
31
|
+
import ft from "../../designer/input-group/index.esm.js";
|
|
32
|
+
import gt from "../layout/index.esm.js";
|
|
33
|
+
import vt from "../list-nav/index.esm.js";
|
|
34
|
+
import ht from "../../designer/list-view/index.esm.js";
|
|
35
|
+
import yt from "../lookup/index.esm.js";
|
|
36
|
+
import bt from "../mapping-editor/index.esm.js";
|
|
37
|
+
import Ft from "../nav/index.esm.js";
|
|
38
|
+
import Ct from "../number-range/index.esm.js";
|
|
39
|
+
import Tt from "../../designer/number-spinner/index.esm.js";
|
|
40
|
+
import kt from "../order/index.esm.js";
|
|
41
|
+
import wt from "../page-header/index.esm.js";
|
|
42
|
+
import xt from "../page-footer/index.esm.js";
|
|
43
|
+
import Vt from "../pagination/index.esm.js";
|
|
44
|
+
import St from "../progress/index.esm.js";
|
|
45
|
+
import Et from "../query-solution/index.esm.js";
|
|
46
|
+
import It from "../../designer/radio-group/index.esm.js";
|
|
47
|
+
import Lt from "../../designer/rate/index.esm.js";
|
|
48
|
+
import Pt from "../../designer/response-toolbar/index.esm.js";
|
|
49
|
+
import Ot from "../response-layout/index.esm.js";
|
|
50
|
+
import Bt from "../../designer/response-layout-editor/index.esm.js";
|
|
51
|
+
import Mt from "../search-box/index.esm.js";
|
|
52
|
+
import Nt from "../../designer/section/index.esm.js";
|
|
53
|
+
import jt from "../smoke-detector/index.esm.js";
|
|
54
|
+
import Gt from "../splitter/index.esm.js";
|
|
55
|
+
import qt from "../step/index.esm.js";
|
|
56
|
+
import At from "../../designer/switch/index.esm.js";
|
|
57
|
+
import $t from "../../designer/tabs/index.esm.js";
|
|
58
|
+
import Rt from "../../designer/tags/index.esm.js";
|
|
59
|
+
import zt from "../text/index.esm.js";
|
|
60
|
+
import Ut from "../../designer/time-picker/index.esm.js";
|
|
61
|
+
import Wt from "../transfer/index.esm.js";
|
|
62
|
+
import Zt from "../tree-view/index.esm.js";
|
|
63
|
+
import Jt from "../uploader/index.esm.js";
|
|
64
|
+
import _t from "../verify-detail/index.esm.js";
|
|
65
|
+
import Qt from "../video/index.esm.js";
|
|
66
|
+
import Xt from "../../designer/textarea/index.esm.js";
|
|
67
|
+
import Yt from "../schema-selector/index.esm.js";
|
|
68
|
+
import Ht from "../../designer/tree-grid/index.esm.js";
|
|
69
|
+
import Dt from "../event-parameter/index.esm.js";
|
|
70
|
+
import Kt from "../filter-condition-editor/index.esm.js";
|
|
71
|
+
import er from "../fieldset/index.esm.js";
|
|
72
|
+
import tr from "../sort-condition-editor/index.esm.js";
|
|
73
|
+
import rr from "../menu-lookup/index.esm.js";
|
|
74
|
+
import nr from "../../designer/drawer/index.esm.js";
|
|
75
|
+
import or from "../json-editor/index.esm.js";
|
|
76
|
+
import ir from "../property-editor/index.esm.js";
|
|
77
|
+
import ar from "../expression-editor/index.esm.js";
|
|
78
|
+
import lr from "../code-editor/index.esm.js";
|
|
79
|
+
import sr from "../html-template/index.esm.js";
|
|
80
|
+
import ur from "../collection-property-editor/index.esm.js";
|
|
81
|
+
import cr from "../../designer/modal/index.esm.js";
|
|
82
|
+
import dr from "../external-container/index.esm.js";
|
|
83
|
+
import pr from "../language-textbox/index.esm.js";
|
|
84
|
+
import mr from "../image/index.esm.js";
|
|
85
|
+
import fr from "../comment/index.esm.js";
|
|
86
|
+
import { schemaResolverMap as gr, propertyEffectMap as vr, propertyConfigSchemaMap as hr, schemaMap as yr, createPropsResolver as br, propertyConfigSchemaMapForDesigner as Fr } from "../dynamic-resolver/index.esm.js";
|
|
87
|
+
import { useDesignerComponent as Ve, DgControl as h } from "../designer-canvas/index.esm.js";
|
|
88
|
+
import { InputBaseProperty as Cr } from "../property-panel/index.esm.js";
|
|
89
|
+
const me = {
|
|
9
90
|
conditions: { type: Array, default: [] },
|
|
10
91
|
fields: { type: Array, default: [] },
|
|
11
92
|
key: { type: String, default: "" },
|
|
@@ -15,99 +96,98 @@ const Te = {
|
|
|
15
96
|
isControlInline: {
|
|
16
97
|
type: [Boolean, String],
|
|
17
98
|
default: "auto",
|
|
18
|
-
validator: (
|
|
99
|
+
validator: (e) => [!0, !1, "auto"].includes(e)
|
|
19
100
|
},
|
|
20
101
|
/**
|
|
21
102
|
* 条件项统一的样式
|
|
22
103
|
*/
|
|
23
104
|
itemClass: { type: Boolean, default: "col-12 col-md-6 col-xl-3 col-el-2" }
|
|
24
105
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
n(this, "valueType", "boolean");
|
|
106
|
+
class Tr {
|
|
107
|
+
constructor(t = { value: [] }, r) {
|
|
108
|
+
L(this, "editorType", "check-box");
|
|
109
|
+
L(this, "value");
|
|
110
|
+
L(this, "valueType", "boolean");
|
|
31
111
|
// 编辑器配置
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
this.value =
|
|
112
|
+
L(this, "editiorConfig");
|
|
113
|
+
const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((p) => JSON.parse(p));
|
|
114
|
+
this.value = o, this.editiorConfig = Object.assign({}, r);
|
|
35
115
|
}
|
|
36
116
|
clear() {
|
|
37
117
|
this.value = [];
|
|
38
118
|
}
|
|
39
|
-
setValue(
|
|
40
|
-
this.value =
|
|
119
|
+
setValue(t) {
|
|
120
|
+
this.value = t;
|
|
41
121
|
}
|
|
42
122
|
getValue() {
|
|
43
123
|
return this.value;
|
|
44
124
|
}
|
|
45
125
|
getDisplayText() {
|
|
46
|
-
return this.value.map((
|
|
126
|
+
return this.value.map((t) => t ? "是" : "否").join(",");
|
|
47
127
|
}
|
|
48
128
|
isEmpty() {
|
|
49
129
|
return this.value.length === 0;
|
|
50
130
|
}
|
|
51
131
|
}
|
|
52
|
-
class
|
|
53
|
-
constructor(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
132
|
+
class kr {
|
|
133
|
+
constructor(t = { textValue: "", value: "", valueField: "" }, r) {
|
|
134
|
+
L(this, "editorType", "combo-lookup");
|
|
135
|
+
L(this, "textValue");
|
|
136
|
+
L(this, "value");
|
|
137
|
+
L(this, "valueField");
|
|
138
|
+
L(this, "valueType", "text");
|
|
59
139
|
// 编辑器配置
|
|
60
|
-
|
|
61
|
-
this.textValue =
|
|
140
|
+
L(this, "editiorConfig");
|
|
141
|
+
this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.valueField = t == null ? void 0 : t.valueField;
|
|
62
142
|
}
|
|
63
143
|
clear() {
|
|
64
144
|
this.value = "", this.valueField = "", this.textValue = "";
|
|
65
145
|
}
|
|
66
|
-
getPropValue(
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
return
|
|
146
|
+
getPropValue(t, r) {
|
|
147
|
+
if (r.length > 1) {
|
|
148
|
+
const n = r.shift();
|
|
149
|
+
return t[n] ? this.getPropValue(t[n], r) : null;
|
|
70
150
|
}
|
|
71
|
-
return
|
|
151
|
+
return t[r[0]];
|
|
72
152
|
}
|
|
73
|
-
getTextValue(
|
|
74
|
-
const
|
|
75
|
-
return
|
|
153
|
+
getTextValue(t) {
|
|
154
|
+
const r = t.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, re(r)));
|
|
155
|
+
return n && n.length ? n.join(",") : "";
|
|
76
156
|
}
|
|
77
157
|
getValue() {
|
|
78
|
-
const
|
|
79
|
-
return
|
|
158
|
+
const t = this.valueField.split("."), r = this.value.split(",").map((n) => this.getPropValue(n, re(t)));
|
|
159
|
+
return r && r.length ? r.join(",") : "";
|
|
80
160
|
}
|
|
81
161
|
getDisplayText() {
|
|
82
162
|
return this.getValue();
|
|
83
163
|
}
|
|
84
|
-
setValue(
|
|
164
|
+
setValue(t) {
|
|
85
165
|
throw new Error("Method not implemented.");
|
|
86
166
|
}
|
|
87
167
|
isEmpty() {
|
|
88
168
|
return !this.valueField;
|
|
89
169
|
}
|
|
90
170
|
}
|
|
91
|
-
class
|
|
92
|
-
constructor(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
171
|
+
class oe {
|
|
172
|
+
constructor(t = { value: "", displayFormat: "", valueFormat: "" }, r) {
|
|
173
|
+
L(this, "editorType", "date-picker");
|
|
174
|
+
L(this, "value");
|
|
175
|
+
L(this, "valueType", "datetime");
|
|
176
|
+
L(this, "displayFormat", "");
|
|
177
|
+
L(this, "valueFormat", "");
|
|
98
178
|
// 编辑器配置
|
|
99
|
-
|
|
100
|
-
this.value =
|
|
179
|
+
L(this, "editiorConfig");
|
|
180
|
+
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "";
|
|
101
181
|
}
|
|
102
182
|
formatValue() {
|
|
103
|
-
const { formatTo:
|
|
183
|
+
const { formatTo: t, parseToDate: r } = we();
|
|
104
184
|
if (!this.value)
|
|
105
185
|
return "";
|
|
106
|
-
const
|
|
107
|
-
return
|
|
186
|
+
const n = r(this.value, this.valueFormat);
|
|
187
|
+
return t(n, this.displayFormat);
|
|
108
188
|
}
|
|
109
|
-
setValue(
|
|
110
|
-
this.value =
|
|
189
|
+
setValue(t) {
|
|
190
|
+
this.value = t;
|
|
111
191
|
}
|
|
112
192
|
getValue() {
|
|
113
193
|
return this.value;
|
|
@@ -122,28 +202,28 @@ class S {
|
|
|
122
202
|
this.value = void 0;
|
|
123
203
|
}
|
|
124
204
|
}
|
|
125
|
-
class
|
|
126
|
-
constructor(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
205
|
+
class fe {
|
|
206
|
+
constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, r = {}) {
|
|
207
|
+
L(this, "editorType", "date-range");
|
|
208
|
+
L(this, "begin", "");
|
|
209
|
+
L(this, "end", "");
|
|
210
|
+
L(this, "valueType", "datetime");
|
|
211
|
+
L(this, "value", "");
|
|
132
212
|
// 编辑器配置
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.begin = (
|
|
213
|
+
L(this, "editiorConfig");
|
|
214
|
+
L(this, "displayFormat", "");
|
|
215
|
+
L(this, "valueFormat", "");
|
|
216
|
+
this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({}, r, { delimiter: "~" }), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
|
|
137
217
|
}
|
|
138
218
|
clear() {
|
|
139
219
|
this.begin = "", this.end = "", this.value = "";
|
|
140
220
|
}
|
|
141
|
-
formatValue(
|
|
142
|
-
const { formatTo:
|
|
143
|
-
if (!
|
|
221
|
+
formatValue(t) {
|
|
222
|
+
const { formatTo: r, parseToDate: n } = we();
|
|
223
|
+
if (!t)
|
|
144
224
|
return "";
|
|
145
|
-
const
|
|
146
|
-
return
|
|
225
|
+
const o = n(t, this.valueFormat);
|
|
226
|
+
return r(o, this.displayFormat);
|
|
147
227
|
}
|
|
148
228
|
getValue() {
|
|
149
229
|
return {
|
|
@@ -155,10 +235,10 @@ class N {
|
|
|
155
235
|
getDisplayText() {
|
|
156
236
|
return !this.begin && !this.end ? "" : (this.begin === null ? "" : this.formatValue(this.begin)) + "~" + (this.end === null ? "" : this.formatValue(this.end));
|
|
157
237
|
}
|
|
158
|
-
setValue(
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
this.begin =
|
|
238
|
+
setValue(t) {
|
|
239
|
+
if (t) {
|
|
240
|
+
const r = t.split(this.editiorConfig.delimiter);
|
|
241
|
+
this.begin = r[0] || "", this.end = r[1] || "", this.value = t;
|
|
162
242
|
} else
|
|
163
243
|
this.clear();
|
|
164
244
|
}
|
|
@@ -166,45 +246,39 @@ class N {
|
|
|
166
246
|
return !this.begin && !this.end;
|
|
167
247
|
}
|
|
168
248
|
}
|
|
169
|
-
class
|
|
170
|
-
constructor(t = { value: "",
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
class R {
|
|
176
|
-
constructor(e = { value: "", valueList: [] }, t) {
|
|
177
|
-
n(this, "editorType", "combo-list");
|
|
178
|
-
n(this, "value");
|
|
179
|
-
n(this, "valueType", "enum");
|
|
180
|
-
n(this, "valueList", []);
|
|
249
|
+
class Se {
|
|
250
|
+
constructor(t = { value: "", valueList: [] }, r) {
|
|
251
|
+
L(this, "editorType", "combo-list");
|
|
252
|
+
L(this, "value");
|
|
253
|
+
L(this, "valueType", "enum");
|
|
254
|
+
L(this, "valueList", []);
|
|
181
255
|
// 编辑器配置
|
|
182
|
-
|
|
183
|
-
this.value =
|
|
256
|
+
L(this, "editiorConfig");
|
|
257
|
+
this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
|
|
184
258
|
}
|
|
185
259
|
clear() {
|
|
186
|
-
const
|
|
187
|
-
this.value =
|
|
260
|
+
const t = typeof this.value;
|
|
261
|
+
this.value = t === "string" ? "" : void 0;
|
|
188
262
|
}
|
|
189
263
|
getValue() {
|
|
190
264
|
return this.value;
|
|
191
265
|
}
|
|
192
266
|
getDisplayText() {
|
|
193
|
-
var
|
|
194
|
-
const
|
|
195
|
-
let
|
|
196
|
-
switch (
|
|
267
|
+
var o, p;
|
|
268
|
+
const t = typeof this.value;
|
|
269
|
+
let r = "", n = [];
|
|
270
|
+
switch (t) {
|
|
197
271
|
case "string":
|
|
198
|
-
|
|
272
|
+
n = this.value.split(",") || [], r = this.valueList.filter((i) => n.indexOf(i.value + "") > -1).map((i) => i.name).join(",");
|
|
199
273
|
break;
|
|
200
274
|
case "boolean":
|
|
201
|
-
|
|
275
|
+
r = ((o = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : o.name) || "";
|
|
202
276
|
break;
|
|
203
277
|
case "number":
|
|
204
|
-
|
|
278
|
+
r = ((p = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : p.name) || "";
|
|
205
279
|
break;
|
|
206
280
|
}
|
|
207
|
-
return
|
|
281
|
+
return r;
|
|
208
282
|
}
|
|
209
283
|
// setValue(data: { value: string; displayText: string }) {
|
|
210
284
|
// // this.displayText = data.dispalyText;
|
|
@@ -212,42 +286,42 @@ class R {
|
|
|
212
286
|
// this.value = enumValues;
|
|
213
287
|
// return this.displayText;
|
|
214
288
|
// }
|
|
215
|
-
setValue(
|
|
216
|
-
this.value =
|
|
289
|
+
setValue(t) {
|
|
290
|
+
this.value = t.value;
|
|
217
291
|
}
|
|
218
292
|
isEmpty() {
|
|
219
293
|
return !this.value && this.value !== !1 && this.value !== 0;
|
|
220
294
|
}
|
|
221
295
|
}
|
|
222
|
-
class
|
|
223
|
-
constructor(
|
|
224
|
-
|
|
296
|
+
class wr {
|
|
297
|
+
constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 }, r) {
|
|
298
|
+
L(this, "editorType", "input-group");
|
|
225
299
|
// 通过弹窗返回的若干个值对象构成的数组
|
|
226
|
-
|
|
227
|
-
|
|
300
|
+
L(this, "value");
|
|
301
|
+
L(this, "valueType", "text");
|
|
228
302
|
// 控件内显示的值
|
|
229
|
-
|
|
303
|
+
L(this, "displayText");
|
|
230
304
|
// 弹窗模式下,取列表中哪个字段的值映射到当前字段
|
|
231
|
-
|
|
305
|
+
L(this, "valueField");
|
|
232
306
|
// 是否是手动输入的值
|
|
233
|
-
|
|
307
|
+
L(this, "isInputText");
|
|
234
308
|
// 编辑器配置
|
|
235
|
-
|
|
236
|
-
this.value =
|
|
309
|
+
L(this, "editiorConfig");
|
|
310
|
+
this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({}, r);
|
|
237
311
|
}
|
|
238
312
|
clear() {
|
|
239
313
|
this.value = "", this.displayText = "", this.valueField = "";
|
|
240
314
|
}
|
|
241
|
-
getPropValue(
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
244
|
-
return
|
|
315
|
+
getPropValue(t, r) {
|
|
316
|
+
if (r.length > 1) {
|
|
317
|
+
const n = r.shift();
|
|
318
|
+
return t[n] ? this.getPropValue(t[n], r) : "";
|
|
245
319
|
}
|
|
246
|
-
return
|
|
320
|
+
return t[r[0]];
|
|
247
321
|
}
|
|
248
|
-
getTextValue(
|
|
249
|
-
const
|
|
250
|
-
return
|
|
322
|
+
getTextValue(t) {
|
|
323
|
+
const r = t.split("."), n = this.value.map((o) => this.getPropValue(o, re(r)));
|
|
324
|
+
return n && n.length ? n.join(",") : "";
|
|
251
325
|
}
|
|
252
326
|
getValue() {
|
|
253
327
|
return this.value;
|
|
@@ -255,65 +329,65 @@ class te {
|
|
|
255
329
|
getDisplayText() {
|
|
256
330
|
return this.getValue();
|
|
257
331
|
}
|
|
258
|
-
setValue(
|
|
332
|
+
setValue(t) {
|
|
259
333
|
throw new Error("Method not implemented.");
|
|
260
334
|
}
|
|
261
335
|
isEmpty() {
|
|
262
|
-
var
|
|
263
|
-
return !this.displayText && (this.value == null || !((
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
class
|
|
267
|
-
constructor(
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
336
|
+
var t;
|
|
337
|
+
return !this.displayText && (this.value == null || !((t = this.value) != null && t.length));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
class xr {
|
|
341
|
+
constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, r) {
|
|
342
|
+
L(this, "editorType", "lookup");
|
|
343
|
+
L(this, "helpId");
|
|
344
|
+
L(this, "mapFields");
|
|
345
|
+
L(this, "value");
|
|
346
|
+
L(this, "valueField");
|
|
347
|
+
L(this, "valueType", "text");
|
|
274
348
|
// 帮助的值是否为手动输入的任意值,对应帮助的任意输入属性nosearch
|
|
275
|
-
|
|
349
|
+
L(this, "isInputText");
|
|
276
350
|
// 编辑器配置
|
|
277
|
-
|
|
278
|
-
this.editiorConfig = Object.assign({},
|
|
351
|
+
L(this, "editiorConfig");
|
|
352
|
+
this.editiorConfig = Object.assign({}, r), this.value = (t == null ? void 0 : t.value) || "", this.valueField = (t == null ? void 0 : t.valueField) || (r == null ? void 0 : r.valueField), this.mapFields = t.mapFields, this.isInputText = (t == null ? void 0 : t.isInputText) || (r == null ? void 0 : r.isInputText), this.helpId = (t == null ? void 0 : t.helpId) || (r == null ? void 0 : r.helpId);
|
|
279
353
|
}
|
|
280
354
|
clear() {
|
|
281
355
|
this.value = "", this.mapFields = [];
|
|
282
356
|
}
|
|
283
357
|
getValue() {
|
|
284
|
-
return this.mapFields.map((
|
|
358
|
+
return this.mapFields.map((t) => We(t, this.valueField || "id")).join(",");
|
|
285
359
|
}
|
|
286
360
|
getDisplayText() {
|
|
287
361
|
return this.value;
|
|
288
362
|
}
|
|
289
|
-
setValue(
|
|
363
|
+
setValue(t) {
|
|
290
364
|
throw new Error("Method not implemented.");
|
|
291
365
|
}
|
|
292
366
|
isEmpty() {
|
|
293
367
|
return !this.mapFields.length;
|
|
294
368
|
}
|
|
295
369
|
}
|
|
296
|
-
class
|
|
297
|
-
constructor(
|
|
298
|
-
super(
|
|
299
|
-
|
|
370
|
+
class Vr extends oe {
|
|
371
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
372
|
+
super(r, n);
|
|
373
|
+
L(this, "editorType", "month-picker");
|
|
300
374
|
}
|
|
301
375
|
}
|
|
302
|
-
class
|
|
303
|
-
constructor(
|
|
304
|
-
super(
|
|
305
|
-
|
|
376
|
+
class Sr extends fe {
|
|
377
|
+
constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n) {
|
|
378
|
+
super(r, n);
|
|
379
|
+
L(this, "editorType", "month-range");
|
|
306
380
|
}
|
|
307
381
|
}
|
|
308
|
-
class
|
|
309
|
-
constructor(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
382
|
+
class Er {
|
|
383
|
+
constructor(t = { begin: null, end: null }, r) {
|
|
384
|
+
L(this, "editorType", "number-range");
|
|
385
|
+
L(this, "begin");
|
|
386
|
+
L(this, "end");
|
|
387
|
+
L(this, "valueType", "number");
|
|
314
388
|
// 编辑器配置
|
|
315
|
-
|
|
316
|
-
this.editiorConfig = Object.assign({},
|
|
389
|
+
L(this, "editiorConfig");
|
|
390
|
+
this.editiorConfig = Object.assign({}, r), this.begin = (t == null ? void 0 : t.begin) == null ? null : parseFloat(t.begin), this.end = (t == null ? void 0 : t.end) == null ? null : parseFloat(t.end);
|
|
317
391
|
}
|
|
318
392
|
clear() {
|
|
319
393
|
this.begin = null, this.end = null;
|
|
@@ -327,23 +401,23 @@ class oe {
|
|
|
327
401
|
getDisplayText() {
|
|
328
402
|
return this.begin === null && this.end === null ? "" : (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
|
|
329
403
|
}
|
|
330
|
-
setValue(
|
|
331
|
-
this.begin =
|
|
404
|
+
setValue(t) {
|
|
405
|
+
this.begin = t.begin == null ? null : parseFloat(t.begin), this.end = t.end == null ? null : parseFloat(t.end);
|
|
332
406
|
}
|
|
333
407
|
isEmpty() {
|
|
334
408
|
return this.begin == null && this.end == null;
|
|
335
409
|
}
|
|
336
410
|
}
|
|
337
|
-
class
|
|
338
|
-
constructor(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
411
|
+
class Ir {
|
|
412
|
+
constructor(t = { value: "" }, r) {
|
|
413
|
+
L(this, "editorType", "number-spinner");
|
|
414
|
+
L(this, "value");
|
|
415
|
+
L(this, "valueType", "number");
|
|
342
416
|
// 编辑器配置
|
|
343
|
-
|
|
344
|
-
this.editiorConfig = Object.assign({},
|
|
345
|
-
const
|
|
346
|
-
this.value = isNaN(
|
|
417
|
+
L(this, "editiorConfig");
|
|
418
|
+
this.editiorConfig = Object.assign({}, r);
|
|
419
|
+
const n = parseFloat(t.value);
|
|
420
|
+
this.value = isNaN(n) ? null : n;
|
|
347
421
|
}
|
|
348
422
|
clear() {
|
|
349
423
|
this.value = null;
|
|
@@ -354,25 +428,25 @@ class ue {
|
|
|
354
428
|
getDisplayText() {
|
|
355
429
|
if (this.isEmpty())
|
|
356
430
|
return "";
|
|
357
|
-
const { formatTo:
|
|
358
|
-
return
|
|
431
|
+
const { formatTo: t } = Ze();
|
|
432
|
+
return t(this.value, this.editiorConfig);
|
|
359
433
|
}
|
|
360
|
-
setValue(
|
|
361
|
-
this.value = isNaN(parseFloat(
|
|
434
|
+
setValue(t) {
|
|
435
|
+
this.value = isNaN(parseFloat(t)) ? null : t;
|
|
362
436
|
}
|
|
363
437
|
isEmpty() {
|
|
364
438
|
return this.value == null || isNaN(this.value);
|
|
365
439
|
}
|
|
366
440
|
}
|
|
367
|
-
class
|
|
368
|
-
constructor(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
441
|
+
class Lr {
|
|
442
|
+
constructor(t = { value: null, valueList: [] }, r) {
|
|
443
|
+
L(this, "editorType", "radio-group");
|
|
444
|
+
L(this, "value");
|
|
445
|
+
L(this, "valueType", "enum");
|
|
446
|
+
L(this, "valueList", []);
|
|
373
447
|
// 编辑器配置
|
|
374
|
-
|
|
375
|
-
this.editiorConfig = Object.assign({},
|
|
448
|
+
L(this, "editiorConfig");
|
|
449
|
+
this.editiorConfig = Object.assign({}, r), this.value = t == null ? void 0 : t.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
|
|
376
450
|
}
|
|
377
451
|
clear() {
|
|
378
452
|
this.value = void 0, this.valueList = [];
|
|
@@ -381,30 +455,30 @@ class le {
|
|
|
381
455
|
return this.value;
|
|
382
456
|
}
|
|
383
457
|
getDisplayText() {
|
|
384
|
-
var
|
|
385
|
-
return ((
|
|
458
|
+
var t;
|
|
459
|
+
return ((t = this.valueList.find((r) => r.value === this.value)) == null ? void 0 : t.name) || "";
|
|
386
460
|
}
|
|
387
|
-
setValue(
|
|
388
|
-
this.value =
|
|
461
|
+
setValue(t) {
|
|
462
|
+
this.value = t;
|
|
389
463
|
}
|
|
390
464
|
isEmpty() {
|
|
391
465
|
return !this.value && this.value !== 0 && this.value !== !1;
|
|
392
466
|
}
|
|
393
467
|
}
|
|
394
|
-
class
|
|
395
|
-
constructor(
|
|
396
|
-
super(
|
|
397
|
-
|
|
468
|
+
class Pr extends oe {
|
|
469
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
470
|
+
super(r, n);
|
|
471
|
+
L(this, "editorType", "year-picker");
|
|
398
472
|
}
|
|
399
473
|
}
|
|
400
|
-
class
|
|
401
|
-
constructor(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
474
|
+
class Ee {
|
|
475
|
+
constructor(t = { value: "" }, r) {
|
|
476
|
+
L(this, "editorType", "text");
|
|
477
|
+
L(this, "value");
|
|
478
|
+
L(this, "valueType", "text");
|
|
405
479
|
// 编辑器配置
|
|
406
|
-
|
|
407
|
-
this.value =
|
|
480
|
+
L(this, "editiorConfig");
|
|
481
|
+
this.value = t.value;
|
|
408
482
|
}
|
|
409
483
|
clear() {
|
|
410
484
|
this.value = void 0;
|
|
@@ -415,79 +489,672 @@ class U {
|
|
|
415
489
|
getDisplayText() {
|
|
416
490
|
return this.getValue();
|
|
417
491
|
}
|
|
418
|
-
setValue(
|
|
419
|
-
this.value =
|
|
492
|
+
setValue(t) {
|
|
493
|
+
this.value = t;
|
|
420
494
|
}
|
|
421
495
|
isEmpty() {
|
|
422
496
|
return !this.value;
|
|
423
497
|
}
|
|
424
498
|
}
|
|
425
|
-
|
|
426
|
-
|
|
499
|
+
class Or extends oe {
|
|
500
|
+
constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
|
|
501
|
+
super(r, n);
|
|
502
|
+
L(this, "editorType", "datetime-picker");
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
class Br extends fe {
|
|
506
|
+
constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n = {}) {
|
|
507
|
+
super(r, n);
|
|
508
|
+
// 这个属性会在后面进行比对
|
|
509
|
+
L(this, "editorType", "datetime-range");
|
|
510
|
+
L(this, "valueType", "datetime");
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
class Mr extends Se {
|
|
514
|
+
constructor(r = { value: "", valueList: [] }, n) {
|
|
515
|
+
super(r, n);
|
|
516
|
+
L(this, "editorType", "check-group");
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function Ie() {
|
|
520
|
+
function e(t, r, n) {
|
|
521
|
+
switch (t) {
|
|
522
|
+
case "check-box":
|
|
523
|
+
return new Tr(r, n);
|
|
524
|
+
case "combo-list":
|
|
525
|
+
return new Se(r, n);
|
|
526
|
+
case "combo-lookup":
|
|
527
|
+
return new kr(r, n);
|
|
528
|
+
case "input-group":
|
|
529
|
+
return new wr(r, n);
|
|
530
|
+
case "year-picker":
|
|
531
|
+
return new Pr(r, n);
|
|
532
|
+
case "date-picker":
|
|
533
|
+
return new oe(r, n);
|
|
534
|
+
case "datetime-range":
|
|
535
|
+
return new Br(r, n);
|
|
536
|
+
case "date-range":
|
|
537
|
+
return new fe(r, n);
|
|
538
|
+
case "datetime-picker":
|
|
539
|
+
return new Or(r, n);
|
|
540
|
+
case "lookup":
|
|
541
|
+
return new xr(r, n);
|
|
542
|
+
case "month-picker":
|
|
543
|
+
return new Vr(r, n);
|
|
544
|
+
case "month-range":
|
|
545
|
+
return new Sr(r, n);
|
|
546
|
+
case "number-range":
|
|
547
|
+
return new Er(r, n);
|
|
548
|
+
case "number-spinner":
|
|
549
|
+
return new Ir(r, n);
|
|
550
|
+
case "radio-group":
|
|
551
|
+
return new Lr(r, n);
|
|
552
|
+
case "check-group":
|
|
553
|
+
return new Mr(r, n);
|
|
554
|
+
default:
|
|
555
|
+
return new Ee(r, n);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return { createConditionValue: e };
|
|
559
|
+
}
|
|
560
|
+
function Le(e = "query-solution") {
|
|
561
|
+
function t(i) {
|
|
562
|
+
let u = "input-group";
|
|
563
|
+
switch (i) {
|
|
564
|
+
case "year-picker":
|
|
565
|
+
case "month-picker":
|
|
566
|
+
case "month-range":
|
|
567
|
+
case "date-range":
|
|
568
|
+
case "datetime-range":
|
|
569
|
+
case "datetime-picker":
|
|
570
|
+
u = "date-picker";
|
|
571
|
+
break;
|
|
572
|
+
default:
|
|
573
|
+
u = i;
|
|
574
|
+
}
|
|
575
|
+
return u;
|
|
576
|
+
}
|
|
577
|
+
function r(i) {
|
|
578
|
+
const u = i.editor ? i.editor.type : "input-group";
|
|
579
|
+
return i.editor.type = t(u), i.editor.type === "date-picker" ? (u.indexOf("range") > -1 && (i.editor.enablePeriod = !0), u.indexOf("datetime") > -1 && (i.editor.showTime = !0), u.indexOf("year") > -1 && (i.editor.selectMode = "year"), u.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0, i.editor.needValid = !0) : i.editor.type === "check-group" && e === "filter-bar" ? i.editor.direction = "vertical" : (i.editor.type === "lookup" || i.editor.type === "combo-list") && (i.editor.enableClear = Object.prototype.hasOwnProperty.call(i.editor, "enableClear") ? i.editor.enableClear : !0), u === "input-group" && !i.editor.placeholder && (i.editor.placeholder = ne.getLocaleValue("input-group.placeholder")), i.editor;
|
|
580
|
+
}
|
|
581
|
+
function n(i) {
|
|
582
|
+
return i.map((S) => Object.assign({}, S)).map((S) => (S.visible = Object.prototype.hasOwnProperty.call(S, "visible") ? S.visible : !0, S.editor = r(S), S));
|
|
583
|
+
}
|
|
584
|
+
function o(i, u, S, g) {
|
|
585
|
+
switch (i.value.editorType) {
|
|
586
|
+
case "combo-list":
|
|
587
|
+
g.newValue && (i.value.valueList = g.newValue.map((v) => ({ name: v.name, value: v.value })));
|
|
588
|
+
break;
|
|
589
|
+
case "radio-group":
|
|
590
|
+
i.value.valueList = [S.data.find((v) => v.value === u)];
|
|
591
|
+
break;
|
|
592
|
+
case "year-range":
|
|
593
|
+
case "month-range":
|
|
594
|
+
case "date-range":
|
|
595
|
+
case "datetime-range":
|
|
596
|
+
i.value.setValue(u);
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function p(i, u, S) {
|
|
601
|
+
var y, m, f, E, c, b;
|
|
602
|
+
const g = re((y = i.get(u.fieldCode)) == null ? void 0 : y.editor), v = (m = i.get(u.fieldCode)) == null ? void 0 : m.id, a = Object.prototype.hasOwnProperty.call(u, "visible") ? u.visible : (f = i.get(u.fieldCode)) == null ? void 0 : f.visible;
|
|
603
|
+
let s = !0;
|
|
604
|
+
if (((E = u.value) == null ? void 0 : E.editorType) === "lookup" && g) {
|
|
605
|
+
g.idValue = (c = u.value.mapFields) == null ? void 0 : c.map((j) => j.id).join(",");
|
|
606
|
+
const { onClear: x } = g;
|
|
607
|
+
g.onClear = (j) => {
|
|
608
|
+
u.value.mapFields = [], S(u, ""), x && x(j);
|
|
609
|
+
}, g["onUpdate:dataMapping"] = (j) => {
|
|
610
|
+
u.value.mapFields = j.items || [], S(u, u.value.getValue());
|
|
611
|
+
}, s = !1;
|
|
612
|
+
} else ((b = u.value) == null ? void 0 : b.editorType) === "number-range" && g ? (g.beginValue = u.value.begin, g.onBeginValueChange = (x) => {
|
|
613
|
+
u.value.begin = x, S(u, x);
|
|
614
|
+
}, g.endValue = u.value.end, g.onEndValueChange = (x) => {
|
|
615
|
+
u.value.end = x, S(u, x);
|
|
616
|
+
}, s = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((x) => {
|
|
617
|
+
var j;
|
|
618
|
+
return x === ((j = u.value) == null ? void 0 : j.editorType);
|
|
619
|
+
}) && (g.beginValue = u.value.begin, g.endValue = u.value.end);
|
|
620
|
+
return Object.prototype.hasOwnProperty.call(u, "disabled") && (g.disabled = u.disabled), { id: v, editor: g, visible: a, needEmitChange: s };
|
|
621
|
+
}
|
|
622
|
+
return { getSingleControlType: r, convertToControls: n, conditionChangeHandler: o, renderFieldConditionEditor: p };
|
|
623
|
+
}
|
|
624
|
+
function ge(e, t, r = "query-solution") {
|
|
625
|
+
const { convertToControls: n } = Le(r), o = M(e.fields), p = M([]), i = /* @__PURE__ */ new Map(), { createConditionValue: u } = Ie();
|
|
626
|
+
function S(v = !0) {
|
|
627
|
+
v && (o.value = n(o.value)), o.value.reduce((a, s) => (a.set(s.labelCode, s), a), i);
|
|
628
|
+
}
|
|
629
|
+
function g(v) {
|
|
630
|
+
return v.forEach((a) => {
|
|
631
|
+
if (a) {
|
|
632
|
+
const s = i.get(a.fieldCode);
|
|
633
|
+
s.controlType && (a.value = u(s.controlType, a.value, s.editor));
|
|
634
|
+
}
|
|
635
|
+
}), v;
|
|
636
|
+
}
|
|
637
|
+
return { convertToControls: n, fields: o, fieldMap: i, fieldConditions: p, loadFieldConfigs: S, initialConditionValue: g };
|
|
638
|
+
}
|
|
639
|
+
function Pe(e, t, r) {
|
|
640
|
+
const n = M(null), o = M(r), p = M(0);
|
|
641
|
+
function i(v, a) {
|
|
642
|
+
let s = null;
|
|
643
|
+
return function() {
|
|
644
|
+
const y = arguments;
|
|
645
|
+
s ? (clearTimeout(s), s = setTimeout(() => {
|
|
646
|
+
s = null, v(...y);
|
|
647
|
+
}, 200)) : (v(...y), s = setTimeout(() => {
|
|
648
|
+
s = null;
|
|
649
|
+
}, 200));
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
function u() {
|
|
653
|
+
o.value && (n.value = new ResizeObserver(i((v) => {
|
|
654
|
+
const a = v[0];
|
|
655
|
+
p.value = a.contentRect.width;
|
|
656
|
+
})), n.value.observe(o.value));
|
|
657
|
+
}
|
|
658
|
+
function S(v) {
|
|
659
|
+
let s = "col-12";
|
|
660
|
+
return v > 250 * 6 ? s = "col-2" : v > 250 * 4 ? s = "col-3" : v > 250 * 3 ? s = "col-4" : v > 250 * 2 && (s = "col-6"), s;
|
|
661
|
+
}
|
|
662
|
+
const g = W(() => S(p.value));
|
|
663
|
+
return _([r], ([v]) => {
|
|
664
|
+
o.value = v, u();
|
|
665
|
+
}), {
|
|
666
|
+
conditionClass: g,
|
|
667
|
+
resizeObserver: n
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
const be = /* @__PURE__ */ Q({
|
|
671
|
+
name: "FConditionFields",
|
|
672
|
+
props: me,
|
|
673
|
+
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
674
|
+
setup(e, t) {
|
|
675
|
+
const r = M(), n = ne.getLocale(), o = M(e.key), p = M(e.conditions), {
|
|
676
|
+
renderFieldConditionEditor: i,
|
|
677
|
+
conditionChangeHandler: u
|
|
678
|
+
} = Le(), S = ge(e), {
|
|
679
|
+
initialConditionValue: g,
|
|
680
|
+
fieldMap: v,
|
|
681
|
+
loadFieldConfigs: a
|
|
682
|
+
} = S, s = Pe(e, t, r), {
|
|
683
|
+
resizeObserver: y
|
|
684
|
+
} = s;
|
|
685
|
+
a(!0), g(p.value), Te(() => {
|
|
686
|
+
var c;
|
|
687
|
+
(c = y.value) == null || c.unobserve(r.value);
|
|
688
|
+
}), _(() => e.fields, () => {
|
|
689
|
+
a(!0);
|
|
690
|
+
}), _(() => e.conditions, () => {
|
|
691
|
+
p.value = e.conditions, g(p.value);
|
|
692
|
+
});
|
|
693
|
+
const m = W(() => ({
|
|
694
|
+
// row: true,
|
|
695
|
+
"f-utils-flex-row-wrap": !0,
|
|
696
|
+
"farris-form": !0,
|
|
697
|
+
"condition-div": !0,
|
|
698
|
+
"farris-form-controls-inline": !n || e.isControlInline === !0 || e.isControlInline === "auto" && n !== "en"
|
|
699
|
+
}));
|
|
700
|
+
function f(c, b, x, j) {
|
|
701
|
+
u(c, b, x, j), t.emit("valueChange", b, c);
|
|
702
|
+
}
|
|
703
|
+
function E() {
|
|
704
|
+
return p.value.map((c) => {
|
|
705
|
+
var U;
|
|
706
|
+
const {
|
|
707
|
+
id: b,
|
|
708
|
+
editor: x,
|
|
709
|
+
needEmitChange: j,
|
|
710
|
+
visible: $
|
|
711
|
+
} = i(v, c, f);
|
|
712
|
+
let G = ((U = x == null ? void 0 : x.appearance) == null ? void 0 : U.class) || e.itemClass;
|
|
713
|
+
return x != null && x.multiLineLabel && (G = G + " farris-group-multi-label"), B(Re, {
|
|
714
|
+
id: b,
|
|
715
|
+
key: b,
|
|
716
|
+
visible: $,
|
|
717
|
+
customClass: G,
|
|
718
|
+
label: (x == null ? void 0 : x.showLabel) === !1 ? " " : c.fieldName,
|
|
719
|
+
editor: x,
|
|
720
|
+
required: x == null ? void 0 : x.required,
|
|
721
|
+
modelValue: c.value.value,
|
|
722
|
+
"onUpdate:modelValue": (R) => c.value.value = R,
|
|
723
|
+
onChange: (R, l) => {
|
|
724
|
+
j && f(c, R, x, l);
|
|
725
|
+
}
|
|
726
|
+
}, null);
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
return () => ce(B("div", {
|
|
730
|
+
class: m.value,
|
|
731
|
+
key: o.value,
|
|
732
|
+
ref: r
|
|
733
|
+
}, [E()]), [[de("area-response")]]);
|
|
734
|
+
}
|
|
735
|
+
}), Nr = {
|
|
736
|
+
customClass: { type: String, default: "" },
|
|
737
|
+
customStyle: { type: String, defaut: "" },
|
|
738
|
+
/** 控制是否可见 */
|
|
739
|
+
visible: { type: Boolean, default: !0 },
|
|
740
|
+
/** 内部控件布局是否响应国际化 */
|
|
741
|
+
adaptForLanguage: { type: Boolean, default: !0 }
|
|
742
|
+
}, ie = /* @__PURE__ */ Q({
|
|
743
|
+
name: "FResponseForm",
|
|
744
|
+
props: Nr,
|
|
745
|
+
emits: [],
|
|
746
|
+
setup(e, t) {
|
|
747
|
+
const r = M(), n = W(() => {
|
|
748
|
+
const o = ne.getLocale(), p = e.customClass.split(" "), i = {
|
|
749
|
+
"drag-container": !0
|
|
750
|
+
};
|
|
751
|
+
return p.reduce((u, S) => (u[S] = !0, u), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
|
|
752
|
+
});
|
|
753
|
+
return () => e.visible && ce(B("div", {
|
|
754
|
+
ref: r,
|
|
755
|
+
class: n.value,
|
|
756
|
+
style: e.customStyle
|
|
757
|
+
}, [t.slots.default && t.slots.default()]), [[de("area-response")]]);
|
|
758
|
+
}
|
|
759
|
+
}), Oe = {
|
|
760
|
+
id: { type: String, default: "" },
|
|
761
|
+
customClass: { type: String, default: "" },
|
|
762
|
+
customStyle: { type: String, default: "" },
|
|
763
|
+
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
764
|
+
editor: { type: Object, default: {} },
|
|
765
|
+
label: { type: String, default: "" },
|
|
766
|
+
/** value is uncertain because type is uncertain, default value should not be set */
|
|
767
|
+
modelValue: { type: [String, Boolean, Array, Number] },
|
|
768
|
+
// readonly: { type: Boolean, default: false },
|
|
769
|
+
visible: { type: Boolean, default: !0 },
|
|
770
|
+
required: { type: Boolean, default: !1 },
|
|
771
|
+
showLabel: { type: Boolean, default: !0 },
|
|
772
|
+
/**
|
|
773
|
+
* visible相当于showLabel为true,none相当于showLabel为false
|
|
774
|
+
*/
|
|
775
|
+
showLabelType: { type: String, default: "visible" },
|
|
776
|
+
type: { type: String, default: "input-group" },
|
|
777
|
+
componentId: { type: String, default: "" },
|
|
778
|
+
errors: { type: Object, default: null },
|
|
779
|
+
fill: { type: Boolean, default: !1 }
|
|
780
|
+
}, jr = {
|
|
781
|
+
id: { type: String },
|
|
782
|
+
required: { type: Boolean, default: !1 },
|
|
783
|
+
text: { type: String, default: "" },
|
|
784
|
+
title: { type: String },
|
|
785
|
+
valid: { type: Boolean, default: !0 },
|
|
786
|
+
inValidTip: { type: String, default: "" },
|
|
787
|
+
/**
|
|
788
|
+
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
789
|
+
*/
|
|
790
|
+
showType: { type: String, default: "visible" }
|
|
791
|
+
}, Gr = /* @__PURE__ */ Q({
|
|
792
|
+
name: "FDynamicFormLabel",
|
|
793
|
+
props: jr,
|
|
794
|
+
emits: [],
|
|
795
|
+
setup(e, t) {
|
|
796
|
+
M(e.title || e.text);
|
|
797
|
+
const r = M(e.required), n = M(e.text), o = M(e.valid), p = M(e.inValidTip);
|
|
798
|
+
_(() => e.text, () => {
|
|
799
|
+
n.value = e.text;
|
|
800
|
+
}), _(() => e.required, (v, a) => {
|
|
801
|
+
v !== a && (r.value = v);
|
|
802
|
+
}), _([() => e.valid, () => e.inValidTip], ([v, a]) => {
|
|
803
|
+
o.value = v, p.value = a;
|
|
804
|
+
});
|
|
805
|
+
const i = W(() => o.value ? n.value : p.value), u = W(() => o.value ? "" : "color:red"), S = W(() => ({
|
|
806
|
+
"col-form-label": !0,
|
|
807
|
+
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
808
|
+
"f-width-auto": r.value && (e.showType === "none" || !n.value)
|
|
809
|
+
})), g = W(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || r.value || !!n.value && e.showType !== "none");
|
|
810
|
+
return () => g.value && B("label", {
|
|
811
|
+
class: S.value,
|
|
812
|
+
title: i.value,
|
|
813
|
+
style: u.value
|
|
814
|
+
}, [!o.value && B("span", {
|
|
815
|
+
class: "f-icon f-icon-warning mr-1",
|
|
816
|
+
style: "color: red; min-width: 16px;",
|
|
817
|
+
title: p.value
|
|
818
|
+
}, null), B("span", {
|
|
819
|
+
class: "farris-label-text"
|
|
820
|
+
}, [r.value && B("span", {
|
|
821
|
+
class: "farris-label-info text-danger"
|
|
822
|
+
}, [$e("*")]), e.showType === "visible" && n.value])]);
|
|
823
|
+
}
|
|
824
|
+
}), { globalStorageKey: qr } = xe(), F = {}, C = {}, T = {}, w = {};
|
|
825
|
+
async function Ar() {
|
|
826
|
+
{
|
|
827
|
+
const e = {
|
|
828
|
+
schemaMap: yr,
|
|
829
|
+
propertyConfigSchemaMap: hr,
|
|
830
|
+
propertyEffectMap: vr,
|
|
831
|
+
schemaResolverMap: gr
|
|
832
|
+
};
|
|
833
|
+
Ye.register(F, C, T, w), Xe.register(F, C, T, w), He.register(F, C, T, w), De.register(F, C, T, w), Ke.register(F, C, T, w, e), et.register(F, C, T, w), he.register(F, C, T, w, e), ye.register(F, C, T, w, e), he.register(F, C, T, w, e), ye.register(F, C, T, w, e), le.register(F, C, T, w, e), tt.register(F, C, T, w), rt.register(F, C, T, w), ot.register(F, C, T, w, e), nt.register(F, C, T, w), it.register(F, C, T, w, e), at.register(F, C, T, w, e), lt.register(F, C, T, w), st.register(F, C, T, w, e), ut.register(F, C, T, w), ar.register(F, C, T, w), ct.register(F, C, T, w), dt.register(F, C, T, w), Kt.register(F, C, T, w), mt.register(F, C, T, w), ft.register(F, C, T, w, e), gt.register(F, C, T, w, e), ht.register(F, C, T, w, e), vt.register(F, C, T, w), yt.register(F, C, T, w, e), bt.register(F, C, T, w), Ft.register(F, C, T, w), Ct.register(F, C, T, w), Tt.register(F, C, T, w, e), kt.register(F, C, T, w), wt.register(F, C, T, w, e), xt.register(F, C, T, w), Vt.register(F, C, T, w), St.register(F, C, T, w), Et.register(F, C, T, w, e), It.register(F, C, T, w, e), Lt.register(F, C, T, w), Ot.register(F, C, T, w, e), Bt.register(F, C, T, w), Pt.register(F, C, T, w), Yt.register(F, C, T), Mt.register(F, C, T, w), Nt.register(F, C, T, w, e), jt.register(F, C, T, w), Gt.register(F, C, T, w), qt.register(F, C, T, w), At.register(F, C, T, w, e), tr.register(F, C, T, w), $t.register(F, C, T, w, e), Rt.register(F, C, T, w), zt.register(F, C, T, w), Ut.register(F, C, T, w, e), Wt.register(F, C, T, w), Zt.register(F, C, T, w), _t.register(F, C, T, w), Jt.register(F, C, T, w), Qt.register(F, C, T, w), Xt.register(F, C, T, w, e), Ht.register(F, C, T, w), pt.register(F, C, T, w), Dt.register(F, C, T, w), er.register(F, C, T, w, e), rr.register(F, C, T, w), nr.register(F, C, T, w), or.register(F, C, T, w), ir.register(F, C, T, w), lr.register(F, C, T, w), sr.register(F, C, T, w, e), ur.register(F, C, T, w), cr.register(F, C, T, w), dr.register(F, C, T, w), pr.register(F, C, T, w, e), mr.register(F, C, T, w, e), fr.register(F, C, T, w);
|
|
834
|
+
const t = window[qr];
|
|
835
|
+
if (t)
|
|
836
|
+
for (const r in t)
|
|
837
|
+
t[r].createPropsResolver = br, t[r].register(F, C, T);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
function $r() {
|
|
841
|
+
Ar();
|
|
842
|
+
function e(i) {
|
|
843
|
+
const u = F[i];
|
|
844
|
+
if (!u)
|
|
845
|
+
throw new Error(`Could not find the editor of type '${i}'`);
|
|
846
|
+
return u;
|
|
847
|
+
}
|
|
848
|
+
function t(i, u) {
|
|
849
|
+
const S = C[i];
|
|
850
|
+
return S ? S(u) : {};
|
|
851
|
+
}
|
|
852
|
+
function r(i) {
|
|
853
|
+
switch (i) {
|
|
854
|
+
case "check-box":
|
|
855
|
+
return "onChangeValue";
|
|
856
|
+
case "switch":
|
|
857
|
+
return "onModelValueChanged";
|
|
858
|
+
case "check-group":
|
|
859
|
+
return "onChangeValue";
|
|
860
|
+
case "combo-list":
|
|
861
|
+
case "combo-tree":
|
|
862
|
+
return "onChange";
|
|
863
|
+
case "combo-lookup":
|
|
864
|
+
return "";
|
|
865
|
+
case "year-range":
|
|
866
|
+
case "year-picker":
|
|
867
|
+
case "month-range":
|
|
868
|
+
case "month-picker":
|
|
869
|
+
case "date-range":
|
|
870
|
+
case "datetime-range":
|
|
871
|
+
case "datetime-picker":
|
|
872
|
+
return "onDatePicked";
|
|
873
|
+
case "date-picker":
|
|
874
|
+
return "onUpdate:modelValue";
|
|
875
|
+
case "time-picker":
|
|
876
|
+
return "onValueChange";
|
|
877
|
+
case "input-group":
|
|
878
|
+
return "onChange";
|
|
879
|
+
case "lookup":
|
|
880
|
+
case "sort-condition-editor":
|
|
881
|
+
case "filter-condition-editor":
|
|
882
|
+
case "code-editor":
|
|
883
|
+
case "language-textbox":
|
|
884
|
+
case "rich-text-editor":
|
|
885
|
+
return "onUpdate:modelValue";
|
|
886
|
+
case "number-range":
|
|
887
|
+
return "onValueChange";
|
|
888
|
+
case "number-spinner":
|
|
889
|
+
return "onValueChange";
|
|
890
|
+
case "radio-group":
|
|
891
|
+
return "onChangeValue";
|
|
892
|
+
case "text":
|
|
893
|
+
return "";
|
|
894
|
+
case "events-editor":
|
|
895
|
+
return "onSavedCommandListChanged";
|
|
896
|
+
case "grid-field-editor":
|
|
897
|
+
case "item-collection-editor":
|
|
898
|
+
case "response-form-layout-setting":
|
|
899
|
+
case "response-layout-editor-setting":
|
|
900
|
+
case "response-layout-splitter":
|
|
901
|
+
case "menu-lookup":
|
|
902
|
+
case "json-editor":
|
|
903
|
+
return "onChange";
|
|
904
|
+
case "field-selector":
|
|
905
|
+
case "binding-selector":
|
|
906
|
+
return "onFieldSelected";
|
|
907
|
+
case "schema-selector":
|
|
908
|
+
return "onSchemaSelected";
|
|
909
|
+
case "mapping-editor":
|
|
910
|
+
return "onMappingFieldsChanged";
|
|
911
|
+
case "textarea":
|
|
912
|
+
return "onChange";
|
|
913
|
+
case "query-solution-config":
|
|
914
|
+
case "solution-preset":
|
|
915
|
+
case "filter-bar-config":
|
|
916
|
+
return "onFieldsChanged";
|
|
917
|
+
case "property-editor":
|
|
918
|
+
return "onValueChange";
|
|
919
|
+
case "expression-editor":
|
|
920
|
+
return "onExpressionChanged";
|
|
921
|
+
case "collection-property-editor":
|
|
922
|
+
return "onValueChange";
|
|
923
|
+
default:
|
|
924
|
+
return "onUpdate:modelValue";
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function n(i) {
|
|
928
|
+
switch (i) {
|
|
929
|
+
case "combo-list":
|
|
930
|
+
case "input-group":
|
|
931
|
+
case "textarea":
|
|
932
|
+
return "onClear";
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
function o(i) {
|
|
936
|
+
switch (i) {
|
|
937
|
+
case "input-group":
|
|
938
|
+
case "textarea":
|
|
939
|
+
return "onMousedownEvent";
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
function p(i) {
|
|
943
|
+
switch (i) {
|
|
944
|
+
case "input-group":
|
|
945
|
+
case "textarea":
|
|
946
|
+
return "onMouseupEvent";
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: r, getClearFunctionName: n, getMousedownFunctionName: o, getMouseupFunctionName: p };
|
|
950
|
+
}
|
|
951
|
+
const Rr = {
|
|
952
|
+
/**
|
|
953
|
+
* 显示的错误信息
|
|
954
|
+
*/
|
|
955
|
+
errors: {
|
|
956
|
+
type: Object,
|
|
957
|
+
default: null
|
|
958
|
+
}
|
|
959
|
+
}, zr = /* @__PURE__ */ Q({
|
|
960
|
+
name: "FValidationMessage",
|
|
961
|
+
props: Rr,
|
|
962
|
+
emits: [],
|
|
963
|
+
setup(e, t) {
|
|
964
|
+
const r = M(e.errors);
|
|
965
|
+
_(() => e.errors, (p) => {
|
|
966
|
+
r.value = p;
|
|
967
|
+
});
|
|
968
|
+
const n = M(!0), o = W(() => {
|
|
969
|
+
if (r.value) {
|
|
970
|
+
const p = Object.keys(r.value).map((i) => {
|
|
971
|
+
var u;
|
|
972
|
+
return (u = r.value[i]) == null ? void 0 : u.name;
|
|
973
|
+
});
|
|
974
|
+
return p.length ? p.join(" ") : "";
|
|
975
|
+
}
|
|
976
|
+
return "";
|
|
977
|
+
});
|
|
978
|
+
return () => o.value && B("div", {
|
|
979
|
+
class: "farris-feedback f-state-invalid",
|
|
980
|
+
onClick: () => n.value = !n.value
|
|
981
|
+
}, [!n.value && B("span", {
|
|
982
|
+
class: "f-icon f-icon-message_warning f-feedback-icon"
|
|
983
|
+
}, null), n.value && B("span", {
|
|
984
|
+
class: "f-feedback-message"
|
|
985
|
+
}, [o.value])]);
|
|
986
|
+
}
|
|
987
|
+
}), se = /* @__PURE__ */ Q({
|
|
988
|
+
name: "FDynamicFormGroup",
|
|
989
|
+
props: Oe,
|
|
990
|
+
emits: ["change", "update:modelValue"],
|
|
991
|
+
setup(e, t) {
|
|
992
|
+
var O;
|
|
993
|
+
const r = M(e.id), n = M(e.customClass), o = M(e.editor), p = M(e.label), i = M(e.modelValue), u = M(e.readonly), S = M(((O = e.editor) == null ? void 0 : O.required) || e.required), g = M(e.showLabel), v = M(e.visible);
|
|
994
|
+
M(e.type);
|
|
995
|
+
const a = M(), s = M(e.errors), y = Je(), m = M(e.editor.type || "input-group"), f = W(() => g.value ? e.showLabelType : "none"), {
|
|
996
|
+
resolveEditorProps: E,
|
|
997
|
+
resolveEditorType: c,
|
|
998
|
+
getChangeFunctionName: b,
|
|
999
|
+
getClearFunctionName: x
|
|
1000
|
+
} = $r(), j = W(() => {
|
|
1001
|
+
const k = {
|
|
1002
|
+
"form-group": !0,
|
|
1003
|
+
"farris-form-group": !0,
|
|
1004
|
+
"common-group": !0,
|
|
1005
|
+
"q-state-readonly": u.value,
|
|
1006
|
+
"form-group--in-mobile": y
|
|
1007
|
+
};
|
|
1008
|
+
return k["form-group--has-" + m.value] = !0, k;
|
|
1009
|
+
}), $ = W(() => {
|
|
1010
|
+
if (e.fill)
|
|
1011
|
+
return {
|
|
1012
|
+
maxWidth: "none"
|
|
1013
|
+
};
|
|
1014
|
+
});
|
|
1015
|
+
function G(k, P, I) {
|
|
1016
|
+
i.value = P !== void 0 ? P : k, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
|
|
1017
|
+
newValue: k,
|
|
1018
|
+
newModelValue: P,
|
|
1019
|
+
parameters: I
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
function U() {
|
|
1023
|
+
t.emit("update:modelValue", "");
|
|
1024
|
+
}
|
|
1025
|
+
function R(k) {
|
|
1026
|
+
return (...P) => {
|
|
1027
|
+
U(), typeof k == "function" && k(...P);
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
function l(k) {
|
|
1031
|
+
return (P, I, A) => {
|
|
1032
|
+
G(P, I, A), typeof k == "function" && k(P, I, A);
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
const d = W(() => {
|
|
1036
|
+
const k = o.value.type || "input-group", P = c(k), I = E(k, o.value), A = b(k), q = x(o.value.type);
|
|
1037
|
+
return q && (I[q] = R(I[q])), A && (I[A] = l(I[A])), (I.id == null || I.id === "") && (I.id = r.value), k === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (I.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (I.onEndValueChange = o.value.onEndValueChange)) : k === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (I["onUpdate:idValue"] = o.value["onUpdate:idValue"], I.id = r.value) : k === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? I.onSelectionChange = o.value.onSelectionChange : k === "property-editor" && (I.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => B(P, pe({
|
|
1038
|
+
ref: a
|
|
1039
|
+
}, I, {
|
|
1040
|
+
modelValue: i.value,
|
|
1041
|
+
"onUpdate:modelValue": (Z) => i.value = Z
|
|
1042
|
+
}), t.slots);
|
|
1043
|
+
});
|
|
1044
|
+
function V() {
|
|
1045
|
+
return B(zr, {
|
|
1046
|
+
id: `${r.value}-validation-message`,
|
|
1047
|
+
errors: s.value
|
|
1048
|
+
}, null);
|
|
1049
|
+
}
|
|
1050
|
+
return _([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([k, P, I, A, q, Z, J, H, K, ee]) => {
|
|
1051
|
+
var N;
|
|
1052
|
+
r.value = k, n.value = P, o.value = I, p.value = A, i.value = q, u.value = Z, S.value = ((N = o.value) == null ? void 0 : N.required) || J, g.value = H, v.value = K, s.value = ee;
|
|
1053
|
+
}), t.expose({
|
|
1054
|
+
editorRef: a
|
|
1055
|
+
}), () => v.value && B("div", {
|
|
1056
|
+
id: `${r.value}-form-group`,
|
|
1057
|
+
class: n.value,
|
|
1058
|
+
style: e.customStyle
|
|
1059
|
+
}, [B("div", {
|
|
1060
|
+
class: "farris-group-wrap",
|
|
1061
|
+
style: $.value
|
|
1062
|
+
}, [B("div", {
|
|
1063
|
+
class: j.value
|
|
1064
|
+
}, [B(Gr, {
|
|
1065
|
+
id: `${r.value}-lable`,
|
|
1066
|
+
showType: f.value,
|
|
1067
|
+
required: S.value,
|
|
1068
|
+
text: p.value,
|
|
1069
|
+
title: p.value
|
|
1070
|
+
}, null), B("div", {
|
|
1071
|
+
class: "farris-input-wrap"
|
|
1072
|
+
}, [d.value(), V()])])])]);
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
ie.install = (e) => {
|
|
1076
|
+
e.component(ie.name, ie).component(se.name, se);
|
|
1077
|
+
};
|
|
1078
|
+
var Ur = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(Ur || {}), Be = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(Be || {});
|
|
1079
|
+
function Wr() {
|
|
1080
|
+
const { getLocaleValue: e } = ne;
|
|
1081
|
+
return { conditionListLocale: {
|
|
1082
|
+
// 添加条件
|
|
1083
|
+
add: e("condition.add"),
|
|
1084
|
+
// 生成条件组
|
|
1085
|
+
create: e("condition.create"),
|
|
1086
|
+
// 重置
|
|
1087
|
+
reset: e("condition.reset"),
|
|
1088
|
+
and: e("condition.and"),
|
|
1089
|
+
or: e("condition.or")
|
|
1090
|
+
} };
|
|
1091
|
+
}
|
|
1092
|
+
function Zr() {
|
|
1093
|
+
const { getLocaleValue: e } = ne;
|
|
427
1094
|
return { operatorsLocale: {
|
|
428
|
-
equal:
|
|
429
|
-
notEqual:
|
|
430
|
-
greater:
|
|
431
|
-
greaterOrEqual:
|
|
432
|
-
lessOrEqual:
|
|
433
|
-
less:
|
|
434
|
-
contains:
|
|
435
|
-
startWith:
|
|
436
|
-
endWith:
|
|
1095
|
+
equal: e("operators.equal"),
|
|
1096
|
+
notEqual: e("operators.notEqual"),
|
|
1097
|
+
greater: e("operators.greater"),
|
|
1098
|
+
greaterOrEqual: e("operators.greaterOrEqual"),
|
|
1099
|
+
lessOrEqual: e("operators.lessOrEqual"),
|
|
1100
|
+
less: e("operators.less"),
|
|
1101
|
+
contains: e("operators.contains"),
|
|
1102
|
+
startWith: e("operators.startWith"),
|
|
1103
|
+
endWith: e("operators.endWith")
|
|
437
1104
|
} };
|
|
438
1105
|
}
|
|
439
|
-
var
|
|
440
|
-
function
|
|
441
|
-
const { operatorsLocale:
|
|
1106
|
+
var Me = /* @__PURE__ */ ((e) => (e.Equal = "0", e.NotEqual = "1", e.Greater = "2", e.GreaterOrEqual = "3", e.Less = "4", e.LessOrEqual = "5", e.Like = "6", e.LikeStartWith = "7", e.LikeEndWith = "8", e.In = "9", e.NotIn = "10", e))(Me || {});
|
|
1107
|
+
function Jr() {
|
|
1108
|
+
const { operatorsLocale: e } = Zr();
|
|
442
1109
|
return [
|
|
443
1110
|
{
|
|
444
1111
|
value: "0",
|
|
445
|
-
name:
|
|
1112
|
+
name: e.equal
|
|
446
1113
|
// 等于
|
|
447
1114
|
},
|
|
448
1115
|
{
|
|
449
1116
|
value: "1",
|
|
450
|
-
name:
|
|
1117
|
+
name: e.equal
|
|
451
1118
|
// 不等于
|
|
452
1119
|
},
|
|
453
1120
|
{
|
|
454
1121
|
value: "2",
|
|
455
|
-
name:
|
|
1122
|
+
name: e.equal
|
|
456
1123
|
// 大于
|
|
457
1124
|
},
|
|
458
1125
|
{
|
|
459
1126
|
value: "3",
|
|
460
|
-
name:
|
|
1127
|
+
name: e.equal
|
|
461
1128
|
// 大于等于
|
|
462
1129
|
},
|
|
463
1130
|
{
|
|
464
1131
|
value: "4",
|
|
465
|
-
name:
|
|
1132
|
+
name: e.less
|
|
466
1133
|
// 小于
|
|
467
1134
|
},
|
|
468
1135
|
{
|
|
469
1136
|
value: "5",
|
|
470
|
-
name:
|
|
1137
|
+
name: e.lessOrEqual
|
|
471
1138
|
// 小于等于
|
|
472
1139
|
},
|
|
473
1140
|
{
|
|
474
1141
|
value: "6",
|
|
475
|
-
name:
|
|
1142
|
+
name: e.contains
|
|
476
1143
|
// 包含
|
|
477
1144
|
},
|
|
478
1145
|
{
|
|
479
1146
|
value: "7",
|
|
480
|
-
name:
|
|
1147
|
+
name: e.startWith
|
|
481
1148
|
// 开始是
|
|
482
1149
|
},
|
|
483
1150
|
{
|
|
484
1151
|
value: "8",
|
|
485
|
-
name:
|
|
1152
|
+
name: e.endWith
|
|
486
1153
|
// 结束是
|
|
487
1154
|
}
|
|
488
1155
|
];
|
|
489
1156
|
}
|
|
490
|
-
const
|
|
1157
|
+
const _r = {
|
|
491
1158
|
"button-edit": ["0", "1", " 6", "7", "8"],
|
|
492
1159
|
"check-box": ["0"],
|
|
493
1160
|
"combo-list": ["0", "1"],
|
|
@@ -507,329 +1174,1652 @@ const he = {
|
|
|
507
1174
|
"radio-group": ["0"],
|
|
508
1175
|
text: ["0", "1", " 6", "7", "8"]
|
|
509
1176
|
};
|
|
510
|
-
function
|
|
511
|
-
const { fieldMap:
|
|
512
|
-
function
|
|
513
|
-
const
|
|
514
|
-
if (!
|
|
1177
|
+
function Qr(e, t, r) {
|
|
1178
|
+
const { fieldMap: n } = r;
|
|
1179
|
+
function o(p) {
|
|
1180
|
+
const i = n.get(p.fieldCode);
|
|
1181
|
+
if (!i)
|
|
515
1182
|
return [];
|
|
516
|
-
const
|
|
517
|
-
return
|
|
1183
|
+
const u = i.editor.type, S = new Set(_r[u]);
|
|
1184
|
+
return Jr().filter((v) => S.has(v.value));
|
|
518
1185
|
}
|
|
519
|
-
return { getCompareOperators:
|
|
1186
|
+
return { getCompareOperators: o };
|
|
520
1187
|
}
|
|
521
|
-
function
|
|
522
|
-
const
|
|
523
|
-
let
|
|
524
|
-
function
|
|
1188
|
+
function Xr() {
|
|
1189
|
+
const e = M({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
1190
|
+
let n = 0;
|
|
1191
|
+
function o() {
|
|
525
1192
|
return {
|
|
526
1193
|
id: "",
|
|
527
1194
|
fieldCode: "",
|
|
528
1195
|
fieldName: "",
|
|
529
|
-
compareType:
|
|
530
|
-
valueType:
|
|
531
|
-
value: new
|
|
1196
|
+
compareType: Me.Equal,
|
|
1197
|
+
valueType: Be.Value,
|
|
1198
|
+
value: new Ee(),
|
|
532
1199
|
relation: 0,
|
|
533
1200
|
conditionId: Date.now()
|
|
534
1201
|
};
|
|
535
1202
|
}
|
|
536
|
-
function
|
|
537
|
-
return { relation:
|
|
538
|
-
}
|
|
539
|
-
function
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}),
|
|
544
|
-
|
|
545
|
-
}),
|
|
546
|
-
}
|
|
547
|
-
function
|
|
548
|
-
const
|
|
549
|
-
let
|
|
550
|
-
return
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
1203
|
+
function p(l, d) {
|
|
1204
|
+
return { relation: l, items: [], children: [], path: [], groupId: ++n, level: d };
|
|
1205
|
+
}
|
|
1206
|
+
function i() {
|
|
1207
|
+
const l = Object.assign({}, e.value);
|
|
1208
|
+
r.forEach((d, V) => {
|
|
1209
|
+
d.groupId === l.groupId && r.set(V, l);
|
|
1210
|
+
}), t.forEach((d, V) => {
|
|
1211
|
+
d.groupId === l.groupId && t.set(V, l);
|
|
1212
|
+
}), e.value = l;
|
|
1213
|
+
}
|
|
1214
|
+
function u(l) {
|
|
1215
|
+
const d = /* @__PURE__ */ new Map();
|
|
1216
|
+
let V = 0;
|
|
1217
|
+
return l.forEach((O, k) => {
|
|
1218
|
+
var P, I;
|
|
1219
|
+
if (V += ((P = O.lBracket) == null ? void 0 : P.length) || 0, d.set(k, V), V -= ((I = O.rBracket) == null ? void 0 : I.length) || 0, V < 0)
|
|
553
1220
|
throw new Error("The right bracket is out of range.");
|
|
554
|
-
}),
|
|
1221
|
+
}), d;
|
|
555
1222
|
}
|
|
556
|
-
function
|
|
557
|
-
for (let
|
|
558
|
-
const
|
|
559
|
-
|
|
1223
|
+
function S(l, d, V, O, k) {
|
|
1224
|
+
for (let P = 0; P < d; P++) {
|
|
1225
|
+
const I = l + (P + 1), A = p(k, I);
|
|
1226
|
+
V.children.push(A), r.set(A.groupId, V), V = V.children[V.children.length - 1], O.push(V);
|
|
560
1227
|
}
|
|
561
|
-
return
|
|
1228
|
+
return V;
|
|
562
1229
|
}
|
|
563
|
-
function g(
|
|
564
|
-
for (let
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
if (!
|
|
1230
|
+
function g(l, d, V, O, k) {
|
|
1231
|
+
for (let q = d; q <= 0; q++)
|
|
1232
|
+
O.pop();
|
|
1233
|
+
const P = O[O.length - 1];
|
|
1234
|
+
if (!P)
|
|
568
1235
|
throw new Error("The group path is out of range");
|
|
569
|
-
const
|
|
570
|
-
return
|
|
1236
|
+
const I = l + d, A = p(k, I);
|
|
1237
|
+
return P.children.push(A), r.set(A.groupId, P), V = P.children[P.children.length - 1], O.push(V), V;
|
|
571
1238
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
return
|
|
1239
|
+
function v(l, d, V, O) {
|
|
1240
|
+
V.pop();
|
|
1241
|
+
const k = V[V.length - 1], P = p(O, l);
|
|
1242
|
+
return k.children.push(P), r.set(P.groupId, k), d = k.children[k.children.length - 1], V.push(d), d;
|
|
576
1243
|
}
|
|
577
|
-
function
|
|
578
|
-
let
|
|
579
|
-
if (!
|
|
1244
|
+
function a(l, d, V, O, k, P) {
|
|
1245
|
+
let I = l[l.length - 1];
|
|
1246
|
+
if (!I)
|
|
580
1247
|
throw new Error("The group path is out of range");
|
|
581
|
-
const
|
|
582
|
-
if (
|
|
583
|
-
return
|
|
584
|
-
const
|
|
585
|
-
return
|
|
586
|
-
}
|
|
587
|
-
function
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
}),
|
|
593
|
-
}
|
|
594
|
-
function
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
function
|
|
599
|
-
if (!
|
|
1248
|
+
const A = d.get(O) || 0, q = d.get(V) || 0;
|
|
1249
|
+
if (V < 0 || V === O)
|
|
1250
|
+
return l[l.length - 1];
|
|
1251
|
+
const Z = A - q, J = k && k.relation !== void 0 ? k.relation : 1;
|
|
1252
|
+
return I = Z > 0 ? S(q, Z, I, l, J) : I, I = Z < 0 ? g(q, Z, I, l, J) : I, I = Z === 0 && q > 0 && A > 0 && k && P && !!k.rBracket && !!P.lBracket ? v(q, I, l, J) : I, I;
|
|
1253
|
+
}
|
|
1254
|
+
function s(l) {
|
|
1255
|
+
const V = { relation: l.length && l[0].relation !== void 0 ? l[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, O = [V], k = u(l);
|
|
1256
|
+
return l.forEach((P, I) => {
|
|
1257
|
+
const A = I - 1, q = l[A], Z = a(O, k, A, I, q, P);
|
|
1258
|
+
Z.items.push(P), t.set(P.conditionId, Z);
|
|
1259
|
+
}), e.value = V, V;
|
|
1260
|
+
}
|
|
1261
|
+
function y() {
|
|
1262
|
+
const l = o();
|
|
1263
|
+
t.set(l.conditionId, e.value), e.value.items.push(l);
|
|
1264
|
+
}
|
|
1265
|
+
function m(l) {
|
|
1266
|
+
if (!l)
|
|
600
1267
|
return;
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
function
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
611
|
-
const
|
|
612
|
-
|
|
1268
|
+
const d = t.get(l.conditionId);
|
|
1269
|
+
if (d) {
|
|
1270
|
+
const V = d.items.findIndex((k) => k.conditionId === l.conditionId) + 1, O = o();
|
|
1271
|
+
t.set(O.conditionId, d), d.items.splice(V, 0, O), i();
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
function f(l, d, V, O) {
|
|
1275
|
+
l.reduce((k, P) => {
|
|
1276
|
+
const I = P.conditionId !== void 0, A = P.groupId !== void 0;
|
|
1277
|
+
if (I) {
|
|
1278
|
+
const q = P;
|
|
1279
|
+
V.push(q), k.items.set(q.conditionId, q);
|
|
613
1280
|
}
|
|
614
|
-
if (
|
|
615
|
-
const
|
|
616
|
-
|
|
1281
|
+
if (A) {
|
|
1282
|
+
const q = P;
|
|
1283
|
+
O.push(q), k.groups.set(q.groupId, q);
|
|
617
1284
|
}
|
|
618
|
-
return
|
|
619
|
-
},
|
|
1285
|
+
return k;
|
|
1286
|
+
}, d);
|
|
620
1287
|
}
|
|
621
|
-
function E(
|
|
622
|
-
|
|
1288
|
+
function E(l, d, V, O, k) {
|
|
1289
|
+
l && (l.items = d.length ? l.items.filter((P) => !V.has(P.conditionId)) : l.items, l.children = O.length ? l.children.filter((P) => !k.has(P.groupId)) : l.children);
|
|
623
1290
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}),
|
|
628
|
-
|
|
1291
|
+
function c(l, d, V) {
|
|
1292
|
+
d.forEach((O) => {
|
|
1293
|
+
l.items.push(O), t.set(O.conditionId, l);
|
|
1294
|
+
}), V.forEach((O) => {
|
|
1295
|
+
l.children.push(O), r.set(O.groupId, l);
|
|
629
1296
|
});
|
|
630
1297
|
}
|
|
631
|
-
function
|
|
632
|
-
const
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
function
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
}),
|
|
644
|
-
|
|
645
|
-
}),
|
|
646
|
-
}
|
|
647
|
-
function
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
let
|
|
651
|
-
function
|
|
652
|
-
const { relation:
|
|
653
|
-
return (
|
|
654
|
-
const
|
|
655
|
-
return
|
|
1298
|
+
function b(l) {
|
|
1299
|
+
const d = l[0], V = d.conditionId !== void 0 ? t.get(d.conditionId) : r.get(d.groupId), O = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, k = [], P = [];
|
|
1300
|
+
if (V) {
|
|
1301
|
+
f(l, O, k, P), E(V, k, O.items, P, O.groups);
|
|
1302
|
+
const I = p(V.relation, V.level + 1);
|
|
1303
|
+
c(I, k, P), V.children.push(I), r.set(I.groupId, V), i();
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
function x(l) {
|
|
1307
|
+
const d = [...l.items], V = [...l.children], O = r.get(l.groupId);
|
|
1308
|
+
O && (O.children = O.children.filter((k) => k.groupId !== l.groupId), r.delete(l.groupId), d.forEach((k) => {
|
|
1309
|
+
O.items.push(k), t.set(k.conditionId, O);
|
|
1310
|
+
}), V.forEach((k) => {
|
|
1311
|
+
O.children.push(k), r.set(k.groupId, O);
|
|
1312
|
+
}), i());
|
|
1313
|
+
}
|
|
1314
|
+
function j(l) {
|
|
1315
|
+
l.relation = l.relation === 1 ? 2 : 1, i();
|
|
1316
|
+
}
|
|
1317
|
+
let $;
|
|
1318
|
+
function G(l) {
|
|
1319
|
+
const { relation: d } = l;
|
|
1320
|
+
return (l.children && l.children.length ? l.children.map((O, k, P) => {
|
|
1321
|
+
const I = $(O);
|
|
1322
|
+
return I[0].lBracket = (I[0].lBracket || "") + "(", I[I.length - 1].rBracket = (I[I.length - 1].rBracket || "") + ")", I[I.length - 1].relation = k < P.length - 1 ? d : 0, I;
|
|
656
1323
|
}) : []).flat();
|
|
657
1324
|
}
|
|
658
|
-
|
|
659
|
-
const { relation:
|
|
660
|
-
return [...
|
|
1325
|
+
$ = (l = e.value) => {
|
|
1326
|
+
const { relation: d } = l, V = l.items.map((k, P, I) => (k.lBracket = P === 0 ? "(" : "", k.rBracket = P === I.length - 1 ? ")" : "", k.relation = P < I.length - 1 ? d || 1 : 0, k)), O = G(l);
|
|
1327
|
+
return [...V, ...O];
|
|
661
1328
|
};
|
|
662
|
-
function
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
665
|
-
|
|
666
|
-
}),
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
} else
|
|
670
|
-
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
|
|
1329
|
+
function U(l) {
|
|
1330
|
+
const d = l || e.value;
|
|
1331
|
+
if (d.children.length && d.children.forEach((V) => {
|
|
1332
|
+
U(V);
|
|
1333
|
+
}), d.level === 0 && !d.items.length && d.children.length === 1) {
|
|
1334
|
+
const V = d.children[0];
|
|
1335
|
+
e.value.relation = V.relation, x(V);
|
|
1336
|
+
} else d.items.length === 0 && d.children.length <= 1 && x(d);
|
|
1337
|
+
}
|
|
1338
|
+
function R(l) {
|
|
1339
|
+
const d = t.get(l.conditionId);
|
|
1340
|
+
d && (d.items = d.items.filter((V) => V.conditionId !== l.conditionId), t.delete(l.conditionId), U(), i());
|
|
674
1341
|
}
|
|
675
1342
|
return {
|
|
676
|
-
addCondition:
|
|
677
|
-
changeGroupRelation:
|
|
678
|
-
conditionGroupMap:
|
|
679
|
-
getConditions:
|
|
680
|
-
group:
|
|
681
|
-
groupParentMap:
|
|
682
|
-
insertConditionTo:
|
|
683
|
-
loadConditionGroup:
|
|
684
|
-
refresh:
|
|
685
|
-
removeCondition:
|
|
686
|
-
rootGroup:
|
|
687
|
-
unGroup:
|
|
1343
|
+
addCondition: y,
|
|
1344
|
+
changeGroupRelation: j,
|
|
1345
|
+
conditionGroupMap: t,
|
|
1346
|
+
getConditions: $,
|
|
1347
|
+
group: b,
|
|
1348
|
+
groupParentMap: r,
|
|
1349
|
+
insertConditionTo: m,
|
|
1350
|
+
loadConditionGroup: s,
|
|
1351
|
+
refresh: i,
|
|
1352
|
+
removeCondition: R,
|
|
1353
|
+
rootGroup: e,
|
|
1354
|
+
unGroup: x
|
|
688
1355
|
};
|
|
689
1356
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
1357
|
+
function Yr(e, t, r) {
|
|
1358
|
+
const n = M(/* @__PURE__ */ new Set()), o = M(/* @__PURE__ */ new Set()), { conditionGroupMap: p, groupParentMap: i } = r;
|
|
1359
|
+
let u, S;
|
|
1360
|
+
function g(c) {
|
|
1361
|
+
let b = u.level <= c.level ? u : c, x = u.level > c.level ? u : c;
|
|
1362
|
+
const j = [];
|
|
1363
|
+
for (; x && b && x !== b; )
|
|
1364
|
+
x.level > b.level ? (j.push(x), x = i.get(x.groupId)) : x.level === b.level && (b = i.get(b.groupId), b && j.unshift(b));
|
|
1365
|
+
return j;
|
|
1366
|
+
}
|
|
1367
|
+
function v(c) {
|
|
1368
|
+
o.value.add(c.groupId), c.items.forEach((b) => n.value.add(b.conditionId)), c.children.forEach((b) => v(b));
|
|
1369
|
+
}
|
|
1370
|
+
function a(c) {
|
|
1371
|
+
const { conditionId: b } = c;
|
|
1372
|
+
n.value.add(b), u = n.value.size === 0 ? p.get(b) : u;
|
|
1373
|
+
const x = p.get(c.conditionId);
|
|
1374
|
+
g(x).forEach(($) => v($));
|
|
1375
|
+
}
|
|
1376
|
+
const s = W(() => n.value.size === 0 && o.value.size === 1), y = function(c) {
|
|
1377
|
+
o.value.delete(c.groupId), c.items.forEach((x) => S(x)), c.children.forEach((x) => !s.value && y(x));
|
|
1378
|
+
const b = i.get(c.groupId);
|
|
1379
|
+
b && o.value.has(b.groupId) && y(b);
|
|
1380
|
+
};
|
|
1381
|
+
S = function(c) {
|
|
1382
|
+
const { conditionId: b } = c;
|
|
1383
|
+
if (n.value.has(b) && n.value.delete(b), o.value.size > 0) {
|
|
1384
|
+
const x = p.get(b);
|
|
1385
|
+
x && o.value.has(x.groupId) && y(x);
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
function m(c) {
|
|
1389
|
+
const { conditionId: b } = c;
|
|
1390
|
+
n.value.size === 0 && (u = p.get(b)), n.value.has(b) ? S(c) : a(c);
|
|
1391
|
+
}
|
|
1392
|
+
function f() {
|
|
1393
|
+
const c = [];
|
|
1394
|
+
return u && (u.items.filter((b) => n.value.has(b.conditionId)).forEach((b) => c.push(b)), u.children.filter((b) => o.value.has(b.groupId)).forEach((b) => c.push(b))), c;
|
|
1395
|
+
}
|
|
1396
|
+
function E() {
|
|
1397
|
+
n.value.clear(), o.value.clear();
|
|
696
1398
|
}
|
|
1399
|
+
return { clear: E, getSelectedGroupItem: f, selectedItems: n, toggleSelect: m };
|
|
697
1400
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
1401
|
+
const ae = /* @__PURE__ */ Q({
|
|
1402
|
+
name: "FConditionList",
|
|
1403
|
+
props: me,
|
|
1404
|
+
emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
|
|
1405
|
+
setup(e, t) {
|
|
1406
|
+
const r = M(e.key), n = M(e.conditions), o = ge(e, t, "filter-bar"), {
|
|
1407
|
+
convertToControls: p,
|
|
1408
|
+
fields: i,
|
|
1409
|
+
fieldMap: u,
|
|
1410
|
+
loadFieldConfigs: S
|
|
1411
|
+
} = o, g = Xr(), {
|
|
1412
|
+
addCondition: v,
|
|
1413
|
+
changeGroupRelation: a,
|
|
1414
|
+
getConditions: s,
|
|
1415
|
+
group: y,
|
|
1416
|
+
insertConditionTo: m,
|
|
1417
|
+
loadConditionGroup: f,
|
|
1418
|
+
refresh: E,
|
|
1419
|
+
removeCondition: c,
|
|
1420
|
+
rootGroup: b,
|
|
1421
|
+
unGroup: x
|
|
1422
|
+
} = g, {
|
|
1423
|
+
createConditionValue: j
|
|
1424
|
+
} = Ie(), $ = Yr(e, t, g), {
|
|
1425
|
+
selectedItems: G,
|
|
1426
|
+
toggleSelect: U
|
|
1427
|
+
} = $, {
|
|
1428
|
+
getCompareOperators: R
|
|
1429
|
+
} = Qr(e, t, o), {
|
|
1430
|
+
conditionListLocale: l
|
|
1431
|
+
} = Wr();
|
|
1432
|
+
S(!1), i.value = p(i.value), f(n.value);
|
|
1433
|
+
function d(N) {
|
|
1434
|
+
var X;
|
|
1435
|
+
const z = ((X = u.get(N.fieldCode)) == null ? void 0 : X.editor) || {
|
|
1436
|
+
type: "text"
|
|
1437
|
+
};
|
|
1438
|
+
N.value = j(z.type, void 0), t.emit("labelCodeChange", N);
|
|
1439
|
+
}
|
|
1440
|
+
function V(N, z) {
|
|
1441
|
+
t.emit("compareTypeChange", z);
|
|
1442
|
+
}
|
|
1443
|
+
function O() {
|
|
1444
|
+
}
|
|
1445
|
+
t.expose({
|
|
1446
|
+
getConditions: s
|
|
1447
|
+
});
|
|
1448
|
+
function k(N, z) {
|
|
1449
|
+
t.emit("valueChange", N, z);
|
|
1450
|
+
}
|
|
1451
|
+
function P(N) {
|
|
1452
|
+
return B("div", {
|
|
1453
|
+
class: "condition-list-item-type mr-3"
|
|
1454
|
+
}, [B(le, {
|
|
1455
|
+
"value-field": "labelCode",
|
|
1456
|
+
"text-field": "name",
|
|
1457
|
+
"id-field": "id",
|
|
1458
|
+
data: i.value,
|
|
1459
|
+
modelValue: N.fieldCode,
|
|
1460
|
+
"onUpdate:modelValue": (z) => N.fieldCode = z,
|
|
1461
|
+
onChange: (z) => d(N)
|
|
1462
|
+
}, null)]);
|
|
1463
|
+
}
|
|
1464
|
+
function I(N) {
|
|
1465
|
+
return B("div", {
|
|
1466
|
+
class: "condition-list-item-compare mr-3"
|
|
1467
|
+
}, [B(le, {
|
|
1468
|
+
"value-field": "value",
|
|
1469
|
+
"text-field": "name",
|
|
1470
|
+
"id-field": "id",
|
|
1471
|
+
data: R(N),
|
|
1472
|
+
modelValue: N.compareType,
|
|
1473
|
+
"onUpdate:modelValue": (z) => N.compareType = z,
|
|
1474
|
+
onChange: (z) => V(z, N)
|
|
1475
|
+
}, null)]);
|
|
1476
|
+
}
|
|
1477
|
+
function A(N) {
|
|
1478
|
+
var z;
|
|
1479
|
+
return B("div", {
|
|
1480
|
+
class: "condition-list-item-control mr-3"
|
|
1481
|
+
}, [B(se, {
|
|
1482
|
+
editor: (z = u.get(N.fieldCode)) == null ? void 0 : z.editor,
|
|
1483
|
+
showLabel: !1,
|
|
1484
|
+
modelValue: N.value.value,
|
|
1485
|
+
"onUpdate:modelValue": (X) => N.value.value = X,
|
|
1486
|
+
onChange: (X) => {
|
|
1487
|
+
k(X, N);
|
|
1488
|
+
}
|
|
1489
|
+
}, null)]);
|
|
1490
|
+
}
|
|
1491
|
+
function q(N) {
|
|
1492
|
+
return [B("div", {
|
|
1493
|
+
class: "condition-list-item-extend"
|
|
1494
|
+
}, [B("span", {
|
|
1495
|
+
class: "f-icon f-icon-plus-sm mr-2",
|
|
1496
|
+
onClick: () => m(N)
|
|
1497
|
+
}, null), B("span", {
|
|
1498
|
+
class: "f-icon f-icon-minus-sm",
|
|
1499
|
+
onClick: () => c(N)
|
|
1500
|
+
}, null)]), B("div", {
|
|
1501
|
+
class: "custom-control custom-checkbox"
|
|
1502
|
+
}, [B("input", {
|
|
1503
|
+
title: "selection",
|
|
1504
|
+
class: "custom-control-input",
|
|
1505
|
+
type: "checkbox",
|
|
1506
|
+
checked: G.value.has(N.conditionId)
|
|
1507
|
+
}, null), B("label", {
|
|
1508
|
+
class: "custom-control-label",
|
|
1509
|
+
onClick: () => U(N)
|
|
1510
|
+
}, null)])];
|
|
1511
|
+
}
|
|
1512
|
+
function Z(N) {
|
|
1513
|
+
return N.items.map((z) => B("div", {
|
|
1514
|
+
class: "condition-list-item",
|
|
1515
|
+
key: z.conditionId
|
|
1516
|
+
}, [P(z), I(z), A(z), q(z)]));
|
|
1517
|
+
}
|
|
1518
|
+
function J(N) {
|
|
1519
|
+
return B("div", {
|
|
1520
|
+
class: "condition-list-relation"
|
|
1521
|
+
}, [B("span", {
|
|
1522
|
+
class: "condition-list-relation-close f-icon-filter-cancel btn-link",
|
|
1523
|
+
onClick: () => x(N)
|
|
1524
|
+
}, null), B("span", {
|
|
1525
|
+
class: "condition-list-relation-text btn-link",
|
|
1526
|
+
onClick: () => a(N)
|
|
1527
|
+
}, [N.relation === 1 ? l.and : l.or])]);
|
|
1528
|
+
}
|
|
1529
|
+
function H(N) {
|
|
1530
|
+
return B("div", {
|
|
1531
|
+
class: "condition-list-content"
|
|
1532
|
+
}, [B("div", {
|
|
1533
|
+
class: "condition-list-content-group"
|
|
1534
|
+
}, [Z(N), N.children && N.children.map((z) => H(z))]), J(N)]);
|
|
1535
|
+
}
|
|
1536
|
+
function K() {
|
|
1537
|
+
y($.getSelectedGroupItem()), $.clear();
|
|
1538
|
+
}
|
|
1539
|
+
function ee() {
|
|
1540
|
+
return B("div", {
|
|
1541
|
+
class: "condition-list-bottom"
|
|
1542
|
+
}, [B("div", {
|
|
1543
|
+
class: "add-condition-btn mb-1 mr-3",
|
|
1544
|
+
onClick: v
|
|
1545
|
+
}, [B("span", {
|
|
1546
|
+
class: "f-icon f-icon-filter-add"
|
|
1547
|
+
}, null), B("span", {
|
|
1548
|
+
class: "ml-1"
|
|
1549
|
+
}, [l.add])]), B("div", {
|
|
1550
|
+
class: "add-condition-btn mb-1",
|
|
1551
|
+
onClick: K
|
|
1552
|
+
}, [B("span", {
|
|
1553
|
+
class: "f-icon f-icon-filter-grouping"
|
|
1554
|
+
}, null), B("span", {
|
|
1555
|
+
class: "ml-1"
|
|
1556
|
+
}, [l.create])]), B("div", {
|
|
1557
|
+
class: "condition-list-reset add-condition-btn",
|
|
1558
|
+
onClick: O
|
|
1559
|
+
}, [l.reset])]);
|
|
1560
|
+
}
|
|
1561
|
+
return () => B("div", {
|
|
1562
|
+
class: "condition-list",
|
|
1563
|
+
key: r.value
|
|
1564
|
+
}, [B("div", {
|
|
1565
|
+
class: "condition-list-body"
|
|
1566
|
+
}, [H(b.value)]), ee()]);
|
|
1567
|
+
}
|
|
1568
|
+
}), Hr = {}, Dr = {}, { globalStorageKey: Ti } = xe(), Kr = {
|
|
1569
|
+
id: { Type: String, default: "" },
|
|
1570
|
+
/** 是否自动完成 */
|
|
1571
|
+
autocomplete: { Type: String, default: "off" },
|
|
1572
|
+
/** 自定义CLASS */
|
|
1573
|
+
customClass: { Type: String, default: "" },
|
|
1574
|
+
/** 禁用 */
|
|
1575
|
+
disabled: { Type: Boolean, default: !1 },
|
|
1576
|
+
/** 允许编辑 */
|
|
1577
|
+
editable: { Type: Boolean, default: !0 },
|
|
1578
|
+
/** 启用清除按钮 */
|
|
1579
|
+
enableClear: { Type: Boolean, default: !0 },
|
|
1580
|
+
/** 启用提示文本 */
|
|
1581
|
+
enableTitle: { Type: Boolean, default: !0 },
|
|
1582
|
+
/** 能否查看密码 */
|
|
1583
|
+
enableViewPassword: { Type: Boolean, default: !0 },
|
|
1584
|
+
/** 始终显示占位符文本 */
|
|
1585
|
+
forcePlaceholder: { Type: Boolean, default: !1 },
|
|
1586
|
+
/** 扩展按钮 */
|
|
1587
|
+
groupText: { Type: String, default: "" },
|
|
1588
|
+
/** 密码模式 */
|
|
1589
|
+
showType: { Type: String, default: "text" },
|
|
1590
|
+
/** 密码模式 --废弃*/
|
|
1591
|
+
type: { Type: String, default: "text" },
|
|
1592
|
+
/** 最大值 */
|
|
1593
|
+
max: { type: [Number, String] },
|
|
1594
|
+
/** 最小值 */
|
|
1595
|
+
min: { type: [Number, String] },
|
|
1596
|
+
/** 最大长度 */
|
|
1597
|
+
maxLength: { Type: Number || void 0, default: void 0 },
|
|
1598
|
+
/** 最小长度 */
|
|
1599
|
+
minLength: { Type: Number || void 0, default: void 0 },
|
|
1600
|
+
/** 组件值 */
|
|
1601
|
+
modelValue: { Type: String || Boolean, default: "" },
|
|
1602
|
+
/** 隐藏边线 */
|
|
1603
|
+
showBorder: { Type: Boolean, default: !0 },
|
|
1604
|
+
/** 步长 */
|
|
1605
|
+
step: { Type: Number, default: 1 },
|
|
1606
|
+
/** 启用提示信息 */
|
|
1607
|
+
placeholder: { Type: String, default: "" },
|
|
1608
|
+
precision: { Type: Number, default: 0 },
|
|
1609
|
+
/** 只读 */
|
|
1610
|
+
readonly: { Type: Boolean, default: !1 },
|
|
1611
|
+
/** 当组件禁用或只读时显示后边的按钮 */
|
|
1612
|
+
showButtonWhenDisabled: { Type: Boolean, default: !1 },
|
|
1613
|
+
/** tab索引 */
|
|
1614
|
+
tabIndex: { Type: Number, default: 0 },
|
|
1615
|
+
/** 文本在输入框中的对齐方式 */
|
|
1616
|
+
textAlign: { Type: String, default: "left" },
|
|
1617
|
+
/** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
|
|
1618
|
+
useExtendInfo: { Type: Boolean, default: !1 },
|
|
1619
|
+
/** 前置扩展信息 */
|
|
1620
|
+
extendInfo: { Type: String, default: "" },
|
|
1621
|
+
/** 输入值 */
|
|
1622
|
+
value: { Type: String, default: "" },
|
|
1623
|
+
/** 是否撑开高度 */
|
|
1624
|
+
autoHeight: { type: Boolean, default: !1 },
|
|
1625
|
+
/** 自动聚焦 */
|
|
1626
|
+
autofocus: { type: Boolean, default: !1 },
|
|
1627
|
+
/** 文本区域可见的行数 */
|
|
1628
|
+
rows: { type: Number, default: 2 },
|
|
1629
|
+
/** 展示输入文本数量 */
|
|
1630
|
+
showCount: { type: Boolean, default: !1 },
|
|
1631
|
+
showZero: { type: Boolean, default: !1 },
|
|
1632
|
+
/**
|
|
1633
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
1634
|
+
*/
|
|
1635
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
1636
|
+
/**
|
|
1637
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
1638
|
+
*/
|
|
1639
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
1640
|
+
/**
|
|
1641
|
+
* modelValue 更新时机, 默认 blur; 可选值:blur | input
|
|
1642
|
+
* - blur: 离开焦点时更新
|
|
1643
|
+
* - change: 输入时更新
|
|
1644
|
+
*/
|
|
1645
|
+
updateOn: { type: String, default: "blur" },
|
|
1646
|
+
formatValidation: { type: Object, default: {} },
|
|
1647
|
+
/**
|
|
1648
|
+
* 是否启用快捷键
|
|
1649
|
+
*/
|
|
1650
|
+
keyboard: { type: Boolean, default: !0 }
|
|
1651
|
+
}, Ne = [
|
|
1652
|
+
{ key: "none", value: "无" },
|
|
1653
|
+
{ key: "cellNumber", value: "手机号" },
|
|
1654
|
+
{ key: "tel", value: "座机号/传真号" },
|
|
1655
|
+
{ key: "telOrCell", value: "手机号/座机号/传真号" },
|
|
1656
|
+
{ key: "postCode", value: "邮编" },
|
|
1657
|
+
{ key: "email", value: "电子邮箱" },
|
|
1658
|
+
{ key: "idCode", value: "身份证号" },
|
|
1659
|
+
{ key: "carCode", value: "车牌号" },
|
|
1660
|
+
{ key: "subjectCode", value: "10位数字会计科目代码" },
|
|
1661
|
+
{ key: "custom", value: "自定义" }
|
|
1662
|
+
];
|
|
1663
|
+
function en(e) {
|
|
1664
|
+
switch (e) {
|
|
1665
|
+
case "none":
|
|
1666
|
+
return "";
|
|
1667
|
+
case "cellNumber":
|
|
1668
|
+
return "^1[0-9]{10}$";
|
|
1669
|
+
case "tel":
|
|
1670
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$";
|
|
1671
|
+
case "telOrCell":
|
|
1672
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$";
|
|
1673
|
+
case "postCode":
|
|
1674
|
+
return "^[1-9]\\d{5}(?!\\d)$";
|
|
1675
|
+
case "workCode":
|
|
1676
|
+
return "^\\d{8}$";
|
|
1677
|
+
case "email":
|
|
1678
|
+
return "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$";
|
|
1679
|
+
case "idCode":
|
|
1680
|
+
return "^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$";
|
|
1681
|
+
case "carCode":
|
|
1682
|
+
return "^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][·\\s]?[A-HJ-NP-Z0-9]{4,5}[挂学警港澳]?|粤[Z港澳][·\\s]?[港澳][0-9A-HJ-NP-Z]{4}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?([DF][0-9A-HJ-NP-Z][0-9]{4}|[0-9]{5}[DF])[挂港澳]?|[使领][0-9]{3}[·\\s]?[0-9]{3}|临[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?[0-9A-Z]{4,5}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z]?[·\\s]?警[0-9A-Z]{4}|[军海空][A-Z][·\\s]?[0-9]{4,5}|WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|\\d{2})[·\\s]?[0-9A-Z]{4,5})$";
|
|
1683
|
+
case "carCodeNew":
|
|
1684
|
+
return "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$";
|
|
1685
|
+
case "subjectCode":
|
|
1686
|
+
return "^\\d{10}$";
|
|
1687
|
+
}
|
|
1688
|
+
return "";
|
|
1689
|
+
}
|
|
1690
|
+
function tn(e) {
|
|
1691
|
+
var t;
|
|
1692
|
+
return "请输入正确的" + ((t = Ne.find((r) => r.key === e)) == null ? void 0 : t.value);
|
|
1693
|
+
}
|
|
1694
|
+
const rn = {
|
|
1695
|
+
convertTo: (e, t, r, n) => {
|
|
1696
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = r, e.editor.formatValidation.expression = en(r), e.editor.formatValidation.message = tn(r);
|
|
1697
|
+
},
|
|
1698
|
+
convertFrom: (e, t, r) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
|
|
1699
|
+
}, Fe = {
|
|
1700
|
+
convertTo: (e, t, r, n) => {
|
|
1701
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = r;
|
|
1702
|
+
},
|
|
1703
|
+
convertFrom: (e, t, r) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
|
|
1704
|
+
};
|
|
1705
|
+
class nn extends Cr {
|
|
1706
|
+
constructor(t, r) {
|
|
1707
|
+
super(t, r);
|
|
1708
|
+
}
|
|
1709
|
+
getPropertyConfig(t, r) {
|
|
1710
|
+
return super.getPropertyConfig(t, r), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
|
|
1711
|
+
}
|
|
1712
|
+
getEditorProperties(t) {
|
|
1713
|
+
var n, o;
|
|
1714
|
+
let r;
|
|
1715
|
+
if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
|
|
1716
|
+
const p = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1717
|
+
(o = p == null ? void 0 : p.schemaField) != null && o.type && (r = p.schemaField.type.length);
|
|
1718
|
+
}
|
|
1719
|
+
return this.getComponentConfig(t, {}, {
|
|
1720
|
+
maxLength: {
|
|
1721
|
+
description: "文本字数最大长度",
|
|
1722
|
+
title: "最大长度",
|
|
1723
|
+
type: "number",
|
|
1724
|
+
editor: {
|
|
1725
|
+
nullable: !0,
|
|
1726
|
+
min: 0,
|
|
1727
|
+
useThousands: !1,
|
|
1728
|
+
max: r,
|
|
1729
|
+
needValid: !0
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
showType: {
|
|
1733
|
+
description: "指定是文本框还是密码框",
|
|
1734
|
+
title: "展示类型",
|
|
1735
|
+
type: "enum",
|
|
1736
|
+
editor: {
|
|
1737
|
+
type: "combo-list",
|
|
1738
|
+
data: [
|
|
1739
|
+
{ id: "text", name: "文本框" },
|
|
1740
|
+
{ id: "password", name: "密码框" }
|
|
1741
|
+
]
|
|
1742
|
+
},
|
|
1743
|
+
refreshPanelAfterChanged: !0,
|
|
1744
|
+
defaultValue: "text"
|
|
1745
|
+
},
|
|
1746
|
+
enableViewPassword: {
|
|
1747
|
+
description: "",
|
|
1748
|
+
title: "能否查看密码",
|
|
1749
|
+
visible: t.editor.showType === "password",
|
|
1750
|
+
type: "boolean"
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
getGridFieldEdtiorProperties(t) {
|
|
1755
|
+
var n, o;
|
|
1756
|
+
let r;
|
|
1757
|
+
if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
|
|
1758
|
+
const p = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1759
|
+
(o = p == null ? void 0 : p.schemaField) != null && o.type && (r = p.schemaField.type.length);
|
|
1760
|
+
}
|
|
1761
|
+
return this.getComponentConfig(t, {}, {
|
|
1762
|
+
maxLength: {
|
|
1763
|
+
description: "文本字数最大长度",
|
|
1764
|
+
title: "最大长度",
|
|
1765
|
+
type: "number",
|
|
1766
|
+
editor: {
|
|
1767
|
+
nullable: !0,
|
|
1768
|
+
min: 0,
|
|
1769
|
+
useThousands: !1,
|
|
1770
|
+
max: r
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
showType: {
|
|
1774
|
+
description: "指定是文本框还是密码框",
|
|
1775
|
+
title: "展示类型",
|
|
1776
|
+
type: "enum",
|
|
1777
|
+
editor: {
|
|
1778
|
+
type: "combo-list",
|
|
1779
|
+
data: [
|
|
1780
|
+
{ id: "text", name: "文本框" },
|
|
1781
|
+
{ id: "password", name: "密码框" }
|
|
1782
|
+
]
|
|
1783
|
+
},
|
|
1784
|
+
refreshPanelAfterChanged: !0,
|
|
1785
|
+
defaultValue: "text"
|
|
1786
|
+
},
|
|
1787
|
+
enableViewPassword: {
|
|
1788
|
+
description: "",
|
|
1789
|
+
title: "能否查看密码",
|
|
1790
|
+
visible: t.editor.showType === "password",
|
|
1791
|
+
type: "boolean"
|
|
1792
|
+
}
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
getFormatValidation(t) {
|
|
1796
|
+
var n, o, p, i;
|
|
1797
|
+
const r = {
|
|
1798
|
+
title: "输入格式校验",
|
|
1799
|
+
description: "输入校验",
|
|
1800
|
+
hide: !((n = t.binding) != null && n.field),
|
|
1801
|
+
properties: {
|
|
1802
|
+
type: {
|
|
1803
|
+
title: "格式类型",
|
|
1804
|
+
type: "enum",
|
|
1805
|
+
description: "格式类型",
|
|
1806
|
+
defaultValue: "",
|
|
1807
|
+
editor: {
|
|
1808
|
+
type: "combo-list",
|
|
1809
|
+
textField: "value",
|
|
1810
|
+
valueField: "key",
|
|
1811
|
+
idField: "key",
|
|
1812
|
+
editable: !1,
|
|
1813
|
+
data: Ne
|
|
1814
|
+
},
|
|
1815
|
+
refreshPanelAfterChanged: !0,
|
|
1816
|
+
$converter: rn,
|
|
1817
|
+
parentPropertyID: "formatValidation"
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1821
|
+
return (o = t.editor.formatValidation) != null && o.type && ((p = t.editor.formatValidation) == null ? void 0 : p.type) !== "none" && (r.properties.message = {
|
|
1822
|
+
title: "输入错误提示",
|
|
1823
|
+
type: "string",
|
|
1824
|
+
description: "输入错误提示",
|
|
1825
|
+
$converter: Fe,
|
|
1826
|
+
parentPropertyID: "formatValidation"
|
|
1827
|
+
}), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (r.properties.expression = {
|
|
1828
|
+
title: "匹配正则",
|
|
1829
|
+
type: "string",
|
|
1830
|
+
description: "匹配正则",
|
|
1831
|
+
$converter: Fe,
|
|
1832
|
+
parentPropertyID: "formatValidation"
|
|
1833
|
+
}), r;
|
|
702
1834
|
}
|
|
703
1835
|
}
|
|
704
|
-
function
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1836
|
+
function on(e, t) {
|
|
1837
|
+
const r = e.schema;
|
|
1838
|
+
function n(o, p) {
|
|
1839
|
+
return new nn(o, t).getPropertyConfig(r, p);
|
|
1840
|
+
}
|
|
1841
|
+
return { getPropsConfig: n };
|
|
1842
|
+
}
|
|
1843
|
+
const an = /* @__PURE__ */ Q({
|
|
1844
|
+
name: "FInputGroupDesign",
|
|
1845
|
+
props: Kr,
|
|
1846
|
+
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1847
|
+
setup(e, t) {
|
|
1848
|
+
const r = M(e.modelValue), n = M(e.modelValue), o = _e(e, t, r, n), {
|
|
1849
|
+
inputGroupClass: p,
|
|
1850
|
+
inputType: i,
|
|
1851
|
+
inputGroupStyle: u
|
|
1852
|
+
} = o, S = M(), g = D("designer-host-service"), v = D("design-item-context"), a = on(v, g), s = Ve(S, v, a), y = W(() => e.showType === "password" ? "password" : "");
|
|
1853
|
+
return ke(() => {
|
|
1854
|
+
S.value.componentInstance = s;
|
|
1855
|
+
}), t.expose(s.value), () => B("div", {
|
|
1856
|
+
id: "inputGroup",
|
|
1857
|
+
ref: S,
|
|
1858
|
+
class: p.value,
|
|
1859
|
+
style: u.value
|
|
1860
|
+
}, [B("input", {
|
|
1861
|
+
class: "form-control",
|
|
1862
|
+
type: e.showType,
|
|
1863
|
+
placeholder: e.placeholder,
|
|
1864
|
+
value: y.value
|
|
1865
|
+
}, null), e.showType === "password" && e.enableViewPassword && B("span", {
|
|
1866
|
+
class: "input-group-append"
|
|
1867
|
+
}, [B("span", {
|
|
1868
|
+
class: "input-group-text"
|
|
1869
|
+
}, [B("span", {
|
|
1870
|
+
class: "f-icon f-icon-eye"
|
|
1871
|
+
}, null)])])]);
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
function ln() {
|
|
1875
|
+
function e(i, u) {
|
|
1876
|
+
const S = Dr[i];
|
|
1877
|
+
return S ? S(u) : {};
|
|
1878
|
+
}
|
|
1879
|
+
function t(i) {
|
|
1880
|
+
return Hr[i] || an;
|
|
1881
|
+
}
|
|
1882
|
+
function r(i) {
|
|
1883
|
+
}
|
|
1884
|
+
function n(i) {
|
|
1885
|
+
}
|
|
1886
|
+
function o(i) {
|
|
1887
|
+
}
|
|
1888
|
+
function p(i) {
|
|
1889
|
+
}
|
|
1890
|
+
return { getChangeFunctionName: r, getClearFunctionName: n, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: p };
|
|
1891
|
+
}
|
|
1892
|
+
function sn(e = {}) {
|
|
1893
|
+
function t(g, v, a, s) {
|
|
1894
|
+
if (typeof a == "number")
|
|
1895
|
+
return s[g].length === a;
|
|
1896
|
+
if (typeof a == "object") {
|
|
1897
|
+
const y = Object.keys(a)[0], m = a[y];
|
|
1898
|
+
if (y === "not")
|
|
1899
|
+
return Number(s[g].length) !== Number(m);
|
|
1900
|
+
if (y === "moreThan")
|
|
1901
|
+
return Number(s[g].length) >= Number(m);
|
|
1902
|
+
if (y === "lessThan")
|
|
1903
|
+
return Number(s[g].length) <= Number(m);
|
|
1904
|
+
}
|
|
1905
|
+
return !1;
|
|
1906
|
+
}
|
|
1907
|
+
function r(g, v, a, s) {
|
|
1908
|
+
return s[g] && s[g].propertyValue && String(s[g].propertyValue.value) === String(a);
|
|
1909
|
+
}
|
|
1910
|
+
const n = /* @__PURE__ */ new Map([
|
|
1911
|
+
["length", t],
|
|
1912
|
+
["getProperty", r]
|
|
1913
|
+
]);
|
|
1914
|
+
Object.keys(e).reduce((g, v) => (g.set(v, e[v]), g), n);
|
|
1915
|
+
function o(g, v) {
|
|
1916
|
+
const a = g;
|
|
1917
|
+
return typeof v == "number" ? [{ target: a, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: a, operator: "getProperty", param: g, value: !!v }] : typeof v == "object" ? Object.keys(v).map((s) => {
|
|
1918
|
+
if (s === "length")
|
|
1919
|
+
return { target: a, operator: "length", param: null, value: v[s] };
|
|
1920
|
+
const y = s, m = v[s];
|
|
1921
|
+
return { target: a, operator: "getProperty", param: y, value: m };
|
|
1922
|
+
}) : [];
|
|
1923
|
+
}
|
|
1924
|
+
function p(g) {
|
|
1925
|
+
return Object.keys(g).reduce((a, s) => {
|
|
1926
|
+
const y = o(s, g[s]);
|
|
1927
|
+
return a.push(...y), a;
|
|
1928
|
+
}, []);
|
|
1929
|
+
}
|
|
1930
|
+
function i(g, v) {
|
|
1931
|
+
if (n.has(g.operator)) {
|
|
1932
|
+
const a = n.get(g.operator);
|
|
1933
|
+
return a && a(g.target, g.param, g.value, v) || !1;
|
|
741
1934
|
}
|
|
1935
|
+
return !1;
|
|
742
1936
|
}
|
|
743
|
-
|
|
1937
|
+
function u(g, v) {
|
|
1938
|
+
return p(g).reduce((y, m) => y && i(m, v), !0);
|
|
1939
|
+
}
|
|
1940
|
+
function S(g, v) {
|
|
1941
|
+
const a = Object.keys(g), s = a.includes("allOf"), y = a.includes("anyOf"), m = s || y, c = (m ? g[m ? s ? "allOf" : "anyOf" : "allOf"] : [g]).map((x) => u(x, v));
|
|
1942
|
+
return s ? !c.includes(!1) : c.includes(!0);
|
|
1943
|
+
}
|
|
1944
|
+
return { parseValueSchema: S };
|
|
744
1945
|
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
1946
|
+
const un = {
|
|
1947
|
+
convertTo: (e, t, r, n) => {
|
|
1948
|
+
e.appearance || (e.appearance = {}), e.appearance[t] = r;
|
|
1949
|
+
},
|
|
1950
|
+
convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
|
|
1951
|
+
}, cn = {
|
|
1952
|
+
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
1953
|
+
}, dn = {
|
|
1954
|
+
convertTo: (e, t, r, n) => {
|
|
1955
|
+
e.editor && (e.editor[t] = r);
|
|
1956
|
+
},
|
|
1957
|
+
convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
1958
|
+
}, pn = {
|
|
1959
|
+
button: { type: "button", name: "按钮" },
|
|
1960
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
1961
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
1962
|
+
"content-container": { type: "content-container", name: "容器" },
|
|
1963
|
+
"input-group": { type: "input-group", name: "文本" },
|
|
1964
|
+
textarea: { type: "textarea", name: "多行文本" },
|
|
1965
|
+
lookup: { type: "lookup", name: "帮助" },
|
|
1966
|
+
"number-spinner": { type: "number-spinner", name: "数值" },
|
|
1967
|
+
"date-picker": { type: "date-picker", name: "日期" },
|
|
1968
|
+
switch: { type: "switch", name: "开关" },
|
|
1969
|
+
"radio-group": { type: "radio-group", name: "单选组" },
|
|
1970
|
+
"check-box": { type: "check-box", name: "复选框" },
|
|
1971
|
+
"check-group": { type: "check-group", name: "复选框组" },
|
|
1972
|
+
"combo-list": { type: "combo-list", name: "下拉列表" },
|
|
1973
|
+
"response-form": { type: "response-form", name: "卡片面板" },
|
|
1974
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
|
|
1975
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
|
|
1976
|
+
"tree-grid": { type: "tree-grid", name: "树表格" },
|
|
1977
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
1978
|
+
"data-grid": { type: "data-grid", name: "表格" },
|
|
1979
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
1980
|
+
module: { type: "Module", name: "模块" },
|
|
1981
|
+
component: { type: "component", name: "组件" },
|
|
1982
|
+
tabs: { type: "tabs", name: "标签页" },
|
|
1983
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
1984
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
1985
|
+
"drawer-toolbar-item": { type: "drawer-toolbar-item", name: "抽屉工具栏按钮" },
|
|
1986
|
+
"html-template": { type: "html-template", name: "模板容器" },
|
|
1987
|
+
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
1988
|
+
section: { type: "section", name: "分组面板" },
|
|
1989
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
1990
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
1991
|
+
splitter: { type: "splitter", name: "分栏面板" },
|
|
1992
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
1993
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
1994
|
+
uploader: { type: "uploader", name: "附件上传" },
|
|
1995
|
+
"page-header": { type: "page-header", name: "页头" },
|
|
1996
|
+
"page-footer": { type: "page-footer", name: "页脚" },
|
|
1997
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
1998
|
+
"drawer-toolbar": { type: "drawer-toolbar", name: "抽屉工具栏" },
|
|
1999
|
+
fieldset: { type: "fieldset", name: "分组" },
|
|
2000
|
+
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
2001
|
+
drawer: { type: "drawer", name: "抽屉" },
|
|
2002
|
+
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
2003
|
+
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
2004
|
+
"list-view": { type: "list-view", name: "列表" },
|
|
2005
|
+
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
2006
|
+
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
2007
|
+
image: { type: "image", name: "图像" },
|
|
2008
|
+
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
2009
|
+
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
2010
|
+
comment: { type: "comment", name: "评论区" },
|
|
2011
|
+
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
2012
|
+
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
2013
|
+
}, mn = {
|
|
2014
|
+
convertFrom: (e, t, r) => {
|
|
2015
|
+
var o;
|
|
2016
|
+
const n = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
2017
|
+
return ((o = pn[n]) == null ? void 0 : o.name) || n;
|
|
2018
|
+
}
|
|
2019
|
+
}, fn = {
|
|
2020
|
+
convertTo: (e, t, r, n) => {
|
|
2021
|
+
e[t] = e[t];
|
|
2022
|
+
},
|
|
2023
|
+
convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
|
|
2024
|
+
}, gn = {
|
|
2025
|
+
convertTo: (e, t, r, n) => {
|
|
2026
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
|
|
2027
|
+
[t]: r
|
|
2028
|
+
});
|
|
2029
|
+
},
|
|
2030
|
+
convertFrom: (e, t, r) => {
|
|
2031
|
+
if (e.formatter) {
|
|
2032
|
+
if (t === "trueText")
|
|
2033
|
+
return e.formatter.trueText;
|
|
2034
|
+
if (t === "falseText")
|
|
2035
|
+
return e.formatter.falseText;
|
|
2036
|
+
if (t === "prefix")
|
|
2037
|
+
return e.formatter.prefix;
|
|
2038
|
+
if (t === "suffix")
|
|
2039
|
+
return e.formatter.suffix;
|
|
2040
|
+
if (t === "precision")
|
|
2041
|
+
return e.formatter.precision;
|
|
2042
|
+
if (t === "decimal")
|
|
2043
|
+
return e.formatter.decimal;
|
|
2044
|
+
if (t === "thousand")
|
|
2045
|
+
return e.formatter.thousand;
|
|
2046
|
+
if (t === "dateFormat")
|
|
2047
|
+
return e.formatter.dateFormat || "yyyy-MM-dd";
|
|
2048
|
+
if (t === "customFormat")
|
|
2049
|
+
return e.formatter.customFormat;
|
|
2050
|
+
if (t === "type")
|
|
2051
|
+
return e.formatter.type || "none";
|
|
2052
|
+
}
|
|
2053
|
+
return "none";
|
|
2054
|
+
}
|
|
2055
|
+
}, vn = {
|
|
2056
|
+
convertTo: (e, t, r, n) => {
|
|
2057
|
+
e.command ? e.command[t] = r : e.command = {
|
|
2058
|
+
[t]: r
|
|
2059
|
+
}, t === "enableType" && r === "default" && (e.command.enable = !0, e.command.commands = [
|
|
2060
|
+
{
|
|
2061
|
+
text: "编辑",
|
|
2062
|
+
type: "primary",
|
|
2063
|
+
command: "edit"
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
text: "删除",
|
|
2067
|
+
type: "danger",
|
|
2068
|
+
command: "remove"
|
|
2069
|
+
}
|
|
2070
|
+
]), t === "enableType" && r === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
2071
|
+
{
|
|
2072
|
+
value: "add",
|
|
2073
|
+
text: {
|
|
2074
|
+
en: "add",
|
|
2075
|
+
"zh-CHS": "增加",
|
|
2076
|
+
"zh-CHT": "增加"
|
|
2077
|
+
},
|
|
2078
|
+
type: "link"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
value: "edit",
|
|
2082
|
+
text: {
|
|
2083
|
+
en: "edit",
|
|
2084
|
+
"zh-CHS": "编辑",
|
|
2085
|
+
"zh-CHT": "編輯"
|
|
2086
|
+
},
|
|
2087
|
+
type: "danger"
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
value: "remove",
|
|
2091
|
+
text: {
|
|
2092
|
+
en: "remove",
|
|
2093
|
+
"zh-CHS": "删除",
|
|
2094
|
+
"zh-CHT": "刪除"
|
|
2095
|
+
},
|
|
2096
|
+
type: "remove"
|
|
2097
|
+
}
|
|
2098
|
+
]), t === "enableType" && r === "unable" && (e.command.enable = !1);
|
|
2099
|
+
},
|
|
2100
|
+
convertFrom: (e, t, r) => {
|
|
2101
|
+
var n, o;
|
|
2102
|
+
if (e.command) {
|
|
2103
|
+
if (t === "enableType") {
|
|
2104
|
+
const p = (o = (n = e.command) == null ? void 0 : n.commands) == null ? void 0 : o.find((i) => i.command === "edit" && i.type === "primary");
|
|
2105
|
+
return e.command.enable ? p ? "default" : "custom" : "unable";
|
|
2106
|
+
}
|
|
2107
|
+
if (t === "commands")
|
|
2108
|
+
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
2109
|
+
if (t === "formatter")
|
|
2110
|
+
return e.command.formatter;
|
|
2111
|
+
if (t === "count")
|
|
2112
|
+
return e.command.count;
|
|
2113
|
+
}
|
|
2114
|
+
return "";
|
|
2115
|
+
}
|
|
2116
|
+
}, hn = {
|
|
2117
|
+
convertTo: (e, t, r, n) => {
|
|
2118
|
+
e.column ? e.column[t] = r : e.column = {
|
|
2119
|
+
[t]: r
|
|
2120
|
+
}, t === "fitColumns" && r && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
2121
|
+
},
|
|
2122
|
+
convertFrom: (e, t, r) => {
|
|
2123
|
+
if (e.column) {
|
|
2124
|
+
if (t === "fitColumns")
|
|
2125
|
+
return e.column.fitColumns;
|
|
2126
|
+
if (t === "fitMode")
|
|
2127
|
+
return e.column.fitMode;
|
|
2128
|
+
}
|
|
2129
|
+
return "";
|
|
2130
|
+
}
|
|
2131
|
+
}, yn = {
|
|
2132
|
+
convertTo: (e, t, r, n) => {
|
|
2133
|
+
e.summary ? e.summary[t] = r : e.summary = {
|
|
2134
|
+
[t]: r
|
|
2135
|
+
}, t === "enable" && r && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
2136
|
+
enable: r,
|
|
2137
|
+
groupFields: []
|
|
2138
|
+
});
|
|
2139
|
+
},
|
|
2140
|
+
convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
2141
|
+
}, bn = {
|
|
2142
|
+
convertTo: (e, t, r, n) => {
|
|
2143
|
+
e.group ? e.group[t] = r : e.group = {
|
|
2144
|
+
[t]: r
|
|
2145
|
+
}, t === "enable" && r && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
2146
|
+
enable: r,
|
|
2147
|
+
groupFields: [],
|
|
2148
|
+
showSummary: !1
|
|
2149
|
+
});
|
|
2150
|
+
},
|
|
2151
|
+
convertFrom: (e, t, r) => {
|
|
2152
|
+
if (e.group) {
|
|
2153
|
+
if (t === "enable")
|
|
2154
|
+
return e.group.enable;
|
|
2155
|
+
if (t === "showSummary")
|
|
2156
|
+
return e.group.showSummary;
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
}, Fn = {
|
|
2160
|
+
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
2161
|
+
convertTo: (e, t, r) => {
|
|
2162
|
+
if (r && r.length > 0) {
|
|
2163
|
+
const n = r[0];
|
|
2164
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = n.bindingField, e.binding.field = n.id, e.binding.fullPath = n.path, e.path = n.bindingPath;
|
|
759
2165
|
}
|
|
760
|
-
return h;
|
|
761
2166
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
2167
|
+
}, Cn = {
|
|
2168
|
+
convertTo: (e, t, r, n) => {
|
|
2169
|
+
e.pagination || (e.pagination = {}), e.pagination[t] = r;
|
|
2170
|
+
},
|
|
2171
|
+
convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
|
|
2172
|
+
}, Tn = {
|
|
2173
|
+
convertTo: (e, t, r, n) => {
|
|
2174
|
+
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
|
|
2175
|
+
},
|
|
2176
|
+
convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
2177
|
+
}, kn = {
|
|
2178
|
+
convertTo: (e, t, r, n) => {
|
|
2179
|
+
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
2180
|
+
},
|
|
2181
|
+
convertFrom: (e, t, r) => {
|
|
2182
|
+
var n, o;
|
|
2183
|
+
return t === "showCheckbox" ? (n = e.selection) != null && n.multiSelect ? !0 : (o = e.selection) == null ? void 0 : o.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
2184
|
+
}
|
|
2185
|
+
}, wn = {
|
|
2186
|
+
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
2187
|
+
}, xn = {
|
|
2188
|
+
convertFrom: (e, t) => e[t] || "",
|
|
2189
|
+
convertTo: (e, t, r) => {
|
|
2190
|
+
e[t] = r;
|
|
2191
|
+
}
|
|
2192
|
+
}, Vn = {
|
|
2193
|
+
convertTo: (e, t, r, n) => {
|
|
2194
|
+
e.size || (e.size = {}), e.size[t] = r;
|
|
2195
|
+
},
|
|
2196
|
+
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
2197
|
+
}, Sn = {
|
|
2198
|
+
convertFrom: (e, t, r) => {
|
|
2199
|
+
var n, o;
|
|
2200
|
+
return (n = e.formatter) != null && n.data && t === "formatterEnumData" && !e.formatterEnumData ? (o = e.formatter) == null ? void 0 : o.data : e.formatterEnumData;
|
|
2201
|
+
}
|
|
2202
|
+
}, En = {
|
|
2203
|
+
convertTo: (e, t, r, n) => {
|
|
2204
|
+
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
2205
|
+
},
|
|
2206
|
+
convertFrom: (e, t, r) => {
|
|
2207
|
+
var n, o;
|
|
2208
|
+
if (t === "mode")
|
|
2209
|
+
return ((n = e.sort) == null ? void 0 : n.mode) || "client";
|
|
2210
|
+
if (t === "multiSort")
|
|
2211
|
+
return !!((o = e.sort) != null && o.multiSort);
|
|
2212
|
+
}
|
|
2213
|
+
}, In = {
|
|
2214
|
+
convertTo: (e, t, r, n) => {
|
|
2215
|
+
e.filter || (e.filter = {}), e.filter[t] = r;
|
|
2216
|
+
},
|
|
2217
|
+
convertFrom: (e, t, r) => {
|
|
2218
|
+
var n;
|
|
2219
|
+
if (t === "mode")
|
|
2220
|
+
return ((n = e.filter) == null ? void 0 : n.mode) || "client";
|
|
2221
|
+
}
|
|
2222
|
+
}, Ln = {
|
|
2223
|
+
convertTo: (e, t, r, n) => {
|
|
2224
|
+
e.rowOption ? e.rowOption[t] = r : e.rowOption = {
|
|
2225
|
+
[t]: r
|
|
2226
|
+
};
|
|
2227
|
+
},
|
|
2228
|
+
convertFrom: (e, t, r) => {
|
|
2229
|
+
if (e.rowOption) {
|
|
2230
|
+
if (t === "customRowStyle")
|
|
2231
|
+
return e.rowOption.customRowStyle;
|
|
2232
|
+
if (t === "customCellStyle")
|
|
2233
|
+
return e.rowOption.customCellStyle;
|
|
2234
|
+
}
|
|
2235
|
+
return "";
|
|
2236
|
+
}
|
|
2237
|
+
}, Pn = {
|
|
2238
|
+
convertTo: (e, t, r, n) => {
|
|
2239
|
+
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = r, t === "columnTemplateType" && r === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
2240
|
+
<span class="f-pretend-link f-cursor-pointer"
|
|
2241
|
+
@click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
|
|
2242
|
+
{{rowData.${e.field}}}
|
|
2243
|
+
</span>` : e.columnTemplate = `
|
|
2244
|
+
<span class="f-pretend-link f-cursor-pointer">
|
|
2245
|
+
{{rowData.${e.field}}}
|
|
2246
|
+
</span>`), t === "columnTemplateType" && r === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && r === "custom" && (e.columnTemplate = ""));
|
|
2247
|
+
},
|
|
2248
|
+
convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
2249
|
+
};
|
|
2250
|
+
function On(e, t, r) {
|
|
2251
|
+
const n = /* @__PURE__ */ new Map([
|
|
2252
|
+
["/converter/appearance.converter", un],
|
|
2253
|
+
["/converter/buttons.converter", cn],
|
|
2254
|
+
["/converter/property-editor.converter", dn],
|
|
2255
|
+
["/converter/items-count.converter", wn],
|
|
2256
|
+
["/converter/type.converter", mn],
|
|
2257
|
+
["/converter/change-editor.converter", fn],
|
|
2258
|
+
["/converter/change-formatter.converter", gn],
|
|
2259
|
+
["/converter/column-command.converter", vn],
|
|
2260
|
+
["/converter/column-option.converter", hn],
|
|
2261
|
+
["/converter/summary.converter", yn],
|
|
2262
|
+
["/converter/group.converter", bn],
|
|
2263
|
+
["/converter/form-group-label.converter", xn],
|
|
2264
|
+
["/converter/field-selector.converter", Fn],
|
|
2265
|
+
["/converter/pagination.converter", Cn],
|
|
2266
|
+
["/converter/row-number.converter", Tn],
|
|
2267
|
+
["/converter/grid-selection.converter", kn],
|
|
2268
|
+
["/converter/size.converter", Vn],
|
|
2269
|
+
["/converter/change-formatter-enum.converter", Sn],
|
|
2270
|
+
["/converter/grid-sort.converter", En],
|
|
2271
|
+
["/converter/grid-filter.converter", In],
|
|
2272
|
+
["/converter/row-option.converter", Ln],
|
|
2273
|
+
["/converter/change-formatter-type.converter", Pn]
|
|
2274
|
+
]), o = /* @__PURE__ */ new Map([
|
|
2275
|
+
["string", { type: "input-group", enableClear: !1 }],
|
|
2276
|
+
["boolean", {
|
|
2277
|
+
type: "combo-list",
|
|
2278
|
+
textField: "name",
|
|
2279
|
+
valueField: "value",
|
|
2280
|
+
idField: "value",
|
|
2281
|
+
enableClear: !1,
|
|
2282
|
+
editable: !1,
|
|
2283
|
+
data: [
|
|
2284
|
+
{
|
|
2285
|
+
value: !0,
|
|
2286
|
+
name: "是"
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
value: !1,
|
|
2290
|
+
name: "否"
|
|
2291
|
+
}
|
|
2292
|
+
]
|
|
2293
|
+
}],
|
|
2294
|
+
["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
|
|
2295
|
+
["array", { type: "button-edit" }],
|
|
2296
|
+
["number", { type: "number-spinner", placeholder: "" }],
|
|
2297
|
+
["events-editor", { type: "events-editor", hide: !0 }]
|
|
2298
|
+
]), p = sn();
|
|
2299
|
+
function i(m, f) {
|
|
2300
|
+
return () => p.parseValueSchema(m, f);
|
|
2301
|
+
}
|
|
2302
|
+
function u(m, f, E) {
|
|
2303
|
+
return m.includes("visible") && f.visible !== void 0 ? typeof f.visible == "boolean" ? () => !!f.visible : f.visible === void 0 ? !0 : i(f.visible, E) : () => !0;
|
|
2304
|
+
}
|
|
2305
|
+
function S(m, f, E) {
|
|
2306
|
+
return m.includes("readonly") && f.readonly !== void 0 ? typeof f.readonly == "boolean" ? () => !!f.readonly : i(f.readonly, E) : () => !1;
|
|
2307
|
+
}
|
|
2308
|
+
function g(m, f) {
|
|
2309
|
+
const E = m.$converter || f;
|
|
2310
|
+
return typeof E == "string" && E && n.has(E) ? n.get(E) || null : E || null;
|
|
2311
|
+
}
|
|
2312
|
+
function v(m, f, E, c, b, x = "", j = "") {
|
|
2313
|
+
return Object.keys(m).map((G) => {
|
|
2314
|
+
const U = M(1), R = G, l = m[G], d = Object.keys(l), V = l.title, O = l.type, k = o.get(O) || { type: "input-group", enableClear: !1 }, P = l.editor ? Object.assign({}, k, l.editor) : Object.assign({}, k), I = u(d, l, f), A = S(d, l, f);
|
|
2315
|
+
P.readonly = P.readonly === void 0 ? A() : P.readonly;
|
|
2316
|
+
const q = l.type === "cascade" ? v(l.properties, f, E, c, b, x, j) : [], Z = !0;
|
|
2317
|
+
let J = g(l, j);
|
|
2318
|
+
const H = W({
|
|
2319
|
+
get() {
|
|
2320
|
+
if (U.value) {
|
|
2321
|
+
if (["class", "style"].find((Ge) => Ge === R) && !J && (J = n.get("/converter/appearance.converter") || null), J && J.convertFrom)
|
|
2322
|
+
return J.convertFrom(E, G, b, x);
|
|
2323
|
+
const Y = E[G];
|
|
2324
|
+
return Object.prototype.hasOwnProperty.call(l, "defaultValue") && (Y === void 0 || typeof Y == "string" && Y === "") ? l.type === "boolean" ? l.defaultValue : l.defaultValue || "" : Y;
|
|
2325
|
+
}
|
|
2326
|
+
return null;
|
|
2327
|
+
},
|
|
2328
|
+
set(Y) {
|
|
2329
|
+
U.value += 1, J && J.convertTo ? (J.convertTo(c, G, Y, b, x), J.convertTo(E, G, Y, b, x)) : (c[G] = Y, E[G] = Y);
|
|
2330
|
+
}
|
|
2331
|
+
}), { refreshPanelAfterChanged: K, description: ee, isExpand: N, parentPropertyID: z } = l, X = { propertyID: R, propertyName: V, propertyType: O, propertyValue: H, editor: P, visible: I, readonly: A, cascadeConfig: q, hideCascadeTitle: Z, refreshPanelAfterChanged: K, description: ee, isExpand: N, parentPropertyID: z };
|
|
2332
|
+
return f[R] = X, X;
|
|
2333
|
+
});
|
|
765
2334
|
}
|
|
766
|
-
function
|
|
767
|
-
|
|
2335
|
+
function a(m, f, E = {}) {
|
|
2336
|
+
const c = {}, b = e[m];
|
|
2337
|
+
return b && b.categories ? Object.keys(b.categories).map((j) => {
|
|
2338
|
+
const $ = b.categories[j], G = $ == null ? void 0 : $.title, U = v($.properties || {}, c, {}, E, f);
|
|
2339
|
+
return { categoryId: j, categoryName: G, properties: U };
|
|
2340
|
+
}) : [];
|
|
2341
|
+
}
|
|
2342
|
+
function s(m, f, E, c, b = "") {
|
|
2343
|
+
const x = f.$ref.schema, j = f.$ref.converter, $ = E[x], G = $.type, U = r($), R = {}, l = e[G];
|
|
2344
|
+
if (l && l.categories) {
|
|
2345
|
+
const d = l.categories[m], V = d == null ? void 0 : d.title;
|
|
2346
|
+
j && Object.keys(d.properties).forEach((P) => {
|
|
2347
|
+
d.properties[P].$converter = j;
|
|
2348
|
+
});
|
|
2349
|
+
const O = (d == null ? void 0 : d.properties) || {}, k = v(O, R, U, $, c, b);
|
|
2350
|
+
return { categoryId: m, categoryName: V, properties: k };
|
|
2351
|
+
}
|
|
2352
|
+
return { categoryId: m, categoryName: "", properties: [] };
|
|
2353
|
+
}
|
|
2354
|
+
function y(m, f, E, c, b) {
|
|
2355
|
+
const x = m.type, j = r(m), $ = {};
|
|
2356
|
+
let G = b || e[x];
|
|
2357
|
+
if (!(G && Object.keys(G).length > 0) && E && E.getPropConfig && (G = E.getPropConfig(c)), G && G.categories) {
|
|
2358
|
+
const R = [];
|
|
2359
|
+
return Object.keys(G.categories).map((l) => {
|
|
2360
|
+
const d = G.categories[l];
|
|
2361
|
+
if (d.$ref) {
|
|
2362
|
+
R.push(s(l, d, m, f, c));
|
|
2363
|
+
return;
|
|
2364
|
+
}
|
|
2365
|
+
const V = d == null ? void 0 : d.title, O = d == null ? void 0 : d.tabId, k = d == null ? void 0 : d.tabName, P = d == null ? void 0 : d.hide, I = d == null ? void 0 : d.hideTitle, A = v(d.properties || {}, $, j, m, f, c, d.$converter), { setPropertyRelates: q } = d, Z = d == null ? void 0 : d.parentPropertyID;
|
|
2366
|
+
R.push({ categoryId: l, categoryName: V, tabId: O, tabName: k, hide: P, properties: A, hideTitle: I, setPropertyRelates: q, parentPropertyID: Z });
|
|
2367
|
+
}), R;
|
|
2368
|
+
}
|
|
2369
|
+
return [];
|
|
768
2370
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
2371
|
+
return {
|
|
2372
|
+
getPropertyConfigBySchema: y,
|
|
2373
|
+
getPropertyConfigByType: a,
|
|
2374
|
+
propertyConverterMap: n
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
function Bn(e, t) {
|
|
2378
|
+
let r;
|
|
2379
|
+
function n(a) {
|
|
2380
|
+
const { properties: s, title: y, ignore: m } = a, f = m && Array.isArray(m), E = Object.keys(s).reduce((c, b) => ((!f || !m.find((x) => x === b)) && (c[b] = s[b].type === "object" && s[b].properties ? n(s[b]) : re(s[b].default)), c), {});
|
|
2381
|
+
if (y && (!f || !m.find((c) => c === "id"))) {
|
|
2382
|
+
const c = y.toLowerCase().replace(/-/g, "_");
|
|
2383
|
+
E.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
2384
|
+
}
|
|
2385
|
+
return E;
|
|
2386
|
+
}
|
|
2387
|
+
function o(a) {
|
|
2388
|
+
const { properties: s, title: y, required: m } = a;
|
|
2389
|
+
if (m && Array.isArray(m)) {
|
|
2390
|
+
const f = m.reduce((E, c) => (E[c] = s[c].type === "object" && s[c].properties ? n(s[c]) : re(s[c].default), E), {});
|
|
2391
|
+
if (y && m.find((E) => E === "id")) {
|
|
2392
|
+
const E = y.toLowerCase().replace(/-/g, "_");
|
|
2393
|
+
f.id = `${E}_${Math.random().toString().slice(2, 6)}`;
|
|
2394
|
+
}
|
|
2395
|
+
return f;
|
|
2396
|
+
}
|
|
2397
|
+
return {
|
|
2398
|
+
type: y
|
|
2399
|
+
};
|
|
2400
|
+
}
|
|
2401
|
+
function p(a, s = {}, y) {
|
|
2402
|
+
const m = e[a];
|
|
2403
|
+
if (m) {
|
|
2404
|
+
let f = o(m);
|
|
2405
|
+
const E = t[a];
|
|
2406
|
+
return f = E ? E({ getSchemaByType: p }, f, s, y) : f, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(f), f;
|
|
2407
|
+
}
|
|
2408
|
+
return null;
|
|
2409
|
+
}
|
|
2410
|
+
function i(a, s) {
|
|
2411
|
+
const y = n(s);
|
|
2412
|
+
return Object.keys(y).reduce((m, f) => (Object.prototype.hasOwnProperty.call(a, f) && (m[f] && ve(m[f]) && ve(a[f] || !a[f]) ? Object.assign(m[f], a[f] || {}) : m[f] = a[f]), m), y), y;
|
|
2413
|
+
}
|
|
2414
|
+
function u(a, s) {
|
|
2415
|
+
return Object.keys(a).filter((m) => a[m] != null).reduce((m, f) => {
|
|
2416
|
+
if (s.has(f)) {
|
|
2417
|
+
const E = s.get(f);
|
|
2418
|
+
if (typeof E == "string")
|
|
2419
|
+
m[E] = a[f];
|
|
2420
|
+
else {
|
|
2421
|
+
const c = E(f, a[f], a);
|
|
2422
|
+
Object.assign(m, c);
|
|
2423
|
+
}
|
|
2424
|
+
} else
|
|
2425
|
+
m[f] = a[f];
|
|
2426
|
+
return m;
|
|
2427
|
+
}, {});
|
|
2428
|
+
}
|
|
2429
|
+
function S(a, s, y = /* @__PURE__ */ new Map()) {
|
|
2430
|
+
const m = i(a, s);
|
|
2431
|
+
return u(m, y);
|
|
2432
|
+
}
|
|
2433
|
+
function g(a) {
|
|
2434
|
+
var y;
|
|
2435
|
+
const s = a.type;
|
|
2436
|
+
if (s) {
|
|
2437
|
+
const m = e[s];
|
|
2438
|
+
if (!m)
|
|
2439
|
+
return a;
|
|
2440
|
+
const f = i(a, m), E = ((y = a.editor) == null ? void 0 : y.type) || "";
|
|
2441
|
+
if (E) {
|
|
2442
|
+
const c = e[E], b = i(a.editor, c);
|
|
2443
|
+
f.editor = b;
|
|
2444
|
+
}
|
|
2445
|
+
return f;
|
|
2446
|
+
}
|
|
2447
|
+
return a;
|
|
2448
|
+
}
|
|
2449
|
+
function v(a) {
|
|
2450
|
+
r = a;
|
|
2451
|
+
}
|
|
2452
|
+
return { getSchemaByType: p, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: S, mappingSchemaToProps: u, setDesignerContext: v };
|
|
2453
|
+
}
|
|
2454
|
+
const Mn = {}, Nn = {}, { resolveSchemaWithDefaultValue: jn } = Bn(Mn, Nn), Gn = {}, qn = {};
|
|
2455
|
+
On(Gn, qn, jn);
|
|
2456
|
+
const te = class te {
|
|
2457
|
+
/**
|
|
2458
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
2459
|
+
*/
|
|
2460
|
+
static getEditorTypesByMDataType(t, r = !1, n = "") {
|
|
2461
|
+
if (r)
|
|
2462
|
+
return [{ key: h["language-textbox"].type, value: h["language-textbox"].name }];
|
|
2463
|
+
let o = te.fieldControlTypeMapping[t];
|
|
2464
|
+
if (n === "data-grid-column" && (o != null && o.length)) {
|
|
2465
|
+
const p = [h["check-group"].type, h["radio-group"].type, h.image.type, h["rich-text-editor"].type];
|
|
2466
|
+
o = o.filter((i) => !p.includes(i.key));
|
|
2467
|
+
}
|
|
2468
|
+
return o;
|
|
2469
|
+
}
|
|
2470
|
+
/**
|
|
2471
|
+
* 获取所有输入类控件
|
|
2472
|
+
*/
|
|
2473
|
+
static getAllInputTypes() {
|
|
2474
|
+
const t = [];
|
|
2475
|
+
for (const r in te.fieldControlTypeMapping)
|
|
2476
|
+
te.fieldControlTypeMapping[r].forEach((n) => {
|
|
2477
|
+
t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
|
|
2478
|
+
});
|
|
2479
|
+
return t;
|
|
2480
|
+
}
|
|
2481
|
+
/**
|
|
2482
|
+
* 提供schema字段基础属性和DOM控件属性的映射
|
|
2483
|
+
* @param control 控件元数据
|
|
2484
|
+
*/
|
|
2485
|
+
static mappingDomPropAndSchemaProp(t, r) {
|
|
2486
|
+
var p;
|
|
2487
|
+
const n = (p = t.editor) == null ? void 0 : p.type, o = [];
|
|
2488
|
+
return (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && r && r.categoryId && r.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === h["input-group"].type || n === h.textarea.type || n === h["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === h["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === h["combo-list"].type || n === h["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === h["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === h["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === h.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
|
|
2489
|
+
}
|
|
2490
|
+
};
|
|
2491
|
+
/**
|
|
2492
|
+
* <字段类型,可配置的控件类型列表>的映射
|
|
2493
|
+
*/
|
|
2494
|
+
L(te, "fieldControlTypeMapping", {
|
|
2495
|
+
String: [
|
|
2496
|
+
{ key: h["input-group"].type, value: h["input-group"].name },
|
|
2497
|
+
{ key: h.lookup.type, value: h.lookup.name },
|
|
2498
|
+
{ key: h.image.type, value: h.image.name },
|
|
2499
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name },
|
|
2500
|
+
{ key: h.switch.type, value: h.switch.name },
|
|
2501
|
+
{ key: h["check-box"].type, value: h["check-box"].name },
|
|
2502
|
+
{ key: h["check-group"].type, value: h["check-group"].name },
|
|
2503
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name },
|
|
2504
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
2505
|
+
{ key: h.textarea.type, value: h.textarea.name },
|
|
2506
|
+
{ key: h["time-picker"].type, value: h["time-picker"].name }
|
|
2507
|
+
],
|
|
2508
|
+
Text: [
|
|
2509
|
+
{ key: h.textarea.type, value: h.textarea.name },
|
|
2510
|
+
{ key: h.lookup.type, value: h.lookup.name },
|
|
2511
|
+
{ key: h.image.type, value: h.image.name },
|
|
2512
|
+
{ key: h["rich-text-editor"].type, value: h["rich-text-editor"].name }
|
|
2513
|
+
],
|
|
2514
|
+
Decimal: [
|
|
2515
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
2516
|
+
],
|
|
2517
|
+
Integer: [
|
|
2518
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
2519
|
+
],
|
|
2520
|
+
Number: [
|
|
2521
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name },
|
|
2522
|
+
{ key: h.switch.type, value: h.switch.name },
|
|
2523
|
+
{ key: h["check-box"].type, value: h["check-box"].name }
|
|
2524
|
+
],
|
|
2525
|
+
BigNumber: [
|
|
2526
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
2527
|
+
],
|
|
2528
|
+
Date: [
|
|
2529
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name }
|
|
2530
|
+
],
|
|
2531
|
+
DateTime: [
|
|
2532
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name }
|
|
2533
|
+
],
|
|
2534
|
+
Boolean: [
|
|
2535
|
+
{ key: h.switch.type, value: h.switch.name },
|
|
2536
|
+
{ key: h["check-box"].type, value: h["check-box"].name }
|
|
2537
|
+
],
|
|
2538
|
+
Enum: [
|
|
2539
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
2540
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name }
|
|
2541
|
+
],
|
|
2542
|
+
Object: [
|
|
2543
|
+
{ key: h.lookup.type, value: h.lookup.name },
|
|
2544
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
2545
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name }
|
|
2546
|
+
]
|
|
2547
|
+
});
|
|
2548
|
+
let Ce = te;
|
|
2549
|
+
var ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {}), je = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(je || {});
|
|
2550
|
+
function An(e, t, r) {
|
|
2551
|
+
function n() {
|
|
2552
|
+
const i = r.componentId;
|
|
2553
|
+
if (!i)
|
|
2554
|
+
return !1;
|
|
2555
|
+
const u = e.formSchemaUtils.getViewModelIdByComponentId(i);
|
|
2556
|
+
if (!u)
|
|
2557
|
+
return !1;
|
|
2558
|
+
const { schema: S } = t, { designViewModelUtils: g } = e, v = g.getDgViewModel(u), a = v == null ? void 0 : v.fields.find((s) => s.id === S.binding.field);
|
|
2559
|
+
return !(!a || a.$type !== je.SimpleField);
|
|
2560
|
+
}
|
|
2561
|
+
function o() {
|
|
2562
|
+
const { schema: i } = t;
|
|
2563
|
+
return !!e.formSchemaUtils.getVariableById(i.binding.field);
|
|
2564
|
+
}
|
|
2565
|
+
function p() {
|
|
2566
|
+
var S;
|
|
2567
|
+
const { schema: i } = t;
|
|
2568
|
+
let u = !0;
|
|
2569
|
+
if (!e || !((S = i.binding) != null && S.field))
|
|
2570
|
+
return u;
|
|
2571
|
+
switch (i.binding.type) {
|
|
2572
|
+
case ue.Form: {
|
|
2573
|
+
u = n();
|
|
782
2574
|
break;
|
|
2575
|
+
}
|
|
2576
|
+
case ue.Variable:
|
|
2577
|
+
u = o();
|
|
2578
|
+
}
|
|
2579
|
+
return u;
|
|
2580
|
+
}
|
|
2581
|
+
return { checkBindingFieldValidation: p };
|
|
2582
|
+
}
|
|
2583
|
+
const $n = /* @__PURE__ */ Q({
|
|
2584
|
+
name: "FDynamicFormGroupDesign",
|
|
2585
|
+
props: ze,
|
|
2586
|
+
emits: ["change", "update:modelValue"],
|
|
2587
|
+
setup(e, t) {
|
|
2588
|
+
var U;
|
|
2589
|
+
const r = M(e.id), n = M(e.customClass), o = M(e.editor), p = M(e.label), i = M(e.modelValue), u = M(!0), S = M(((U = e.editor) == null ? void 0 : U.required) === !0), g = M(e.showLabel);
|
|
2590
|
+
M(e.type);
|
|
2591
|
+
const v = M(), a = D("designer-host-service"), s = D("design-item-context"), y = W(() => g.value ? e.showLabelType : "none"), {
|
|
2592
|
+
resolveEditorProps: m,
|
|
2593
|
+
resolveEditorType: f
|
|
2594
|
+
} = ln(), E = W(() => ({
|
|
2595
|
+
"form-group": !0,
|
|
2596
|
+
"farris-form-group": !0,
|
|
2597
|
+
"common-group": !0,
|
|
2598
|
+
"q-state-readonly": u.value,
|
|
2599
|
+
"form-group-in-canvas": !0
|
|
2600
|
+
})), c = W(() => {
|
|
2601
|
+
const R = o.value.type || "input-group", l = f(R), d = m(R, o.value);
|
|
2602
|
+
return () => B(l, pe({
|
|
2603
|
+
ref: v
|
|
2604
|
+
}, d, {
|
|
2605
|
+
modelValue: i.value,
|
|
2606
|
+
"onUpdate:modelValue": (V) => i.value = V
|
|
2607
|
+
}), null);
|
|
2608
|
+
});
|
|
2609
|
+
_([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([R, l, d, V, O, k, P]) => {
|
|
2610
|
+
var I;
|
|
2611
|
+
r.value = R, n.value = l, o.value = {
|
|
2612
|
+
...d
|
|
2613
|
+
}, p.value = V, i.value = O, u.value = k, S.value = ((I = o.value) == null ? void 0 : I.required) === !0, g.value = P;
|
|
2614
|
+
}, {
|
|
2615
|
+
deep: !0
|
|
2616
|
+
});
|
|
2617
|
+
const x = !D("external-container-id"), {
|
|
2618
|
+
checkBindingFieldValidation: j
|
|
2619
|
+
} = An(a, s, e);
|
|
2620
|
+
function $() {
|
|
2621
|
+
const R = x ? j() : !0;
|
|
2622
|
+
return B(Ue, {
|
|
2623
|
+
id: `${r.value}-lable`,
|
|
2624
|
+
showType: y.value,
|
|
2625
|
+
required: S.value,
|
|
2626
|
+
text: p.value,
|
|
2627
|
+
title: p.value,
|
|
2628
|
+
valid: R,
|
|
2629
|
+
inValidTip: "绑定信息已失效,请切换绑定或移除控件"
|
|
2630
|
+
}, null);
|
|
2631
|
+
}
|
|
2632
|
+
const G = W(() => {
|
|
2633
|
+
if (e.fill)
|
|
2634
|
+
return {
|
|
2635
|
+
maxWidth: "none"
|
|
2636
|
+
};
|
|
2637
|
+
});
|
|
2638
|
+
return t.expose({
|
|
2639
|
+
editorRef: v
|
|
2640
|
+
}), () => B("div", {
|
|
2641
|
+
id: `${r.value}-input-group`,
|
|
2642
|
+
class: n.value
|
|
2643
|
+
}, [B("div", {
|
|
2644
|
+
class: "farris-group-wrap",
|
|
2645
|
+
style: G.value
|
|
2646
|
+
}, [B("div", {
|
|
2647
|
+
class: E.value
|
|
2648
|
+
}, [$(), B("div", {
|
|
2649
|
+
class: "farris-input-wrap"
|
|
2650
|
+
}, [c.value()])])])]);
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
function Rn(e, t) {
|
|
2654
|
+
function r() {
|
|
2655
|
+
return !0;
|
|
2656
|
+
}
|
|
2657
|
+
function n() {
|
|
2658
|
+
return !0;
|
|
2659
|
+
}
|
|
2660
|
+
function o() {
|
|
2661
|
+
return !1;
|
|
2662
|
+
}
|
|
2663
|
+
function p() {
|
|
2664
|
+
return !0;
|
|
2665
|
+
}
|
|
2666
|
+
function i(a) {
|
|
2667
|
+
var c;
|
|
2668
|
+
const s = t == null ? void 0 : t.designViewModelUtils, y = t == null ? void 0 : t.formSchemaUtils, m = (c = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : c.belongedComponentId;
|
|
2669
|
+
if (!m || !s || !y)
|
|
2670
|
+
return;
|
|
2671
|
+
const f = y.getViewModelIdByComponentId(m), E = s.getDgViewModel(f);
|
|
2672
|
+
E && E.removeField([a]);
|
|
2673
|
+
}
|
|
2674
|
+
function u(a, s) {
|
|
2675
|
+
const y = t == null ? void 0 : t.formSchemaUtils, { schema: m } = e;
|
|
2676
|
+
if (y.getComponents().find((E) => {
|
|
2677
|
+
let c = y.getControlsInCmpWidthBinding(E.viewModel, a);
|
|
2678
|
+
if (c = c.filter((b) => {
|
|
2679
|
+
var j;
|
|
2680
|
+
if (b.id === m.id)
|
|
2681
|
+
return !1;
|
|
2682
|
+
const x = s.type === "visible" ? b[s.type] : (j = b.editor) == null ? void 0 : j[s.type];
|
|
2683
|
+
if (x && x.type === "Expression" && x.expressionId === s.id)
|
|
2684
|
+
return !0;
|
|
2685
|
+
}), c.length)
|
|
2686
|
+
return !0;
|
|
2687
|
+
}))
|
|
2688
|
+
return !0;
|
|
2689
|
+
}
|
|
2690
|
+
function S(a) {
|
|
2691
|
+
var m;
|
|
2692
|
+
const s = t == null ? void 0 : t.formSchemaUtils, { schema: y } = e;
|
|
2693
|
+
if (s.getExpressions().length) {
|
|
2694
|
+
const f = s.getExpressions(), E = f.findIndex((c) => c.target === a);
|
|
2695
|
+
E > -1 && ((m = f[E].rules) == null || m.map((c) => {
|
|
2696
|
+
var b;
|
|
2697
|
+
switch (c.type) {
|
|
2698
|
+
case "visible":
|
|
2699
|
+
case "readonly":
|
|
2700
|
+
case "required": {
|
|
2701
|
+
const x = c.type === "visible" ? y[c.type] : (b = y.editor) == null ? void 0 : b[c.type];
|
|
2702
|
+
x && x.type === "Expression" && x.expressionId === c.id && (u(a, c) || (c.needDelete = !0));
|
|
2703
|
+
break;
|
|
2704
|
+
}
|
|
2705
|
+
default:
|
|
2706
|
+
u(a, c) || (c.needDelete = !0);
|
|
2707
|
+
}
|
|
2708
|
+
}), f[E].rules = f[E].rules.filter((c) => !c.needDelete));
|
|
783
2709
|
}
|
|
784
2710
|
}
|
|
785
|
-
function
|
|
786
|
-
var
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}, x = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((y) => {
|
|
802
|
-
var T;
|
|
803
|
-
return y === ((T = h.value) == null ? void 0 : T.editorType);
|
|
804
|
-
}) && (g.beginValue = h.value.begin, g.endValue = h.value.end);
|
|
805
|
-
return Object.prototype.hasOwnProperty.call(h, "disabled") && (g.disabled = h.disabled), { id: k, editor: g, visible: q, needEmitChange: x };
|
|
806
|
-
}
|
|
807
|
-
return { getSingleControlType: t, convertToControls: o, conditionChangeHandler: f, renderFieldConditionEditor: b };
|
|
2711
|
+
function g() {
|
|
2712
|
+
var s, y;
|
|
2713
|
+
const a = (s = e == null ? void 0 : e.parent) == null ? void 0 : s.componentInstance.value;
|
|
2714
|
+
((y = a == null ? void 0 : a.schema) == null ? void 0 : y.type) === h["response-layout-item"].type && (a != null && a.schema.appearance.class) && (a.schema.appearance.class = a.schema.appearance.class.replace("f-form-layout", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form-controls-inline", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form-auto", ""), a.schema.appearance.class = a.schema.appearance.class.trim().replace(" ", " "));
|
|
2715
|
+
}
|
|
2716
|
+
function v() {
|
|
2717
|
+
const { schema: a } = e, s = a.binding && a.binding.field;
|
|
2718
|
+
s && (i(s), S(s)), g();
|
|
2719
|
+
}
|
|
2720
|
+
return {
|
|
2721
|
+
canAccepts: o,
|
|
2722
|
+
checkCanDeleteComponent: n,
|
|
2723
|
+
checkCanMoveComponent: r,
|
|
2724
|
+
hideNestedPaddingInDesginerView: p,
|
|
2725
|
+
onRemoveComponent: v
|
|
2726
|
+
};
|
|
808
2727
|
}
|
|
2728
|
+
const zn = /* @__PURE__ */ Q({
|
|
2729
|
+
name: "FFormGroupDesign",
|
|
2730
|
+
props: Oe,
|
|
2731
|
+
emits: [],
|
|
2732
|
+
setup(e, t) {
|
|
2733
|
+
const r = M(), n = D("design-item-context"), o = D("designer-host-service"), p = Rn(n, o), i = Ve(r, n, p);
|
|
2734
|
+
return ke(() => {
|
|
2735
|
+
r.value.componentInstance = i, i.value.getPropConfig = (...u) => {
|
|
2736
|
+
var g, v, a;
|
|
2737
|
+
let S = Fr[e.editor.type];
|
|
2738
|
+
return S && Object.keys(S).length === 0 && ((g = r.value) != null && g.editorRef) && ((a = (v = r.value) == null ? void 0 : v.editorRef) != null && a.getPropConfig) && (S = r.value.editorRef.getPropConfig(...u, i.value)), S;
|
|
2739
|
+
};
|
|
2740
|
+
}), t.expose(i.value), () => B($n, pe(e, {
|
|
2741
|
+
ref: r
|
|
2742
|
+
}), null);
|
|
2743
|
+
}
|
|
2744
|
+
}), ki = /* @__PURE__ */ Q({
|
|
2745
|
+
name: "FConditionFieldsDesign",
|
|
2746
|
+
directives: {
|
|
2747
|
+
"area-response": Qe
|
|
2748
|
+
},
|
|
2749
|
+
props: me,
|
|
2750
|
+
emits: ["valueChange", "blur", "focus", "click", "input"],
|
|
2751
|
+
setup(e, t) {
|
|
2752
|
+
const r = M(), n = M(e.key), o = M(e.conditions), p = ge(e), {
|
|
2753
|
+
fieldMap: i,
|
|
2754
|
+
loadFieldConfigs: u
|
|
2755
|
+
} = p, S = Pe(e, t, r), {
|
|
2756
|
+
resizeObserver: g
|
|
2757
|
+
} = S;
|
|
2758
|
+
u(!0), Te(() => {
|
|
2759
|
+
var s;
|
|
2760
|
+
(s = g.value) == null || s.unobserve(r.value);
|
|
2761
|
+
}), _(() => e.conditions, () => {
|
|
2762
|
+
o.value = e.conditions;
|
|
2763
|
+
});
|
|
2764
|
+
const v = W(() => ({
|
|
2765
|
+
// row: true,
|
|
2766
|
+
"f-utils-flex-row-wrap": !0,
|
|
2767
|
+
"farris-form": !0,
|
|
2768
|
+
"condition-div": !0
|
|
2769
|
+
}));
|
|
2770
|
+
function a() {
|
|
2771
|
+
return o.value.map((s) => {
|
|
2772
|
+
var f, E;
|
|
2773
|
+
const y = (f = i.get(s.fieldCode)) == null ? void 0 : f.editor;
|
|
2774
|
+
y && (y.disabled = !0);
|
|
2775
|
+
let m = ((E = y == null ? void 0 : y.appearance) == null ? void 0 : E.class) || e.itemClass;
|
|
2776
|
+
return y != null && y.multiLineLabel && (m = m + " farris-group-multi-label"), B(zn, {
|
|
2777
|
+
customClass: m,
|
|
2778
|
+
label: (y == null ? void 0 : y.showLabel) === !1 ? " " : s.fieldName,
|
|
2779
|
+
required: y == null ? void 0 : y.required,
|
|
2780
|
+
editor: y,
|
|
2781
|
+
type: "form-group"
|
|
2782
|
+
}, null);
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
return () => ce(B("div", {
|
|
2786
|
+
class: v.value,
|
|
2787
|
+
key: n.value,
|
|
2788
|
+
ref: r
|
|
2789
|
+
}, [a()]), [[de("area-response")]]);
|
|
2790
|
+
}
|
|
2791
|
+
});
|
|
2792
|
+
ae.install = (e) => {
|
|
2793
|
+
e.component(be.name, be).component(ae.name, ae);
|
|
2794
|
+
};
|
|
809
2795
|
export {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
2796
|
+
Tr as CheckBoxValue,
|
|
2797
|
+
Se as ComboListValue,
|
|
2798
|
+
kr as ComboLookupValue,
|
|
2799
|
+
Me as CompareType,
|
|
2800
|
+
_r as CompareTypeInEditor,
|
|
2801
|
+
oe as DatePickerValue,
|
|
2802
|
+
fe as DateRangeValue,
|
|
2803
|
+
Or as DateTimePickerValue,
|
|
2804
|
+
Ur as EnumType,
|
|
2805
|
+
be as FConditionFields,
|
|
2806
|
+
ki as FConditionFieldsDesign,
|
|
2807
|
+
ae as FConditionList,
|
|
2808
|
+
wr as InputGroupValue,
|
|
2809
|
+
xr as LookupValue,
|
|
2810
|
+
Vr as MonthPickerValue,
|
|
2811
|
+
Sr as MonthRangeValue,
|
|
2812
|
+
Er as NumberRangeValue,
|
|
2813
|
+
Ir as NumberSpinnerValue,
|
|
2814
|
+
Lr as RadioGroupValue,
|
|
2815
|
+
Ee as TextValue,
|
|
2816
|
+
Be as ValueType,
|
|
2817
|
+
Pr as YearPickerValue,
|
|
2818
|
+
me as conditionProps,
|
|
2819
|
+
ae as default,
|
|
2820
|
+
Jr as getCompareTypeName,
|
|
2821
|
+
Qr as useCompare,
|
|
2822
|
+
Xr as useCondition,
|
|
2823
|
+
Le as useConditionUtils,
|
|
834
2824
|
Ie as useConditionValue
|
|
835
2825
|
};
|