@farris/ui-vue 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3791 -2760
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-view/index.esm.js +1815 -1789
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +2975 -2615
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +427 -466
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +2 -3
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +427 -646
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1190 -850
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3863
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2447 -2221
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +760 -543
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +105 -104
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +320 -153
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5191 -4407
- package/designer/data-grid/index.umd.cjs +17 -10
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +12665 -12117
- package/designer/farris-designer.all.umd.cjs +12 -12
- package/designer/list-view/index.esm.js +327 -327
- package/designer/list-view/index.umd.cjs +3 -3
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +0 -1
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +9 -9
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2829 -2540
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +822 -464
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +69725 -68244
- package/farris.all.umd.cjs +92 -92
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +14 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +6 -1
- package/types/condition/index.d.ts +55 -0
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → flow-canvas/src/components/flow-node-item.component.d.ts} +1 -1
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +1 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-view/src/tree-view.props.d.ts +1 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/layout/designer.d.ts +0 -32
- package/types/list-nav/designer.d.ts +0 -6
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
|
@@ -1,22 +1,217 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { isUndefined as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { ref as g, computed as R, createVNode as d, Fragment as U, watch as j, withModifiers as Ae, withDirectives as He, vModelText as Ee, defineComponent as N, onMounted as ee, inject as Q } from "vue";
|
|
2
|
+
import { resolveAppearance as de, createPropsResolver as ce, getPropsResolverGenerator as je } from "../dynamic-resolver/index.esm.js";
|
|
3
|
+
import { getCustomStyle as ae, getCustomClass as Z, FormSchemaEntityFieldType$Type as Y, withInstall as $e } from "../common/index.esm.js";
|
|
4
|
+
import { useFilter as Ge, useIdentify as Ne, useHierarchy as _e, useGroupData as ze, useDataView as Ue, useSelection as We, usePagination as qe, useRow as De, useEdit as Ke, useVisualDataBound as Xe, useVisualDataCell as Ye, useVisualDataRow as Je, useVisualGroupRow as Qe, useVisualSummaryRow as Ze, useVisualData as et, useSidebar as tt, useColumn as nt, useVirtualScroll as lt, getPagination as it } from "../data-view/index.esm.js";
|
|
5
|
+
import { LocaleService as te } from "../locale/index.esm.js";
|
|
6
|
+
import { FCheckbox as ne } from "../checkbox/index.esm.js";
|
|
7
|
+
import at from "../button-edit/index.esm.js";
|
|
8
|
+
import { isUndefined as ot } from "lodash-es";
|
|
9
|
+
import st from "../list-view/index.esm.js";
|
|
10
|
+
import rt from "../../designer/button-edit/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as fe } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { InputBaseProperty as ut } from "../property-panel/index.esm.js";
|
|
13
|
+
const dt = /* @__PURE__ */ new Map([
|
|
14
|
+
["appearance", de]
|
|
15
|
+
]), ct = "https://json-schema.org/draft/2020-12/schema", ft = "https://farris-design.gitee.io/order.schema.json", mt = "order", vt = "A Farris Component", gt = "object", ht = {
|
|
16
|
+
id: {
|
|
17
|
+
description: "The unique identifier for a order",
|
|
18
|
+
type: "string"
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
description: "The type string of order component",
|
|
22
|
+
type: "string",
|
|
23
|
+
default: "order"
|
|
24
|
+
},
|
|
25
|
+
appearance: {
|
|
26
|
+
description: "",
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
class: {
|
|
30
|
+
type: "string"
|
|
31
|
+
},
|
|
32
|
+
style: {
|
|
33
|
+
type: "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
default: {}
|
|
37
|
+
},
|
|
38
|
+
binding: {
|
|
39
|
+
description: "",
|
|
40
|
+
type: "object",
|
|
41
|
+
default: {}
|
|
42
|
+
},
|
|
43
|
+
editable: {
|
|
44
|
+
description: "",
|
|
45
|
+
type: "boolean",
|
|
46
|
+
default: !0
|
|
47
|
+
},
|
|
48
|
+
enableLinkLabel: {
|
|
49
|
+
description: "",
|
|
50
|
+
type: "boolean",
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
label: {
|
|
54
|
+
description: "",
|
|
55
|
+
type: "string",
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
lableWidth: {
|
|
59
|
+
description: "",
|
|
60
|
+
type: "number"
|
|
61
|
+
},
|
|
62
|
+
placeholder: {
|
|
63
|
+
description: "",
|
|
64
|
+
type: "string",
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
readonly: {
|
|
68
|
+
description: "",
|
|
69
|
+
type: "boolean",
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
required: {
|
|
73
|
+
description: "",
|
|
74
|
+
type: "boolean",
|
|
75
|
+
default: !1
|
|
76
|
+
},
|
|
77
|
+
tabindex: {
|
|
78
|
+
description: "",
|
|
79
|
+
type: "number",
|
|
80
|
+
default: -1
|
|
81
|
+
},
|
|
82
|
+
textAlign: {
|
|
83
|
+
description: "",
|
|
84
|
+
type: "string",
|
|
85
|
+
enum: [
|
|
86
|
+
"left",
|
|
87
|
+
"middle",
|
|
88
|
+
"right"
|
|
89
|
+
],
|
|
90
|
+
default: "left"
|
|
91
|
+
},
|
|
92
|
+
visible: {
|
|
93
|
+
description: "",
|
|
94
|
+
type: "boolean",
|
|
95
|
+
default: !0
|
|
96
|
+
},
|
|
97
|
+
onBlur: {
|
|
98
|
+
description: "",
|
|
99
|
+
type: "string",
|
|
100
|
+
default: ""
|
|
101
|
+
},
|
|
102
|
+
onClickLinkLabel: {
|
|
103
|
+
description: "",
|
|
104
|
+
type: "string",
|
|
105
|
+
default: ""
|
|
106
|
+
}
|
|
107
|
+
}, yt = [
|
|
108
|
+
"id",
|
|
109
|
+
"type"
|
|
110
|
+
], pt = {
|
|
111
|
+
$schema: ct,
|
|
112
|
+
$id: ft,
|
|
113
|
+
title: mt,
|
|
114
|
+
description: vt,
|
|
115
|
+
type: gt,
|
|
116
|
+
properties: ht,
|
|
117
|
+
required: yt
|
|
118
|
+
};
|
|
119
|
+
function bt(e, t, n) {
|
|
120
|
+
return t;
|
|
121
|
+
}
|
|
122
|
+
const Ct = "order", St = "A Farris Component", wt = "object", Ft = {
|
|
123
|
+
basic: {
|
|
124
|
+
description: "Basic Infomation",
|
|
125
|
+
title: "基本信息",
|
|
126
|
+
properties: {
|
|
127
|
+
id: {
|
|
128
|
+
description: "组件标识",
|
|
129
|
+
title: "标识",
|
|
130
|
+
type: "string",
|
|
131
|
+
readonly: !0
|
|
132
|
+
},
|
|
133
|
+
type: {
|
|
134
|
+
description: "组件类型",
|
|
135
|
+
title: "控件类型",
|
|
136
|
+
type: "select",
|
|
137
|
+
editor: {
|
|
138
|
+
type: "waiting for modification",
|
|
139
|
+
enum: []
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
behavior: {
|
|
145
|
+
description: "Basic Infomation",
|
|
146
|
+
title: "行为",
|
|
147
|
+
properties: {
|
|
148
|
+
editable: {
|
|
149
|
+
description: "",
|
|
150
|
+
title: "允许编辑",
|
|
151
|
+
type: "boolean"
|
|
152
|
+
},
|
|
153
|
+
readonly: {
|
|
154
|
+
description: "",
|
|
155
|
+
title: "只读",
|
|
156
|
+
type: "string"
|
|
157
|
+
},
|
|
158
|
+
required: {
|
|
159
|
+
description: "",
|
|
160
|
+
title: "必填",
|
|
161
|
+
type: "boolean"
|
|
162
|
+
},
|
|
163
|
+
visible: {
|
|
164
|
+
description: "",
|
|
165
|
+
title: "可见",
|
|
166
|
+
type: "boolean"
|
|
167
|
+
},
|
|
168
|
+
placeholder: {
|
|
169
|
+
description: "",
|
|
170
|
+
title: "提示文本",
|
|
171
|
+
type: "string"
|
|
172
|
+
},
|
|
173
|
+
tabindex: {
|
|
174
|
+
description: "",
|
|
175
|
+
title: "tab索引",
|
|
176
|
+
type: "number"
|
|
177
|
+
},
|
|
178
|
+
textAlign: {
|
|
179
|
+
description: "",
|
|
180
|
+
title: "对齐方式",
|
|
181
|
+
type: "enum",
|
|
182
|
+
editor: {
|
|
183
|
+
type: "combo-list",
|
|
184
|
+
textField: "name",
|
|
185
|
+
valueField: "value",
|
|
186
|
+
data: [
|
|
187
|
+
{
|
|
188
|
+
value: "left",
|
|
189
|
+
name: "左对齐"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: "center",
|
|
193
|
+
name: "居中"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
value: "right",
|
|
197
|
+
name: "右对齐"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}, It = {
|
|
205
|
+
title: Ct,
|
|
206
|
+
description: St,
|
|
207
|
+
type: wt,
|
|
208
|
+
categories: Ft
|
|
209
|
+
}, le = {
|
|
15
210
|
/** 排序列数据源 */
|
|
16
211
|
dataSource: { type: Array, default: [] },
|
|
17
212
|
/** 当前排序数组 */
|
|
18
213
|
items: { type: Array, default: [] }
|
|
19
|
-
},
|
|
214
|
+
}, oe = ce(le, pt, dt, bt, It), Vt = {
|
|
20
215
|
/** 列集合 */
|
|
21
216
|
columns: {
|
|
22
217
|
type: Array,
|
|
@@ -84,226 +279,226 @@ const ot = {
|
|
|
84
279
|
/** 分页 */
|
|
85
280
|
pagination: { type: Object, default: { enable: !1, size: 20 } }
|
|
86
281
|
};
|
|
87
|
-
function
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
for (;
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
return
|
|
98
|
-
const
|
|
99
|
-
let
|
|
100
|
-
for (;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
282
|
+
function kt(e, t) {
|
|
283
|
+
function n(o) {
|
|
284
|
+
const c = [];
|
|
285
|
+
let F = o.nextNode();
|
|
286
|
+
for (; F; )
|
|
287
|
+
c.push(F), F = o.nextNode();
|
|
288
|
+
return c;
|
|
289
|
+
}
|
|
290
|
+
function l(o, c) {
|
|
291
|
+
const F = document.createTreeWalker(o, NodeFilter.SHOW_TEXT);
|
|
292
|
+
return n(F).map((y) => ({ textNode: y, text: (y.textContent || "").toLocaleLowerCase() })).map(({ textNode: y, text: p }) => {
|
|
293
|
+
const C = [];
|
|
294
|
+
let x = 0;
|
|
295
|
+
for (; x < p.length; ) {
|
|
296
|
+
const V = p.indexOf(c, x);
|
|
297
|
+
if (V === -1)
|
|
103
298
|
break;
|
|
104
|
-
|
|
299
|
+
C.push(V), x = V + c.length;
|
|
105
300
|
}
|
|
106
|
-
return
|
|
107
|
-
const
|
|
108
|
-
return
|
|
301
|
+
return C.map((V) => {
|
|
302
|
+
const i = new Range();
|
|
303
|
+
return i.setStart(y, V), i.setEnd(y, V + c.length), i;
|
|
109
304
|
});
|
|
110
305
|
}).flat();
|
|
111
306
|
}
|
|
112
|
-
function
|
|
113
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
307
|
+
function u(o) {
|
|
308
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !o || !t))
|
|
114
309
|
return;
|
|
115
|
-
const
|
|
116
|
-
CSS.highlights.set("search-result",
|
|
310
|
+
const c = l(t.value, o.toLocaleLowerCase()), F = new Highlight(...c);
|
|
311
|
+
CSS.highlights.set("search-result", F);
|
|
117
312
|
}
|
|
118
|
-
return { search:
|
|
313
|
+
return { search: u };
|
|
119
314
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
var
|
|
123
|
-
return ((
|
|
315
|
+
function se(e, t, n, l, u, o, c, F, T, b) {
|
|
316
|
+
const I = g(e.size), y = g(e.textField), p = g(e.titleField), C = g(e.disableField), x = R(() => {
|
|
317
|
+
var m, B;
|
|
318
|
+
return ((m = e.selection) == null ? void 0 : m.multiSelect) && ((B = e.selection) == null ? void 0 : B.showCheckbox);
|
|
124
319
|
}), {
|
|
125
|
-
onMouseenterItem:
|
|
126
|
-
onMouseoverItem:
|
|
127
|
-
onMouseoutItem:
|
|
128
|
-
} =
|
|
129
|
-
getKey:
|
|
130
|
-
listViewItemClass:
|
|
131
|
-
listViewItemStyle:
|
|
132
|
-
onCheckItem:
|
|
133
|
-
onClickItem:
|
|
134
|
-
} =
|
|
135
|
-
const
|
|
320
|
+
onMouseenterItem: V,
|
|
321
|
+
onMouseoverItem: i,
|
|
322
|
+
onMouseoutItem: r
|
|
323
|
+
} = o, {
|
|
324
|
+
getKey: a,
|
|
325
|
+
listViewItemClass: s,
|
|
326
|
+
listViewItemStyle: S,
|
|
327
|
+
onCheckItem: v,
|
|
328
|
+
onClickItem: f
|
|
329
|
+
} = c, O = R(() => {
|
|
330
|
+
const m = {
|
|
136
331
|
"text-overflow": "ellipsis",
|
|
137
332
|
overflow: "hidden",
|
|
138
333
|
"white-space": "nowrap"
|
|
139
334
|
};
|
|
140
|
-
return e.itemClass ?
|
|
141
|
-
margin:
|
|
142
|
-
...
|
|
335
|
+
return e.itemClass ? m : {
|
|
336
|
+
margin: I.value === "small" ? "0.25rem 0" : "8px 0",
|
|
337
|
+
...m
|
|
143
338
|
};
|
|
144
339
|
});
|
|
145
|
-
function
|
|
146
|
-
return
|
|
147
|
-
class:
|
|
148
|
-
id:
|
|
149
|
-
key:
|
|
150
|
-
style:
|
|
151
|
-
onClick: (E) =>
|
|
152
|
-
onMouseenter: (E) =>
|
|
153
|
-
onMouseover: (E) =>
|
|
154
|
-
onMouseout: (E) =>
|
|
155
|
-
}, [
|
|
340
|
+
function k(m, B, H) {
|
|
341
|
+
return m.checked = F.findIndexInSelectedItems(m) > -1, d("li", {
|
|
342
|
+
class: s(m, B),
|
|
343
|
+
id: a(m, B),
|
|
344
|
+
key: a(m, B),
|
|
345
|
+
style: S(m, B),
|
|
346
|
+
onClick: (E) => f(m, B, E),
|
|
347
|
+
onMouseenter: (E) => V(E, m, B),
|
|
348
|
+
onMouseover: (E) => i(E, m, B),
|
|
349
|
+
onMouseout: (E) => r(E, m, B)
|
|
350
|
+
}, [x.value && d("div", {
|
|
156
351
|
class: "f-list-select",
|
|
157
352
|
onClick: (E) => E.stopPropagation()
|
|
158
|
-
}, [
|
|
159
|
-
id: "list-" +
|
|
353
|
+
}, [d(ne, {
|
|
354
|
+
id: "list-" + a(m, B),
|
|
160
355
|
customClass: "listview-checkbox float-left",
|
|
161
|
-
disabled:
|
|
162
|
-
checked:
|
|
163
|
-
"onUpdate:checked": (E) =>
|
|
356
|
+
disabled: m[C.value],
|
|
357
|
+
checked: m.checked,
|
|
358
|
+
"onUpdate:checked": (E) => m.checked = E,
|
|
164
359
|
onChange: (E) => {
|
|
165
|
-
|
|
360
|
+
v(m, B, !E.checked);
|
|
166
361
|
}
|
|
167
|
-
}, null)]),
|
|
362
|
+
}, null)]), d("div", {
|
|
168
363
|
class: "f-list-content"
|
|
169
|
-
}, [
|
|
364
|
+
}, [d("div", {
|
|
170
365
|
class: e.itemContentClass,
|
|
171
|
-
style:
|
|
172
|
-
title:
|
|
173
|
-
}, [
|
|
366
|
+
style: O.value,
|
|
367
|
+
title: m.raw[p.value] || m.raw[y.value]
|
|
368
|
+
}, [m.raw[y.value]])])]);
|
|
174
369
|
}
|
|
175
370
|
return {
|
|
176
|
-
renderItem:
|
|
371
|
+
renderItem: k
|
|
177
372
|
};
|
|
178
373
|
}
|
|
179
|
-
function
|
|
180
|
-
const
|
|
181
|
-
onMouseenterItem:
|
|
182
|
-
onMouseoverItem:
|
|
183
|
-
onMouseoutItem:
|
|
184
|
-
} =
|
|
185
|
-
getKey:
|
|
186
|
-
listViewItemClass:
|
|
187
|
-
listViewItemStyle:
|
|
188
|
-
onCheckItem:
|
|
189
|
-
onClickItem:
|
|
190
|
-
updateSelectedItems:
|
|
191
|
-
} =
|
|
192
|
-
function
|
|
193
|
-
return e.contentTemplate ?
|
|
194
|
-
item:
|
|
195
|
-
index:
|
|
196
|
-
selectedItem:
|
|
197
|
-
})]) : t.slots.content ?
|
|
198
|
-
item:
|
|
199
|
-
index:
|
|
200
|
-
selectedItem:
|
|
201
|
-
})]) :
|
|
374
|
+
function Tt(e, t, n, l, u, o, c, F, T, b) {
|
|
375
|
+
const I = g(e.multiSelect), y = g(e.disableField), p = g(e.textField), {
|
|
376
|
+
onMouseenterItem: C,
|
|
377
|
+
onMouseoverItem: x,
|
|
378
|
+
onMouseoutItem: V
|
|
379
|
+
} = o, {
|
|
380
|
+
getKey: i,
|
|
381
|
+
listViewItemClass: r,
|
|
382
|
+
listViewItemStyle: a,
|
|
383
|
+
onCheckItem: s,
|
|
384
|
+
onClickItem: S,
|
|
385
|
+
updateSelectedItems: v
|
|
386
|
+
} = c;
|
|
387
|
+
function f(k, m, B) {
|
|
388
|
+
return e.contentTemplate ? d(U, null, [e.contentTemplate({
|
|
389
|
+
item: k.raw,
|
|
390
|
+
index: m,
|
|
391
|
+
selectedItem: B
|
|
392
|
+
})]) : t.slots.content ? d(U, null, [t.slots.content && t.slots.content({
|
|
393
|
+
item: k.raw,
|
|
394
|
+
index: m,
|
|
395
|
+
selectedItem: B
|
|
396
|
+
})]) : d("div", {
|
|
202
397
|
style: "margin: 10px 0;"
|
|
203
|
-
}, [
|
|
204
|
-
}
|
|
205
|
-
function
|
|
206
|
-
return
|
|
207
|
-
class:
|
|
208
|
-
id:
|
|
209
|
-
key:
|
|
210
|
-
style:
|
|
211
|
-
onClick: (
|
|
212
|
-
onMouseenter: (
|
|
213
|
-
onMouseover: (
|
|
214
|
-
onMouseout: (
|
|
215
|
-
}, [
|
|
398
|
+
}, [k.raw[p.value || "name"]]);
|
|
399
|
+
}
|
|
400
|
+
function O(k, m, B) {
|
|
401
|
+
return d("li", {
|
|
402
|
+
class: r(k, m),
|
|
403
|
+
id: i(k, m),
|
|
404
|
+
key: i(k, m),
|
|
405
|
+
style: a(k, m),
|
|
406
|
+
onClick: (H) => S(k, m, H),
|
|
407
|
+
onMouseenter: (H) => C(H, k, m),
|
|
408
|
+
onMouseover: (H) => x(H, k, m),
|
|
409
|
+
onMouseout: (H) => V(H, k, m)
|
|
410
|
+
}, [I.value && d("div", {
|
|
216
411
|
class: "f-list-select",
|
|
217
|
-
onClick: (
|
|
218
|
-
}, [
|
|
219
|
-
id: "list-" +
|
|
412
|
+
onClick: (H) => H.stopPropagation()
|
|
413
|
+
}, [d(ne, {
|
|
414
|
+
id: "list-" + i(k, m),
|
|
220
415
|
customClass: "listview-checkbox",
|
|
221
|
-
disabled:
|
|
222
|
-
checked:
|
|
223
|
-
"onUpdate:checked": (
|
|
224
|
-
onChange: (
|
|
225
|
-
|
|
416
|
+
disabled: k[y.value],
|
|
417
|
+
checked: k.checked,
|
|
418
|
+
"onUpdate:checked": (H) => k.checked = H,
|
|
419
|
+
onChange: (H) => {
|
|
420
|
+
s(k, m, !H.checked), v();
|
|
226
421
|
}
|
|
227
|
-
}, null)]),
|
|
422
|
+
}, null)]), d("div", {
|
|
228
423
|
class: "f-list-content"
|
|
229
|
-
}, [
|
|
424
|
+
}, [f(k, m, B)])]);
|
|
230
425
|
}
|
|
231
426
|
return {
|
|
232
|
-
renderItem:
|
|
427
|
+
renderItem: O
|
|
233
428
|
};
|
|
234
429
|
}
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
onMouseenterItem:
|
|
238
|
-
onMouseoverItem:
|
|
239
|
-
onMouseoutItem:
|
|
240
|
-
} = i, {
|
|
241
|
-
getKey: l,
|
|
242
|
-
listViewItemClass: S,
|
|
243
|
-
onCheckItem: u,
|
|
244
|
-
onClickItem: p
|
|
430
|
+
function xt(e, t, n, l, u, o, c, F, T, b) {
|
|
431
|
+
const I = g(e.multiSelect), y = g(e.disableField), p = g(e.textField), {
|
|
432
|
+
onMouseenterItem: C,
|
|
433
|
+
onMouseoverItem: x,
|
|
434
|
+
onMouseoutItem: V
|
|
245
435
|
} = o, {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
} =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
436
|
+
getKey: i,
|
|
437
|
+
listViewItemClass: r,
|
|
438
|
+
onCheckItem: a,
|
|
439
|
+
onClickItem: s
|
|
440
|
+
} = c, {
|
|
441
|
+
dragstart: S,
|
|
442
|
+
dragenter: v,
|
|
443
|
+
dragover: f,
|
|
444
|
+
dragend: O
|
|
445
|
+
} = l, {
|
|
446
|
+
removeItem: k
|
|
447
|
+
} = T, m = R(() => ({
|
|
448
|
+
margin: I.value ? "10px 0" : "10px 0px 10px 14px"
|
|
254
449
|
}));
|
|
255
|
-
function
|
|
256
|
-
const
|
|
257
|
-
|
|
450
|
+
function B(h, w = "") {
|
|
451
|
+
const A = h.target;
|
|
452
|
+
A.title = A.scrollWidth > A.clientWidth ? w : "";
|
|
258
453
|
}
|
|
259
|
-
function
|
|
260
|
-
return
|
|
261
|
-
style:
|
|
262
|
-
onMouseenter: (
|
|
263
|
-
}, [
|
|
454
|
+
function H(h) {
|
|
455
|
+
return d("div", {
|
|
456
|
+
style: m.value,
|
|
457
|
+
onMouseenter: (w) => B(w, h.raw[p.value || "name"])
|
|
458
|
+
}, [h.raw[p.value || "name"]]);
|
|
264
459
|
}
|
|
265
460
|
function E() {
|
|
266
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
267
|
-
}
|
|
268
|
-
const
|
|
269
|
-
function P(
|
|
270
|
-
return
|
|
271
|
-
class:
|
|
272
|
-
id:
|
|
273
|
-
key:
|
|
274
|
-
onClick: (
|
|
275
|
-
onMouseenter: (
|
|
276
|
-
onMouseover: (
|
|
277
|
-
onMouseout: (
|
|
461
|
+
return t.slots.itemContent ? t.slots.itemContent : H;
|
|
462
|
+
}
|
|
463
|
+
const G = E();
|
|
464
|
+
function P(h, w, A) {
|
|
465
|
+
return d("li", {
|
|
466
|
+
class: r(h, w),
|
|
467
|
+
id: i(h, w),
|
|
468
|
+
key: i(h, w),
|
|
469
|
+
onClick: (M) => s(h, w, M),
|
|
470
|
+
onMouseenter: (M) => C(M, h, w),
|
|
471
|
+
onMouseover: (M) => x(M, h, w),
|
|
472
|
+
onMouseout: (M) => V(M, h, w),
|
|
278
473
|
draggable: "true",
|
|
279
|
-
onDragstart: (
|
|
280
|
-
onDragenter: (
|
|
281
|
-
onDragend: (
|
|
282
|
-
onDragover: (
|
|
283
|
-
}, [
|
|
474
|
+
onDragstart: (M) => S(M, h, w),
|
|
475
|
+
onDragenter: (M) => v(M, w),
|
|
476
|
+
onDragend: (M) => O(M, h),
|
|
477
|
+
onDragover: (M) => f(M)
|
|
478
|
+
}, [I.value && d("div", {
|
|
284
479
|
class: "f-list-select",
|
|
285
|
-
onClick: (
|
|
286
|
-
}, [
|
|
287
|
-
id: "list-" +
|
|
480
|
+
onClick: (M) => M.stopPropagation()
|
|
481
|
+
}, [d(ne, {
|
|
482
|
+
id: "list-" + i(h, w),
|
|
288
483
|
customClass: "listview-checkbox",
|
|
289
|
-
disabled:
|
|
290
|
-
checked:
|
|
291
|
-
"onUpdate:checked": (
|
|
292
|
-
onChange: (
|
|
293
|
-
}, null)]),
|
|
484
|
+
disabled: h[y.value] || !h.checked,
|
|
485
|
+
checked: h.checked,
|
|
486
|
+
"onUpdate:checked": (M) => h.checked = M,
|
|
487
|
+
onChange: (M) => a(h, w, !M.checked)
|
|
488
|
+
}, null)]), d("div", {
|
|
294
489
|
class: "f-list-content"
|
|
295
|
-
}, [
|
|
490
|
+
}, [G(h)]), d("div", {
|
|
296
491
|
class: "f-list-remove",
|
|
297
|
-
onClick: (
|
|
298
|
-
|
|
492
|
+
onClick: (M) => {
|
|
493
|
+
M.stopPropagation(), k(w);
|
|
299
494
|
}
|
|
300
|
-
}, [
|
|
495
|
+
}, [d("div", {
|
|
301
496
|
class: "f-list-remove-icon"
|
|
302
|
-
}, [
|
|
497
|
+
}, [d("i", {
|
|
303
498
|
class: "f-icon f-icon-remove_face"
|
|
304
|
-
}, null)])]),
|
|
499
|
+
}, null)])]), d("div", {
|
|
305
500
|
class: "f-list-handle"
|
|
306
|
-
}, [
|
|
501
|
+
}, [d("div", null, [d("i", {
|
|
307
502
|
class: "f-icon f-icon-drag-vertical"
|
|
308
503
|
}, null)])])]);
|
|
309
504
|
}
|
|
@@ -311,196 +506,196 @@ function ct(e, t, a, n, r, i, o, d, w, b) {
|
|
|
311
506
|
renderItem: P
|
|
312
507
|
};
|
|
313
508
|
}
|
|
314
|
-
function
|
|
315
|
-
var
|
|
316
|
-
const
|
|
317
|
-
collpaseGroupIconClass:
|
|
318
|
-
} =
|
|
319
|
-
toggleGroupRow:
|
|
509
|
+
function Ot(e, t, n, l, u, o, c, F, T, b) {
|
|
510
|
+
var i;
|
|
511
|
+
const I = g(((i = e.group) == null ? void 0 : i.groupFields) || []), {
|
|
512
|
+
collpaseGroupIconClass: y
|
|
513
|
+
} = u, {
|
|
514
|
+
toggleGroupRow: p
|
|
320
515
|
} = b;
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
function
|
|
325
|
-
return t.slots.group ?
|
|
326
|
-
item:
|
|
327
|
-
index:
|
|
328
|
-
selectedItem:
|
|
329
|
-
})]) :
|
|
516
|
+
function C(r, a) {
|
|
517
|
+
a.collapse = !a.collapse, n.value = p(a.collapse ? "collapse" : "expand", a, n.value);
|
|
518
|
+
}
|
|
519
|
+
function x(r, a, s) {
|
|
520
|
+
return t.slots.group ? d(U, null, [t.slots.content && t.slots.group({
|
|
521
|
+
item: r.raw,
|
|
522
|
+
index: a,
|
|
523
|
+
selectedItem: s
|
|
524
|
+
})]) : d("div", {
|
|
330
525
|
class: "f-navlookup-recentHeader",
|
|
331
|
-
onClick: (
|
|
332
|
-
}, [
|
|
526
|
+
onClick: (S) => C(S, r)
|
|
527
|
+
}, [d("div", {
|
|
333
528
|
class: "fv-grid-group-row-icon"
|
|
334
|
-
}, [
|
|
335
|
-
class:
|
|
336
|
-
}, null)]),
|
|
529
|
+
}, [d("span", {
|
|
530
|
+
class: y(r)
|
|
531
|
+
}, null)]), d("div", {
|
|
337
532
|
class: "f-navlookup-recommandLabel"
|
|
338
|
-
}, [
|
|
533
|
+
}, [r.raw[I.value[r.layer]]])]);
|
|
339
534
|
}
|
|
340
|
-
function
|
|
341
|
-
return
|
|
535
|
+
function V(r, a, s) {
|
|
536
|
+
return r.layer > -1 && x(r, a, s);
|
|
342
537
|
}
|
|
343
538
|
return {
|
|
344
|
-
renderItem:
|
|
539
|
+
renderItem: V
|
|
345
540
|
};
|
|
346
541
|
}
|
|
347
|
-
function
|
|
348
|
-
const { dataView:
|
|
349
|
-
function
|
|
350
|
-
if (
|
|
351
|
-
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(
|
|
542
|
+
function Pt(e, t, n, l) {
|
|
543
|
+
const { dataView: u } = n, { updateSelectedItems: o } = l;
|
|
544
|
+
function c(F) {
|
|
545
|
+
if (F > -1 && F < u.value.length) {
|
|
546
|
+
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(u.value[F]))
|
|
352
547
|
return;
|
|
353
|
-
const
|
|
354
|
-
|
|
548
|
+
const T = u.value.splice(F, 1);
|
|
549
|
+
o(), t.emit("removeItem", T[0]);
|
|
355
550
|
}
|
|
356
551
|
}
|
|
357
|
-
return { removeItem:
|
|
552
|
+
return { removeItem: c };
|
|
358
553
|
}
|
|
359
|
-
function
|
|
360
|
-
const
|
|
554
|
+
function Mt(e, t, n, l, u, o, c, F, T, b) {
|
|
555
|
+
const I = g(e.view), y = g(e.view === "CardView"), p = g({}), C = Pt(e, t, l, T), x = R(() => ({
|
|
361
556
|
"f-list-view-group": !0,
|
|
362
557
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
363
|
-
"d-flex":
|
|
364
|
-
"flex-wrap":
|
|
365
|
-
})),
|
|
366
|
-
|
|
367
|
-
function
|
|
368
|
-
return
|
|
369
|
-
}
|
|
370
|
-
const
|
|
371
|
-
renderItem:
|
|
372
|
-
} =
|
|
373
|
-
renderItem:
|
|
374
|
-
} =
|
|
375
|
-
function
|
|
376
|
-
return
|
|
558
|
+
"d-flex": y.value,
|
|
559
|
+
"flex-wrap": y.value
|
|
560
|
+
})), V = R(() => !!n.value && n.value.length > 0), i = R(() => n.value.length === 0);
|
|
561
|
+
R(() => i.value && !t.slots.empty);
|
|
562
|
+
function r() {
|
|
563
|
+
return I.value === "SingleView" ? se : I.value === "DraggableView" ? xt : (I.value === "ContentView" || I.value === "CardView") && (e.contentTemplate || t.slots.content) ? Tt : se;
|
|
564
|
+
}
|
|
565
|
+
const a = r(), {
|
|
566
|
+
renderItem: s
|
|
567
|
+
} = a(e, t, n, b, u, o, T, c, C, F), {
|
|
568
|
+
renderItem: S
|
|
569
|
+
} = Ot(e, t, n, b, u, o, T, c, C, F), v = [s, S];
|
|
570
|
+
function f() {
|
|
571
|
+
return n.value.filter((m) => m.visible !== !1).map((m, B) => v[m.type](m, B, p));
|
|
377
572
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
573
|
+
function O() {
|
|
574
|
+
return d("div", {
|
|
380
575
|
class: "f-list-view-emptydata",
|
|
381
576
|
style: "margin: 0 auto;"
|
|
382
|
-
}, [
|
|
577
|
+
}, [d("p", {
|
|
383
578
|
class: "f-empty-title"
|
|
384
|
-
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() :
|
|
579
|
+
}, [e.emptyTemplate ? e.emptyTemplate() : t.slots.empty ? t.slots.empty() : te.getLocaleValue("listView.emptyMessage")])]);
|
|
385
580
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
388
|
-
class:
|
|
581
|
+
function k() {
|
|
582
|
+
return d("ul", {
|
|
583
|
+
class: x.value,
|
|
389
584
|
style: "list-style: none;"
|
|
390
|
-
}, [
|
|
585
|
+
}, [V.value && f(), i.value && O()]);
|
|
391
586
|
}
|
|
392
587
|
return {
|
|
393
|
-
renderListArea:
|
|
588
|
+
renderListArea: k
|
|
394
589
|
};
|
|
395
590
|
}
|
|
396
|
-
function
|
|
397
|
-
function
|
|
398
|
-
return t.slots.header &&
|
|
591
|
+
function Bt(e, t, n) {
|
|
592
|
+
function l() {
|
|
593
|
+
return t.slots.header && d("div", {
|
|
399
594
|
class: "f-list-view-header"
|
|
400
595
|
}, [t.slots.header()]);
|
|
401
596
|
}
|
|
402
597
|
return {
|
|
403
|
-
renderHeader:
|
|
598
|
+
renderHeader: l
|
|
404
599
|
};
|
|
405
600
|
}
|
|
406
|
-
function
|
|
407
|
-
const
|
|
408
|
-
function
|
|
409
|
-
|
|
601
|
+
function re(e, t, n) {
|
|
602
|
+
const l = g(e.headerClass), u = g(e.placeholder), o = g(""), c = R(() => !o.value), F = R(() => !!o.value);
|
|
603
|
+
function T(p) {
|
|
604
|
+
o.value = "";
|
|
410
605
|
}
|
|
411
|
-
j(
|
|
412
|
-
e.enableHighlightSearch &&
|
|
606
|
+
j(o, (p) => {
|
|
607
|
+
e.enableHighlightSearch && n.search(p), t.emit("afterSearch", p);
|
|
413
608
|
});
|
|
414
|
-
const b =
|
|
415
|
-
const
|
|
609
|
+
const b = R(() => {
|
|
610
|
+
const p = {
|
|
416
611
|
"form-group": !0,
|
|
417
612
|
"farris-form-group": !0
|
|
418
613
|
};
|
|
419
|
-
return
|
|
614
|
+
return l.value && l.value.split(" ").reduce((x, V) => (x[V] = !0, x), p), p;
|
|
420
615
|
});
|
|
421
|
-
function
|
|
616
|
+
function I(p) {
|
|
422
617
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
618
|
+
function y() {
|
|
619
|
+
return d("div", {
|
|
425
620
|
class: "f-list-view-header",
|
|
426
|
-
onClick:
|
|
427
|
-
}, [
|
|
621
|
+
onClick: Ae(() => I, ["prevent", "stop"])
|
|
622
|
+
}, [d("div", {
|
|
428
623
|
class: b.value
|
|
429
|
-
}, [
|
|
624
|
+
}, [d("div", {
|
|
430
625
|
class: "farris-input-wrap"
|
|
431
|
-
}, [
|
|
626
|
+
}, [d("div", {
|
|
432
627
|
class: "f-cmp-inputgroup"
|
|
433
|
-
}, [
|
|
628
|
+
}, [d("div", {
|
|
434
629
|
class: "input-group f-state-editable"
|
|
435
|
-
}, [
|
|
630
|
+
}, [He(d("input", {
|
|
436
631
|
class: "form-control f-utils-fill text-left",
|
|
437
|
-
"onUpdate:modelValue": (
|
|
632
|
+
"onUpdate:modelValue": (p) => o.value = p,
|
|
438
633
|
name: "input-group-value",
|
|
439
634
|
type: "text",
|
|
440
|
-
placeholder:
|
|
635
|
+
placeholder: u.value,
|
|
441
636
|
autocomplete: "off"
|
|
442
|
-
}, null), [[
|
|
637
|
+
}, null), [[Ee, o.value]]), d("div", {
|
|
443
638
|
class: "input-group-append"
|
|
444
|
-
}, [
|
|
639
|
+
}, [F.value && d("span", {
|
|
445
640
|
class: "input-group-text input-group-clear",
|
|
446
|
-
onClick: (
|
|
447
|
-
}, [
|
|
641
|
+
onClick: (p) => T()
|
|
642
|
+
}, [d("i", {
|
|
448
643
|
class: "f-icon f-icon-close-circle"
|
|
449
|
-
}, null)]),
|
|
644
|
+
}, null)]), c.value && d("span", {
|
|
450
645
|
class: "input-group-text"
|
|
451
|
-
}, [
|
|
646
|
+
}, [d("span", {
|
|
452
647
|
class: "f-icon f-icon-search"
|
|
453
648
|
}, null)])])])])])])]);
|
|
454
649
|
}
|
|
455
650
|
return {
|
|
456
|
-
renderHeader:
|
|
651
|
+
renderHeader: y
|
|
457
652
|
};
|
|
458
653
|
}
|
|
459
|
-
function
|
|
460
|
-
const e =
|
|
461
|
-
function
|
|
462
|
-
|
|
654
|
+
function Rt() {
|
|
655
|
+
const e = g(""), t = g(-1), n = g(""), l = g(-1), u = g(!1);
|
|
656
|
+
function o(y, p, C) {
|
|
657
|
+
l.value = C;
|
|
463
658
|
}
|
|
464
|
-
function
|
|
465
|
-
|
|
659
|
+
function c(y, p, C) {
|
|
660
|
+
u.value || (l.value = C);
|
|
466
661
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
662
|
+
function F(y, p, C) {
|
|
663
|
+
l.value = -1;
|
|
469
664
|
}
|
|
470
|
-
function
|
|
471
|
-
|
|
665
|
+
function T() {
|
|
666
|
+
u.value = !0;
|
|
472
667
|
}
|
|
473
668
|
function b() {
|
|
474
|
-
|
|
669
|
+
u.value = !1;
|
|
475
670
|
}
|
|
476
|
-
function
|
|
671
|
+
function I() {
|
|
477
672
|
t.value = -1, e.value = "";
|
|
478
673
|
}
|
|
479
674
|
return {
|
|
480
675
|
activeIndex: t,
|
|
481
|
-
focusedItemId:
|
|
482
|
-
hoverIndex:
|
|
483
|
-
clearActiveItem:
|
|
484
|
-
onMouseenterItem:
|
|
485
|
-
onMouseoverItem:
|
|
486
|
-
onMouseoutItem:
|
|
676
|
+
focusedItemId: n,
|
|
677
|
+
hoverIndex: l,
|
|
678
|
+
clearActiveItem: I,
|
|
679
|
+
onMouseenterItem: o,
|
|
680
|
+
onMouseoverItem: c,
|
|
681
|
+
onMouseoutItem: F,
|
|
487
682
|
resumeHover: b,
|
|
488
|
-
suspendHover:
|
|
683
|
+
suspendHover: T
|
|
489
684
|
};
|
|
490
685
|
}
|
|
491
|
-
function
|
|
492
|
-
const
|
|
493
|
-
let
|
|
494
|
-
function
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
}
|
|
498
|
-
function
|
|
499
|
-
const { left:
|
|
500
|
-
return
|
|
686
|
+
function Lt(e, t, n, l) {
|
|
687
|
+
const u = g(e.idField), { dataView: o } = n, c = g(-1), F = g(!1), { activeIndex: T, focusedItemId: b, hoverIndex: I, resumeHover: y, suspendHover: p } = l;
|
|
688
|
+
let C, x = 0, V = 0;
|
|
689
|
+
function i(f, O) {
|
|
690
|
+
const k = f - x, m = O - V;
|
|
691
|
+
C.style.left = parseInt(C.style.left) + k + "px", C.style.top = parseInt(C.style.top) + m + "px", x = f, V = O;
|
|
692
|
+
}
|
|
693
|
+
function r(f) {
|
|
694
|
+
const { left: O, top: k } = f.getBoundingClientRect(), m = f.cloneNode(!0);
|
|
695
|
+
return m.className = m.className + " f-listview-drag-moving", m.style.cssText = `
|
|
501
696
|
position:absolute;
|
|
502
|
-
left:${
|
|
503
|
-
top:${document.documentElement.scrollTop ?
|
|
697
|
+
left:${O}px;
|
|
698
|
+
top:${document.documentElement.scrollTop ? k + document.documentElement.scrollTop : k}px;
|
|
504
699
|
z-index: 999999;
|
|
505
700
|
pointer-events: none;
|
|
506
701
|
border-radius: 10px;
|
|
@@ -509,224 +704,224 @@ function ht(e, t, a, n) {
|
|
|
509
704
|
align-items: center;
|
|
510
705
|
float: none;
|
|
511
706
|
text-align: initial;
|
|
512
|
-
width:${getComputedStyle(
|
|
513
|
-
height:${getComputedStyle(
|
|
514
|
-
`,
|
|
707
|
+
width:${getComputedStyle(f).width};
|
|
708
|
+
height:${getComputedStyle(f).height};
|
|
709
|
+
`, m.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", m.children[0].children[0].style.cssText = `
|
|
515
710
|
margin: 10px 0px 10px 14px;
|
|
516
711
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
517
|
-
`,
|
|
712
|
+
`, m.children[1].style.cssText = "width: 30px;padding: 0 14px 0 0", m.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(m), m;
|
|
518
713
|
}
|
|
519
|
-
function
|
|
520
|
-
if (
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
|
|
714
|
+
function a(f, O, k) {
|
|
715
|
+
if (f.stopPropagation(), p(), O) {
|
|
716
|
+
if (C = r(f.target), f.dataTransfer) {
|
|
717
|
+
const m = new Image();
|
|
718
|
+
m.src = "", f.dataTransfer.setDragImage(m, 0, 0);
|
|
524
719
|
}
|
|
525
|
-
|
|
526
|
-
|
|
720
|
+
x = f.pageX, V = f.pageY, setTimeout(() => {
|
|
721
|
+
c.value = k, F.value = !0, O.moving = !0;
|
|
527
722
|
});
|
|
528
723
|
}
|
|
529
724
|
}
|
|
530
|
-
function
|
|
531
|
-
if (
|
|
532
|
-
const
|
|
533
|
-
|
|
725
|
+
function s(f, O) {
|
|
726
|
+
if (f.preventDefault(), c.value !== O) {
|
|
727
|
+
const k = o.value[c.value], m = o.value;
|
|
728
|
+
m.splice(c.value, 1), m.splice(O, 0, k), c.value = O, i(f.pageX, f.pageY);
|
|
534
729
|
}
|
|
535
730
|
}
|
|
536
|
-
function
|
|
537
|
-
|
|
731
|
+
function S(f) {
|
|
732
|
+
f.preventDefault(), f.dataTransfer && (f.dataTransfer.dropEffect = "move"), i(f.pageX, f.pageY);
|
|
538
733
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}),
|
|
734
|
+
function v(f, O) {
|
|
735
|
+
O && (O.moving = !1, C && (document.body.removeChild(C), C = null)), o.value.forEach((k, m) => {
|
|
736
|
+
k.__fv_index__ = m;
|
|
737
|
+
}), F.value = !1, y(), I.value = O.raw.__fv_index__, T.value = O.raw.__fv_index__, b.value = O.raw[u.value], t.emit("change", o.value), t.emit("activeChange", [O.raw]);
|
|
543
738
|
}
|
|
544
739
|
return {
|
|
545
|
-
dragstart:
|
|
546
|
-
dragenter:
|
|
547
|
-
dragover:
|
|
548
|
-
dragend:
|
|
549
|
-
isDragging:
|
|
740
|
+
dragstart: a,
|
|
741
|
+
dragenter: s,
|
|
742
|
+
dragover: S,
|
|
743
|
+
dragend: v,
|
|
744
|
+
isDragging: F
|
|
550
745
|
};
|
|
551
746
|
}
|
|
552
|
-
function
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
const b =
|
|
556
|
-
let
|
|
557
|
-
return
|
|
747
|
+
function At(e, t, n, l, u, o) {
|
|
748
|
+
const c = g(e.idField), F = g(e.disableField), T = g(e.draggable);
|
|
749
|
+
g(e.itemClass);
|
|
750
|
+
const b = g(e.selection.multiSelect ?? !1), I = g(e.selection.multiSelectMode), { isDragging: y } = l, { activeIndex: p, focusedItemId: C, hoverIndex: x } = u, { clearSelection: V, getSelectedItems: i, toggleSelectItem: r, currentSelectedDataId: a } = o, s = g(i()), S = (P) => s.value.length === 0 ? !1 : s.value.some((h) => {
|
|
751
|
+
let w = "";
|
|
752
|
+
return h.data ? w = h.data[c.value] : w = h[c.value], w === P;
|
|
558
753
|
});
|
|
559
|
-
function
|
|
560
|
-
|
|
754
|
+
function v() {
|
|
755
|
+
s.value = i();
|
|
561
756
|
}
|
|
562
|
-
function
|
|
563
|
-
return P.raw[
|
|
757
|
+
function f(P, h) {
|
|
758
|
+
return P.raw[c.value] != null ? P.raw[c.value] : "";
|
|
564
759
|
}
|
|
565
|
-
function
|
|
566
|
-
const
|
|
760
|
+
function O(P, h) {
|
|
761
|
+
const w = {
|
|
567
762
|
"f-list-view-group-item": !0,
|
|
568
|
-
"f-list-view-draggable-item":
|
|
763
|
+
"f-list-view-draggable-item": T.value,
|
|
569
764
|
"f-un-click": !P.checked,
|
|
570
|
-
"f-un-select": !!P.raw[
|
|
765
|
+
"f-un-select": !!P.raw[F.value],
|
|
571
766
|
"f-listview-active": (
|
|
572
767
|
// 多选
|
|
573
|
-
b.value &&
|
|
574
|
-
!b.value && P.raw[
|
|
768
|
+
b.value && S(f(P)) || // 单选
|
|
769
|
+
!b.value && P.raw[c.value] === a.value
|
|
575
770
|
),
|
|
576
|
-
"f-listview-hover": !
|
|
771
|
+
"f-listview-hover": !y.value && h === x.value,
|
|
577
772
|
moving: !!P.moving
|
|
578
773
|
};
|
|
579
774
|
if (typeof e.itemClass == "string")
|
|
580
|
-
return
|
|
775
|
+
return Z(w, e.itemClass);
|
|
581
776
|
if (typeof e.itemClass == "function") {
|
|
582
|
-
const
|
|
583
|
-
return
|
|
777
|
+
const A = e.itemClass(P);
|
|
778
|
+
return Z(w, A);
|
|
584
779
|
}
|
|
585
|
-
return
|
|
780
|
+
return w;
|
|
586
781
|
}
|
|
587
|
-
function
|
|
588
|
-
const
|
|
782
|
+
function k(P, h) {
|
|
783
|
+
const w = {};
|
|
589
784
|
if (typeof e.itemStyle == "string")
|
|
590
|
-
return
|
|
785
|
+
return ae(w, e.itemStyle);
|
|
591
786
|
if (typeof e.itemStyle == "function") {
|
|
592
|
-
const
|
|
593
|
-
return
|
|
787
|
+
const A = e.itemStyle(P);
|
|
788
|
+
return ae(w, A);
|
|
594
789
|
}
|
|
595
|
-
return
|
|
790
|
+
return w;
|
|
596
791
|
}
|
|
597
|
-
const
|
|
598
|
-
function
|
|
599
|
-
P.checked =
|
|
792
|
+
const m = R(() => !b.value);
|
|
793
|
+
function B(P, h, w) {
|
|
794
|
+
P.checked = w, !P.raw[F.value] && (m.value && (C.value = P.raw[c.value]), r(P));
|
|
600
795
|
}
|
|
601
|
-
const
|
|
602
|
-
function
|
|
603
|
-
if (P.raw[
|
|
604
|
-
|
|
796
|
+
const H = R(() => b.value && I.value === "OnCheckClearByClick"), E = R(() => !b.value || b.value && (I.value === "OnCheckAndClick" || I.value === "OnClick"));
|
|
797
|
+
function G(P, h, w) {
|
|
798
|
+
if (P.raw[F.value]) {
|
|
799
|
+
w == null || w.preventDefault(), w == null || w.stopPropagation();
|
|
605
800
|
return;
|
|
606
801
|
}
|
|
607
|
-
|
|
802
|
+
a.value = P.raw[c.value], C.value = P.raw[c.value], p.value = h, H.value && V(), E.value && (r(P), v()), t.emit("clickItem", { data: s.value, index: h, dataItem: P.raw }), t.emit("activeChange", s.value);
|
|
608
803
|
}
|
|
609
804
|
return {
|
|
610
|
-
getKey:
|
|
611
|
-
selectedItems:
|
|
612
|
-
listViewItemClass:
|
|
613
|
-
listViewItemStyle:
|
|
614
|
-
updateSelectedItems:
|
|
615
|
-
onCheckItem:
|
|
616
|
-
onClickItem:
|
|
805
|
+
getKey: f,
|
|
806
|
+
selectedItems: s,
|
|
807
|
+
listViewItemClass: O,
|
|
808
|
+
listViewItemStyle: k,
|
|
809
|
+
updateSelectedItems: v,
|
|
810
|
+
onCheckItem: B,
|
|
811
|
+
onClickItem: G
|
|
617
812
|
};
|
|
618
813
|
}
|
|
619
|
-
const
|
|
814
|
+
const me = /* @__PURE__ */ N({
|
|
620
815
|
name: "FListView",
|
|
621
|
-
props:
|
|
816
|
+
props: Vt,
|
|
622
817
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
623
818
|
setup(e, t) {
|
|
624
|
-
const
|
|
625
|
-
getVisualData:
|
|
626
|
-
} =
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
const
|
|
819
|
+
const n = g(), l = g(!0), u = g(!1), o = g([]), c = 0, F = g(e.columns), T = Ge(e, t), b = Ne(e), I = _e(e), y = ze(e, b), p = Ue(e, /* @__PURE__ */ new Map(), T, I, b), C = We(e, p, b, o, t), x = kt(e, n), V = qe(e, p), i = R(() => p.dataView.value.length), r = De(e, t, C, b), a = Ke(e, t, b, r, o), s = Xe(e), S = Ye(e, {}, s), v = Je(e, p, a, I, b, s, S), f = Qe(e, b, S, v), O = Ze(e, b, S, v), k = et(e, F, p, i, c, v, f, O), {
|
|
820
|
+
getVisualData: m
|
|
821
|
+
} = k;
|
|
822
|
+
o.value = m(0, i.value + c - 1);
|
|
823
|
+
const B = R(() => {
|
|
824
|
+
const L = {
|
|
630
825
|
"f-list-view": !0,
|
|
631
826
|
"f-list-view-multiple": e.multiSelect
|
|
632
827
|
};
|
|
633
|
-
return e.size !== "default" && (
|
|
634
|
-
}),
|
|
828
|
+
return e.size !== "default" && (L[`${e.size}-item`] = !0), Z(L, e.customClass);
|
|
829
|
+
}), H = R(() => !!t.slots.footer || l.value);
|
|
635
830
|
function E() {
|
|
636
|
-
return e.header === "SearchBar" ?
|
|
831
|
+
return e.header === "SearchBar" ? re : e.header === "ContentHeader" ? Bt : re;
|
|
637
832
|
}
|
|
638
|
-
const
|
|
833
|
+
const G = E(), {
|
|
639
834
|
renderHeader: P
|
|
640
|
-
} =
|
|
641
|
-
renderListArea:
|
|
642
|
-
} =
|
|
643
|
-
function
|
|
644
|
-
|
|
835
|
+
} = G(e, t, x), h = Rt(), w = Lt(e, t, p, h), A = At(e, t, o, w, h, C), {
|
|
836
|
+
renderListArea: M
|
|
837
|
+
} = Mt(e, t, o, p, y, h, C, k, A, w);
|
|
838
|
+
function _(L) {
|
|
839
|
+
x.search(L);
|
|
645
840
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
841
|
+
function be(L) {
|
|
842
|
+
L && (p.load(L), o.value = m(0, i.value + c - 1));
|
|
648
843
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
844
|
+
function Ce() {
|
|
845
|
+
C.clearSelection(), h.clearActiveItem();
|
|
651
846
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
847
|
+
function Se() {
|
|
848
|
+
return A.selectedItems.value;
|
|
654
849
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
850
|
+
function we() {
|
|
851
|
+
return A.selectedItems.value.map((L) => L[b.idField.value]);
|
|
657
852
|
}
|
|
658
|
-
function
|
|
659
|
-
|
|
853
|
+
function ie(L) {
|
|
854
|
+
C.selectedValues.value = L, A.updateSelectedItems();
|
|
660
855
|
}
|
|
661
|
-
function
|
|
662
|
-
return
|
|
856
|
+
function Fe() {
|
|
857
|
+
return C.currentSelectedDataId.value;
|
|
663
858
|
}
|
|
664
|
-
function
|
|
665
|
-
|
|
859
|
+
function Ie(L) {
|
|
860
|
+
r.activeRowById(L);
|
|
666
861
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
z &&
|
|
862
|
+
function Ve(L) {
|
|
863
|
+
const $ = b.idField.value, z = o.value.find((X) => X.raw[$] === L), W = o.value.findIndex((X) => X.raw[$] === L);
|
|
864
|
+
z && W > -1 && A.onClickItem(z, W);
|
|
670
865
|
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
z &&
|
|
866
|
+
function ke(L) {
|
|
867
|
+
const $ = b.idField.value, z = o.value.find((W) => W.raw[$] === L);
|
|
868
|
+
z && r.changeRow(z);
|
|
674
869
|
}
|
|
675
|
-
function
|
|
676
|
-
|
|
870
|
+
function Te(L) {
|
|
871
|
+
V.updatePagination(L);
|
|
677
872
|
}
|
|
678
|
-
function
|
|
679
|
-
return
|
|
873
|
+
function xe(L) {
|
|
874
|
+
return o.value.filter(($) => L.includes($.raw[e.idField]));
|
|
680
875
|
}
|
|
681
876
|
t.expose({
|
|
682
|
-
search:
|
|
683
|
-
updateDataSource:
|
|
684
|
-
clearSelection:
|
|
685
|
-
getSelections:
|
|
686
|
-
updateSelectionByIds:
|
|
687
|
-
getSelectionIds:
|
|
688
|
-
activeRowById:
|
|
689
|
-
getCurrentRowId:
|
|
690
|
-
clickRowItemById:
|
|
691
|
-
updatePagination:
|
|
692
|
-
getVisibleDataByIds:
|
|
693
|
-
selectRowById:
|
|
877
|
+
search: _,
|
|
878
|
+
updateDataSource: be,
|
|
879
|
+
clearSelection: Ce,
|
|
880
|
+
getSelections: Se,
|
|
881
|
+
updateSelectionByIds: ie,
|
|
882
|
+
getSelectionIds: we,
|
|
883
|
+
activeRowById: Ie,
|
|
884
|
+
getCurrentRowId: Fe,
|
|
885
|
+
clickRowItemById: Ve,
|
|
886
|
+
updatePagination: Te,
|
|
887
|
+
getVisibleDataByIds: xe,
|
|
888
|
+
selectRowById: ke
|
|
694
889
|
});
|
|
695
|
-
function
|
|
696
|
-
e.multiSelect && (
|
|
890
|
+
function Oe(L) {
|
|
891
|
+
e.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
697
892
|
}
|
|
698
|
-
j(() => e.selectionValues, (
|
|
699
|
-
|
|
893
|
+
j(() => e.selectionValues, (L, $) => {
|
|
894
|
+
L !== $ && ie(L);
|
|
700
895
|
});
|
|
701
|
-
const
|
|
702
|
-
sidebarWidth:
|
|
703
|
-
showSidebarCheckBox:
|
|
704
|
-
} =
|
|
705
|
-
applyColumnSorter:
|
|
706
|
-
columnContext:
|
|
707
|
-
updateColumnRenderContext:
|
|
708
|
-
} =
|
|
709
|
-
shouldRenderPagination:
|
|
710
|
-
} =
|
|
711
|
-
renderDataGridPagination:
|
|
712
|
-
} =
|
|
713
|
-
return () =>
|
|
714
|
-
class:
|
|
715
|
-
onClick:
|
|
716
|
-
}, [P(),
|
|
717
|
-
ref:
|
|
896
|
+
const Pe = tt(e, C), {
|
|
897
|
+
sidebarWidth: Me,
|
|
898
|
+
showSidebarCheckBox: an
|
|
899
|
+
} = Pe, Be = nt(e, t), {
|
|
900
|
+
applyColumnSorter: on,
|
|
901
|
+
columnContext: Re,
|
|
902
|
+
updateColumnRenderContext: sn
|
|
903
|
+
} = Be, Le = lt(e, p, o, Re, k, i, c, Me, a), {
|
|
904
|
+
shouldRenderPagination: rn
|
|
905
|
+
} = V, {
|
|
906
|
+
renderDataGridPagination: un
|
|
907
|
+
} = it(e, t, p, Le, V, C);
|
|
908
|
+
return () => d("div", {
|
|
909
|
+
class: B.value,
|
|
910
|
+
onClick: Oe
|
|
911
|
+
}, [P(), d("div", {
|
|
912
|
+
ref: n,
|
|
718
913
|
class: "f-list-view-content",
|
|
719
914
|
onMouseover: () => {
|
|
720
|
-
|
|
915
|
+
u.value = !0;
|
|
721
916
|
},
|
|
722
917
|
onMouseleave: () => {
|
|
723
|
-
|
|
918
|
+
u.value = !1;
|
|
724
919
|
}
|
|
725
|
-
}, [
|
|
920
|
+
}, [M()]), H.value && d("div", {
|
|
726
921
|
class: "f-list-view-footer"
|
|
727
922
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
728
923
|
}
|
|
729
|
-
}),
|
|
924
|
+
}), Ht = {
|
|
730
925
|
/**
|
|
731
926
|
* 组件标识
|
|
732
927
|
*/
|
|
@@ -752,58 +947,58 @@ const Ct = /* @__PURE__ */ _({
|
|
|
752
947
|
*/
|
|
753
948
|
customClass: { type: Object, default: {} }
|
|
754
949
|
};
|
|
755
|
-
function
|
|
756
|
-
function
|
|
757
|
-
|
|
950
|
+
function Et(e, t) {
|
|
951
|
+
function n(l) {
|
|
952
|
+
l.stopPropagation(), e.disabled || t.emit("click", l);
|
|
758
953
|
}
|
|
759
954
|
return {
|
|
760
|
-
onClickButton:
|
|
955
|
+
onClickButton: n
|
|
761
956
|
};
|
|
762
957
|
}
|
|
763
|
-
function
|
|
764
|
-
const t =
|
|
765
|
-
const
|
|
958
|
+
function jt(e) {
|
|
959
|
+
const t = R(() => {
|
|
960
|
+
const l = {
|
|
766
961
|
"f-icon": !0
|
|
767
962
|
};
|
|
768
963
|
if (e.icon) {
|
|
769
|
-
const
|
|
770
|
-
|
|
964
|
+
const u = e.icon.trim().split(" ");
|
|
965
|
+
u && u.length && u.reduce((o, c) => (o[c] = !0, o), l);
|
|
771
966
|
}
|
|
772
|
-
return
|
|
773
|
-
}),
|
|
774
|
-
return { iconClass: t, shouldShowIcon:
|
|
967
|
+
return l;
|
|
968
|
+
}), n = R(() => !!(e.icon && e.icon.trim()));
|
|
969
|
+
return { iconClass: t, shouldShowIcon: n };
|
|
775
970
|
}
|
|
776
|
-
const
|
|
971
|
+
const ve = /* @__PURE__ */ N({
|
|
777
972
|
name: "FButton",
|
|
778
|
-
props:
|
|
973
|
+
props: Ht,
|
|
779
974
|
emits: ["click"],
|
|
780
975
|
setup(e, t) {
|
|
781
976
|
const {
|
|
782
|
-
onClickButton:
|
|
783
|
-
} =
|
|
784
|
-
iconClass:
|
|
785
|
-
shouldShowIcon:
|
|
786
|
-
} =
|
|
787
|
-
const
|
|
977
|
+
onClickButton: n
|
|
978
|
+
} = Et(e, t), {
|
|
979
|
+
iconClass: l,
|
|
980
|
+
shouldShowIcon: u
|
|
981
|
+
} = jt(e), o = R(() => {
|
|
982
|
+
const c = {
|
|
788
983
|
btn: !0,
|
|
789
984
|
"btn-lg": e.size === "large",
|
|
790
985
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
791
986
|
"btn-sm": e.size === "small",
|
|
792
|
-
"btn-icontext":
|
|
987
|
+
"btn-icontext": u.value
|
|
793
988
|
};
|
|
794
|
-
return
|
|
989
|
+
return c[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((F, T) => (F[T] = e.customClass[T], F), c), c;
|
|
795
990
|
});
|
|
796
|
-
return () =>
|
|
797
|
-
class:
|
|
991
|
+
return () => d("button", {
|
|
992
|
+
class: o.value,
|
|
798
993
|
disabled: e.disabled,
|
|
799
|
-
onClick: (
|
|
800
|
-
}, [
|
|
801
|
-
class:
|
|
994
|
+
onClick: (c) => n(c)
|
|
995
|
+
}, [u.value && d("i", {
|
|
996
|
+
class: l.value
|
|
802
997
|
}, null), t.slots.default && t.slots.default()]);
|
|
803
998
|
}
|
|
804
|
-
}),
|
|
805
|
-
["appearance",
|
|
806
|
-
]),
|
|
999
|
+
}), ge = /* @__PURE__ */ new Map([
|
|
1000
|
+
["appearance", de]
|
|
1001
|
+
]), $t = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", _t = "A Farris Input Component", zt = "object", Ut = {
|
|
807
1002
|
id: {
|
|
808
1003
|
description: "The unique identifier for a combo list",
|
|
809
1004
|
type: "string"
|
|
@@ -894,6 +1089,10 @@ const wt = /* @__PURE__ */ _({
|
|
|
894
1089
|
description: "",
|
|
895
1090
|
type: "array"
|
|
896
1091
|
},
|
|
1092
|
+
dataSource: {
|
|
1093
|
+
description: "",
|
|
1094
|
+
type: "string"
|
|
1095
|
+
},
|
|
897
1096
|
remote: {
|
|
898
1097
|
description: "",
|
|
899
1098
|
type: "string"
|
|
@@ -1002,41 +1201,41 @@ const wt = /* @__PURE__ */ _({
|
|
|
1002
1201
|
type: "string",
|
|
1003
1202
|
default: ""
|
|
1004
1203
|
}
|
|
1005
|
-
},
|
|
1204
|
+
}, Wt = [
|
|
1006
1205
|
"type"
|
|
1007
|
-
],
|
|
1206
|
+
], qt = [
|
|
1008
1207
|
"id",
|
|
1009
1208
|
"appearance",
|
|
1010
1209
|
"binding",
|
|
1011
1210
|
"visible"
|
|
1012
|
-
],
|
|
1211
|
+
], Dt = {
|
|
1013
1212
|
onClear: "清空事件",
|
|
1014
1213
|
onChange: "值变化事件",
|
|
1015
1214
|
beforeOpen: "打开下拉面板前事件"
|
|
1016
|
-
},
|
|
1017
|
-
$schema:
|
|
1018
|
-
$id:
|
|
1019
|
-
title:
|
|
1020
|
-
description:
|
|
1021
|
-
type:
|
|
1022
|
-
properties:
|
|
1023
|
-
required:
|
|
1024
|
-
ignore:
|
|
1025
|
-
events:
|
|
1215
|
+
}, he = {
|
|
1216
|
+
$schema: $t,
|
|
1217
|
+
$id: Gt,
|
|
1218
|
+
title: Nt,
|
|
1219
|
+
description: _t,
|
|
1220
|
+
type: zt,
|
|
1221
|
+
properties: Ut,
|
|
1222
|
+
required: Wt,
|
|
1223
|
+
ignore: qt,
|
|
1224
|
+
events: Dt
|
|
1026
1225
|
};
|
|
1027
|
-
function
|
|
1226
|
+
function ye(e, t, n) {
|
|
1028
1227
|
return t;
|
|
1029
1228
|
}
|
|
1030
|
-
function
|
|
1031
|
-
function e(t,
|
|
1032
|
-
const
|
|
1033
|
-
return
|
|
1229
|
+
function Kt() {
|
|
1230
|
+
function e(t, n, l) {
|
|
1231
|
+
const u = {};
|
|
1232
|
+
return u.beforeOpen = (o) => n.call("beforeOpen", t, [o, t], l), u;
|
|
1034
1233
|
}
|
|
1035
1234
|
return {
|
|
1036
1235
|
resolve: e
|
|
1037
1236
|
};
|
|
1038
1237
|
}
|
|
1039
|
-
const
|
|
1238
|
+
const K = {
|
|
1040
1239
|
/**
|
|
1041
1240
|
* 组件标识
|
|
1042
1241
|
*/
|
|
@@ -1205,17 +1404,16 @@ const q = {
|
|
|
1205
1404
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
1206
1405
|
minPanelWidth: { type: Number, default: 160 },
|
|
1207
1406
|
popupOnClick: { type: Boolean, default: !0 }
|
|
1208
|
-
}
|
|
1209
|
-
Object.assign({}, q, {
|
|
1407
|
+
}, Xt = Object.assign({}, K, {
|
|
1210
1408
|
readonly: {}
|
|
1211
1409
|
});
|
|
1212
|
-
ce(
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
),
|
|
1410
|
+
ce(K, he, ge, ye);
|
|
1411
|
+
const pe = je(
|
|
1412
|
+
K,
|
|
1413
|
+
he,
|
|
1414
|
+
ge,
|
|
1415
|
+
ye
|
|
1416
|
+
), Yt = Kt(), Jt = {
|
|
1219
1417
|
dataSource: { type: Array, default: [] },
|
|
1220
1418
|
enableSearch: { type: Boolean, default: !1 },
|
|
1221
1419
|
idField: { type: String, default: "id" },
|
|
@@ -1236,311 +1434,307 @@ const fe = et(
|
|
|
1236
1434
|
},
|
|
1237
1435
|
// 搜索启用高亮
|
|
1238
1436
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1239
|
-
},
|
|
1437
|
+
}, Qt = /* @__PURE__ */ N({
|
|
1240
1438
|
name: "FComboListContainer",
|
|
1241
|
-
props:
|
|
1439
|
+
props: Jt,
|
|
1242
1440
|
emits: ["selectionChange"],
|
|
1243
1441
|
setup(e, t) {
|
|
1244
|
-
const
|
|
1442
|
+
const n = g(), l = g(e.dataSource), u = g([]), o = g(e.separator), c = g(e.width), F = g(e.maxHeight), T = R(() => e.multiSelect), b = g(e.multiSelect ? String(e.selectedValues).split(o.value) : [e.selectedValues]), I = R(() => ({
|
|
1245
1443
|
enableSelectRow: !0,
|
|
1246
1444
|
multiSelect: e.multiSelect,
|
|
1247
1445
|
multiSelectMode: "OnCheckAndClick",
|
|
1248
|
-
showCheckbox:
|
|
1446
|
+
showCheckbox: T.value,
|
|
1249
1447
|
showSelectAll: !1,
|
|
1250
1448
|
showSelection: !0
|
|
1251
1449
|
}));
|
|
1252
1450
|
j(e.dataSource, () => {
|
|
1253
|
-
|
|
1254
|
-
}),
|
|
1255
|
-
const
|
|
1256
|
-
const
|
|
1257
|
-
return
|
|
1451
|
+
l.value = e.dataSource;
|
|
1452
|
+
}), R(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
1453
|
+
const y = R(() => {
|
|
1454
|
+
const i = {};
|
|
1455
|
+
return c.value !== void 0 && (i.width = `${c.value}px`), F.value !== void 0 && F.value > 0 && (i.maxHeight = `${F.value}px`), i;
|
|
1258
1456
|
});
|
|
1259
|
-
function
|
|
1260
|
-
|
|
1457
|
+
function p(i) {
|
|
1458
|
+
n.value.search(i);
|
|
1261
1459
|
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1460
|
+
function C(i) {
|
|
1461
|
+
u.value = i.map((r) => Object.assign({}, r)), b.value = i.map((r) => r[e.idField]), t.emit("selectionChange", u.value);
|
|
1264
1462
|
}
|
|
1265
|
-
function
|
|
1463
|
+
function x(i) {
|
|
1266
1464
|
if (e.enableHighlightSearch)
|
|
1267
1465
|
return;
|
|
1268
|
-
let
|
|
1466
|
+
let r = [];
|
|
1269
1467
|
const {
|
|
1270
|
-
searchOption:
|
|
1468
|
+
searchOption: a
|
|
1271
1469
|
} = e;
|
|
1272
|
-
typeof
|
|
1470
|
+
typeof a == "function" ? r = l.value.filter((s) => a(i, s)) : r = l.value.filter((s) => s[e.valueField].indexOf(i) > -1 || s[e.textField].indexOf(i) > -1), n.value.updateDataSource(r);
|
|
1273
1471
|
}
|
|
1274
|
-
j([() => e.selectedValues], ([
|
|
1275
|
-
e.multiSelect ? b.value =
|
|
1472
|
+
j([() => e.selectedValues], ([i]) => {
|
|
1473
|
+
e.multiSelect ? b.value = i.split(o.value) : b.value = [i];
|
|
1276
1474
|
});
|
|
1277
|
-
function
|
|
1278
|
-
|
|
1475
|
+
function V(i) {
|
|
1476
|
+
n.value.activeRowById(i);
|
|
1279
1477
|
}
|
|
1280
|
-
return
|
|
1281
|
-
var
|
|
1478
|
+
return ee(() => {
|
|
1479
|
+
var i, r;
|
|
1282
1480
|
if (!e.multiSelect) {
|
|
1283
|
-
const
|
|
1284
|
-
let
|
|
1285
|
-
const
|
|
1286
|
-
if (!
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1481
|
+
const a = (i = b.value) == null ? void 0 : i[0];
|
|
1482
|
+
let s = a;
|
|
1483
|
+
const S = l.value.map((v) => v[e.valueField || e.idField]);
|
|
1484
|
+
if (!ot(a) && S.includes(a)) {
|
|
1485
|
+
const v = typeof a, f = typeof ((r = l.value[0]) == null ? void 0 : r[e.valueField || e.idField]);
|
|
1486
|
+
f === "number" && v !== f && (s = Number(a)), f === "boolean" && v !== f && (s = a === "true" ? !0 : a === "false" ? !1 : a), V(s);
|
|
1289
1487
|
}
|
|
1290
1488
|
}
|
|
1291
1489
|
}), t.expose({
|
|
1292
|
-
search:
|
|
1293
|
-
activeRowById:
|
|
1294
|
-
}), () =>
|
|
1490
|
+
search: p,
|
|
1491
|
+
activeRowById: V
|
|
1492
|
+
}), () => d("div", {
|
|
1295
1493
|
class: "f-combo-list-container",
|
|
1296
|
-
style:
|
|
1297
|
-
}, [
|
|
1298
|
-
ref:
|
|
1494
|
+
style: y.value
|
|
1495
|
+
}, [d(st, {
|
|
1496
|
+
ref: n,
|
|
1299
1497
|
size: "small",
|
|
1300
1498
|
itemClass: "f-combo-list-item",
|
|
1301
1499
|
itemContentClass: "text-truncate",
|
|
1302
1500
|
header: "ContentHeader",
|
|
1303
1501
|
headerClass: "f-combo-list-search-box",
|
|
1304
|
-
data:
|
|
1502
|
+
data: l.value,
|
|
1305
1503
|
idField: e.idField,
|
|
1306
1504
|
textField: e.textField,
|
|
1307
1505
|
titleField: e.titleField,
|
|
1308
1506
|
multiSelect: e.multiSelect,
|
|
1309
|
-
selection:
|
|
1507
|
+
selection: I.value,
|
|
1310
1508
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1311
1509
|
selectionValues: b.value,
|
|
1312
|
-
onSelectionUpdate:
|
|
1313
|
-
onAfterSearch:
|
|
1510
|
+
onSelectionUpdate: C,
|
|
1511
|
+
onAfterSearch: x
|
|
1314
1512
|
}, null)]);
|
|
1315
1513
|
}
|
|
1316
1514
|
});
|
|
1317
|
-
function
|
|
1318
|
-
const
|
|
1319
|
-
function i
|
|
1320
|
-
const
|
|
1321
|
-
return
|
|
1322
|
-
const
|
|
1323
|
-
return
|
|
1515
|
+
function Zt(e, t) {
|
|
1516
|
+
const n = g(""), l = g(e.modelValue), u = g(e.data || []), o = g(e.editable);
|
|
1517
|
+
function c(i) {
|
|
1518
|
+
const r = e.multiSelect ? String(i).split(e.separator) : [String(i)], a = r.map((v) => [v, !0]), s = new Map(a);
|
|
1519
|
+
return u.value.filter((v) => s.has(String(v[e.valueField]))).sort((v, f) => {
|
|
1520
|
+
const O = r.indexOf(v[e.valueField]), k = r.indexOf(f[e.valueField]);
|
|
1521
|
+
return O - k;
|
|
1324
1522
|
});
|
|
1325
1523
|
}
|
|
1326
|
-
function
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1524
|
+
function F(i) {
|
|
1525
|
+
const r = c(i).map((a) => a[e.textField]).join(e.separator);
|
|
1526
|
+
n.value = o.value ? r || i : r;
|
|
1329
1527
|
}
|
|
1330
|
-
function
|
|
1528
|
+
function T(i) {
|
|
1331
1529
|
if (e.multiSelect) {
|
|
1332
|
-
const
|
|
1333
|
-
return
|
|
1530
|
+
const r = i.split(e.separator).map((s) => [s, !0]), a = new Map(r);
|
|
1531
|
+
return u.value.filter((s) => a.has(s[e.textField]));
|
|
1334
1532
|
}
|
|
1335
|
-
return
|
|
1533
|
+
return u.value.filter((r) => "" + r[e.textField] === i);
|
|
1336
1534
|
}
|
|
1337
|
-
function
|
|
1338
|
-
const
|
|
1339
|
-
return
|
|
1535
|
+
function b(i) {
|
|
1536
|
+
const r = {};
|
|
1537
|
+
return r[e.idField] = i, r[e.textField] = i, [r];
|
|
1340
1538
|
}
|
|
1341
|
-
function
|
|
1342
|
-
let
|
|
1343
|
-
const
|
|
1344
|
-
return
|
|
1539
|
+
function I(i) {
|
|
1540
|
+
let r = T(i);
|
|
1541
|
+
const a = r && r.length > 0;
|
|
1542
|
+
return o.value && !a && (r = b(i)), r;
|
|
1345
1543
|
}
|
|
1346
|
-
function
|
|
1347
|
-
const { url:
|
|
1348
|
-
if (!
|
|
1544
|
+
function y() {
|
|
1545
|
+
const { url: i, method: r = "GET", headers: a = { "Content-Type": "application/json;charset=utf-8;" }, body: s = null } = e.remote;
|
|
1546
|
+
if (!i)
|
|
1349
1547
|
return;
|
|
1350
|
-
const
|
|
1351
|
-
let
|
|
1352
|
-
fetch(new Request(
|
|
1353
|
-
var
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1356
|
-
throw
|
|
1357
|
-
}).then((
|
|
1358
|
-
|
|
1359
|
-
}).catch((
|
|
1360
|
-
console.warn(
|
|
1548
|
+
const S = r.toLowerCase() === "get" ? { method: r, headers: a } : { method: r, headers: a, body: s };
|
|
1549
|
+
let v = !1;
|
|
1550
|
+
fetch(new Request(i, S)).then((f) => {
|
|
1551
|
+
var k, m;
|
|
1552
|
+
if (f.status === 200)
|
|
1553
|
+
return v = !!((m = (k = f.headers) == null ? void 0 : k.get("content-type")) != null && m.includes("application/json")), v ? f.text() : f.json();
|
|
1554
|
+
throw f.status === 405 ? new Error(te.getLocaleValue("comboList.remoteError")) : new Error(f.statusText);
|
|
1555
|
+
}).then((f) => {
|
|
1556
|
+
f.length && (u.value = v ? JSON.parse(f) : f);
|
|
1557
|
+
}).catch((f) => {
|
|
1558
|
+
console.warn(f);
|
|
1361
1559
|
});
|
|
1362
1560
|
}
|
|
1363
|
-
e.remote && (e.load ? e.load().then((
|
|
1364
|
-
|
|
1365
|
-
}).catch((
|
|
1366
|
-
console.log(
|
|
1367
|
-
}) :
|
|
1368
|
-
|
|
1369
|
-
}), j([
|
|
1370
|
-
if (e.modelValue != null) {
|
|
1371
|
-
const
|
|
1372
|
-
l
|
|
1561
|
+
e.remote && (e.load ? e.load().then((i) => {
|
|
1562
|
+
u.value = i;
|
|
1563
|
+
}).catch((i) => {
|
|
1564
|
+
console.log(i);
|
|
1565
|
+
}) : y()), j(() => e.data, () => {
|
|
1566
|
+
u.value = e.data;
|
|
1567
|
+
}), j([u], ([i], [r]) => {
|
|
1568
|
+
if (e.modelValue != null && !e.multiSelect) {
|
|
1569
|
+
const a = i.find((s) => s[e.valueField] === l.value);
|
|
1570
|
+
a ? a[e.valueField] !== l.value ? (l.value = a[e.valueField], n.value = a[e.textField], t.emit("update:modelValue", a[e.valueField]), t.emit("change", [a], a[e.valueField])) : n.value !== a[e.textField] && (n.value = a[e.textField]) : l.value !== "" && (l.value = "", n.value = "", t.emit("update:modelValue", ""), t.emit("change", [], ""));
|
|
1373
1571
|
}
|
|
1374
|
-
}), j(() => e.modelValue, (
|
|
1375
|
-
|
|
1572
|
+
}), j(() => e.modelValue, (i, r) => {
|
|
1573
|
+
r !== i && (l.value = i, F(i));
|
|
1376
1574
|
});
|
|
1377
|
-
function
|
|
1378
|
-
|
|
1575
|
+
function p(i) {
|
|
1576
|
+
u.value = i;
|
|
1379
1577
|
}
|
|
1380
|
-
function
|
|
1381
|
-
return
|
|
1578
|
+
function C() {
|
|
1579
|
+
return u.value;
|
|
1382
1580
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1581
|
+
function x() {
|
|
1582
|
+
return n.value;
|
|
1385
1583
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const
|
|
1388
|
-
return !e.beforeOpen || !
|
|
1389
|
-
}
|
|
1390
|
-
return
|
|
1391
|
-
dataSource:
|
|
1392
|
-
displayText:
|
|
1393
|
-
editable:
|
|
1394
|
-
modelValue:
|
|
1395
|
-
beforeOpenList:
|
|
1396
|
-
getItemsByDisplayText:
|
|
1397
|
-
getItemsByValue:
|
|
1398
|
-
getSelectedItemsByDisplayText:
|
|
1584
|
+
function V() {
|
|
1585
|
+
const i = typeof e.beforeOpen == "function";
|
|
1586
|
+
return !e.beforeOpen || !i ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({ instance: { updateDataSource: p, getData: C, getDisplayText: x } })).then((r) => typeof (r == null ? void 0 : r.canOpen) == "boolean" ? r == null ? void 0 : r.canOpen : !0);
|
|
1587
|
+
}
|
|
1588
|
+
return F(e.modelValue), {
|
|
1589
|
+
dataSource: u,
|
|
1590
|
+
displayText: n,
|
|
1591
|
+
editable: o,
|
|
1592
|
+
modelValue: l,
|
|
1593
|
+
beforeOpenList: V,
|
|
1594
|
+
getItemsByDisplayText: T,
|
|
1595
|
+
getItemsByValue: c,
|
|
1596
|
+
getSelectedItemsByDisplayText: I
|
|
1399
1597
|
};
|
|
1400
1598
|
}
|
|
1401
|
-
const
|
|
1599
|
+
const q = /* @__PURE__ */ N({
|
|
1402
1600
|
name: "FComboList",
|
|
1403
|
-
props:
|
|
1601
|
+
props: K,
|
|
1404
1602
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1405
1603
|
setup(e, t) {
|
|
1406
|
-
const
|
|
1407
|
-
dataSource:
|
|
1604
|
+
const n = g(), l = g(), u = g(e.disabled || e.readonly), o = g(e.enableClear), c = g(e.enableSearch), F = g(e.readonly), {
|
|
1605
|
+
dataSource: T,
|
|
1408
1606
|
displayText: b,
|
|
1409
|
-
editable:
|
|
1410
|
-
modelValue:
|
|
1411
|
-
getItemsByDisplayText:
|
|
1412
|
-
getItemsByValue:
|
|
1413
|
-
beforeOpenList:
|
|
1414
|
-
} =
|
|
1415
|
-
|
|
1416
|
-
const
|
|
1417
|
-
function
|
|
1418
|
-
!
|
|
1607
|
+
editable: I,
|
|
1608
|
+
modelValue: y,
|
|
1609
|
+
getItemsByDisplayText: p,
|
|
1610
|
+
getItemsByValue: C,
|
|
1611
|
+
beforeOpenList: x
|
|
1612
|
+
} = Zt(e, t), V = g(e.dropDownIcon);
|
|
1613
|
+
V.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (V.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
1614
|
+
const i = R(() => e.multiSelect), r = R(() => l.value ? l.value.elementRef.getBoundingClientRect().width : 0);
|
|
1615
|
+
function a() {
|
|
1616
|
+
!i.value && l.value && l.value.hidePopup();
|
|
1419
1617
|
}
|
|
1420
|
-
function
|
|
1421
|
-
b.value =
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1618
|
+
function s(h) {
|
|
1619
|
+
b.value = h.map((A) => A[e.textField]).join(e.separator) || y.value;
|
|
1620
|
+
let w = "";
|
|
1621
|
+
h.length === 1 ? w = h[0][e.valueField] : w = h.map((A) => A[e.valueField]).join(e.separator), y.value !== w && (y.value = w, t.emit("update:modelValue", y.value), t.emit("change", h, y.value));
|
|
1424
1622
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1623
|
+
function S() {
|
|
1624
|
+
const h = C(y.value);
|
|
1625
|
+
s(h);
|
|
1428
1626
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1627
|
+
function v() {
|
|
1628
|
+
F.value || b.value;
|
|
1431
1629
|
}
|
|
1432
|
-
function
|
|
1433
|
-
var
|
|
1434
|
-
|
|
1630
|
+
function f(h) {
|
|
1631
|
+
var w;
|
|
1632
|
+
y.value = "", (w = n.value) == null || w.activeRowById(""), t.emit("clear");
|
|
1435
1633
|
}
|
|
1436
|
-
function
|
|
1437
|
-
var
|
|
1438
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
1634
|
+
function O(h) {
|
|
1635
|
+
var w, A;
|
|
1636
|
+
e.enableSearch && e.enableHighlightSearch && ((w = n.value) == null || w.search(h)), (A = n.value) == null || A.activeRowById(h), t.emit("change", [y.value], y.value);
|
|
1439
1637
|
}
|
|
1440
|
-
function
|
|
1638
|
+
function k(h) {
|
|
1441
1639
|
if (e.multiSelect) {
|
|
1442
|
-
const
|
|
1640
|
+
const w = p(h);
|
|
1443
1641
|
e.viewType;
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
} else
|
|
1642
|
+
const M = w.map((_) => _[e.idField || e.valueField]).join(e.separator);
|
|
1643
|
+
y.value !== M && (y.value = M, t.emit("update:modelValue", y.value), t.emit("change", w, y.value));
|
|
1644
|
+
} else h !== y.value && (y.value = h, t.emit("update:modelValue", y.value), t.emit("change", [], h));
|
|
1447
1645
|
}
|
|
1448
|
-
function
|
|
1646
|
+
function m() {
|
|
1449
1647
|
return b.value;
|
|
1450
1648
|
}
|
|
1451
|
-
function
|
|
1649
|
+
function B(h) {
|
|
1452
1650
|
const {
|
|
1453
|
-
value:
|
|
1454
|
-
} =
|
|
1455
|
-
|
|
1651
|
+
value: w
|
|
1652
|
+
} = h.target;
|
|
1653
|
+
O(w), t.emit("input", w);
|
|
1456
1654
|
}
|
|
1457
|
-
function
|
|
1458
|
-
|
|
1655
|
+
function H() {
|
|
1656
|
+
l.value.hidePopup();
|
|
1459
1657
|
}
|
|
1460
|
-
function E(
|
|
1461
|
-
|
|
1658
|
+
function E(h) {
|
|
1659
|
+
T.value = h;
|
|
1462
1660
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1661
|
+
function G() {
|
|
1662
|
+
return T.value;
|
|
1465
1663
|
}
|
|
1466
1664
|
const P = {
|
|
1467
|
-
getDisplayText:
|
|
1468
|
-
hidePopup:
|
|
1665
|
+
getDisplayText: m,
|
|
1666
|
+
hidePopup: H,
|
|
1469
1667
|
updateDataSource: E,
|
|
1470
|
-
getData:
|
|
1668
|
+
getData: G
|
|
1471
1669
|
};
|
|
1472
|
-
return t.expose(P), j([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
1473
|
-
|
|
1474
|
-
}), () =>
|
|
1475
|
-
ref:
|
|
1670
|
+
return t.expose(P), j([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, w, A, M, _]) => {
|
|
1671
|
+
u.value = h, I.value = w, o.value = A, c.value = M, F.value = _;
|
|
1672
|
+
}), () => d(at, {
|
|
1673
|
+
ref: l,
|
|
1476
1674
|
id: e.id,
|
|
1477
|
-
disable:
|
|
1478
|
-
readonly:
|
|
1675
|
+
disable: u.value,
|
|
1676
|
+
readonly: F.value,
|
|
1479
1677
|
forcePlaceholder: e.forcePlaceholder,
|
|
1480
|
-
editable:
|
|
1481
|
-
buttonContent:
|
|
1482
|
-
placeholder: e.placeholder === "请选择" ?
|
|
1483
|
-
enableClear:
|
|
1678
|
+
editable: I.value,
|
|
1679
|
+
buttonContent: V.value,
|
|
1680
|
+
placeholder: e.placeholder === "请选择" ? te.getLocaleValue("comboList.placeholder") : e.placeholder,
|
|
1681
|
+
enableClear: o.value,
|
|
1484
1682
|
maxLength: e.maxLength,
|
|
1485
1683
|
tabIndex: e.tabIndex,
|
|
1486
1684
|
enableTitle: e.enableTitle,
|
|
1487
1685
|
multiSelect: e.multiSelect,
|
|
1488
1686
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1489
1687
|
modelValue: b.value,
|
|
1490
|
-
"onUpdate:modelValue": (
|
|
1688
|
+
"onUpdate:modelValue": (h) => b.value = h,
|
|
1491
1689
|
focusOnCreated: e.focusOnCreated,
|
|
1492
1690
|
selectOnCreated: e.selectOnCreated,
|
|
1493
|
-
onClear:
|
|
1494
|
-
onClick:
|
|
1495
|
-
onChange:
|
|
1496
|
-
onBlur:
|
|
1497
|
-
onInput:
|
|
1498
|
-
beforeOpen:
|
|
1691
|
+
onClear: f,
|
|
1692
|
+
onClick: v,
|
|
1693
|
+
onChange: k,
|
|
1694
|
+
onBlur: S,
|
|
1695
|
+
onInput: B,
|
|
1696
|
+
beforeOpen: x,
|
|
1499
1697
|
placement: e.placement,
|
|
1500
1698
|
popupMinWidth: e.minPanelWidth,
|
|
1501
1699
|
popupClass: "f-combo-list-wrapper",
|
|
1502
1700
|
popupOnClick: e.popupOnClick,
|
|
1503
1701
|
limitContentBySpace: !0
|
|
1504
1702
|
}, {
|
|
1505
|
-
default: () => [
|
|
1506
|
-
ref:
|
|
1703
|
+
default: () => [d(Qt, {
|
|
1704
|
+
ref: n,
|
|
1507
1705
|
idField: e.idField,
|
|
1508
1706
|
valueField: e.valueField,
|
|
1509
1707
|
textField: e.textField,
|
|
1510
1708
|
titleField: e.titleField,
|
|
1511
|
-
dataSource:
|
|
1512
|
-
selectedValues:
|
|
1709
|
+
dataSource: T.value,
|
|
1710
|
+
selectedValues: y.value,
|
|
1513
1711
|
separator: e.separator,
|
|
1514
1712
|
multiSelect: e.multiSelect,
|
|
1515
|
-
enableSearch:
|
|
1713
|
+
enableSearch: c.value,
|
|
1516
1714
|
maxHeight: e.maxHeight,
|
|
1517
1715
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1518
|
-
width: e.fitEditor ?
|
|
1519
|
-
onSelectionChange: (
|
|
1520
|
-
|
|
1716
|
+
width: e.fitEditor ? r.value : void 0,
|
|
1717
|
+
onSelectionChange: (h) => {
|
|
1718
|
+
s(h), a();
|
|
1521
1719
|
}
|
|
1522
1720
|
}, null)]
|
|
1523
1721
|
});
|
|
1524
1722
|
}
|
|
1525
|
-
}),
|
|
1526
|
-
readonly: {}
|
|
1527
|
-
});
|
|
1528
|
-
ce(de, Z, Q, ee);
|
|
1529
|
-
const oe = {
|
|
1723
|
+
}), ue = {
|
|
1530
1724
|
convertFrom: (e, t) => (e.editor.remote || {})[t],
|
|
1531
|
-
convertTo: (e, t,
|
|
1532
|
-
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] =
|
|
1725
|
+
convertTo: (e, t, n) => {
|
|
1726
|
+
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] = n;
|
|
1533
1727
|
}
|
|
1534
1728
|
};
|
|
1535
|
-
class
|
|
1536
|
-
constructor(t,
|
|
1537
|
-
super(t,
|
|
1729
|
+
class en extends ut {
|
|
1730
|
+
constructor(t, n) {
|
|
1731
|
+
super(t, n);
|
|
1538
1732
|
}
|
|
1539
1733
|
getCommonEditorProperties(t) {
|
|
1540
|
-
var
|
|
1734
|
+
var n, l, u;
|
|
1541
1735
|
return {
|
|
1542
1736
|
viewType: {
|
|
1543
|
-
visible: !!((
|
|
1737
|
+
visible: !!((n = t.editor) != null && n.multiSelect),
|
|
1544
1738
|
description: "数据展示类型,有标签和文本两种方式",
|
|
1545
1739
|
title: "数据展示类型",
|
|
1546
1740
|
type: "enum",
|
|
@@ -1553,7 +1747,7 @@ class jt extends at {
|
|
|
1553
1747
|
refreshPanelAfterChanged: !0
|
|
1554
1748
|
},
|
|
1555
1749
|
separator: {
|
|
1556
|
-
visible: !!((
|
|
1750
|
+
visible: !!((l = t.editor) != null && l.multiSelect) && ((u = t.editor) == null ? void 0 : u.viewType) === "text",
|
|
1557
1751
|
description: "下拉列表启用多选且数据展示类型为文本时的分隔符",
|
|
1558
1752
|
title: "分隔符",
|
|
1559
1753
|
type: "enum",
|
|
@@ -1583,14 +1777,15 @@ class jt extends at {
|
|
|
1583
1777
|
};
|
|
1584
1778
|
}
|
|
1585
1779
|
getEditorProperties(t) {
|
|
1586
|
-
var i,
|
|
1587
|
-
const
|
|
1588
|
-
let
|
|
1589
|
-
if (((
|
|
1590
|
-
const
|
|
1591
|
-
(
|
|
1780
|
+
var T, b, I, y, p, C, x, V, i, r, a, s;
|
|
1781
|
+
const n = this;
|
|
1782
|
+
let l = "";
|
|
1783
|
+
if (((T = t == null ? void 0 : t.binding) == null ? void 0 : T.type) === "Form") {
|
|
1784
|
+
const S = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1785
|
+
(b = S == null ? void 0 : S.schemaField) != null && b.type && (l = S.schemaField.type.$type);
|
|
1592
1786
|
}
|
|
1593
|
-
|
|
1787
|
+
const u = this.getPropertyEditorParams(t, ["Variable"]), o = !t.editor.dataSourceType || t.editor.dataSourceType === "static", c = ((y = (I = this.designViewModelField) == null ? void 0 : I.type) == null ? void 0 : y.$type) === Y.StringType && ((p = t.editor) == null ? void 0 : p.type) === "combo-list" && ((C = t.editor) == null ? void 0 : C.dataSourceType) === "dynamic" && !((V = (x = t.editor) == null ? void 0 : x.remote) != null && V.url) && !((i = t.editor) != null && i.multiSelect);
|
|
1788
|
+
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
1594
1789
|
// enableSearch: {
|
|
1595
1790
|
// description: "编辑状态下启用搜索",
|
|
1596
1791
|
// title: "允许编辑",
|
|
@@ -1614,21 +1809,33 @@ class jt extends at {
|
|
|
1614
1809
|
},
|
|
1615
1810
|
refreshPanelAfterChanged: !0
|
|
1616
1811
|
},
|
|
1812
|
+
dataSource: {
|
|
1813
|
+
description: "动态数据源绑定变量",
|
|
1814
|
+
visible: c,
|
|
1815
|
+
title: "数据",
|
|
1816
|
+
editor: {
|
|
1817
|
+
...u,
|
|
1818
|
+
controlName: "",
|
|
1819
|
+
enableClear: !0
|
|
1820
|
+
},
|
|
1821
|
+
refreshPanelAfterChanged: !0
|
|
1822
|
+
},
|
|
1617
1823
|
data: {
|
|
1618
1824
|
description: "",
|
|
1619
1825
|
title: "数据",
|
|
1620
1826
|
type: "array",
|
|
1621
|
-
visible:
|
|
1622
|
-
...
|
|
1827
|
+
visible: o,
|
|
1828
|
+
...n.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
1623
1829
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1624
1830
|
refreshPanelAfterChanged: !0
|
|
1625
1831
|
},
|
|
1626
1832
|
url: {
|
|
1627
|
-
visible: t.editor.dataSourceType === "dynamic",
|
|
1628
|
-
$converter:
|
|
1833
|
+
visible: t.editor.dataSourceType === "dynamic" && !((r = t.editor) != null && r.dataSource),
|
|
1834
|
+
$converter: ue,
|
|
1629
1835
|
description: "",
|
|
1630
1836
|
title: "服务端API",
|
|
1631
|
-
type: "string"
|
|
1837
|
+
type: "string",
|
|
1838
|
+
refreshPanelAfterChanged: !0
|
|
1632
1839
|
},
|
|
1633
1840
|
// method: {
|
|
1634
1841
|
// visible: propertyData.editor.dataSourceType === "dynamic",
|
|
@@ -1647,7 +1854,7 @@ class jt extends at {
|
|
|
1647
1854
|
// },
|
|
1648
1855
|
body: {
|
|
1649
1856
|
visible: !1,
|
|
1650
|
-
$converter:
|
|
1857
|
+
$converter: ue,
|
|
1651
1858
|
description: "",
|
|
1652
1859
|
title: "服务端API参数",
|
|
1653
1860
|
type: "string"
|
|
@@ -1667,7 +1874,8 @@ class jt extends at {
|
|
|
1667
1874
|
multiSelect: {
|
|
1668
1875
|
description: "",
|
|
1669
1876
|
title: "启用多选",
|
|
1670
|
-
visible: !
|
|
1877
|
+
visible: !l || l === "StringType",
|
|
1878
|
+
readonly: ((a = t.editor) == null ? void 0 : a.dataSourceType) === "dynamic" && !!((s = t.editor) != null && s.dataSource),
|
|
1671
1879
|
type: "boolean",
|
|
1672
1880
|
refreshPanelAfterChanged: !0
|
|
1673
1881
|
},
|
|
@@ -1683,33 +1891,38 @@ class jt extends at {
|
|
|
1683
1891
|
}
|
|
1684
1892
|
},
|
|
1685
1893
|
...this.getCommonEditorProperties(t)
|
|
1686
|
-
}, (
|
|
1687
|
-
if (!
|
|
1894
|
+
}, (S, v) => {
|
|
1895
|
+
if (!S || !v.editor)
|
|
1688
1896
|
return;
|
|
1689
|
-
const
|
|
1690
|
-
switch (
|
|
1897
|
+
const f = this;
|
|
1898
|
+
switch (S.propertyID) {
|
|
1691
1899
|
case "dataSourceType": {
|
|
1692
|
-
|
|
1900
|
+
S.propertyValue === "static" ? (v.editor.valueField = "value", v.editor.textField = "name", v.editor.remote = null) : S.propertyValue === "dynamic" && (v.editor.remote = { method: "GET" }, v.editor.valueField = "value", v.editor.textField = "name");
|
|
1693
1901
|
break;
|
|
1694
1902
|
}
|
|
1695
1903
|
case "data": {
|
|
1696
|
-
!
|
|
1904
|
+
!f.checkEnumDataReadonly(v) && v.formatter && (v.formatter.data = [...S.propertyValue]);
|
|
1697
1905
|
break;
|
|
1698
1906
|
}
|
|
1699
|
-
case "viewType":
|
|
1700
|
-
|
|
1907
|
+
case "viewType": {
|
|
1908
|
+
S.propertyValue === "tag" && (v.editor.editable = !1);
|
|
1909
|
+
break;
|
|
1910
|
+
}
|
|
1911
|
+
case "dataSource":
|
|
1912
|
+
f.afterMutilEditorChanged(v, S);
|
|
1701
1913
|
}
|
|
1702
1914
|
});
|
|
1703
1915
|
}
|
|
1704
|
-
getGridFieldEdtiorProperties(t,
|
|
1705
|
-
var
|
|
1706
|
-
const
|
|
1707
|
-
let
|
|
1708
|
-
if (((
|
|
1709
|
-
const
|
|
1710
|
-
(
|
|
1916
|
+
getGridFieldEdtiorProperties(t, n) {
|
|
1917
|
+
var T, b, I, y, p, C, x, V, i, r, a, s, S;
|
|
1918
|
+
const l = this;
|
|
1919
|
+
let u = "";
|
|
1920
|
+
if (((T = t == null ? void 0 : t.binding) == null ? void 0 : T.type) === "Form") {
|
|
1921
|
+
const v = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1922
|
+
(b = v == null ? void 0 : v.schemaField) != null && b.type && (u = v.schemaField.type.$type);
|
|
1711
1923
|
}
|
|
1712
|
-
|
|
1924
|
+
const o = ((y = (I = this.designViewModelField) == null ? void 0 : I.type) == null ? void 0 : y.$type) === Y.StringType && ((p = t.editor) == null ? void 0 : p.type) === "combo-list" && ((C = t.editor) == null ? void 0 : C.dataSourceType) === "dynamic" && !((x = t.editor) != null && x.multiSelect), c = this.getPropertyEditorParams(t, ["Variable"]);
|
|
1925
|
+
return l.getComponentConfig(t, { type: "combo-list" }, {
|
|
1713
1926
|
// editable: {
|
|
1714
1927
|
// description: "",
|
|
1715
1928
|
// title: "允许编辑",
|
|
@@ -1721,25 +1934,36 @@ class jt extends at {
|
|
|
1721
1934
|
title: "启用清空",
|
|
1722
1935
|
type: "boolean"
|
|
1723
1936
|
},
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1937
|
+
dataSourceType: {
|
|
1938
|
+
description: "",
|
|
1939
|
+
title: "数据源类型",
|
|
1940
|
+
type: "enum",
|
|
1941
|
+
editor: {
|
|
1942
|
+
default: "static",
|
|
1943
|
+
data: [
|
|
1944
|
+
{ id: "static", name: "静态" },
|
|
1945
|
+
{ id: "dynamic", name: "动态" }
|
|
1946
|
+
]
|
|
1947
|
+
},
|
|
1948
|
+
refreshPanelAfterChanged: !0
|
|
1949
|
+
},
|
|
1950
|
+
dataSource: {
|
|
1951
|
+
description: "动态数据源绑定变量",
|
|
1952
|
+
visible: o,
|
|
1953
|
+
title: "数据",
|
|
1954
|
+
editor: {
|
|
1955
|
+
...c,
|
|
1956
|
+
controlName: "",
|
|
1957
|
+
enableClear: !0
|
|
1958
|
+
},
|
|
1959
|
+
refreshPanelAfterChanged: !0
|
|
1960
|
+
},
|
|
1737
1961
|
data: {
|
|
1738
1962
|
description: "",
|
|
1739
1963
|
title: "数据",
|
|
1740
1964
|
type: "array",
|
|
1741
|
-
visible: !((
|
|
1742
|
-
...
|
|
1965
|
+
visible: !((V = t.editor) != null && V.dataSourceType) || ((i = t.editor) == null ? void 0 : i.dataSourceType) === "static",
|
|
1966
|
+
...l.getItemCollectionEditor(t, (r = t.editor) == null ? void 0 : r.valueField, (a = t.editor) == null ? void 0 : a.textField),
|
|
1743
1967
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1744
1968
|
refreshPanelAfterChanged: !0
|
|
1745
1969
|
},
|
|
@@ -1758,7 +1982,8 @@ class jt extends at {
|
|
|
1758
1982
|
multiSelect: {
|
|
1759
1983
|
description: "",
|
|
1760
1984
|
title: "启用多选",
|
|
1761
|
-
visible:
|
|
1985
|
+
visible: u === "StringType",
|
|
1986
|
+
readonly: ((s = t.editor) == null ? void 0 : s.dataSourceType) === "dynamic" && !!((S = t.editor) != null && S.dataSource),
|
|
1762
1987
|
type: "boolean",
|
|
1763
1988
|
refreshPanelAfterChanged: !0
|
|
1764
1989
|
},
|
|
@@ -1774,33 +1999,35 @@ class jt extends at {
|
|
|
1774
1999
|
}
|
|
1775
2000
|
},
|
|
1776
2001
|
...this.getCommonEditorProperties(t)
|
|
1777
|
-
}, (
|
|
1778
|
-
if (!
|
|
2002
|
+
}, (v, f) => {
|
|
2003
|
+
if (!v || !f.editor)
|
|
1779
2004
|
return;
|
|
1780
2005
|
const O = this;
|
|
1781
|
-
switch (
|
|
2006
|
+
switch (v.propertyID) {
|
|
1782
2007
|
case "dataSourceType": {
|
|
1783
|
-
|
|
2008
|
+
v.propertyValue === "static" ? (f.editor.valueField = "value", f.editor.textField = "name", f.editor.remote = null) : v.propertyValue === "dynamic" && (f.editor.remote = { method: "GET" }, f.editor.valueField = "value", f.editor.textField = "name");
|
|
1784
2009
|
break;
|
|
1785
2010
|
}
|
|
1786
2011
|
case "data": {
|
|
1787
|
-
!O.checkEnumDataReadonly(
|
|
2012
|
+
!O.checkEnumDataReadonly(f) && f.formatter && (f.formatter.data = [...v.propertyValue]);
|
|
1788
2013
|
break;
|
|
1789
2014
|
}
|
|
2015
|
+
case "dataSource":
|
|
2016
|
+
O.afterMutilEditorChanged(f, v);
|
|
1790
2017
|
}
|
|
1791
2018
|
});
|
|
1792
2019
|
}
|
|
1793
|
-
setEditorPropertyRelates(t,
|
|
1794
|
-
if (!t || !
|
|
2020
|
+
setEditorPropertyRelates(t, n, l) {
|
|
2021
|
+
if (!t || !n.editor)
|
|
1795
2022
|
return;
|
|
1796
|
-
const
|
|
2023
|
+
const u = this;
|
|
1797
2024
|
switch (t.propertyID) {
|
|
1798
2025
|
case "dataSourceType": {
|
|
1799
|
-
t.propertyValue === "static" && (
|
|
2026
|
+
t.propertyValue === "static" && (n.editor.valueField = "value", n.editor.textField = "name", n.editor.remote = {});
|
|
1800
2027
|
break;
|
|
1801
2028
|
}
|
|
1802
2029
|
case "data": {
|
|
1803
|
-
!
|
|
2030
|
+
!u.checkEnumDataReadonly(n) && n.formatter && (n.formatter.data = [...t.propertyValue]);
|
|
1804
2031
|
break;
|
|
1805
2032
|
}
|
|
1806
2033
|
}
|
|
@@ -1808,11 +2035,11 @@ class jt extends at {
|
|
|
1808
2035
|
/**
|
|
1809
2036
|
* 切换绑定属性
|
|
1810
2037
|
*/
|
|
1811
|
-
changeBindingField(t,
|
|
1812
|
-
var
|
|
1813
|
-
super.changeBindingField(t,
|
|
1814
|
-
const
|
|
1815
|
-
t.editor && ((
|
|
2038
|
+
changeBindingField(t, n, l) {
|
|
2039
|
+
var o;
|
|
2040
|
+
super.changeBindingField(t, n);
|
|
2041
|
+
const u = l;
|
|
2042
|
+
t.editor && ((o = u == null ? void 0 : u.type) == null ? void 0 : o.$type) === Y.EnumType && (t.editor.data = u.type.enumValues || []);
|
|
1816
2043
|
}
|
|
1817
2044
|
/**
|
|
1818
2045
|
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
@@ -1821,9 +2048,9 @@ class jt extends at {
|
|
|
1821
2048
|
* @param showPosition 面板展示位置
|
|
1822
2049
|
* @param customEvent 输入控件特有的事件配置
|
|
1823
2050
|
*/
|
|
1824
|
-
getEventPropertyConfig(t,
|
|
1825
|
-
const
|
|
1826
|
-
let
|
|
2051
|
+
getEventPropertyConfig(t, n = "card", l, u) {
|
|
2052
|
+
const o = this;
|
|
2053
|
+
let c = [
|
|
1827
2054
|
{
|
|
1828
2055
|
label: "onChange",
|
|
1829
2056
|
name: "值变化事件"
|
|
@@ -1837,42 +2064,42 @@ class jt extends at {
|
|
|
1837
2064
|
name: "下拉面板前事件"
|
|
1838
2065
|
}
|
|
1839
2066
|
];
|
|
1840
|
-
|
|
1841
|
-
const
|
|
2067
|
+
l && (c = c.concat(l)), this.appendFieldValueChangeEvents(t, c);
|
|
2068
|
+
const F = o.eventsEditorUtils.formProperties(t, o.viewModelId, c);
|
|
1842
2069
|
return {
|
|
1843
2070
|
title: "事件",
|
|
1844
2071
|
hideTitle: !0,
|
|
1845
|
-
properties:
|
|
2072
|
+
properties: o.createBaseEventProperty(F),
|
|
1846
2073
|
tabId: "commands",
|
|
1847
2074
|
tabName: "交互",
|
|
1848
|
-
setPropertyRelates(
|
|
1849
|
-
const
|
|
1850
|
-
delete t[
|
|
1851
|
-
const
|
|
1852
|
-
|
|
2075
|
+
setPropertyRelates(I, y) {
|
|
2076
|
+
const p = I.propertyValue;
|
|
2077
|
+
delete t[o.viewModelId], p && (p.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, p.events, p)), u && u(I, y, p);
|
|
2078
|
+
const C = o.designViewModelUtils.getDgViewModel(o.viewModelId);
|
|
2079
|
+
C && o.designViewModelField && C.changeField(o.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged }), t.editor.beforeOpen !== t.beforeOpen && (t.editor.beforeOpen = t.beforeOpen), t.editor.onChange !== t.onChange && (t.editor.onChange = t.onChange), t.editor.onClear !== t.onClear && (t.editor.onClear = t.onClear);
|
|
1853
2080
|
}
|
|
1854
2081
|
};
|
|
1855
2082
|
}
|
|
1856
2083
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const
|
|
1859
|
-
function
|
|
1860
|
-
return new
|
|
2084
|
+
function tn(e, t) {
|
|
2085
|
+
const n = e.schema;
|
|
2086
|
+
function l(u, o) {
|
|
2087
|
+
return new en(u, t).getPropertyConfig(n, o);
|
|
1861
2088
|
}
|
|
1862
2089
|
return {
|
|
1863
|
-
getPropsConfig:
|
|
2090
|
+
getPropsConfig: l
|
|
1864
2091
|
};
|
|
1865
2092
|
}
|
|
1866
|
-
const
|
|
2093
|
+
const nn = /* @__PURE__ */ N({
|
|
1867
2094
|
name: "FComboListDesign",
|
|
1868
|
-
props:
|
|
2095
|
+
props: Xt,
|
|
1869
2096
|
emits: ["clear", "update:modelValue", "change"],
|
|
1870
2097
|
setup(e, t) {
|
|
1871
|
-
const
|
|
1872
|
-
return
|
|
1873
|
-
|
|
1874
|
-
}), t.expose(
|
|
1875
|
-
ref:
|
|
2098
|
+
const n = g(), l = Q("designer-host-service"), u = Q("design-item-context"), o = tn(u, l), c = fe(n, u, o);
|
|
2099
|
+
return ee(() => {
|
|
2100
|
+
n.value.componentInstance = c;
|
|
2101
|
+
}), t.expose(c.value), () => d(rt, {
|
|
2102
|
+
ref: n,
|
|
1876
2103
|
buttonContent: e.dropDownIcon,
|
|
1877
2104
|
readonly: !0,
|
|
1878
2105
|
editable: !1,
|
|
@@ -1882,125 +2109,238 @@ const Nt = /* @__PURE__ */ _({
|
|
|
1882
2109
|
}, null);
|
|
1883
2110
|
}
|
|
1884
2111
|
});
|
|
1885
|
-
|
|
1886
|
-
e["combo-list"] =
|
|
2112
|
+
q.register = (e, t, n, l, u) => {
|
|
2113
|
+
e["combo-list"] = q, t["combo-list"] = pe(u), l["combo-list"] = { callbackResolver: Yt };
|
|
1887
2114
|
};
|
|
1888
|
-
|
|
1889
|
-
e["combo-list"] =
|
|
2115
|
+
q.registerDesigner = (e, t, n, l) => {
|
|
2116
|
+
e["combo-list"] = nn, t["combo-list"] = pe(l);
|
|
1890
2117
|
};
|
|
1891
|
-
const
|
|
2118
|
+
const D = $e(q), J = /* @__PURE__ */ N({
|
|
1892
2119
|
name: "FOrder",
|
|
1893
|
-
props:
|
|
2120
|
+
props: le,
|
|
1894
2121
|
emits: ["change"],
|
|
1895
2122
|
setup(e, t) {
|
|
1896
|
-
const
|
|
2123
|
+
const n = g(), l = g(e.items);
|
|
2124
|
+
function u() {
|
|
2125
|
+
var s;
|
|
2126
|
+
const a = Array.isArray(e.items) ? e.items : [];
|
|
2127
|
+
l.value = [...a], (s = n.value) == null || s.updateDataSource(l.value);
|
|
2128
|
+
}
|
|
2129
|
+
j(() => e.items, u);
|
|
2130
|
+
const o = g("排序列"), c = g("排序方式"), F = g("添加排序列"), T = [{
|
|
2131
|
+
id: "asc",
|
|
2132
|
+
name: "升序"
|
|
2133
|
+
}, {
|
|
2134
|
+
id: "desc",
|
|
2135
|
+
name: "降序"
|
|
2136
|
+
}], b = g(/* @__PURE__ */ new Map());
|
|
2137
|
+
function I() {
|
|
2138
|
+
const a = l.value.map((s) => [s.id, !0]);
|
|
2139
|
+
b.value = new Map(a);
|
|
2140
|
+
}
|
|
2141
|
+
I();
|
|
2142
|
+
const y = R(() => e.dataSource.map((a) => (a.disabled = b.value.has(a.id), a))), p = R(() => ({
|
|
2143
|
+
"f-order": !0
|
|
2144
|
+
}));
|
|
2145
|
+
function C(a) {
|
|
2146
|
+
l.value = l.value.filter((s) => s.id !== a.id), I(), t.emit("change", l.value);
|
|
2147
|
+
}
|
|
2148
|
+
function x() {
|
|
2149
|
+
l.value = [...l.value, {
|
|
2150
|
+
id: Date.now().toString(),
|
|
2151
|
+
name: "",
|
|
2152
|
+
order: "asc"
|
|
2153
|
+
}], I(), t.emit("change", l.value);
|
|
2154
|
+
}
|
|
2155
|
+
function V(a) {
|
|
2156
|
+
if (a && a.length === 1) {
|
|
2157
|
+
const s = a[0], S = l.value.find((v) => v.id === s.id);
|
|
2158
|
+
S && (S.name = s.name);
|
|
2159
|
+
}
|
|
2160
|
+
I(), t.emit("change", l.value);
|
|
2161
|
+
}
|
|
2162
|
+
function i(a) {
|
|
2163
|
+
if (a && a.length) {
|
|
2164
|
+
const s = /* @__PURE__ */ new Map();
|
|
2165
|
+
a.reduce((S, v) => (S.set(v.id, v), S), s), l.value = a.map((S) => s.get(S.id)), t.emit("change", l.value);
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
1897
2168
|
function r() {
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
2169
|
+
return d(me, {
|
|
2170
|
+
ref: n,
|
|
2171
|
+
style: "flex:1",
|
|
2172
|
+
data: l.value,
|
|
2173
|
+
draggable: !0,
|
|
2174
|
+
view: "DraggableView",
|
|
2175
|
+
"keep-order": !0,
|
|
2176
|
+
itemClass: "f-order-item",
|
|
2177
|
+
onRemoveItem: C,
|
|
2178
|
+
onChange: i
|
|
2179
|
+
}, {
|
|
2180
|
+
header: () => d("div", {
|
|
2181
|
+
class: "f-order-header"
|
|
2182
|
+
}, [d("span", {
|
|
2183
|
+
class: "f-order-header-order-field"
|
|
2184
|
+
}, [o.value]), d("span", {
|
|
2185
|
+
class: "f-order-header-order-type"
|
|
2186
|
+
}, [c.value])]),
|
|
2187
|
+
itemContent: (a) => d("div", {
|
|
2188
|
+
class: "f-order-item-content"
|
|
2189
|
+
}, [d(D, {
|
|
2190
|
+
class: "f-order-item-content-order-field",
|
|
2191
|
+
data: y.value,
|
|
2192
|
+
valueField: "id",
|
|
2193
|
+
textField: "name",
|
|
2194
|
+
idField: "id",
|
|
2195
|
+
modelValue: a.raw.id,
|
|
2196
|
+
"onUpdate:modelValue": (s) => a.raw.id = s,
|
|
2197
|
+
onChange: V,
|
|
2198
|
+
onClear: V
|
|
2199
|
+
}, null), d(D, {
|
|
2200
|
+
class: "f-order-item-content-order-type",
|
|
2201
|
+
data: T,
|
|
2202
|
+
valueField: "id",
|
|
2203
|
+
textField: "name",
|
|
2204
|
+
idField: "id",
|
|
2205
|
+
modelValue: a.raw.order,
|
|
2206
|
+
"onUpdate:modelValue": (s) => a.raw.order = s,
|
|
2207
|
+
onChange: V
|
|
2208
|
+
}, null)]),
|
|
2209
|
+
footer: () => d("div", {
|
|
2210
|
+
class: "f-order-footer"
|
|
2211
|
+
}, [d(ve, {
|
|
2212
|
+
type: "link",
|
|
2213
|
+
class: "f-order-add-button",
|
|
2214
|
+
onClick: x
|
|
2215
|
+
}, {
|
|
2216
|
+
default: () => d(U, null, [d("span", {
|
|
2217
|
+
class: "f-order-add-icon"
|
|
2218
|
+
}, [d("i", {
|
|
2219
|
+
class: "f-icon f-icon-add"
|
|
2220
|
+
}, null)]), F.value])
|
|
2221
|
+
})])
|
|
2222
|
+
});
|
|
1901
2223
|
}
|
|
1902
|
-
|
|
1903
|
-
|
|
2224
|
+
return () => d("div", {
|
|
2225
|
+
class: p.value
|
|
2226
|
+
}, [r()]);
|
|
2227
|
+
}
|
|
2228
|
+
}), ln = /* @__PURE__ */ N({
|
|
2229
|
+
name: "FOrderDesign",
|
|
2230
|
+
props: le,
|
|
2231
|
+
emits: ["change"],
|
|
2232
|
+
setup(e, t) {
|
|
2233
|
+
const n = g(e.items), l = g("排序列"), u = g("排序方式"), o = g("添加排序列"), c = [{
|
|
1904
2234
|
id: "asc",
|
|
1905
2235
|
name: "升序"
|
|
1906
2236
|
}, {
|
|
1907
2237
|
id: "desc",
|
|
1908
2238
|
name: "降序"
|
|
1909
|
-
}],
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
2239
|
+
}], F = g(/* @__PURE__ */ new Map()), T = g(), b = Q("design-item-context"), I = fe(T, b);
|
|
2240
|
+
ee(() => {
|
|
2241
|
+
T.value.componentInstance = I;
|
|
2242
|
+
}), t.expose(I.value);
|
|
2243
|
+
function y() {
|
|
2244
|
+
const s = n.value.map((S) => [S.id, !0]);
|
|
2245
|
+
F.value = new Map(s);
|
|
1913
2246
|
}
|
|
1914
|
-
|
|
1915
|
-
const
|
|
2247
|
+
y();
|
|
2248
|
+
const p = R(() => e.dataSource.map((s) => (s.disabled = F.value.has(s.id), s))), C = R(() => ({
|
|
1916
2249
|
"f-order": !0
|
|
1917
2250
|
}));
|
|
1918
|
-
function
|
|
1919
|
-
n.value = n.value.filter((
|
|
2251
|
+
function x(s) {
|
|
2252
|
+
n.value = n.value.filter((S) => S.id !== s.id), y(), t.emit("change", n.value);
|
|
1920
2253
|
}
|
|
1921
|
-
function
|
|
2254
|
+
function V() {
|
|
1922
2255
|
n.value = [...n.value, {
|
|
1923
2256
|
id: Date.now().toString(),
|
|
1924
2257
|
name: "",
|
|
1925
2258
|
order: "asc"
|
|
1926
|
-
}],
|
|
2259
|
+
}], y(), t.emit("change", n.value);
|
|
1927
2260
|
}
|
|
1928
|
-
function
|
|
1929
|
-
|
|
1930
|
-
const p = u[0], T = n.value.find((k) => k.id === p.id);
|
|
1931
|
-
T && (T.name = p.name);
|
|
1932
|
-
}
|
|
1933
|
-
V(), t.emit("change", n.value);
|
|
2261
|
+
function i(s) {
|
|
2262
|
+
y(), t.emit("change", n.value);
|
|
1934
2263
|
}
|
|
1935
|
-
function
|
|
1936
|
-
if (
|
|
1937
|
-
const
|
|
1938
|
-
|
|
2264
|
+
function r(s) {
|
|
2265
|
+
if (s && s.length) {
|
|
2266
|
+
const S = /* @__PURE__ */ new Map();
|
|
2267
|
+
s.reduce((v, f) => (v.set(f.id, f), v), S), n.value = s.map((v) => S.get(v.id)), t.emit("change", n.value);
|
|
1939
2268
|
}
|
|
1940
2269
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
1943
|
-
ref: a,
|
|
2270
|
+
function a() {
|
|
2271
|
+
return d(me, {
|
|
1944
2272
|
style: "flex:1",
|
|
1945
2273
|
data: n.value,
|
|
1946
2274
|
draggable: !0,
|
|
1947
2275
|
view: "DraggableView",
|
|
1948
2276
|
"keep-order": !0,
|
|
1949
2277
|
itemClass: "f-order-item",
|
|
1950
|
-
onRemoveItem:
|
|
1951
|
-
onChange:
|
|
2278
|
+
onRemoveItem: x,
|
|
2279
|
+
onChange: r
|
|
1952
2280
|
}, {
|
|
1953
|
-
header: () =>
|
|
2281
|
+
header: () => d("div", {
|
|
1954
2282
|
class: "f-order-header"
|
|
1955
|
-
}, [
|
|
2283
|
+
}, [d("span", {
|
|
1956
2284
|
class: "f-order-header-order-field"
|
|
1957
|
-
}, [
|
|
2285
|
+
}, [l.value]), d("span", {
|
|
1958
2286
|
class: "f-order-header-order-type"
|
|
1959
|
-
}, [
|
|
1960
|
-
itemContent: (
|
|
2287
|
+
}, [u.value])]),
|
|
2288
|
+
itemContent: (s) => d("div", {
|
|
1961
2289
|
class: "f-order-item-content"
|
|
1962
|
-
}, [
|
|
2290
|
+
}, [d(D, {
|
|
1963
2291
|
class: "f-order-item-content-order-field",
|
|
1964
|
-
data:
|
|
2292
|
+
data: p.value,
|
|
1965
2293
|
valueField: "id",
|
|
1966
2294
|
textField: "name",
|
|
1967
2295
|
idField: "id",
|
|
1968
|
-
modelValue:
|
|
1969
|
-
"onUpdate:modelValue": (
|
|
1970
|
-
onChange:
|
|
1971
|
-
onClear:
|
|
1972
|
-
}, null),
|
|
2296
|
+
modelValue: s.id,
|
|
2297
|
+
"onUpdate:modelValue": (S) => s.id = S,
|
|
2298
|
+
onChange: i,
|
|
2299
|
+
onClear: i
|
|
2300
|
+
}, null), d(D, {
|
|
1973
2301
|
class: "f-order-item-content-order-type",
|
|
1974
|
-
data:
|
|
2302
|
+
data: c,
|
|
1975
2303
|
valueField: "id",
|
|
1976
2304
|
textField: "name",
|
|
1977
2305
|
idField: "id",
|
|
1978
|
-
modelValue:
|
|
1979
|
-
"onUpdate:modelValue": (
|
|
1980
|
-
onChange:
|
|
2306
|
+
modelValue: s.order,
|
|
2307
|
+
"onUpdate:modelValue": (S) => s.order = S,
|
|
2308
|
+
onChange: i
|
|
1981
2309
|
}, null)]),
|
|
1982
|
-
footer: () =>
|
|
2310
|
+
footer: () => d("div", {
|
|
1983
2311
|
class: "f-order-footer"
|
|
1984
|
-
}, [
|
|
2312
|
+
}, [d(ve, {
|
|
1985
2313
|
type: "link",
|
|
1986
2314
|
class: "f-order-add-button",
|
|
1987
|
-
onClick:
|
|
2315
|
+
onClick: V
|
|
1988
2316
|
}, {
|
|
1989
|
-
default: () =>
|
|
2317
|
+
default: () => d(U, null, [d("span", {
|
|
1990
2318
|
class: "f-order-add-icon"
|
|
1991
|
-
}, [
|
|
2319
|
+
}, [d("i", {
|
|
1992
2320
|
class: "f-icon f-icon-add"
|
|
1993
|
-
}, null)]),
|
|
2321
|
+
}, null)]), o.value])
|
|
1994
2322
|
})])
|
|
1995
2323
|
});
|
|
1996
2324
|
}
|
|
1997
|
-
return () =>
|
|
1998
|
-
|
|
1999
|
-
|
|
2325
|
+
return () => d("div", {
|
|
2326
|
+
ref: T,
|
|
2327
|
+
class: C.value
|
|
2328
|
+
}, [a()]);
|
|
2329
|
+
}
|
|
2330
|
+
}), wn = {
|
|
2331
|
+
install(e) {
|
|
2332
|
+
e.component(J.name, J);
|
|
2333
|
+
},
|
|
2334
|
+
register(e, t, n, l) {
|
|
2335
|
+
e.order = J, t.order = oe;
|
|
2336
|
+
},
|
|
2337
|
+
registerDesigner(e, t, n) {
|
|
2338
|
+
e.order = ln, t.order = oe;
|
|
2000
2339
|
}
|
|
2001
|
-
}
|
|
2340
|
+
};
|
|
2002
2341
|
export {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2342
|
+
J as FOrder,
|
|
2343
|
+
wn as default,
|
|
2344
|
+
le as orderProps,
|
|
2345
|
+
oe as propsResolver
|
|
2006
2346
|
};
|