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